From ed604fac923e4dffd20f02e33db5b91b511d9f8a Mon Sep 17 00:00:00 2001 From: Ilya Katz Date: Sat, 2 Aug 2014 18:45:05 -0400 Subject: [PATCH 1/4] a couple additions for better dev time --- Gemfile | 4 ++++ spec/spec_helper.rb | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Gemfile b/Gemfile index e132ace..90961ee 100644 --- a/Gemfile +++ b/Gemfile @@ -7,6 +7,9 @@ gem 'rails', '4.0.0' # gem 'unicorn' gem 'puma' +# uncomment for heroku +#gem 'rails_12factor', group: :production + # databases gem 'pg' gem 'redis' @@ -61,6 +64,7 @@ group :development do gem 'guard-livereload' gem 'rack-livereload' gem 'foreman' + gem 'quiet_assets' end gem 'whenever', require: false diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 943bc19..7db6960 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -39,4 +39,7 @@ # the seed, which is printed after each run. # --seed 1234 config.order = "random" + + # Less typing when using factories + config.include FactoryGirl::Syntax::Methods end From eab6c655edde136e9a259aa143f2af5476f3423a Mon Sep 17 00:00:00 2001 From: Ilya Katz Date: Sat, 16 Aug 2014 12:40:46 -0400 Subject: [PATCH 2/4] update gem dependecies --- Gemfile | 11 ++- Gemfile.lock | 259 ++++++++++++++++++++++++++++----------------------- 2 files changed, 147 insertions(+), 123 deletions(-) diff --git a/Gemfile b/Gemfile index 90961ee..922669a 100644 --- a/Gemfile +++ b/Gemfile @@ -16,11 +16,11 @@ gem 'redis' gem 'redis-objects' # Assets: -gem 'uglifier', '>= 1.3.0' -gem 'coffee-rails', '~> 4.0.0' -gem 'sass-rails', '~> 4.0.0' -gem 'compass-rails', '~> 2.0.alpha.0' -gem 'zurb-foundation', '>= 4.0.0' +gem 'uglifier' +gem 'coffee-rails' +gem 'sass-rails' +gem 'compass-rails' +gem 'zurb-foundation' # Account: @@ -67,6 +67,7 @@ group :development do gem 'quiet_assets' end +gem 'rails-rename', '~> 1.0.0' gem 'whenever', require: false # Use ActiveModel has_secure_password diff --git a/Gemfile.lock b/Gemfile.lock index 99e7c6c..1e4815d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,141 +25,160 @@ GEM multi_json (~> 1.3) thread_safe (~> 0.1) tzinfo (~> 0.3.37) - addressable (2.3.5) - arel (4.0.0) - atomic (1.1.14) - bcrypt-ruby (3.1.2) + addressable (2.3.6) + arel (4.0.2) + bcrypt (3.1.7) builder (3.1.4) cancan (1.6.10) - capybara (2.1.0) + capybara (2.4.1) mime-types (>= 1.16) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - carrierwave (0.9.0) + carrierwave (0.10.0) activemodel (>= 3.2.0) activesupport (>= 3.2.0) json (>= 1.7) - carrierwave_backgrounder (0.3.0) + mime-types (>= 1.16) + carrierwave_backgrounder (0.4.1) carrierwave (~> 0.5) - celluloid (0.15.1) + celluloid (0.15.2) timers (~> 1.1.0) chronic (0.10.2) - chunky_png (1.2.8) - coderay (1.0.9) - coffee-rails (4.0.0) + chunky_png (1.3.1) + coderay (1.1.0) + coffee-rails (4.0.1) coffee-script (>= 2.2.0) - railties (>= 4.0.0.beta, < 5.0) - coffee-script (2.2.0) + railties (>= 4.0.0, < 5.0) + coffee-script (2.3.0) coffee-script-source execjs - coffee-script-source (1.6.3) - columnize (0.3.6) - compass (0.12.2) + coffee-script-source (1.7.1) + columnize (0.8.9) + compass (0.12.7) chunky_png (~> 1.2) fssm (>= 0.2.7) - sass (~> 3.1) - compass-rails (2.0.alpha.0) - compass (>= 0.12.2, < 0.14) - connection_pool (1.1.0) - debugger (1.6.2) + sass (~> 3.2.19) + compass-rails (2.0.0) + compass (>= 0.12.2) + connection_pool (2.0.0) + debugger (1.6.8) columnize (>= 0.3.1) debugger-linecache (~> 1.2.0) - debugger-ruby_core_source (~> 1.2.3) + debugger-ruby_core_source (~> 1.3.5) debugger-linecache (1.2.0) - debugger-ruby_core_source (1.2.3) - devise (3.1.1) - bcrypt-ruby (~> 3.0) + debugger-ruby_core_source (1.3.5) + devise (3.2.4) + bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 3.2.6, < 5) thread_safe (~> 0.1) warden (~> 1.2.3) - diff-lcs (1.2.4) - dotenv (0.9.0) - em-websocket (0.5.0) + diff-lcs (1.2.5) + dotenv (0.11.1) + dotenv-deployment (~> 0.0.2) + dotenv-deployment (0.0.2) + em-websocket (0.5.1) eventmachine (>= 0.12.9) - http_parser.rb (~> 0.5.3) + http_parser.rb (~> 0.6.0) erubis (2.7.0) eventmachine (1.0.3) - excon (0.25.3) - execjs (2.0.2) - factory_girl (4.2.0) + excon (0.39.0) + execjs (2.2.1) + factory_girl (4.4.0) activesupport (>= 3.0.0) - factory_girl_rails (4.2.1) - factory_girl (~> 4.2.0) + factory_girl_rails (4.4.1) + factory_girl (~> 4.4.0) railties (>= 3.0.0) - ffi (1.9.0) - fog (1.15.0) + ffi (1.9.3) + fog (1.23.0) + fog-brightbox + fog-core (~> 1.23) + fog-json + fog-softlayer + ipaddress (~> 0.5) + nokogiri (~> 1.5, >= 1.5.11) + fog-brightbox (0.1.1) + fog-core (~> 1.22) + fog-json + inflecto + fog-core (1.23.0) builder - excon (~> 0.25.0) - formatador (~> 0.2.0) + excon (~> 0.38) + formatador (~> 0.2) mime-types - multi_json (~> 1.0) net-scp (~> 1.1) net-ssh (>= 2.1.3) - nokogiri (~> 1.5) - ruby-hmac - foreman (0.63.0) - dotenv (>= 0.7) - thor (>= 0.13.6) - formatador (0.2.4) + fog-json (1.0.0) + multi_json (~> 1.0) + fog-softlayer (0.3.11) + fog-core + fog-json + foreman (0.74.0) + dotenv (~> 0.11.1) + thor (~> 0.19.1) + formatador (0.2.5) fssm (0.2.10) - guard (2.0.2) + guard (2.6.1) formatador (>= 0.2.4) - listen (~> 2.0) + listen (~> 2.7) lumberjack (~> 1.0) pry (>= 0.9.12) thor (>= 0.18.1) - guard-livereload (2.0.0) + guard-livereload (2.3.0) em-websocket (~> 0.5) guard (~> 2.0) multi_json (~> 1.8) hike (1.2.3) - http_parser.rb (0.5.3) - i18n (0.6.5) - jquery-rails (3.0.4) + http_parser.rb (0.6.0) + i18n (0.6.11) + inflecto (0.0.2) + ipaddress (0.8.0) + jquery-rails (3.1.1) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - json (1.8.0) - launchy (2.3.0) + json (1.8.1) + launchy (2.4.2) addressable (~> 2.3) - listen (2.0.0) - celluloid (>= 0.15.1) + listen (2.7.9) + celluloid (>= 0.15.2) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) - lumberjack (1.0.4) + lumberjack (1.0.9) mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) method_source (0.8.2) - mime-types (1.25) - mini_magick (3.6.0) + mime-types (1.25.1) + mini_magick (3.8.0) subexec (~> 0.2.1) - mini_portile (0.5.1) + mini_portile (0.6.0) minitest (4.7.5) - multi_json (1.8.1) - net-scp (1.1.2) + multi_json (1.10.1) + net-scp (1.2.1) net-ssh (>= 2.6.5) - net-ssh (2.7.0) - nokogiri (1.6.0) - mini_portile (~> 0.5.0) - orm_adapter (0.4.0) - pg (0.17.0) - polyglot (0.3.3) - pry (0.9.12.2) - coderay (~> 1.0.5) - method_source (~> 0.8) + net-ssh (2.9.1) + nokogiri (1.6.3.1) + mini_portile (= 0.6.0) + orm_adapter (0.5.0) + pg (0.17.1) + polyglot (0.3.5) + pry (0.10.0) + coderay (~> 1.1.0) + method_source (~> 0.8.1) slop (~> 3.4) - pry-debugger (0.2.2) + pry-debugger (0.2.3) debugger (~> 1.3) - pry (~> 0.9.10) - puma (2.6.0) + pry (>= 0.9.10, < 0.11.0) + puma (2.9.0) rack (>= 1.1, < 2.0) + quiet_assets (1.0.3) + railties (>= 3.1, < 5.0) rack (1.5.2) rack-livereload (0.3.15) rack - rack-protection (1.5.0) + rack-protection (1.5.3) rack rack-test (0.6.2) rack (>= 1.0) @@ -171,58 +190,62 @@ GEM bundler (>= 1.3.0, < 2.0) railties (= 4.0.0) sprockets-rails (~> 2.0.0) + rails_rename (0.0.1) railties (4.0.0) actionpack (= 4.0.0) activesupport (= 4.0.0) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (10.1.0) - rb-fsevent (0.9.3) - rb-inotify (0.9.2) + rake (10.3.2) + rb-fsevent (0.9.4) + rb-inotify (0.9.5) ffi (>= 0.5.0) - redis (3.0.5) - redis-namespace (1.3.1) - redis (~> 3.0.0) - redis-objects (0.7.0) + redis (3.1.0) + redis-namespace (1.5.1) + redis (~> 3.0, >= 3.0.4) + redis-objects (1.0.0) redis (>= 3.0.2) - rspec-core (2.14.5) - rspec-expectations (2.14.3) - diff-lcs (>= 1.1.3, < 2.0) - rspec-mocks (2.14.3) - rspec-rails (2.14.0) + rspec-core (3.0.3) + rspec-support (~> 3.0.0) + rspec-expectations (3.0.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.0.0) + rspec-mocks (3.0.3) + rspec-support (~> 3.0.0) + rspec-rails (3.0.2) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 2.14.0) - rspec-expectations (~> 2.14.0) - rspec-mocks (~> 2.14.0) - ruby-hmac (0.4.0) - sass (3.2.12) - sass-rails (4.0.0) - railties (>= 4.0.0.beta, < 5.0) + rspec-core (~> 3.0.0) + rspec-expectations (~> 3.0.0) + rspec-mocks (~> 3.0.0) + rspec-support (~> 3.0.0) + rspec-support (3.0.3) + sass (3.2.19) + sass-rails (4.0.1) + railties (>= 4.0.0, < 5.0) sass (>= 3.1.10) sprockets-rails (~> 2.0.0) - sidekiq (2.15.1) - celluloid (>= 0.15.1) - connection_pool (>= 1.0.0) + sidekiq (3.2.1) + celluloid (>= 0.15.2) + connection_pool (>= 2.0.0) json - redis (>= 3.0.4) + redis (>= 3.0.6) redis-namespace (>= 1.3.1) - simple_form (3.0.0) - actionpack (>= 4.0.0, < 4.1) - activemodel (>= 4.0.0, < 4.1) - sinatra (1.4.3) + simple_form (3.0.2) + actionpack (~> 4.0) + activemodel (~> 4.0) + sinatra (1.4.5) rack (~> 1.4) rack-protection (~> 1.4) tilt (~> 1.3, >= 1.3.4) - slop (3.4.6) - spring (0.0.10) - sprockets (2.10.0) + slop (3.6.0) + sprockets (2.12.1) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.0.0) + sprockets-rails (2.0.1) actionpack (>= 3.0) activesupport (>= 3.0) sprockets (~> 2.8) @@ -230,21 +253,20 @@ GEM capybara (>= 1.0.0) rspec-rails (>= 2.5.0) subexec (0.2.3) - thor (0.18.1) - thread_safe (0.1.3) - atomic + thor (0.19.1) + thread_safe (0.3.4) tilt (1.4.1) timers (1.1.0) treetop (1.4.15) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.37) - uglifier (2.2.1) + tzinfo (0.3.40) + uglifier (2.5.3) execjs (>= 0.3.0) - multi_json (~> 1.0, >= 1.0.2) + json (>= 1.8.0) warden (1.2.3) rack (>= 1.0) - whenever (0.8.4) + whenever (0.9.2) activesupport (>= 2.3.4) chronic (>= 0.6.3) xpath (2.0.0) @@ -259,8 +281,8 @@ DEPENDENCIES cancan carrierwave carrierwave_backgrounder - coffee-rails (~> 4.0.0) - compass-rails (~> 2.0.alpha.0) + coffee-rails + compass-rails devise factory_girl_rails (~> 4.0) fog (>= 1.3.1) @@ -273,17 +295,18 @@ DEPENDENCIES pry pry-debugger puma + quiet_assets rack-livereload rails (= 4.0.0) + rails_rename redis redis-objects rspec-rails - sass-rails (~> 4.0.0) + sass-rails sidekiq simple_form sinatra - spring steak - uglifier (>= 1.3.0) + uglifier whenever - zurb-foundation (>= 4.0.0) + zurb-foundation From 3662c1f1a157ace4fefa19c32f1cba763d9defb0 Mon Sep 17 00:00:00 2001 From: Ilya Katz Date: Sat, 16 Aug 2014 12:55:47 -0400 Subject: [PATCH 3/4] use latest versions of stuff --- .ruby-version | 2 +- Gemfile | 4 +- Gemfile.lock | 100 +++++++++++++++++++++++++++----------------------- README.md | 4 ++ 4 files changed, 61 insertions(+), 49 deletions(-) diff --git a/.ruby-version b/.ruby-version index 227cea2..7ec1d6d 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.0.0 +2.1.0 diff --git a/Gemfile b/Gemfile index 922669a..a1f2960 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '4.0.0' +gem 'rails', '4.1' # web # gem 'unicorn' @@ -20,7 +20,7 @@ gem 'uglifier' gem 'coffee-rails' gem 'sass-rails' gem 'compass-rails' -gem 'zurb-foundation' +gem 'foundation-rails', "~> 5.0.0" # Account: diff --git a/Gemfile.lock b/Gemfile.lock index 1e4815d..be7fc21 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,34 +1,36 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (4.0.0) - actionpack (= 4.0.0) - mail (~> 2.5.3) - actionpack (4.0.0) - activesupport (= 4.0.0) - builder (~> 3.1.0) - erubis (~> 2.7.0) + actionmailer (4.1.0) + actionpack (= 4.1.0) + actionview (= 4.1.0) + mail (~> 2.5.4) + actionpack (4.1.0) + actionview (= 4.1.0) + activesupport (= 4.1.0) rack (~> 1.5.2) rack-test (~> 0.6.2) - activemodel (4.0.0) - activesupport (= 4.0.0) - builder (~> 3.1.0) - activerecord (4.0.0) - activemodel (= 4.0.0) - activerecord-deprecated_finders (~> 1.0.2) - activesupport (= 4.0.0) - arel (~> 4.0.0) - activerecord-deprecated_finders (1.0.3) - activesupport (4.0.0) - i18n (~> 0.6, >= 0.6.4) - minitest (~> 4.2) - multi_json (~> 1.3) + actionview (4.1.0) + activesupport (= 4.1.0) + builder (~> 3.1) + erubis (~> 2.7.0) + activemodel (4.1.0) + activesupport (= 4.1.0) + builder (~> 3.1) + activerecord (4.1.0) + activemodel (= 4.1.0) + activesupport (= 4.1.0) + arel (~> 5.0.0) + activesupport (4.1.0) + i18n (~> 0.6, >= 0.6.9) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) thread_safe (~> 0.1) - tzinfo (~> 0.3.37) + tzinfo (~> 1.1) addressable (2.3.6) - arel (4.0.2) + arel (5.0.1.20140414130214) bcrypt (3.1.7) - builder (3.1.4) + builder (3.2.2) cancan (1.6.10) capybara (2.4.1) mime-types (>= 1.16) @@ -119,6 +121,9 @@ GEM dotenv (~> 0.11.1) thor (~> 0.19.1) formatador (0.2.5) + foundation-rails (5.0.3.1) + railties (>= 3.1.0) + sass (>= 3.2.0) fssm (0.2.10) guard (2.6.1) formatador (>= 0.2.4) @@ -154,7 +159,7 @@ GEM mini_magick (3.8.0) subexec (~> 0.2.1) mini_portile (0.6.0) - minitest (4.7.5) + minitest (5.4.0) multi_json (1.10.1) net-scp (1.2.1) net-ssh (>= 2.6.5) @@ -182,18 +187,21 @@ GEM rack rack-test (0.6.2) rack (>= 1.0) - rails (4.0.0) - actionmailer (= 4.0.0) - actionpack (= 4.0.0) - activerecord (= 4.0.0) - activesupport (= 4.0.0) + rails (4.1.0) + actionmailer (= 4.1.0) + actionpack (= 4.1.0) + actionview (= 4.1.0) + activemodel (= 4.1.0) + activerecord (= 4.1.0) + activesupport (= 4.1.0) bundler (>= 1.3.0, < 2.0) - railties (= 4.0.0) - sprockets-rails (~> 2.0.0) - rails_rename (0.0.1) - railties (4.0.0) - actionpack (= 4.0.0) - activesupport (= 4.0.0) + railties (= 4.1.0) + sprockets-rails (~> 2.0) + rails-rename (1.0.0) + rails (>= 4.0.0) + railties (4.1.0) + actionpack (= 4.1.0) + activesupport (= 4.1.0) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (10.3.2) @@ -222,10 +230,11 @@ GEM rspec-support (~> 3.0.0) rspec-support (3.0.3) sass (3.2.19) - sass-rails (4.0.1) + sass-rails (4.0.3) railties (>= 4.0.0, < 5.0) - sass (>= 3.1.10) - sprockets-rails (~> 2.0.0) + sass (~> 3.2.0) + sprockets (~> 2.8, <= 2.11.0) + sprockets-rails (~> 2.0) sidekiq (3.2.1) celluloid (>= 0.15.2) connection_pool (>= 2.0.0) @@ -240,12 +249,12 @@ GEM rack-protection (~> 1.4) tilt (~> 1.3, >= 1.3.4) slop (3.6.0) - sprockets (2.12.1) + sprockets (2.11.0) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.0.1) + sprockets-rails (2.1.3) actionpack (>= 3.0) activesupport (>= 3.0) sprockets (~> 2.8) @@ -260,7 +269,8 @@ GEM treetop (1.4.15) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.40) + tzinfo (1.2.2) + thread_safe (~> 0.1) uglifier (2.5.3) execjs (>= 0.3.0) json (>= 1.8.0) @@ -271,8 +281,6 @@ GEM chronic (>= 0.6.3) xpath (2.0.0) nokogiri (~> 1.3) - zurb-foundation (4.3.2) - sass (>= 3.2.0) PLATFORMS ruby @@ -287,6 +295,7 @@ DEPENDENCIES factory_girl_rails (~> 4.0) fog (>= 1.3.1) foreman + foundation-rails (~> 5.0.0) guard-livereload jquery-rails launchy @@ -297,8 +306,8 @@ DEPENDENCIES puma quiet_assets rack-livereload - rails (= 4.0.0) - rails_rename + rails (= 4.1) + rails-rename (~> 1.0.0) redis redis-objects rspec-rails @@ -309,4 +318,3 @@ DEPENDENCIES steak uglifier whenever - zurb-foundation diff --git a/README.md b/README.md index 4db0da1..1f42e7e 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,10 @@ Install gems gem install bundler bundle install +### Rename you application + + rails g rename NewAppName + ### Run tests faster Spring will make running your tests faster, but to take advantage of it you need to run it independently (i.e. without `bundle exec`). Install spring gem the old fashioned way From 24a50a6b16c5329034bbe37be54270ad3aacdfc0 Mon Sep 17 00:00:00 2001 From: Ilya Katz Date: Sat, 16 Aug 2014 13:03:23 -0400 Subject: [PATCH 4/4] remove empty helper --- app/helpers/home_helper.rb | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 app/helpers/home_helper.rb diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb deleted file mode 100644 index 23de56a..0000000 --- a/app/helpers/home_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module HomeHelper -end