diff --git a/.ruby-version b/.ruby-version index 005119b..35cee72 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.4.1 +2.4.3 diff --git a/Gemfile b/Gemfile index f88cec8..6924713 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,8 @@ source 'https://rubygems.org' -gem 'rails', '5.0.2' +gem 'rails', '5.0.6' gem 'sqlite3' -gem 'pg', '~> 0.20.0' +gem 'pg', '~> 0.21.0' gem 'sass-rails', '~> 5.0' gem 'uglifier', '>= 1.3.0' @@ -14,16 +14,17 @@ gem 'therubyracer', platforms: :ruby # Use jquery as the JavaScript library gem 'jquery-rails', '~> 4.3.1' gem 'bootstrap-sass', '~> 3.3.7' -gem 'kaminari', '~> 1.0.1' -gem 'turbolinks', '~> 5.0.1' -gem 'jbuilder', '~> 2.6' +gem 'kaminari', '~> 1.1.1' +gem 'turbolinks', '~> 5.1.0' +gem 'jbuilder', '~> 2.7' gem 'cocoon', '~> 1.2.9' -gem 'unitwise', '~> 2.0.0' +gem 'unitwise', '~> 2.2.0' gem 'redcarpet', '~> 3.4.0' # Use ActiveModel has_secure_password gem 'bcrypt', '~> 3.1.11' +gem 'tzinfo-data' group :development, :test do @@ -35,5 +36,3 @@ group :development, :test do gem 'database_cleaner', '~> 1.5.3' end - - diff --git a/Gemfile.lock b/Gemfile.lock index e99b204..cde4cfd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,71 +1,72 @@ GEM remote: https://rubygems.org/ specs: - actioncable (5.0.2) - actionpack (= 5.0.2) + actioncable (5.0.6) + actionpack (= 5.0.6) nio4r (>= 1.2, < 3.0) websocket-driver (~> 0.6.1) - actionmailer (5.0.2) - actionpack (= 5.0.2) - actionview (= 5.0.2) - activejob (= 5.0.2) + actionmailer (5.0.6) + actionpack (= 5.0.6) + actionview (= 5.0.6) + activejob (= 5.0.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.0.2) - actionview (= 5.0.2) - activesupport (= 5.0.2) + actionpack (5.0.6) + actionview (= 5.0.6) + activesupport (= 5.0.6) rack (~> 2.0) rack-test (~> 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.0.2) - activesupport (= 5.0.2) + actionview (5.0.6) + activesupport (= 5.0.6) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.0.2) - activesupport (= 5.0.2) + activejob (5.0.6) + activesupport (= 5.0.6) globalid (>= 0.3.6) - activemodel (5.0.2) - activesupport (= 5.0.2) - activerecord (5.0.2) - activemodel (= 5.0.2) - activesupport (= 5.0.2) + activemodel (5.0.6) + activesupport (= 5.0.6) + activerecord (5.0.6) + activemodel (= 5.0.6) + activesupport (= 5.0.6) arel (~> 7.0) - activesupport (5.0.2) + activesupport (5.0.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) tzinfo (~> 1.1) arel (7.1.4) - autoprefixer-rails (6.7.7.1) + autoprefixer-rails (8.1.0.1) execjs bcrypt (3.1.11) bootstrap-sass (3.3.7) autoprefixer-rails (>= 5.2.1) sass (>= 3.3.4) builder (3.2.3) - cocoon (1.2.9) - coderay (1.1.1) + cocoon (1.2.11) + coderay (1.1.2) concurrent-ruby (1.0.5) + crass (1.0.3) database_cleaner (1.5.3) diff-lcs (1.3) erubis (2.7.0) execjs (2.7.0) - factory_girl (4.8.0) + factory_girl (4.8.1) activesupport (>= 3.0.0) factory_girl_rails (4.8.0) factory_girl (~> 4.8.0) railties (>= 3.0.0) - ffi (1.9.18) + ffi (1.9.23) formatador (0.2.5) - globalid (0.3.7) - activesupport (>= 4.1.0) - guard (2.14.1) + globalid (0.4.1) + activesupport (>= 4.2.0) + guard (2.14.2) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) - lumberjack (~> 1.0) + lumberjack (>= 1.0.12, < 2.0) nenv (~> 0.1) notiffany (~> 0.0) pry (>= 0.9.12) @@ -76,94 +77,93 @@ GEM guard (~> 2.1) guard-compat (~> 1.1) rspec (>= 2.99.0, < 4.0) - i18n (0.8.1) - jbuilder (2.6.3) - activesupport (>= 3.0.0, < 5.2) - multi_json (~> 1.2) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + jbuilder (2.7.0) + activesupport (>= 4.2.0) + multi_json (>= 1.2) jquery-rails (4.3.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - kaminari (1.0.1) + kaminari (1.1.1) activesupport (>= 4.1.0) - kaminari-actionview (= 1.0.1) - kaminari-activerecord (= 1.0.1) - kaminari-core (= 1.0.1) - kaminari-actionview (1.0.1) + kaminari-actionview (= 1.1.1) + kaminari-activerecord (= 1.1.1) + kaminari-core (= 1.1.1) + kaminari-actionview (1.1.1) actionview - kaminari-core (= 1.0.1) - kaminari-activerecord (1.0.1) + kaminari-core (= 1.1.1) + kaminari-activerecord (1.1.1) activerecord - kaminari-core (= 1.0.1) - kaminari-core (1.0.1) + kaminari-core (= 1.1.1) + kaminari-core (1.1.1) libv8 (3.16.14.19) liner (0.2.4) listen (3.1.5) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) - loofah (2.0.3) + loofah (2.2.1) + crass (~> 1.0.2) nokogiri (>= 1.5.9) - lumberjack (1.0.11) - mail (2.6.4) - mime-types (>= 1.16, < 4) + lumberjack (1.0.12) + mail (2.7.0) + mini_mime (>= 0.1.1) memoizable (0.4.2) thread_safe (~> 0.3, >= 0.3.1) - method_source (0.8.2) - mime-types (3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) - mini_portile2 (2.1.0) - minitest (5.10.1) - multi_json (1.12.1) + method_source (0.9.0) + mini_mime (1.0.0) + mini_portile2 (2.3.0) + minitest (5.11.3) + multi_json (1.13.1) nenv (0.3.0) - nio4r (2.0.0) - nokogiri (1.7.1) - mini_portile2 (~> 2.1.0) + nio4r (2.3.0) + nokogiri (1.8.2) + mini_portile2 (~> 2.3.0) notiffany (0.1.1) nenv (~> 0.1) shellany (~> 0.0) - parslet (1.8.0) - pg (0.20.0) - pry (0.10.4) + parslet (1.8.2) + pg (0.21.0) + pry (0.11.3) coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - puma (3.8.2) - rack (2.0.1) + method_source (~> 0.9.0) + puma (3.11.3) + rack (2.0.4) rack-test (0.6.3) rack (>= 1.0) - rails (5.0.2) - actioncable (= 5.0.2) - actionmailer (= 5.0.2) - actionpack (= 5.0.2) - actionview (= 5.0.2) - activejob (= 5.0.2) - activemodel (= 5.0.2) - activerecord (= 5.0.2) - activesupport (= 5.0.2) - bundler (>= 1.3.0, < 2.0) - railties (= 5.0.2) + rails (5.0.6) + actioncable (= 5.0.6) + actionmailer (= 5.0.6) + actionpack (= 5.0.6) + actionview (= 5.0.6) + activejob (= 5.0.6) + activemodel (= 5.0.6) + activerecord (= 5.0.6) + activesupport (= 5.0.6) + bundler (>= 1.3.0) + railties (= 5.0.6) sprockets-rails (>= 2.0.0) - rails-controller-testing (1.0.1) - actionpack (~> 5.x) - actionview (~> 5.x) + rails-controller-testing (1.0.2) + actionpack (~> 5.x, >= 5.0.1) + actionview (~> 5.x, >= 5.0.1) activesupport (~> 5.x) - rails-dom-testing (2.0.2) - activesupport (>= 4.2.0, < 6.0) - nokogiri (~> 1.6) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) rails-html-sanitizer (1.0.3) loofah (~> 2.0) - railties (5.0.2) - actionpack (= 5.0.2) - activesupport (= 5.0.2) + railties (5.0.6) + actionpack (= 5.0.6) + activesupport (= 5.0.6) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (12.0.0) - rb-fsevent (0.9.8) - rb-inotify (0.9.8) - ffi (>= 0.5.0) + rake (12.3.0) + rb-fsevent (0.10.3) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) redcarpet (3.4.0) ref (2.0.0) rspec (3.5.0) @@ -188,8 +188,12 @@ GEM rspec-support (~> 3.5.0) rspec-support (3.5.0) ruby_dep (1.5.0) - sass (3.4.23) - sass-rails (5.0.6) + sass (3.5.5) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sass-rails (5.0.7) railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) @@ -197,11 +201,10 @@ GEM tilt (>= 1.1, < 3) shellany (0.0.1) signed_multiset (0.2.1) - slop (3.6.0) sprockets (3.7.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.0) + sprockets-rails (3.2.1) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) @@ -209,24 +212,26 @@ GEM therubyracer (0.12.3) libv8 (~> 3.16.14.15) ref - thor (0.19.4) + thor (0.20.0) thread_safe (0.3.6) - tilt (2.0.7) - turbolinks (5.0.1) - turbolinks-source (~> 5) - turbolinks-source (5.0.0) - tzinfo (1.2.3) + tilt (2.0.8) + turbolinks (5.1.0) + turbolinks-source (~> 5.1) + turbolinks-source (5.1.0) + tzinfo (1.2.5) thread_safe (~> 0.1) - uglifier (3.2.0) + tzinfo-data (1.2018.3) + tzinfo (>= 1.0.0) + uglifier (4.1.8) execjs (>= 0.3.0, < 3) - unitwise (2.0.0) + unitwise (2.2.0) liner (~> 0.2) memoizable (~> 0.4) parslet (~> 1.5) signed_multiset (~> 0.2) websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.2) + websocket-extensions (0.1.3) PLATFORMS ruby @@ -239,21 +244,22 @@ DEPENDENCIES factory_girl_rails (~> 4.8.0) guard (~> 2.14.0) guard-rspec - jbuilder (~> 2.6) + jbuilder (~> 2.7) jquery-rails (~> 4.3.1) - kaminari (~> 1.0.1) - pg (~> 0.20.0) + kaminari (~> 1.1.1) + pg (~> 0.21.0) puma - rails (= 5.0.2) + rails (= 5.0.6) rails-controller-testing redcarpet (~> 3.4.0) rspec-rails (~> 3.5.0) sass-rails (~> 5.0) sqlite3 therubyracer - turbolinks (~> 5.0.1) + turbolinks (~> 5.1.0) + tzinfo-data uglifier (>= 1.3.0) - unitwise (~> 2.0.0) + unitwise (~> 2.2.0) BUNDLED WITH - 1.14.6 + 1.16.1 diff --git a/app/assets/stylesheets/recipes.scss b/app/assets/stylesheets/recipes.scss index 905e104..647c0b5 100644 --- a/app/assets/stylesheets/recipes.scss +++ b/app/assets/stylesheets/recipes.scss @@ -2,6 +2,14 @@ // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ +div.table_tags { + width: 275px; +} + +div.recipe_list_controls { + width: 85px; +} + @mixin editor { @extend .well; diff --git a/app/decorators/recipe_decorator.rb b/app/decorators/recipe_decorator.rb index 8629c04..03fe0f0 100644 --- a/app/decorators/recipe_decorator.rb +++ b/app/decorators/recipe_decorator.rb @@ -10,11 +10,15 @@ class RecipeDecorator < BaseDecorator end end + def created_at + wrapped.created_at ? wrapped.created_at.strftime('%D') : '' + end + def tag_names tags = wrapped.tag_names tags.map do |t| h.content_tag('span', t, class: 'label label-default') - end.join(' ').html_safe + end.join(' ').html_safe end def source_markup diff --git a/app/views/recipes/index.html.erb b/app/views/recipes/index.html.erb index 77d15c2..dc83ce2 100644 --- a/app/views/recipes/index.html.erb +++ b/app/views/recipes/index.html.erb @@ -47,7 +47,7 @@ <% decorate(@recipes, RecipeDecorator).each do |recipe| %>