commit 1cf08781b45469ae8fcc4b09dbbc9fa69559e6f6 Author: Dan Elbert Date: Tue Jan 12 18:43:00 2016 -0600 initial commit diff --git a/.byebug_history b/.byebug_history new file mode 100644 index 0000000..611c8e2 --- /dev/null +++ b/.byebug_history @@ -0,0 +1,2 @@ +exit +current_controller diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..050c9d9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# See https://help.github.com/articles/ignoring-files for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile '~/.gitignore_global' + +# Ignore bundler config. +/.bundle + +# Ignore the default SQLite database. +/db/*.sqlite3 +/db/*.sqlite3-journal + +# Ignore all logfiles and tempfiles. +/log/* +!/log/.keep +/tmp diff --git a/.idea/.generators b/.idea/.generators new file mode 100644 index 0000000..1618976 --- /dev/null +++ b/.idea/.generators @@ -0,0 +1,8 @@ + + diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..3c2392a --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +cookbook \ No newline at end of file diff --git a/.idea/.rakeTasks b/.idea/.rakeTasks new file mode 100644 index 0000000..c6865d9 --- /dev/null +++ b/.idea/.rakeTasks @@ -0,0 +1,7 @@ + + diff --git a/.idea/cookbook.iml b/.idea/cookbook.iml new file mode 100644 index 0000000..b221936 --- /dev/null +++ b/.idea/cookbook.iml @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..f9dbfe6 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..bd3dad4 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..6564d52 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..4d34314 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,1025 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1452634238462 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.rspec b/.rspec new file mode 100644 index 0000000..83e16f8 --- /dev/null +++ b/.rspec @@ -0,0 +1,2 @@ +--color +--require spec_helper diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..e4c0be2 --- /dev/null +++ b/Gemfile @@ -0,0 +1,42 @@ +source 'https://rubygems.org' + + +# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' +gem 'rails', '4.2.5' +gem 'sqlite3' +gem 'sass-rails', '~> 5.0' +gem 'uglifier', '>= 1.3.0' + +# See https://github.com/rails/execjs#readme for more supported runtimes +gem 'therubyracer', platforms: :ruby + +# Use jquery as the JavaScript library +gem 'jquery-rails' +gem 'bootstrap-sass', '~> 3.3.6' +# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks +gem 'turbolinks' +gem 'jbuilder', '~> 2.0' + +# Use ActiveModel has_secure_password +# gem 'bcrypt', '~> 3.1.7' + +# Use Unicorn as the app server +# gem 'unicorn' + +# Use Capistrano for deployment +# gem 'capistrano-rails', group: :development + +group :development, :test do + + gem 'rspec-rails', '~> 3.4.0' + gem 'factory_girl_rails', '~> 4.5.0' + gem 'database_cleaner', '~> 1.5.1' + # Call 'byebug' anywhere in the code to stop execution and get a debugger console + gem 'byebug' +end + +group :development do + # Access an IRB console on exception pages or by using <%= console %> in views + gem 'web-console', '~> 2.0' +end + diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..0e0da76 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,190 @@ +GEM + remote: https://rubygems.org/ + specs: + actionmailer (4.2.5) + actionpack (= 4.2.5) + actionview (= 4.2.5) + activejob (= 4.2.5) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.5) + actionview (= 4.2.5) + activesupport (= 4.2.5) + rack (~> 1.6) + rack-test (~> 0.6.2) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (4.2.5) + activesupport (= 4.2.5) + builder (~> 3.1) + erubis (~> 2.7.0) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + activejob (4.2.5) + activesupport (= 4.2.5) + globalid (>= 0.3.0) + activemodel (4.2.5) + activesupport (= 4.2.5) + builder (~> 3.1) + activerecord (4.2.5) + activemodel (= 4.2.5) + activesupport (= 4.2.5) + arel (~> 6.0) + activesupport (4.2.5) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + arel (6.0.3) + autoprefixer-rails (6.2.3) + execjs + json + binding_of_caller (0.7.2) + debug_inspector (>= 0.0.1) + bootstrap-sass (3.3.6) + autoprefixer-rails (>= 5.2.1) + sass (>= 3.3.4) + builder (3.2.2) + byebug (8.2.1) + coffee-rails (4.1.1) + coffee-script (>= 2.2.0) + railties (>= 4.0.0, < 5.1.x) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.10.0) + concurrent-ruby (1.0.0) + database_cleaner (1.5.1) + debug_inspector (0.0.2) + diff-lcs (1.2.5) + erubis (2.7.0) + execjs (2.6.0) + factory_girl (4.5.0) + activesupport (>= 3.0.0) + factory_girl_rails (4.5.0) + factory_girl (~> 4.5.0) + railties (>= 3.0.0) + globalid (0.3.6) + activesupport (>= 4.1.0) + i18n (0.7.0) + jbuilder (2.4.0) + activesupport (>= 3.0.0, < 5.1) + multi_json (~> 1.2) + jquery-rails (4.0.5) + rails-dom-testing (~> 1.0) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + json (1.8.3) + libv8 (3.16.14.13) + loofah (2.0.3) + nokogiri (>= 1.5.9) + mail (2.6.3) + mime-types (>= 1.16, < 3) + mime-types (2.99) + mini_portile2 (2.0.0) + minitest (5.8.3) + multi_json (1.11.2) + nokogiri (1.6.7.1) + mini_portile2 (~> 2.0.0.rc2) + rack (1.6.4) + rack-test (0.6.3) + rack (>= 1.0) + rails (4.2.5) + actionmailer (= 4.2.5) + actionpack (= 4.2.5) + actionview (= 4.2.5) + activejob (= 4.2.5) + activemodel (= 4.2.5) + activerecord (= 4.2.5) + activesupport (= 4.2.5) + bundler (>= 1.3.0, < 2.0) + railties (= 4.2.5) + sprockets-rails + rails-deprecated_sanitizer (1.0.3) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.7) + activesupport (>= 4.2.0.beta, < 5.0) + nokogiri (~> 1.6.0) + rails-deprecated_sanitizer (>= 1.0.1) + rails-html-sanitizer (1.0.2) + loofah (~> 2.0) + railties (4.2.5) + actionpack (= 4.2.5) + activesupport (= 4.2.5) + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rake (10.4.2) + ref (2.0.0) + rspec-core (3.4.1) + rspec-support (~> 3.4.0) + rspec-expectations (3.4.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.4.0) + rspec-mocks (3.4.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.4.0) + rspec-rails (3.4.0) + actionpack (>= 3.0, < 4.3) + activesupport (>= 3.0, < 4.3) + railties (>= 3.0, < 4.3) + rspec-core (~> 3.4.0) + rspec-expectations (~> 3.4.0) + rspec-mocks (~> 3.4.0) + rspec-support (~> 3.4.0) + rspec-support (3.4.1) + sass (3.4.21) + sass-rails (5.0.4) + railties (>= 4.0.0, < 5.0) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + sprockets (3.5.2) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.0.0) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + sqlite3 (1.3.11) + therubyracer (0.12.2) + libv8 (~> 3.16.14.0) + ref + thor (0.19.1) + thread_safe (0.3.5) + tilt (2.0.2) + turbolinks (2.5.3) + coffee-rails + tzinfo (1.2.2) + thread_safe (~> 0.1) + uglifier (2.7.2) + execjs (>= 0.3.0) + json (>= 1.8.0) + web-console (2.2.1) + activemodel (>= 4.0) + binding_of_caller (>= 0.7.2) + railties (>= 4.0) + sprockets-rails (>= 2.0, < 4.0) + +PLATFORMS + ruby + +DEPENDENCIES + bootstrap-sass (~> 3.3.6) + byebug + database_cleaner (~> 1.5.1) + factory_girl_rails (~> 4.5.0) + jbuilder (~> 2.0) + jquery-rails + rails (= 4.2.5) + rspec-rails (~> 3.4.0) + sass-rails (~> 5.0) + sqlite3 + therubyracer + turbolinks + uglifier (>= 1.3.0) + web-console (~> 2.0) + +BUNDLED WITH + 1.10.6 diff --git a/README.rdoc b/README.rdoc new file mode 100644 index 0000000..dd4e97e --- /dev/null +++ b/README.rdoc @@ -0,0 +1,28 @@ +== README + +This README would normally document whatever steps are necessary to get the +application up and running. + +Things you may want to cover: + +* Ruby version + +* System dependencies + +* Configuration + +* Database creation + +* Database initialization + +* How to run the test suite + +* Services (job queues, cache servers, search engines, etc.) + +* Deployment instructions + +* ... + + +Please feel free to use a different markup language if you do not plan to run +rake doc:app. diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..ba6b733 --- /dev/null +++ b/Rakefile @@ -0,0 +1,6 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require File.expand_path('../config/application', __FILE__) + +Rails.application.load_tasks diff --git a/app/assets/images/.keep b/app/assets/images/.keep new file mode 100644 index 0000000..e69de29 diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js new file mode 100644 index 0000000..7465856 --- /dev/null +++ b/app/assets/javascripts/application.js @@ -0,0 +1,17 @@ +// This is a manifest file that'll be compiled into application.js, which will include all the files +// listed below. +// +// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, +// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. +// +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// compiled file. +// +// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details +// about supported directives. +// +//= require jquery +//= require jquery_ujs +//= require turbolinks +//= require bootstrap-sprockets +//= require_tree . diff --git a/app/assets/javascripts/flash_messages.js b/app/assets/javascripts/flash_messages.js new file mode 100644 index 0000000..3d473ad --- /dev/null +++ b/app/assets/javascripts/flash_messages.js @@ -0,0 +1,34 @@ + +var flashMessageTypeMap = { + error: "danger", + notice: "success" +}; + +function flashMessage(flashType, message) { + + var timeoutIdContainer = {}; + + if (flashMessageTypeMap[flashType]) { + flashType = flashMessageTypeMap[flashType]; + } + + var closeButton = $(" + Cookbook + + + + + +<%= render partial: 'layouts/flash_messages' %> + +
+ + <%= yield %> + +
+ + + + + \ No newline at end of file diff --git a/app/views/recipes/_form.html.erb b/app/views/recipes/_form.html.erb new file mode 100644 index 0000000..9c3b0c3 --- /dev/null +++ b/app/views/recipes/_form.html.erb @@ -0,0 +1,24 @@ +<%= form_for(@recipe) do |f| %> + + <%= render partial: 'shared/error_list', locals: {model: @recipe} %> + +

Ingredients

+ <% @recipe.recipe_ingredients.each do |ri| %> + + <%= render partial: 'recipes/editor/ingredient', locals: { recipe_ingredient: ri } %> + + <% end %> + + + +

Steps

+ <% @recipe.recipe_steps.each do |rs| %> + + <%= render partial: 'recipes/editor/step', locals: { recipe_step: rs } %> + + <% end %> + +
+ <%= f.submit class: 'btn btn-primary' %> +
+<% end %> diff --git a/app/views/recipes/edit.html.erb b/app/views/recipes/edit.html.erb new file mode 100644 index 0000000..4ba4b0c --- /dev/null +++ b/app/views/recipes/edit.html.erb @@ -0,0 +1,12 @@ +
+
+ +

Editing Recipe

+ + <%= render 'form' %> + + <%= link_to 'Show', @recipe, class: 'btn btn-primary' %> | + <%= link_to 'Back', recipes_path, class: 'btn btn-primary' %> + +
+
\ No newline at end of file diff --git a/app/views/recipes/editor/_ingredient.html.erb b/app/views/recipes/editor/_ingredient.html.erb new file mode 100644 index 0000000..e69de29 diff --git a/app/views/recipes/editor/_step.html.erb b/app/views/recipes/editor/_step.html.erb new file mode 100644 index 0000000..e69de29 diff --git a/app/views/recipes/index.html.erb b/app/views/recipes/index.html.erb new file mode 100644 index 0000000..9575635 --- /dev/null +++ b/app/views/recipes/index.html.erb @@ -0,0 +1,47 @@ +
+
+ +

Listing Recipes

+ + <% if @recipes.empty? %> +

No Recipes

+ <% else %> + + + + + + + + + + + + + + + + <% @recipes.each do |recipe| %> + + + + + + + + + + + + <% end %> + +
NameYieldsTotal TimeActive TimeCreatedModified
<%= recipe.name %><%= recipe.yields %><%= recipe.total_time %><%= recipe.active_time %><%= recipe.created_at %><%= recipe.updated_at %><%= link_to 'Show', recipe %><%= link_to 'Edit', edit_recipe_path(recipe) %><%= link_to 'Destroy', recipe, method: :delete, data: { confirm: 'Are you sure?' } %>
+ + <% end %> + +
+ + <%= link_to 'New Recipe', new_recipe_path, class: 'btn btn-default' %> + +
+
\ No newline at end of file diff --git a/app/views/recipes/index.json.jbuilder b/app/views/recipes/index.json.jbuilder new file mode 100644 index 0000000..2298d85 --- /dev/null +++ b/app/views/recipes/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array!(@recipes) do |recipe| + json.extract! recipe, :id + json.url recipe_url(recipe, format: :json) +end diff --git a/app/views/recipes/new.html.erb b/app/views/recipes/new.html.erb new file mode 100644 index 0000000..df5c075 --- /dev/null +++ b/app/views/recipes/new.html.erb @@ -0,0 +1,11 @@ +
+
+ +

New Recipe

+ + <%= render 'form' %> + + <%= link_to 'Back', recipes_path, class: 'btn btn-default' %> + +
+
\ No newline at end of file diff --git a/app/views/recipes/show.html.erb b/app/views/recipes/show.html.erb new file mode 100644 index 0000000..baf3a71 --- /dev/null +++ b/app/views/recipes/show.html.erb @@ -0,0 +1,8 @@ +
+
+ + <%= link_to 'Edit', edit_recipe_path(@recipe) %> | + <%= link_to 'Back', recipes_path %> + +
+
\ No newline at end of file diff --git a/app/views/recipes/show.json.jbuilder b/app/views/recipes/show.json.jbuilder new file mode 100644 index 0000000..4e12951 --- /dev/null +++ b/app/views/recipes/show.json.jbuilder @@ -0,0 +1 @@ +json.extract! @recipe, :id, :created_at, :updated_at diff --git a/app/views/shared/_error_list.html.erb b/app/views/shared/_error_list.html.erb new file mode 100644 index 0000000..e0564ec --- /dev/null +++ b/app/views/shared/_error_list.html.erb @@ -0,0 +1,11 @@ +<% if model.errors.any? %> +
+

<%= pluralize(model.errors.count, 'error') %> prohibited this <%= model.class.model_name.human %> from being saved:

+ + +
+<% end %> \ No newline at end of file diff --git a/bin/bundle b/bin/bundle new file mode 100755 index 0000000..66e9889 --- /dev/null +++ b/bin/bundle @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +load Gem.bin_path('bundler', 'bundle') diff --git a/bin/rails b/bin/rails new file mode 100755 index 0000000..5191e69 --- /dev/null +++ b/bin/rails @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +APP_PATH = File.expand_path('../../config/application', __FILE__) +require_relative '../config/boot' +require 'rails/commands' diff --git a/bin/rake b/bin/rake new file mode 100755 index 0000000..1724048 --- /dev/null +++ b/bin/rake @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +require_relative '../config/boot' +require 'rake' +Rake.application.run diff --git a/bin/setup b/bin/setup new file mode 100755 index 0000000..acdb2c1 --- /dev/null +++ b/bin/setup @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +require 'pathname' + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +Dir.chdir APP_ROOT do + # This script is a starting point to setup your application. + # Add necessary setup steps to this file: + + puts "== Installing dependencies ==" + system "gem install bundler --conservative" + system "bundle check || bundle install" + + # puts "\n== Copying sample files ==" + # unless File.exist?("config/database.yml") + # system "cp config/database.yml.sample config/database.yml" + # end + + puts "\n== Preparing database ==" + system "bin/rake db:setup" + + puts "\n== Removing old logs and tempfiles ==" + system "rm -f log/*" + system "rm -rf tmp/cache" + + puts "\n== Restarting application server ==" + system "touch tmp/restart.txt" +end diff --git a/config.ru b/config.ru new file mode 100644 index 0000000..bd83b25 --- /dev/null +++ b/config.ru @@ -0,0 +1,4 @@ +# This file is used by Rack-based servers to start the application. + +require ::File.expand_path('../config/environment', __FILE__) +run Rails.application diff --git a/config/application.rb b/config/application.rb new file mode 100644 index 0000000..b067e6f --- /dev/null +++ b/config/application.rb @@ -0,0 +1,26 @@ +require File.expand_path('../boot', __FILE__) + +require 'rails/all' + +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(*Rails.groups) + +module Cookbook + class Application < Rails::Application + # Settings in config/environments/* take precedence over those specified here. + # Application configuration should go into files in config/initializers + # -- all .rb files in that directory are automatically loaded. + + # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. + # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. + # config.time_zone = 'Central Time (US & Canada)' + + # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. + # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] + # config.i18n.default_locale = :de + + # Do not swallow errors in after_commit/after_rollback callbacks. + config.active_record.raise_in_transactional_callbacks = true + end +end diff --git a/config/boot.rb b/config/boot.rb new file mode 100644 index 0000000..6b750f0 --- /dev/null +++ b/config/boot.rb @@ -0,0 +1,3 @@ +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) + +require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/config/database.yml b/config/database.yml new file mode 100644 index 0000000..1c1a37c --- /dev/null +++ b/config/database.yml @@ -0,0 +1,25 @@ +# SQLite version 3.x +# gem install sqlite3 +# +# Ensure the SQLite 3 gem is defined in your Gemfile +# gem 'sqlite3' +# +default: &default + adapter: sqlite3 + pool: 5 + timeout: 5000 + +development: + <<: *default + database: db/development.sqlite3 + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + <<: *default + database: db/test.sqlite3 + +production: + <<: *default + database: db/production.sqlite3 diff --git a/config/environment.rb b/config/environment.rb new file mode 100644 index 0000000..ee8d90d --- /dev/null +++ b/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require File.expand_path('../application', __FILE__) + +# Initialize the Rails application. +Rails.application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb new file mode 100644 index 0000000..b55e214 --- /dev/null +++ b/config/environments/development.rb @@ -0,0 +1,41 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded on + # every request. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + + # Don't care if the mailer can't send. + config.action_mailer.raise_delivery_errors = false + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + + # Debug mode disables concatenation and preprocessing of assets. + # This option may cause significant delays in view rendering with a large + # number of complex assets. + config.assets.debug = true + + # Asset digests allow you to set far-future HTTP expiration dates on all assets, + # yet still be able to expire them through the digest params. + config.assets.digest = true + + # Adds additional error checking when serving assets at runtime. + # Checks for improperly declared sprockets dependencies. + # Raises helpful error messages. + config.assets.raise_runtime_errors = true + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true +end diff --git a/config/environments/production.rb b/config/environments/production.rb new file mode 100644 index 0000000..5c1b32e --- /dev/null +++ b/config/environments/production.rb @@ -0,0 +1,79 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.cache_classes = true + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Enable Rack::Cache to put a simple HTTP cache in front of your application + # Add `rack-cache` to your Gemfile before enabling this. + # For large-scale production use, consider using a caching reverse proxy like + # NGINX, varnish or squid. + # config.action_dispatch.rack_cache = true + + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? + + # Compress JavaScripts and CSS. + config.assets.js_compressor = :uglifier + # config.assets.css_compressor = :sass + + # Do not fallback to assets pipeline if a precompiled asset is missed. + config.assets.compile = false + + # Asset digests allow you to set far-future HTTP expiration dates on all assets, + # yet still be able to expire them through the digest params. + config.assets.digest = true + + # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true + + # Use the lowest log level to ensure availability of diagnostic information + # when problems arise. + config.log_level = :debug + + # Prepend all log lines with the following tags. + # config.log_tags = [ :subdomain, :uuid ] + + # Use a different logger for distributed setups. + # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.action_controller.asset_host = 'http://assets.example.com' + + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Send deprecation notices to registered listeners. + config.active_support.deprecation = :notify + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false +end diff --git a/config/environments/test.rb b/config/environments/test.rb new file mode 100644 index 0000000..1c19f08 --- /dev/null +++ b/config/environments/test.rb @@ -0,0 +1,42 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # The test environment is used exclusively to run your application's + # test suite. You never need to work with it otherwise. Remember that + # your test database is "scratch space" for the test suite and is wiped + # and recreated between test runs. Don't rely on the data there! + config.cache_classes = true + + # Do not eager load code on boot. This avoids loading your whole application + # just for the purpose of running a single test. If you are using a tool that + # preloads Rails for running tests, you may have to set it to true. + config.eager_load = false + + # Configure static file server for tests with Cache-Control for performance. + config.serve_static_files = true + config.static_cache_control = 'public, max-age=3600' + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + + # Raise exceptions instead of rendering exception templates. + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + + # Tell Action Mailer not to deliver emails to the real world. + # The :test delivery method accumulates sent emails in the + # ActionMailer::Base.deliveries array. + config.action_mailer.delivery_method = :test + + # Randomize the order test cases are executed. + config.active_support.test_order = :random + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true +end diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb new file mode 100644 index 0000000..01ef3e6 --- /dev/null +++ b/config/initializers/assets.rb @@ -0,0 +1,11 @@ +# Be sure to restart your server when you modify this file. + +# Version of your assets, change this if you want to expire all your assets. +Rails.application.config.assets.version = '1.0' + +# Add additional assets to the asset load path +# Rails.application.config.assets.paths << Emoji.images_path + +# Precompile additional assets. +# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. +# Rails.application.config.assets.precompile += %w( search.js ) diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb new file mode 100644 index 0000000..59385cd --- /dev/null +++ b/config/initializers/backtrace_silencers.rb @@ -0,0 +1,7 @@ +# Be sure to restart your server when you modify this file. + +# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. +# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } + +# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. +# Rails.backtrace_cleaner.remove_silencers! diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb new file mode 100644 index 0000000..7f70458 --- /dev/null +++ b/config/initializers/cookies_serializer.rb @@ -0,0 +1,3 @@ +# Be sure to restart your server when you modify this file. + +Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb new file mode 100644 index 0000000..4a994e1 --- /dev/null +++ b/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Configure sensitive parameters which will be filtered from the log file. +Rails.application.config.filter_parameters += [:password] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb new file mode 100644 index 0000000..ac033bf --- /dev/null +++ b/config/initializers/inflections.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, '\1en' +# inflect.singular /^(ox)en/i, '\1' +# inflect.irregular 'person', 'people' +# inflect.uncountable %w( fish sheep ) +# end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym 'RESTful' +# end diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb new file mode 100644 index 0000000..dc18996 --- /dev/null +++ b/config/initializers/mime_types.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Add new mime types for use in respond_to blocks: +# Mime::Type.register "text/richtext", :rtf diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb new file mode 100644 index 0000000..d57fec0 --- /dev/null +++ b/config/initializers/session_store.rb @@ -0,0 +1,3 @@ +# Be sure to restart your server when you modify this file. + +Rails.application.config.session_store :cookie_store, key: '_cookbook_session' diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb new file mode 100644 index 0000000..33725e9 --- /dev/null +++ b/config/initializers/wrap_parameters.rb @@ -0,0 +1,14 @@ +# Be sure to restart your server when you modify this file. + +# This file contains settings for ActionController::ParamsWrapper which +# is enabled by default. + +# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. +ActiveSupport.on_load(:action_controller) do + wrap_parameters format: [:json] if respond_to?(:wrap_parameters) +end + +# To enable root element in JSON for ActiveRecord objects. +# ActiveSupport.on_load(:active_record) do +# self.include_root_in_json = true +# end diff --git a/config/locales/en.yml b/config/locales/en.yml new file mode 100644 index 0000000..0653957 --- /dev/null +++ b/config/locales/en.yml @@ -0,0 +1,23 @@ +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t 'hello' +# +# In views, this is aliased to just `t`: +# +# <%= t('hello') %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# To learn more, please read the Rails Internationalization guide +# available at http://guides.rubyonrails.org/i18n.html. + +en: + hello: "Hello world" diff --git a/config/routes.rb b/config/routes.rb new file mode 100644 index 0000000..69c0718 --- /dev/null +++ b/config/routes.rb @@ -0,0 +1,9 @@ +Rails.application.routes.draw do + + resources :recipes + resources :ingredients + + root 'recipes#index' + + +end diff --git a/config/secrets.yml b/config/secrets.yml new file mode 100644 index 0000000..114bedc --- /dev/null +++ b/config/secrets.yml @@ -0,0 +1,22 @@ +# Be sure to restart your server when you modify this file. + +# Your secret key is used for verifying the integrity of signed cookies. +# If you change this key, all old signed cookies will become invalid! + +# Make sure the secret is at least 30 characters and all random, +# no regular words or you'll be exposed to dictionary attacks. +# You can use `rake secret` to generate a secure secret key. + +# Make sure the secrets in this file are kept private +# if you're sharing your code publicly. + +development: + secret_key_base: c5522f51520c361b0848e80a52f6b5ce2259285fd1de3db94869460aa636c49a62217995dec4047eb0f037a16246cbf2b6b62f3a88f8f5cc2f0f6837b372d3b3 + +test: + secret_key_base: 1cf4b0a7e92c645ce88bc6909fa66ad706a7b4d8dcfc6c80a472b309cb1c745dead17d3c633ae971da164b7b82555a8f33033229f598b72a35b74ae199cc93e0 + +# Do not keep production secrets in the repository, +# instead read values from the environment. +production: + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> diff --git a/db/migrate/20160112214203_create_ingredients.rb b/db/migrate/20160112214203_create_ingredients.rb new file mode 100644 index 0000000..f4de0c9 --- /dev/null +++ b/db/migrate/20160112214203_create_ingredients.rb @@ -0,0 +1,12 @@ +class CreateIngredients < ActiveRecord::Migration + def change + create_table :ingredients do |t| + + t.string :name + t.string :density + t.text :notes + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20160112214213_create_recipes.rb b/db/migrate/20160112214213_create_recipes.rb new file mode 100644 index 0000000..07d5292 --- /dev/null +++ b/db/migrate/20160112214213_create_recipes.rb @@ -0,0 +1,14 @@ +class CreateRecipes < ActiveRecord::Migration + def change + create_table :recipes do |t| + + t.string :name + t.text :source + t.integer :yields + t.integer :total_time + t.integer :active_time + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20160112225805_create_recipe_ingredients.rb b/db/migrate/20160112225805_create_recipe_ingredients.rb new file mode 100644 index 0000000..a57421e --- /dev/null +++ b/db/migrate/20160112225805_create_recipe_ingredients.rb @@ -0,0 +1,17 @@ +class CreateRecipeIngredients < ActiveRecord::Migration + def change + create_table :recipe_ingredients do |t| + + t.integer :ingredient_id + t.integer :recipe_id, index: true + + t.string :custom_name + t.string :custom_density + + t.string :quantity + t.string :units + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20160113002615_create_recipe_steps.rb b/db/migrate/20160113002615_create_recipe_steps.rb new file mode 100644 index 0000000..cfc2e18 --- /dev/null +++ b/db/migrate/20160113002615_create_recipe_steps.rb @@ -0,0 +1,12 @@ +class CreateRecipeSteps < ActiveRecord::Migration + def change + create_table :recipe_steps do |t| + + t.integer :recipe_id, index: true + t.integer :number + t.text :step + + t.timestamps null: false + end + end +end diff --git a/db/schema.rb b/db/schema.rb new file mode 100644 index 0000000..ef612bb --- /dev/null +++ b/db/schema.rb @@ -0,0 +1,57 @@ +# encoding: UTF-8 +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema.define(version: 20160113002615) do + + create_table "ingredients", force: :cascade do |t| + t.string "name" + t.string "density" + t.text "notes" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "recipe_ingredients", force: :cascade do |t| + t.integer "ingredient_id" + t.integer "recipe_id" + t.string "custom_name" + t.string "custom_density" + t.string "quantity" + t.string "units" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "recipe_ingredients", ["recipe_id"], name: "index_recipe_ingredients_on_recipe_id" + + create_table "recipe_steps", force: :cascade do |t| + t.integer "recipe_id" + t.integer "number" + t.text "step" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "recipe_steps", ["recipe_id"], name: "index_recipe_steps_on_recipe_id" + + create_table "recipes", force: :cascade do |t| + t.string "name" + t.text "source" + t.integer "yields" + t.integer "total_time" + t.integer "active_time" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + +end diff --git a/db/seeds.rb b/db/seeds.rb new file mode 100644 index 0000000..4edb1e8 --- /dev/null +++ b/db/seeds.rb @@ -0,0 +1,7 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). +# +# Examples: +# +# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) +# Mayor.create(name: 'Emanuel', city: cities.first) diff --git a/lib/assets/.keep b/lib/assets/.keep new file mode 100644 index 0000000..e69de29 diff --git a/lib/tasks/.keep b/lib/tasks/.keep new file mode 100644 index 0000000..e69de29 diff --git a/log/.keep b/log/.keep new file mode 100644 index 0000000..e69de29 diff --git a/public/404.html b/public/404.html new file mode 100644 index 0000000..b612547 --- /dev/null +++ b/public/404.html @@ -0,0 +1,67 @@ + + + + The page you were looking for doesn't exist (404) + + + + + + +
+
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/public/422.html b/public/422.html new file mode 100644 index 0000000..a21f82b --- /dev/null +++ b/public/422.html @@ -0,0 +1,67 @@ + + + + The change you wanted was rejected (422) + + + + + + +
+
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/public/500.html b/public/500.html new file mode 100644 index 0000000..061abc5 --- /dev/null +++ b/public/500.html @@ -0,0 +1,66 @@ + + + + We're sorry, but something went wrong (500) + + + + + + +
+
+

We're sorry, but something went wrong.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..3c9c7c0 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,5 @@ +# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file +# +# To ban all spiders from the entire site uncomment the next two lines: +# User-agent: * +# Disallow: / diff --git a/spec/controllers/.keep b/spec/controllers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/controllers/ingredients_controller_spec.rb b/spec/controllers/ingredients_controller_spec.rb new file mode 100644 index 0000000..95f2ae1 --- /dev/null +++ b/spec/controllers/ingredients_controller_spec.rb @@ -0,0 +1,159 @@ +require 'rails_helper' + +# This spec was generated by rspec-rails when you ran the scaffold generator. +# It demonstrates how one might use RSpec to specify the controller code that +# was generated by Rails when you ran the scaffold generator. +# +# It assumes that the implementation code is generated by the rails scaffold +# generator. If you are using any extension libraries to generate different +# controller code, this generated spec may or may not pass. +# +# It only uses APIs available in rails and/or rspec-rails. There are a number +# of tools you can use to make these specs even more expressive, but we're +# sticking to rails and rspec-rails APIs to keep things simple and stable. +# +# Compared to earlier versions of this generator, there is very limited use of +# stubs and message expectations in this spec. Stubs are only used when there +# is no simpler way to get a handle on the object needed for the example. +# Message expectations are only used when there is no simpler way to specify +# that an instance is receiving a specific message. + +RSpec.describe IngredientsController, type: :controller do + + # This should return the minimal set of attributes required to create a valid + # Ingredient. As you add validations to Ingredient, be sure to + # adjust the attributes here as well. + let(:valid_attributes) { + skip("Add a hash of attributes valid for your model") + } + + let(:invalid_attributes) { + skip("Add a hash of attributes invalid for your model") + } + + # This should return the minimal set of values that should be in the session + # in order to pass any filters (e.g. authentication) defined in + # IngredientsController. Be sure to keep this updated too. + let(:valid_session) { {} } + + describe "GET #index" do + it "assigns all ingredients as @ingredients" do + ingredient = Ingredient.create! valid_attributes + get :index, {}, valid_session + expect(assigns(:ingredients)).to eq([ingredient]) + end + end + + describe "GET #show" do + it "assigns the requested ingredient as @ingredient" do + ingredient = Ingredient.create! valid_attributes + get :show, {:id => ingredient.to_param}, valid_session + expect(assigns(:ingredient)).to eq(ingredient) + end + end + + describe "GET #new" do + it "assigns a new ingredient as @ingredient" do + get :new, {}, valid_session + expect(assigns(:ingredient)).to be_a_new(Ingredient) + end + end + + describe "GET #edit" do + it "assigns the requested ingredient as @ingredient" do + ingredient = Ingredient.create! valid_attributes + get :edit, {:id => ingredient.to_param}, valid_session + expect(assigns(:ingredient)).to eq(ingredient) + end + end + + describe "POST #create" do + context "with valid params" do + it "creates a new Ingredient" do + expect { + post :create, {:ingredient => valid_attributes}, valid_session + }.to change(Ingredient, :count).by(1) + end + + it "assigns a newly created ingredient as @ingredient" do + post :create, {:ingredient => valid_attributes}, valid_session + expect(assigns(:ingredient)).to be_a(Ingredient) + expect(assigns(:ingredient)).to be_persisted + end + + it "redirects to the created ingredient" do + post :create, {:ingredient => valid_attributes}, valid_session + expect(response).to redirect_to(Ingredient.last) + end + end + + context "with invalid params" do + it "assigns a newly created but unsaved ingredient as @ingredient" do + post :create, {:ingredient => invalid_attributes}, valid_session + expect(assigns(:ingredient)).to be_a_new(Ingredient) + end + + it "re-renders the 'new' template" do + post :create, {:ingredient => invalid_attributes}, valid_session + expect(response).to render_template("new") + end + end + end + + describe "PUT #update" do + context "with valid params" do + let(:new_attributes) { + skip("Add a hash of attributes valid for your model") + } + + it "updates the requested ingredient" do + ingredient = Ingredient.create! valid_attributes + put :update, {:id => ingredient.to_param, :ingredient => new_attributes}, valid_session + ingredient.reload + skip("Add assertions for updated state") + end + + it "assigns the requested ingredient as @ingredient" do + ingredient = Ingredient.create! valid_attributes + put :update, {:id => ingredient.to_param, :ingredient => valid_attributes}, valid_session + expect(assigns(:ingredient)).to eq(ingredient) + end + + it "redirects to the ingredient" do + ingredient = Ingredient.create! valid_attributes + put :update, {:id => ingredient.to_param, :ingredient => valid_attributes}, valid_session + expect(response).to redirect_to(ingredient) + end + end + + context "with invalid params" do + it "assigns the ingredient as @ingredient" do + ingredient = Ingredient.create! valid_attributes + put :update, {:id => ingredient.to_param, :ingredient => invalid_attributes}, valid_session + expect(assigns(:ingredient)).to eq(ingredient) + end + + it "re-renders the 'edit' template" do + ingredient = Ingredient.create! valid_attributes + put :update, {:id => ingredient.to_param, :ingredient => invalid_attributes}, valid_session + expect(response).to render_template("edit") + end + end + end + + describe "DELETE #destroy" do + it "destroys the requested ingredient" do + ingredient = Ingredient.create! valid_attributes + expect { + delete :destroy, {:id => ingredient.to_param}, valid_session + }.to change(Ingredient, :count).by(-1) + end + + it "redirects to the ingredients list" do + ingredient = Ingredient.create! valid_attributes + delete :destroy, {:id => ingredient.to_param}, valid_session + expect(response).to redirect_to(ingredients_url) + end + end + +end diff --git a/spec/controllers/recipes_controller_spec.rb b/spec/controllers/recipes_controller_spec.rb new file mode 100644 index 0000000..91af795 --- /dev/null +++ b/spec/controllers/recipes_controller_spec.rb @@ -0,0 +1,159 @@ +require 'rails_helper' + +# This spec was generated by rspec-rails when you ran the scaffold generator. +# It demonstrates how one might use RSpec to specify the controller code that +# was generated by Rails when you ran the scaffold generator. +# +# It assumes that the implementation code is generated by the rails scaffold +# generator. If you are using any extension libraries to generate different +# controller code, this generated spec may or may not pass. +# +# It only uses APIs available in rails and/or rspec-rails. There are a number +# of tools you can use to make these specs even more expressive, but we're +# sticking to rails and rspec-rails APIs to keep things simple and stable. +# +# Compared to earlier versions of this generator, there is very limited use of +# stubs and message expectations in this spec. Stubs are only used when there +# is no simpler way to get a handle on the object needed for the example. +# Message expectations are only used when there is no simpler way to specify +# that an instance is receiving a specific message. + +RSpec.describe RecipesController, type: :controller do + + # This should return the minimal set of attributes required to create a valid + # Recipe. As you add validations to Recipe, be sure to + # adjust the attributes here as well. + let(:valid_attributes) { + skip("Add a hash of attributes valid for your model") + } + + let(:invalid_attributes) { + skip("Add a hash of attributes invalid for your model") + } + + # This should return the minimal set of values that should be in the session + # in order to pass any filters (e.g. authentication) defined in + # RecipesController. Be sure to keep this updated too. + let(:valid_session) { {} } + + describe "GET #index" do + it "assigns all recipes as @recipes" do + recipe = Recipe.create! valid_attributes + get :index, {}, valid_session + expect(assigns(:recipes)).to eq([recipe]) + end + end + + describe "GET #show" do + it "assigns the requested recipe as @recipe" do + recipe = Recipe.create! valid_attributes + get :show, {:id => recipe.to_param}, valid_session + expect(assigns(:recipe)).to eq(recipe) + end + end + + describe "GET #new" do + it "assigns a new recipe as @recipe" do + get :new, {}, valid_session + expect(assigns(:recipe)).to be_a_new(Recipe) + end + end + + describe "GET #edit" do + it "assigns the requested recipe as @recipe" do + recipe = Recipe.create! valid_attributes + get :edit, {:id => recipe.to_param}, valid_session + expect(assigns(:recipe)).to eq(recipe) + end + end + + describe "POST #create" do + context "with valid params" do + it "creates a new Recipe" do + expect { + post :create, {:recipe => valid_attributes}, valid_session + }.to change(Recipe, :count).by(1) + end + + it "assigns a newly created recipe as @recipe" do + post :create, {:recipe => valid_attributes}, valid_session + expect(assigns(:recipe)).to be_a(Recipe) + expect(assigns(:recipe)).to be_persisted + end + + it "redirects to the created recipe" do + post :create, {:recipe => valid_attributes}, valid_session + expect(response).to redirect_to(Recipe.last) + end + end + + context "with invalid params" do + it "assigns a newly created but unsaved recipe as @recipe" do + post :create, {:recipe => invalid_attributes}, valid_session + expect(assigns(:recipe)).to be_a_new(Recipe) + end + + it "re-renders the 'new' template" do + post :create, {:recipe => invalid_attributes}, valid_session + expect(response).to render_template("new") + end + end + end + + describe "PUT #update" do + context "with valid params" do + let(:new_attributes) { + skip("Add a hash of attributes valid for your model") + } + + it "updates the requested recipe" do + recipe = Recipe.create! valid_attributes + put :update, {:id => recipe.to_param, :recipe => new_attributes}, valid_session + recipe.reload + skip("Add assertions for updated state") + end + + it "assigns the requested recipe as @recipe" do + recipe = Recipe.create! valid_attributes + put :update, {:id => recipe.to_param, :recipe => valid_attributes}, valid_session + expect(assigns(:recipe)).to eq(recipe) + end + + it "redirects to the recipe" do + recipe = Recipe.create! valid_attributes + put :update, {:id => recipe.to_param, :recipe => valid_attributes}, valid_session + expect(response).to redirect_to(recipe) + end + end + + context "with invalid params" do + it "assigns the recipe as @recipe" do + recipe = Recipe.create! valid_attributes + put :update, {:id => recipe.to_param, :recipe => invalid_attributes}, valid_session + expect(assigns(:recipe)).to eq(recipe) + end + + it "re-renders the 'edit' template" do + recipe = Recipe.create! valid_attributes + put :update, {:id => recipe.to_param, :recipe => invalid_attributes}, valid_session + expect(response).to render_template("edit") + end + end + end + + describe "DELETE #destroy" do + it "destroys the requested recipe" do + recipe = Recipe.create! valid_attributes + expect { + delete :destroy, {:id => recipe.to_param}, valid_session + }.to change(Recipe, :count).by(-1) + end + + it "redirects to the recipes list" do + recipe = Recipe.create! valid_attributes + delete :destroy, {:id => recipe.to_param}, valid_session + expect(response).to redirect_to(recipes_url) + end + end + +end diff --git a/spec/factories/ingredients.rb b/spec/factories/ingredients.rb new file mode 100644 index 0000000..bceeb06 --- /dev/null +++ b/spec/factories/ingredients.rb @@ -0,0 +1,6 @@ +FactoryGirl.define do + factory :ingredient do + + end + +end diff --git a/spec/factories/recipe_ingredients.rb b/spec/factories/recipe_ingredients.rb new file mode 100644 index 0000000..028fb53 --- /dev/null +++ b/spec/factories/recipe_ingredients.rb @@ -0,0 +1,6 @@ +FactoryGirl.define do + factory :recipe_ingredient do + + end + +end diff --git a/spec/factories/recipe_steps.rb b/spec/factories/recipe_steps.rb new file mode 100644 index 0000000..def9af1 --- /dev/null +++ b/spec/factories/recipe_steps.rb @@ -0,0 +1,7 @@ +FactoryGirl.define do + factory :recipe_step do + number 1 +step "MyText" + end + +end diff --git a/spec/factories/recipes.rb b/spec/factories/recipes.rb new file mode 100644 index 0000000..19925a2 --- /dev/null +++ b/spec/factories/recipes.rb @@ -0,0 +1,6 @@ +FactoryGirl.define do + factory :recipe do + + end + +end diff --git a/spec/fixtures/.keep b/spec/fixtures/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/helpers/.keep b/spec/helpers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/helpers/ingredients_helper_spec.rb b/spec/helpers/ingredients_helper_spec.rb new file mode 100644 index 0000000..0a9ee8a --- /dev/null +++ b/spec/helpers/ingredients_helper_spec.rb @@ -0,0 +1,15 @@ +require 'rails_helper' + +# Specs in this file have access to a helper object that includes +# the IngredientsHelper. For example: +# +# describe IngredientsHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# expect(helper.concat_strings("this","that")).to eq("this that") +# end +# end +# end +RSpec.describe IngredientsHelper, type: :helper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/recipes_helper_spec.rb b/spec/helpers/recipes_helper_spec.rb new file mode 100644 index 0000000..69b5b0e --- /dev/null +++ b/spec/helpers/recipes_helper_spec.rb @@ -0,0 +1,15 @@ +require 'rails_helper' + +# Specs in this file have access to a helper object that includes +# the RecipesHelper. For example: +# +# describe RecipesHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# expect(helper.concat_strings("this","that")).to eq("this that") +# end +# end +# end +RSpec.describe RecipesHelper, type: :helper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/integration/.keep b/spec/integration/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/mailers/.keep b/spec/mailers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/models/.keep b/spec/models/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/models/ingredient_spec.rb b/spec/models/ingredient_spec.rb new file mode 100644 index 0000000..0dc0383 --- /dev/null +++ b/spec/models/ingredient_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe Ingredient, type: :model do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/recipe_ingredient_spec.rb b/spec/models/recipe_ingredient_spec.rb new file mode 100644 index 0000000..376f99f --- /dev/null +++ b/spec/models/recipe_ingredient_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe RecipeIngredient, type: :model do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/recipe_spec.rb b/spec/models/recipe_spec.rb new file mode 100644 index 0000000..8e223d3 --- /dev/null +++ b/spec/models/recipe_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe Recipe, type: :model do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/recipe_step_spec.rb b/spec/models/recipe_step_spec.rb new file mode 100644 index 0000000..9e7afe3 --- /dev/null +++ b/spec/models/recipe_step_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe RecipeStep, type: :model do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb new file mode 100644 index 0000000..6f1ab14 --- /dev/null +++ b/spec/rails_helper.rb @@ -0,0 +1,57 @@ +# This file is copied to spec/ when you run 'rails generate rspec:install' +ENV['RAILS_ENV'] ||= 'test' +require File.expand_path('../../config/environment', __FILE__) +# Prevent database truncation if the environment is production +abort("The Rails environment is running in production mode!") if Rails.env.production? +require 'spec_helper' +require 'rspec/rails' +# Add additional requires below this line. Rails is not loaded until this point! + +# Requires supporting ruby files with custom matchers and macros, etc, in +# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are +# run as spec files by default. This means that files in spec/support that end +# in _spec.rb will both be required and run as specs, causing the specs to be +# run twice. It is recommended that you do not name files matching this glob to +# end with _spec.rb. You can configure this pattern with the --pattern +# option on the command line or in ~/.rspec, .rspec or `.rspec-local`. +# +# The following line is provided for convenience purposes. It has the downside +# of increasing the boot-up time by auto-requiring all files in the support +# directory. Alternatively, in the individual `*_spec.rb` files, manually +# require only the support files necessary. +# +# Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } + +# Checks for pending migration and applies them before tests are run. +# If you are not using ActiveRecord, you can remove this line. +ActiveRecord::Migration.maintain_test_schema! + +RSpec.configure do |config| + # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures + config.fixture_path = "#{::Rails.root}/spec/fixtures" + + # If you're not using ActiveRecord, or you'd prefer not to run each of your + # examples within a transaction, remove the following line or assign false + # instead of true. + config.use_transactional_fixtures = true + + # RSpec Rails can automatically mix in different behaviours to your tests + # based on their file location, for example enabling you to call `get` and + # `post` in specs under `spec/controllers`. + # + # You can disable this behaviour by removing the line below, and instead + # explicitly tag your specs with their type, e.g.: + # + # RSpec.describe UsersController, :type => :controller do + # # ... + # end + # + # The different available types are documented in the features, such as in + # https://relishapp.com/rspec/rspec-rails/docs + config.infer_spec_type_from_file_location! + + # Filter lines from Rails gems in backtraces. + config.filter_rails_from_backtrace! + # arbitrary gems may also be filtered via: + # config.filter_gems_from_backtrace("gem name") +end diff --git a/spec/requests/ingredients_spec.rb b/spec/requests/ingredients_spec.rb new file mode 100644 index 0000000..1181aba --- /dev/null +++ b/spec/requests/ingredients_spec.rb @@ -0,0 +1,10 @@ +require 'rails_helper' + +RSpec.describe "Ingredients", type: :request do + describe "GET /ingredients" do + it "works! (now write some real specs)" do + get ingredients_path + expect(response).to have_http_status(200) + end + end +end diff --git a/spec/requests/recipes_spec.rb b/spec/requests/recipes_spec.rb new file mode 100644 index 0000000..a4f0a9c --- /dev/null +++ b/spec/requests/recipes_spec.rb @@ -0,0 +1,10 @@ +require 'rails_helper' + +RSpec.describe "Recipes", type: :request do + describe "GET /recipes" do + it "works! (now write some real specs)" do + get recipes_path + expect(response).to have_http_status(200) + end + end +end diff --git a/spec/routing/ingredients_routing_spec.rb b/spec/routing/ingredients_routing_spec.rb new file mode 100644 index 0000000..0fa04a5 --- /dev/null +++ b/spec/routing/ingredients_routing_spec.rb @@ -0,0 +1,39 @@ +require "rails_helper" + +RSpec.describe IngredientsController, type: :routing do + describe "routing" do + + it "routes to #index" do + expect(:get => "/ingredients").to route_to("ingredients#index") + end + + it "routes to #new" do + expect(:get => "/ingredients/new").to route_to("ingredients#new") + end + + it "routes to #show" do + expect(:get => "/ingredients/1").to route_to("ingredients#show", :id => "1") + end + + it "routes to #edit" do + expect(:get => "/ingredients/1/edit").to route_to("ingredients#edit", :id => "1") + end + + it "routes to #create" do + expect(:post => "/ingredients").to route_to("ingredients#create") + end + + it "routes to #update via PUT" do + expect(:put => "/ingredients/1").to route_to("ingredients#update", :id => "1") + end + + it "routes to #update via PATCH" do + expect(:patch => "/ingredients/1").to route_to("ingredients#update", :id => "1") + end + + it "routes to #destroy" do + expect(:delete => "/ingredients/1").to route_to("ingredients#destroy", :id => "1") + end + + end +end diff --git a/spec/routing/recipes_routing_spec.rb b/spec/routing/recipes_routing_spec.rb new file mode 100644 index 0000000..7bd40cf --- /dev/null +++ b/spec/routing/recipes_routing_spec.rb @@ -0,0 +1,39 @@ +require "rails_helper" + +RSpec.describe RecipesController, type: :routing do + describe "routing" do + + it "routes to #index" do + expect(:get => "/recipes").to route_to("recipes#index") + end + + it "routes to #new" do + expect(:get => "/recipes/new").to route_to("recipes#new") + end + + it "routes to #show" do + expect(:get => "/recipes/1").to route_to("recipes#show", :id => "1") + end + + it "routes to #edit" do + expect(:get => "/recipes/1/edit").to route_to("recipes#edit", :id => "1") + end + + it "routes to #create" do + expect(:post => "/recipes").to route_to("recipes#create") + end + + it "routes to #update via PUT" do + expect(:put => "/recipes/1").to route_to("recipes#update", :id => "1") + end + + it "routes to #update via PATCH" do + expect(:patch => "/recipes/1").to route_to("recipes#update", :id => "1") + end + + it "routes to #destroy" do + expect(:delete => "/recipes/1").to route_to("recipes#destroy", :id => "1") + end + + end +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..61e2738 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,92 @@ +# This file was generated by the `rails generate rspec:install` command. Conventionally, all +# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. +# The generated `.rspec` file contains `--require spec_helper` which will cause +# this file to always be loaded, without a need to explicitly require it in any +# files. +# +# Given that it is always loaded, you are encouraged to keep this file as +# light-weight as possible. Requiring heavyweight dependencies from this file +# will add to the boot time of your test suite on EVERY test run, even for an +# individual file that may not need all of that loaded. Instead, consider making +# a separate helper file that requires the additional dependencies and performs +# the additional setup, and require it from the spec files that actually need +# it. +# +# The `.rspec` file also contains a few flags that are not defaults but that +# users commonly want. +# +# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration +RSpec.configure do |config| + # rspec-expectations config goes here. You can use an alternate + # assertion/expectation library such as wrong or the stdlib/minitest + # assertions if you prefer. + config.expect_with :rspec do |expectations| + # This option will default to `true` in RSpec 4. It makes the `description` + # and `failure_message` of custom matchers include text for helper methods + # defined using `chain`, e.g.: + # be_bigger_than(2).and_smaller_than(4).description + # # => "be bigger than 2 and smaller than 4" + # ...rather than: + # # => "be bigger than 2" + expectations.include_chain_clauses_in_custom_matcher_descriptions = true + end + + # rspec-mocks config goes here. You can use an alternate test double + # library (such as bogus or mocha) by changing the `mock_with` option here. + config.mock_with :rspec do |mocks| + # Prevents you from mocking or stubbing a method that does not exist on + # a real object. This is generally recommended, and will default to + # `true` in RSpec 4. + mocks.verify_partial_doubles = true + end + +# The settings below are suggested to provide a good initial experience +# with RSpec, but feel free to customize to your heart's content. +=begin + # These two settings work together to allow you to limit a spec run + # to individual examples or groups you care about by tagging them with + # `:focus` metadata. When nothing is tagged with `:focus`, all examples + # get run. + config.filter_run :focus + config.run_all_when_everything_filtered = true + + # Allows RSpec to persist some state between runs in order to support + # the `--only-failures` and `--next-failure` CLI options. We recommend + # you configure your source control system to ignore this file. + config.example_status_persistence_file_path = "spec/examples.txt" + + # Limits the available syntax to the non-monkey patched syntax that is + # recommended. For more details, see: + # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/ + # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ + # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode + config.disable_monkey_patching! + + # Many RSpec users commonly either run the entire suite or an individual + # file, and it's useful to allow more verbose output when running an + # individual spec file. + if config.files_to_run.one? + # Use the documentation formatter for detailed output, + # unless a formatter has already been configured + # (e.g. via a command-line flag). + config.default_formatter = 'doc' + end + + # Print the 10 slowest examples and example groups at the + # end of the spec run, to help surface which specs are running + # particularly slow. + config.profile_examples = 10 + + # Run specs in random order to surface order dependencies. If you find an + # order dependency and want to debug it, you can fix the order by providing + # the seed, which is printed after each run. + # --seed 1234 + config.order = :random + + # Seed global randomization in this process using the `--seed` CLI option. + # Setting this allows you to use `--seed` to deterministically reproduce + # test failures related to randomization by passing the same `--seed` value + # as the one that triggered the failure. + Kernel.srand config.seed +=end +end diff --git a/spec/views/ingredients/edit.html.erb_spec.rb b/spec/views/ingredients/edit.html.erb_spec.rb new file mode 100644 index 0000000..6e9ec62 --- /dev/null +++ b/spec/views/ingredients/edit.html.erb_spec.rb @@ -0,0 +1,14 @@ +require 'rails_helper' + +RSpec.describe "ingredients/edit", type: :view do + before(:each) do + @ingredient = assign(:ingredient, Ingredient.create!()) + end + + it "renders the edit ingredient form" do + render + + assert_select "form[action=?][method=?]", ingredient_path(@ingredient), "post" do + end + end +end diff --git a/spec/views/ingredients/index.html.erb_spec.rb b/spec/views/ingredients/index.html.erb_spec.rb new file mode 100644 index 0000000..03938b5 --- /dev/null +++ b/spec/views/ingredients/index.html.erb_spec.rb @@ -0,0 +1,14 @@ +require 'rails_helper' + +RSpec.describe "ingredients/index", type: :view do + before(:each) do + assign(:ingredients, [ + Ingredient.create!(), + Ingredient.create!() + ]) + end + + it "renders a list of ingredients" do + render + end +end diff --git a/spec/views/ingredients/new.html.erb_spec.rb b/spec/views/ingredients/new.html.erb_spec.rb new file mode 100644 index 0000000..501bb8a --- /dev/null +++ b/spec/views/ingredients/new.html.erb_spec.rb @@ -0,0 +1,14 @@ +require 'rails_helper' + +RSpec.describe "ingredients/new", type: :view do + before(:each) do + assign(:ingredient, Ingredient.new()) + end + + it "renders new ingredient form" do + render + + assert_select "form[action=?][method=?]", ingredients_path, "post" do + end + end +end diff --git a/spec/views/ingredients/show.html.erb_spec.rb b/spec/views/ingredients/show.html.erb_spec.rb new file mode 100644 index 0000000..539b987 --- /dev/null +++ b/spec/views/ingredients/show.html.erb_spec.rb @@ -0,0 +1,11 @@ +require 'rails_helper' + +RSpec.describe "ingredients/show", type: :view do + before(:each) do + @ingredient = assign(:ingredient, Ingredient.create!()) + end + + it "renders attributes in

" do + render + end +end diff --git a/spec/views/recipes/edit.html.erb_spec.rb b/spec/views/recipes/edit.html.erb_spec.rb new file mode 100644 index 0000000..262f000 --- /dev/null +++ b/spec/views/recipes/edit.html.erb_spec.rb @@ -0,0 +1,14 @@ +require 'rails_helper' + +RSpec.describe "recipes/edit", type: :view do + before(:each) do + @recipe = assign(:recipe, Recipe.create!()) + end + + it "renders the edit recipe form" do + render + + assert_select "form[action=?][method=?]", recipe_path(@recipe), "post" do + end + end +end diff --git a/spec/views/recipes/index.html.erb_spec.rb b/spec/views/recipes/index.html.erb_spec.rb new file mode 100644 index 0000000..aa88b16 --- /dev/null +++ b/spec/views/recipes/index.html.erb_spec.rb @@ -0,0 +1,14 @@ +require 'rails_helper' + +RSpec.describe "recipes/index", type: :view do + before(:each) do + assign(:recipes, [ + Recipe.create!(), + Recipe.create!() + ]) + end + + it "renders a list of recipes" do + render + end +end diff --git a/spec/views/recipes/new.html.erb_spec.rb b/spec/views/recipes/new.html.erb_spec.rb new file mode 100644 index 0000000..b9b1f99 --- /dev/null +++ b/spec/views/recipes/new.html.erb_spec.rb @@ -0,0 +1,14 @@ +require 'rails_helper' + +RSpec.describe "recipes/new", type: :view do + before(:each) do + assign(:recipe, Recipe.new()) + end + + it "renders new recipe form" do + render + + assert_select "form[action=?][method=?]", recipes_path, "post" do + end + end +end diff --git a/spec/views/recipes/show.html.erb_spec.rb b/spec/views/recipes/show.html.erb_spec.rb new file mode 100644 index 0000000..cf54599 --- /dev/null +++ b/spec/views/recipes/show.html.erb_spec.rb @@ -0,0 +1,11 @@ +require 'rails_helper' + +RSpec.describe "recipes/show", type: :view do + before(:each) do + @recipe = assign(:recipe, Recipe.create!()) + end + + it "renders attributes in

" do + render + end +end diff --git a/vendor/assets/javascripts/.keep b/vendor/assets/javascripts/.keep new file mode 100644 index 0000000..e69de29 diff --git a/vendor/assets/stylesheets/.keep b/vendor/assets/stylesheets/.keep new file mode 100644 index 0000000..e69de29 diff --git a/vendor/assets/stylesheets/sandstone/_bootswatch.scss b/vendor/assets/stylesheets/sandstone/_bootswatch.scss new file mode 100644 index 0000000..9bb6c5e --- /dev/null +++ b/vendor/assets/stylesheets/sandstone/_bootswatch.scss @@ -0,0 +1,195 @@ +// Sandstone 3.3.5 +// Bootswatch +// ----------------------------------------------------- + +$web-font-path: "https://fonts.googleapis.com/css?family=Roboto:400,500" !default; +@import url($web-font-path); + +// Navbar ===================================================================== + +.sandstone { + font-size: 11px; + line-height: 22px; + font-weight: 500; + text-transform: uppercase; +} + +.navbar { + .nav > li > a { + @extend .sandstone; + } + + &-form input, + &-form .form-control { + border: none; + } +} + +// Buttons ==================================================================== + +.btn { + border: none; + @extend .sandstone; + + &:hover { + border-color: transparent; + } + + &-lg { + line-height: 26px; + } + + &-default { + &:hover { + background-color: $navbar-default-link-active-bg; + } + } +} + +// Typography ================================================================= + +// Tables ===================================================================== + +// Forms ====================================================================== + +input, +.form-control { + @include box-shadow(none); + + &:focus { + border-color: $input-border; + @include box-shadow(none); + } +} + +// Navs ======================================================================= + +.nav { + @extend .sandstone; + + .open > a, + .open > a:hover, + .open > a:focus { + border-color: $gray-light; + } +} + +.nav-tabs { + + & > li > a { + background-color: $gray-lighter; + border-color: $nav-tabs-border-color; + color: $gray; + } + + > li.disabled > a:hover { + background-color: $gray-lighter; + } +} + +.nav-pills { + a { + color: $gray; + } + + li > a { + border: 1px solid transparent; + } + + li.active > a, + li > a:hover { + border-color: $gray-light; + } + + li.disabled > a { + border-color: transparent; + } +} + +.breadcrumb { + @extend .sandstone; + + border: 1px solid $gray-light; + + a { + color: $gray; + } +} + +.pagination { + @extend .sandstone; +} + +.pager { + @extend .sandstone; + + li > a { + color: $gray; + } +} + +.dropdown-menu { + & > li > a { + @extend .sandstone; + } +} + +// Indicators ================================================================= + +.alert { + + a, + .alert-link { + color: #fff; + } +} + +.tooltip { + @extend .sandstone; +} + +// Progress bars ============================================================== + +.progress { + border-radius: 10px; + background-color: $gray-light; + @include box-shadow(none); + + &-bar { + @include box-shadow(none); + } +} + +// Containers ================================================================= + +.list-group { + &-item { + padding: 16px 24px; + } +} + +.well { + @include box-shadow(none); +} + +.panel { + @include box-shadow(none); + + .panel-heading, + .panel-title { + @extend .sandstone; + color: #fff; + } + + .panel-footer { + @extend .sandstone; + } + + &-default { + .panel-heading, + .panel-title, + .panel-footer { + color: $gray; + } + } +} diff --git a/vendor/assets/stylesheets/sandstone/_variables.scss b/vendor/assets/stylesheets/sandstone/_variables.scss new file mode 100644 index 0000000..5c5847c --- /dev/null +++ b/vendor/assets/stylesheets/sandstone/_variables.scss @@ -0,0 +1,870 @@ +$bootstrap-sass-asset-helper: false !default; +// Sandstone 3.3.6 +// Variables +// -------------------------------------------------- + + +//== Colors +// +//## Gray and brand colors for use across Bootstrap. + +$gray-base: #000 !default; +$gray-darker: #3E3F3A !default; +$gray-dark: #8E8C84 !default; +$gray: #98978B !default; +$gray-light: #DFD7CA !default; +$gray-lighter: #F8F5F0 !default; + +$brand-primary: #325D88 !default; +$brand-success: #93C54B !default; +$brand-info: #29ABE0 !default; +$brand-warning: #F47C3C !default; +$brand-danger: #d9534f !default; + + +//== Scaffolding +// +//## Settings for some of the most global styles. + +//** Background color for ``. +$body-bg: #fff !default; +//** Global text color on ``. +$text-color: #3E3F3A !default; + +//** Global textual link color. +$link-color: $brand-success !default; +//** Link hover color set via `darken()` function. +$link-hover-color: darken($link-color, 10%) !default; +//** Link hover decoration. +$link-hover-decoration: underline !default; + + +//== Typography +// +//## Font, line-height, and color for body text, headings, and more. + +$font-family-sans-serif: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif !default; +$font-family-serif: Georgia, "Times New Roman", Times, serif !default; +//** Default monospace fonts for ``, ``, and `

`.
+$font-family-monospace:   Menlo, Monaco, Consolas, "Courier New", monospace !default;
+$font-family-base:        $font-family-sans-serif !default;
+
+$font-size-base:          14px !default;
+$font-size-large:         ceil(($font-size-base * 1.25)) !default; // ~18px
+$font-size-small:         ceil(($font-size-base * 0.85)) !default; // ~12px
+
+$font-size-h1:            floor(($font-size-base * 2.6)) !default; // ~36px
+$font-size-h2:            floor(($font-size-base * 2.15)) !default; // ~30px
+$font-size-h3:            ceil(($font-size-base * 1.7)) !default; // ~24px
+$font-size-h4:            ceil(($font-size-base * 1.25)) !default; // ~18px
+$font-size-h5:            $font-size-base !default;
+$font-size-h6:            ceil(($font-size-base * 0.85)) !default; // ~12px
+
+//** Unit-less `line-height` for use in components like buttons.
+$line-height-base:        1.428571429 !default; // 20/14
+//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
+$line-height-computed:    floor(($font-size-base * $line-height-base)) !default; // ~20px
+
+//** By default, this inherits from the ``.
+$headings-font-family:    inherit !default;
+$headings-font-weight:    400 !default;
+$headings-line-height:    1.1 !default;
+$headings-color:          inherit !default;
+
+
+//== Iconography
+//
+//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
+
+//** Load fonts from this directory.
+$icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "../fonts/bootstrap/") !default;
+//** File name for all font files.
+$icon-font-name:          "glyphicons-halflings-regular" !default;
+//** Element ID within SVG icon file.
+$icon-font-svg-id:        "glyphicons_halflingsregular" !default;
+
+
+//== Components
+//
+//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
+
+$padding-base-vertical:     12px !default;
+$padding-base-horizontal:   16px !default;
+
+$padding-large-vertical:    20px !default;
+$padding-large-horizontal:  30px !default;
+
+$padding-small-vertical:    5px !default;
+$padding-small-horizontal:  10px !default;
+
+$padding-xs-vertical:       1px !default;
+$padding-xs-horizontal:     5px !default;
+
+$line-height-large:         1.3333333 !default; // extra decimals for Win 8.1 Chrome
+$line-height-small:         1.5 !default;
+
+$border-radius-base:        4px !default;
+$border-radius-large:       6px !default;
+$border-radius-small:       3px !default;
+
+//** Global color for active items (e.g., navs or dropdowns).
+$component-active-color:    $gray !default;
+//** Global background color for active items (e.g., navs or dropdowns).
+$component-active-bg:       $gray-lighter !default;
+
+//** Width of the `border` for generating carets that indicator dropdowns.
+$caret-width-base:          4px !default;
+//** Carets increase slightly in size for larger components.
+$caret-width-large:         5px !default;
+
+
+//== Tables
+//
+//## Customizes the `.table` component with basic values, each used across all table variations.
+
+//** Padding for ``s and ``s.
+$table-cell-padding:            8px !default;
+//** Padding for cells in `.table-condensed`.
+$table-condensed-cell-padding:  5px !default;
+
+//** Default background color used for all tables.
+$table-bg:                      transparent !default;
+//** Background color used for `.table-striped`.
+$table-bg-accent:               $gray-lighter !default;
+//** Background color used for `.table-hover`.
+$table-bg-hover:                $gray-lighter !default;
+$table-bg-active:               $table-bg-hover !default;
+
+//** Border color for table and cell borders.
+$table-border-color:            $gray-light !default;
+
+
+//== Buttons
+//
+//## For each of Bootstrap's buttons, define text, background and border color.
+
+$btn-font-weight:                normal !default;
+
+$btn-default-color:              #fff !default;
+$btn-default-bg:                 $gray-darker !default;
+$btn-default-border:             transparent !default;
+
+$btn-primary-color:              #fff !default;
+$btn-primary-bg:                 $brand-primary !default;
+$btn-primary-border:             transparent !default;
+
+$btn-success-color:              #fff !default;
+$btn-success-bg:                 $brand-success !default;
+$btn-success-border:             transparent !default;
+
+$btn-info-color:                 #fff !default;
+$btn-info-bg:                    $brand-info !default;
+$btn-info-border:                transparent !default;
+
+$btn-warning-color:              #fff !default;
+$btn-warning-bg:                 $brand-warning !default;
+$btn-warning-border:             transparent !default;
+
+$btn-danger-color:               #fff !default;
+$btn-danger-bg:                  $brand-danger !default;
+$btn-danger-border:              transparent !default;
+
+$btn-link-disabled-color:        $gray-light !default;
+
+// Allows for customizing button radius independently from global border radius
+$btn-border-radius-base:         $border-radius-base !default;
+$btn-border-radius-large:        $border-radius-large !default;
+$btn-border-radius-small:        $border-radius-small !default;
+
+
+//== Forms
+//
+//##
+
+//** `` background color
+$input-bg:                       #fff !default;
+//** `` background color
+$input-bg-disabled:              $gray-lighter !default;
+
+//** Text color for ``s
+$input-color:                    $text-color !default;
+//** `` border color
+$input-border:                   $gray-light !default;
+
+// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
+//** Default `.form-control` border radius
+// This has no effect on ``s in CSS.
+$input-border-radius:            $border-radius-base !default;
+//** Large `.form-control` border radius
+$input-border-radius-large:      $border-radius-large !default;
+//** Small `.form-control` border radius
+$input-border-radius-small:      $border-radius-small !default;
+
+//** Border color for inputs on focus
+$input-border-focus:             transparent !default;
+
+//** Placeholder text color
+$input-color-placeholder:        $gray-light !default;
+
+//** Default `.form-control` height
+$input-height-base:              ($line-height-computed + ($padding-base-vertical * 2) + 2) !default;
+//** Large `.form-control` height
+$input-height-large:             (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2) !default;
+//** Small `.form-control` height
+$input-height-small:             (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2) !default;
+
+//** `.form-group` margin
+$form-group-margin-bottom:       15px !default;
+
+$legend-color:                   $headings-color !default;
+$legend-border-color:            transparent !default;
+
+//** Background color for textual input addons
+$input-group-addon-bg:           $gray-lighter !default;
+//** Border color for textual input addons
+$input-group-addon-border-color: $input-border !default;
+
+//** Disabled cursor for form controls and buttons.
+$cursor-disabled:                not-allowed !default;
+
+
+//== Dropdowns
+//
+//## Dropdown menu container and contents.
+
+//** Background for the dropdown menu.
+$dropdown-bg:                    #fff !default;
+//** Dropdown menu `border-color`.
+$dropdown-border:                $gray-light !default;
+//** Dropdown menu `border-color` **for IE8**.
+$dropdown-fallback-border:       $gray-light !default;
+//** Divider color for between dropdown items.
+$dropdown-divider-bg:            $gray-lighter !default;
+
+//** Dropdown link text color.
+$dropdown-link-color:            $gray !default;
+//** Hover color for dropdown links.
+$dropdown-link-hover-color:      $dropdown-link-color !default;
+//** Hover background for dropdown links.
+$dropdown-link-hover-bg:         $gray-lighter !default;
+
+//** Active dropdown menu item text color.
+$dropdown-link-active-color:     $component-active-color !default;
+//** Active dropdown menu item background color.
+$dropdown-link-active-bg:        $component-active-bg !default;
+
+//** Disabled dropdown menu item background color.
+$dropdown-link-disabled-color:   $gray-light !default;
+
+//** Text color for headers within dropdown menus.
+$dropdown-header-color:          $gray-light !default;
+
+//** Deprecated `$dropdown-caret-color` as of v3.1.0
+$dropdown-caret-color:           #000 !default;
+
+
+//-- Z-index master list
+//
+// Warning: Avoid customizing these values. They're used for a bird's eye view
+// of components dependent on the z-axis and are designed to all work together.
+//
+// Note: These variables are not generated into the Customizer.
+
+$zindex-navbar:            1000 !default;
+$zindex-dropdown:          1000 !default;
+$zindex-popover:           1060 !default;
+$zindex-tooltip:           1070 !default;
+$zindex-navbar-fixed:      1030 !default;
+$zindex-modal-background:  1040 !default;
+$zindex-modal:             1050 !default;
+
+
+//== Media queries breakpoints
+//
+//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
+
+// Extra small screen / phone
+//** Deprecated `$screen-xs` as of v3.0.1
+$screen-xs:                  480px !default;
+//** Deprecated `$screen-xs-min` as of v3.2.0
+$screen-xs-min:              $screen-xs !default;
+//** Deprecated `$screen-phone` as of v3.0.1
+$screen-phone:               $screen-xs-min !default;
+
+// Small screen / tablet
+//** Deprecated `$screen-sm` as of v3.0.1
+$screen-sm:                  768px !default;
+$screen-sm-min:              $screen-sm !default;
+//** Deprecated `$screen-tablet` as of v3.0.1
+$screen-tablet:              $screen-sm-min !default;
+
+// Medium screen / desktop
+//** Deprecated `$screen-md` as of v3.0.1
+$screen-md:                  992px !default;
+$screen-md-min:              $screen-md !default;
+//** Deprecated `$screen-desktop` as of v3.0.1
+$screen-desktop:             $screen-md-min !default;
+
+// Large screen / wide desktop
+//** Deprecated `$screen-lg` as of v3.0.1
+$screen-lg:                  1200px !default;
+$screen-lg-min:              $screen-lg !default;
+//** Deprecated `$screen-lg-desktop` as of v3.0.1
+$screen-lg-desktop:          $screen-lg-min !default;
+
+// So media queries don't overlap when required, provide a maximum
+$screen-xs-max:              ($screen-sm-min - 1) !default;
+$screen-sm-max:              ($screen-md-min - 1) !default;
+$screen-md-max:              ($screen-lg-min - 1) !default;
+
+
+//== Grid system
+//
+//## Define your custom responsive grid.
+
+//** Number of columns in the grid.
+$grid-columns:              12 !default;
+//** Padding between columns. Gets divided in half for the left and right.
+$grid-gutter-width:         30px !default;
+// Navbar collapse
+//** Point at which the navbar becomes uncollapsed.
+$grid-float-breakpoint:     $screen-sm-min !default;
+//** Point at which the navbar begins collapsing.
+$grid-float-breakpoint-max: ($grid-float-breakpoint - 1) !default;
+
+
+//== Container sizes
+//
+//## Define the maximum width of `.container` for different screen sizes.
+
+// Small screen / tablet
+$container-tablet:             (720px + $grid-gutter-width) !default;
+//** For `$screen-sm-min` and up.
+$container-sm:                 $container-tablet !default;
+
+// Medium screen / desktop
+$container-desktop:            (940px + $grid-gutter-width) !default;
+//** For `$screen-md-min` and up.
+$container-md:                 $container-desktop !default;
+
+// Large screen / wide desktop
+$container-large-desktop:      (1140px + $grid-gutter-width) !default;
+//** For `$screen-lg-min` and up.
+$container-lg:                 $container-large-desktop !default;
+
+
+//== Navbar
+//
+//##
+
+// Basics of a navbar
+$navbar-height:                    60px !default;
+$navbar-margin-bottom:             $line-height-computed !default;
+$navbar-border-radius:             $border-radius-base !default;
+$navbar-padding-horizontal:        floor(($grid-gutter-width / 2)) !default;
+$navbar-padding-vertical:          (($navbar-height - $line-height-computed) / 2) !default;
+$navbar-collapse-max-height:       340px !default;
+
+$navbar-default-color:             $gray-dark !default;
+$navbar-default-bg:                $gray-darker !default;
+$navbar-default-border:            $gray-darker !default;
+
+// Navbar links
+$navbar-default-link-color:                $gray !default;
+$navbar-default-link-hover-color:          #fff !default;
+$navbar-default-link-hover-bg:             transparent !default;
+$navbar-default-link-active-color:         #fff !default;
+$navbar-default-link-active-bg:            darken($navbar-default-bg, 2%) !default;
+$navbar-default-link-disabled-color:       #ccc !default;
+$navbar-default-link-disabled-bg:          transparent !default;
+
+// Navbar brand label
+$navbar-default-brand-color:               #fff !default;
+$navbar-default-brand-hover-color:         #fff !default;
+$navbar-default-brand-hover-bg:            transparent !default;
+
+// Navbar toggle
+$navbar-default-toggle-hover-bg:           $navbar-default-link-active-bg !default;
+$navbar-default-toggle-icon-bar-bg:        $navbar-default-link-color !default;
+$navbar-default-toggle-border-color:       transparent !default;
+
+
+//=== Inverted navbar
+// Reset inverted navbar basics
+$navbar-inverse-color:                      $gray-light !default;
+$navbar-inverse-bg:                         $brand-success !default;
+$navbar-inverse-border:                     $brand-success !default;
+
+// Inverted navbar links
+$navbar-inverse-link-color:                 darken($brand-success, 15%) !default;
+$navbar-inverse-link-hover-color:           #fff !default;
+$navbar-inverse-link-hover-bg:              transparent !default;
+$navbar-inverse-link-active-color:          $navbar-inverse-link-hover-color !default;
+$navbar-inverse-link-active-bg:             darken($navbar-inverse-bg, 4%) !default;
+$navbar-inverse-link-disabled-color:        #444 !default;
+$navbar-inverse-link-disabled-bg:           transparent !default;
+
+// Inverted navbar brand label
+$navbar-inverse-brand-color:                #fff !default;
+$navbar-inverse-brand-hover-color:          #fff !default;
+$navbar-inverse-brand-hover-bg:             transparent !default;
+
+// Inverted navbar toggle
+$navbar-inverse-toggle-hover-bg:            $navbar-inverse-link-active-bg !default;
+$navbar-inverse-toggle-icon-bar-bg:         $navbar-inverse-link-color !default;
+$navbar-inverse-toggle-border-color:        transparent !default;
+
+
+//== Navs
+//
+//##
+
+//=== Shared nav styles
+$nav-link-padding:                          10px 15px !default;
+$nav-link-hover-bg:                         $gray-lighter !default;
+
+$nav-disabled-link-color:                   $gray-light !default;
+$nav-disabled-link-hover-color:             $gray-light !default;
+
+//== Tabs
+$nav-tabs-border-color:                     $gray-light !default;
+
+$nav-tabs-link-hover-border-color:          $gray-light !default;
+
+$nav-tabs-active-link-hover-bg:             $body-bg !default;
+$nav-tabs-active-link-hover-color:          $gray !default;
+$nav-tabs-active-link-hover-border-color:   $gray-light !default;
+
+$nav-tabs-justified-link-border-color:            $gray-light !default;
+$nav-tabs-justified-active-link-border-color:     $body-bg !default;
+
+//== Pills
+$nav-pills-border-radius:                   $border-radius-base !default;
+$nav-pills-active-link-hover-bg:            $component-active-bg !default;
+$nav-pills-active-link-hover-color:         $component-active-color !default;
+
+
+//== Pagination
+//
+//##
+
+$pagination-color:                     $gray !default;
+$pagination-bg:                        $gray-lighter !default;
+$pagination-border:                    $gray-light !default;
+
+$pagination-hover-color:               $gray-dark !default;
+$pagination-hover-bg:                  $gray-light !default;
+$pagination-hover-border:              $pagination-border !default;
+
+$pagination-active-color:              $gray-dark !default;
+$pagination-active-bg:                 $gray-light !default;
+$pagination-active-border:             $gray-light !default;
+
+$pagination-disabled-color:            $gray-light !default;
+$pagination-disabled-bg:               $gray-lighter !default;
+$pagination-disabled-border:           $gray-light !default;
+
+
+//== Pager
+//
+//##
+
+$pager-bg:                             $pagination-bg !default;
+$pager-border:                         $pagination-border !default;
+$pager-border-radius:                  15px !default;
+
+$pager-hover-bg:                       $pagination-hover-bg !default;
+
+$pager-active-bg:                      $pagination-active-bg !default;
+$pager-active-color:                   $pagination-active-color !default;
+
+$pager-disabled-color:                 $pagination-disabled-color !default;
+
+
+//== Jumbotron
+//
+//##
+
+$jumbotron-padding:              30px !default;
+$jumbotron-color:                inherit !default;
+$jumbotron-bg:                   $gray-lighter !default;
+$jumbotron-heading-color:        inherit !default;
+$jumbotron-font-size:            ceil(($font-size-base * 1.5)) !default;
+$jumbotron-heading-font-size:    ceil(($font-size-base * 4.5)) !default;
+
+
+//== Form states and alerts
+//
+//## Define colors for form feedback states and, by default, alerts.
+
+$state-success-text:             $brand-success !default;
+$state-success-bg:               #dff0d8 !default;
+$state-success-border:           darken(adjust-hue($state-success-bg, -10), 5%) !default;
+
+$state-info-text:                $brand-info !default;
+$state-info-bg:                  #d9edf7 !default;
+$state-info-border:              darken(adjust-hue($state-info-bg, -10), 7%) !default;
+
+$state-warning-text:             $brand-warning !default;
+$state-warning-bg:               #fcf8e3 !default;
+$state-warning-border:           darken(adjust-hue($state-warning-bg, -10), 5%) !default;
+
+$state-danger-text:              $brand-danger !default;
+$state-danger-bg:                #f2dede !default;
+$state-danger-border:            darken(adjust-hue($state-danger-bg, -10), 5%) !default;
+
+
+//== Tooltips
+//
+//##
+
+//** Tooltip max width
+$tooltip-max-width:           200px !default;
+//** Tooltip text color
+$tooltip-color:               #fff !default;
+//** Tooltip background color
+$tooltip-bg:                  $navbar-default-bg !default;
+$tooltip-opacity:             1 !default;
+
+//** Tooltip arrow width
+$tooltip-arrow-width:         5px !default;
+//** Tooltip arrow color
+$tooltip-arrow-color:         $tooltip-bg !default;
+
+
+//== Popovers
+//
+//##
+
+//** Popover body background color
+$popover-bg:                          #fff !default;
+//** Popover maximum width
+$popover-max-width:                   276px !default;
+//** Popover border color
+$popover-border-color:                $gray-light !default;
+//** Popover fallback border color
+$popover-fallback-border-color:       $gray-light !default;
+
+//** Popover title background color
+$popover-title-bg:                    $gray-lighter !default;
+
+//** Popover arrow width
+$popover-arrow-width:                 10px !default;
+//** Popover arrow color
+$popover-arrow-color:                 $popover-bg !default;
+
+//** Popover outer arrow width
+$popover-arrow-outer-width:           ($popover-arrow-width + 1) !default;
+//** Popover outer arrow color
+$popover-arrow-outer-color:           fadein($popover-border-color, 5%) !default;
+//** Popover outer arrow fallback color
+$popover-arrow-outer-fallback-color:  darken($popover-fallback-border-color, 20%) !default;
+
+
+//== Labels
+//
+//##
+
+//** Default label background color
+$label-default-bg:            $navbar-default-bg !default;
+//** Primary label background color
+$label-primary-bg:            $brand-primary !default;
+//** Success label background color
+$label-success-bg:            $brand-success !default;
+//** Info label background color
+$label-info-bg:               $brand-info !default;
+//** Warning label background color
+$label-warning-bg:            $brand-warning !default;
+//** Danger label background color
+$label-danger-bg:             $brand-danger !default;
+
+//** Default label text color
+$label-color:                 #fff !default;
+//** Default text color of a linked label
+$label-link-hover-color:      #fff !default;
+
+
+//== Modals
+//
+//##
+
+//** Padding applied to the modal body
+$modal-inner-padding:         15px !default;
+
+//** Padding applied to the modal title
+$modal-title-padding:         15px !default;
+//** Modal title line-height
+$modal-title-line-height:     $line-height-base !default;
+
+//** Background color of modal content area
+$modal-content-bg:                             #fff !default;
+//** Modal content border color
+$modal-content-border-color:                   $gray-lighter !default;
+//** Modal content border color **for IE8**
+$modal-content-fallback-border-color:          $gray-lighter !default;
+
+//** Modal backdrop background color
+$modal-backdrop-bg:           #000 !default;
+//** Modal backdrop opacity
+$modal-backdrop-opacity:      .5 !default;
+//** Modal header border color
+$modal-header-border-color:   $gray-lighter !default;
+//** Modal footer border color
+$modal-footer-border-color:   $modal-header-border-color !default;
+
+$modal-lg:                    900px !default;
+$modal-md:                    600px !default;
+$modal-sm:                    300px !default;
+
+
+//== Alerts
+//
+//## Define alert colors, border radius, and padding.
+
+$alert-padding:               15px !default;
+$alert-border-radius:         $border-radius-base !default;
+$alert-link-font-weight:      bold !default;
+
+$alert-success-bg:            $brand-success !default;
+$alert-success-text:          #fff !default;
+$alert-success-border:        transparent !default;
+
+$alert-info-bg:               $brand-info !default;
+$alert-info-text:             #fff !default;
+$alert-info-border:           transparent !default;
+
+$alert-warning-bg:            $brand-warning !default;
+$alert-warning-text:          #fff !default;
+$alert-warning-border:        transparent !default;
+
+$alert-danger-bg:             $brand-danger !default;
+$alert-danger-text:           #fff !default;
+$alert-danger-border:         transparent !default;
+
+
+//== Progress bars
+//
+//##
+
+//** Background color of the whole progress component
+$progress-bg:                 #f5f5f5 !default;
+//** Progress bar text color
+$progress-bar-color:          #fff !default;
+//** Variable for setting rounded corners on progress bar.
+$progress-border-radius:      $border-radius-base !default;
+
+//** Default progress bar color
+$progress-bar-bg:             $brand-primary !default;
+//** Success progress bar color
+$progress-bar-success-bg:     $brand-success !default;
+//** Warning progress bar color
+$progress-bar-warning-bg:     $brand-warning !default;
+//** Danger progress bar color
+$progress-bar-danger-bg:      $brand-danger !default;
+//** Info progress bar color
+$progress-bar-info-bg:        $brand-info !default;
+
+
+//== List group
+//
+//##
+
+//** Background color on `.list-group-item`
+$list-group-bg:                 #fff !default;
+//** `.list-group-item` border color
+$list-group-border:             $gray-light !default;
+//** List group border radius
+$list-group-border-radius:      $border-radius-base !default;
+
+//** Background color of single list items on hover
+$list-group-hover-bg:           $gray-lighter !default;
+//** Text color of active list items
+$list-group-active-color:       $text-color !default;
+//** Background color of active list items
+$list-group-active-bg:          $component-active-bg !default;
+//** Border color of active list elements
+$list-group-active-border:      $list-group-border !default;
+//** Text color for content within active list items
+$list-group-active-text-color:  $text-color !default;
+
+//** Text color of disabled list items
+$list-group-disabled-color:      $gray-light !default;
+//** Background color of disabled list items
+$list-group-disabled-bg:         $gray-lighter !default;
+//** Text color for content within disabled list items
+$list-group-disabled-text-color: $list-group-disabled-color !default;
+
+$list-group-link-color:         $text-color !default;
+$list-group-link-hover-color:   $list-group-link-color !default;
+$list-group-link-heading-color: $headings-color !default;
+
+
+//== Panels
+//
+//##
+
+$panel-bg:                    #fff !default;
+$panel-body-padding:          15px !default;
+$panel-heading-padding:       10px 15px !default;
+$panel-footer-padding:        $panel-heading-padding !default;
+$panel-border-radius:         $border-radius-base !default;
+
+//** Border color for elements within panels
+$panel-inner-border:          $gray-light !default;
+$panel-footer-bg:             $gray-lighter !default;
+
+$panel-default-text:          $text-color !default;
+$panel-default-border:        $gray-light !default;
+$panel-default-heading-bg:    $gray-lighter !default;
+
+$panel-primary-text:          #fff !default;
+$panel-primary-border:        $brand-primary !default;
+$panel-primary-heading-bg:    $brand-primary !default;
+
+$panel-success-text:          $state-success-text !default;
+$panel-success-border:        $state-success-border !default;
+$panel-success-heading-bg:    $brand-success !default;
+
+$panel-info-text:             $state-info-text !default;
+$panel-info-border:           $state-info-border !default;
+$panel-info-heading-bg:       $brand-info !default;
+
+$panel-warning-text:          $state-warning-text !default;
+$panel-warning-border:        $state-warning-border !default;
+$panel-warning-heading-bg:    $brand-warning !default;
+
+$panel-danger-text:           $state-danger-text !default;
+$panel-danger-border:         $state-danger-border !default;
+$panel-danger-heading-bg:     $brand-danger !default;
+
+
+//== Thumbnails
+//
+//##
+
+//** Padding around the thumbnail image
+$thumbnail-padding:           4px !default;
+//** Thumbnail background color
+$thumbnail-bg:                $gray-lighter !default;
+//** Thumbnail border color
+$thumbnail-border:            $gray-light !default;
+//** Thumbnail border radius
+$thumbnail-border-radius:     $border-radius-base !default;
+
+//** Custom text color for thumbnail captions
+$thumbnail-caption-color:     $text-color !default;
+//** Padding around the thumbnail caption
+$thumbnail-caption-padding:   9px !default;
+
+
+//== Wells
+//
+//##
+
+$well-bg:                     $gray-lighter !default;
+$well-border:                 transparent !default;
+
+
+//== Badges
+//
+//##
+
+$badge-color:                 #fff !default;
+//** Linked badge text color on hover
+$badge-link-hover-color:      #fff !default;
+$badge-bg:                    $brand-success !default;
+
+//** Badge text color in active nav link
+$badge-active-color:          #fff !default;
+//** Badge background color in active nav link
+$badge-active-bg:             $brand-success !default;
+
+$badge-font-weight:           normal !default;
+$badge-line-height:           1 !default;
+$badge-border-radius:         10px !default;
+
+
+//== Breadcrumbs
+//
+//##
+
+$breadcrumb-padding-vertical:   8px !default;
+$breadcrumb-padding-horizontal: 15px !default;
+//** Breadcrumb background color
+$breadcrumb-bg:                 $gray-lighter !default;
+//** Breadcrumb text color
+$breadcrumb-color:              $gray-light !default;
+//** Text color of current page in the breadcrumb
+$breadcrumb-active-color:       $gray !default;
+//** Textual separator for between breadcrumb elements
+$breadcrumb-separator:          "/" !default;
+
+
+//== Carousel
+//
+//##
+
+$carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6) !default;
+
+$carousel-control-color:                      #fff !default;
+$carousel-control-width:                      15% !default;
+$carousel-control-opacity:                    .5 !default;
+$carousel-control-font-size:                  20px !default;
+
+$carousel-indicator-active-bg:                #fff !default;
+$carousel-indicator-border-color:             #fff !default;
+
+$carousel-caption-color:                      #fff !default;
+
+
+//== Close
+//
+//##
+
+$close-font-weight:           bold !default;
+$close-color:                 #000 !default;
+$close-text-shadow:           0 0 0 transparent !default;
+
+
+//== Code
+//
+//##
+
+$code-color:                  #c7254e !default;
+$code-bg:                     #f9f2f4 !default;
+
+$kbd-color:                   #fff !default;
+$kbd-bg:                      #333 !default;
+
+$pre-bg:                      #f5f5f5 !default;
+$pre-color:                   $gray-dark !default;
+$pre-border-color:            #ccc !default;
+$pre-scrollable-max-height:   340px !default;
+
+
+//== Type
+//
+//##
+
+//** Horizontal offset for forms and lists.
+$component-offset-horizontal: 180px !default;
+//** Text muted color
+$text-muted:                  $gray !default;
+//** Abbreviations and acronyms border color
+$abbr-border-color:           $gray !default;
+//** Headings small color
+$headings-small-color:        $gray !default;
+//** Blockquote small color
+$blockquote-small-color:      $text-color !default;
+//** Blockquote font size
+$blockquote-font-size:        ($font-size-base * 1.25) !default;
+//** Blockquote border color
+$blockquote-border-color:     $gray-light !default;
+//** Page header border color
+$page-header-border-color:    $gray-lighter !default;
+//** Width of horizontal description list titles
+$dl-horizontal-offset:        $component-offset-horizontal !default;
+//** Point at which .dl-horizontal becomes horizontal
+$dl-horizontal-breakpoint:    $grid-float-breakpoint !default;
+//** Horizontal line color.
+$hr-border:                   $gray-lighter !default;