From 2562b480f0b0db8860133488bf7eaecbcfd2b137 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Sat, 7 Apr 2012 21:52:00 -0700 Subject: [PATCH 01/41] bundle update --- Gemfile.lock | 56 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 97eb0bd..f13b0aa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -31,7 +31,7 @@ GEM addressable (2.2.7) arel (3.0.2) bcrypt-ruby (3.0.1) - bootstrap-sass (2.0.1) + bootstrap-sass (2.0.2) builder (3.0.0) capybara (1.1.2) mime-types (>= 1.16) @@ -59,14 +59,14 @@ GEM capybara (>= 1.1.2) cucumber (>= 1.1.8) nokogiri (>= 1.5.0) - database_cleaner (0.7.1) + database_cleaner (0.7.2) devise (2.0.4) bcrypt-ruby (~> 3.0) orm_adapter (~> 0.0.3) railties (~> 3.1) warden (~> 1.1.1) - devise_invitable (1.0.0) - devise (~> 2.0.0) + devise_invitable (1.0.1) + devise (>= 2.0.0) rails (~> 3.0) diff-lcs (1.1.3) email_spec (1.2.1) @@ -75,13 +75,13 @@ GEM erubis (2.7.0) execjs (1.3.0) multi_json (~> 1.0) - factory_girl (2.6.4) - activesupport (>= 2.3.9) - factory_girl_rails (1.7.0) - factory_girl (~> 2.6.0) + factory_girl (3.1.0) + activesupport (>= 3.0.0) + factory_girl_rails (3.1.0) + factory_girl (~> 3.1.0) railties (>= 3.0.0) ffi (1.0.11) - gherkin (2.9.1) + gherkin (2.9.3) json (>= 1.4.6) haml (3.1.4) haml-rails (0.3.4) @@ -92,20 +92,20 @@ GEM hike (1.2.1) i18n (0.6.0) journey (1.0.3) - jquery-rails (2.0.1) + jquery-rails (2.0.2) railties (>= 3.2.0, < 5.0) thor (~> 0.14) - json (1.6.5) - launchy (2.0.5) + json (1.6.6) + launchy (2.1.0) addressable (~> 2.2.6) mail (2.4.4) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) - mime-types (1.17.2) - multi_json (1.1.0) + mime-types (1.18) + multi_json (1.2.0) nokogiri (1.5.2) - orm_adapter (0.0.6) + orm_adapter (0.0.7) polyglot (0.3.3) rack (1.4.1) rack-cache (1.2) @@ -132,22 +132,22 @@ GEM rake (0.9.2.2) rdoc (3.12) json (~> 1.4) - rspec (2.8.0) - rspec-core (~> 2.8.0) - rspec-expectations (~> 2.8.0) - rspec-mocks (~> 2.8.0) - rspec-core (2.8.0) - rspec-expectations (2.8.0) - diff-lcs (~> 1.1.2) - rspec-mocks (2.8.0) - rspec-rails (2.8.1) + rspec (2.9.0) + rspec-core (~> 2.9.0) + rspec-expectations (~> 2.9.0) + rspec-mocks (~> 2.9.0) + rspec-core (2.9.0) + rspec-expectations (2.9.1) + diff-lcs (~> 1.1.3) + rspec-mocks (2.9.0) + rspec-rails (2.9.0) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec (~> 2.8.0) - rubyzip (0.9.6.1) + rspec (~> 2.9.0) + rubyzip (0.9.7) sass (3.1.15) - sass-rails (3.2.4) + sass-rails (3.2.5) railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) @@ -171,7 +171,7 @@ GEM polyglot polyglot (>= 0.3.1) tzinfo (0.3.32) - uglifier (1.2.3) + uglifier (1.2.4) execjs (>= 0.3.0) multi_json (>= 1.0.2) warden (1.1.1) From 7fa6b1110b11f013af0faf5532fdd0e5e6e0d41b Mon Sep 17 00:00:00 2001 From: Will Schive Date: Mon, 9 Apr 2012 09:47:50 -0700 Subject: [PATCH 02/41] added and git ignored fork_data folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 252f9e7..215b712 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ db/*.sqlite3 /doc/app/ /doc/features.html /doc/specs.html +/fork_data /public/cache /public/stylesheets/compiled /public/system From 1fda96fe85f800f66f4120b481a112886062ee31 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Tue, 10 Apr 2012 11:32:13 -0700 Subject: [PATCH 03/41] updated bundle --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index f13b0aa..0830db3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -170,7 +170,7 @@ GEM treetop (1.4.10) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.32) + tzinfo (0.3.33) uglifier (1.2.4) execjs (>= 0.3.0) multi_json (>= 1.0.2) From 6f74cf5330fbfad249fea180728b2e7c6e2680a9 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Sat, 5 May 2012 17:13:43 -0700 Subject: [PATCH 04/41] updated gemset to 1.9.3-p194@rails323 --- .rvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rvmrc b/.rvmrc index 26064b5..7179de5 100644 --- a/.rvmrc +++ b/.rvmrc @@ -1 +1 @@ -rvm use ruby-1.9.3-p125@rails322 +rvm use ruby-1.9.3-p194@rails323 From 57fcfc2b5631daeae599b1dbf3760e0203062cc6 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Sun, 6 May 2012 10:22:50 -0700 Subject: [PATCH 05/41] upstream changes --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 68ef870..bb2f3fe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -76,7 +76,7 @@ GEM erubis (2.7.0) execjs (1.3.0) multi_json (~> 1.0) - factory_girl (3.2.0) + factory_girl (3.2.0) activesupport (>= 3.0.0) factory_girl_rails (3.2.0) factory_girl (~> 3.2.0) @@ -95,7 +95,7 @@ GEM i18n (0.6.0) journey (1.0.3) jquery-datatables-rails (1.9.1.3) - jquery-rails + jquery-rails jquery-rails (2.0.2) railties (>= 3.2.0, < 5.0) thor (~> 0.14) @@ -215,4 +215,4 @@ DEPENDENCIES simple_form sqlite3 uglifier (>= 1.0.3) - will_paginate (>= 3.0.3) + will_paginate (>= 3.0.3) \ No newline at end of file From f7756a85483e46f6453d179a3422d8d71a843451 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Sun, 6 May 2012 11:21:34 -0700 Subject: [PATCH 06/41] merged upstream, bundle installed --- Gemfile.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index bb2f3fe..d2d2321 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -28,7 +28,7 @@ GEM activesupport (3.2.3) i18n (~> 0.6) multi_json (~> 1.0) - addressable (2.2.7) + addressable (2.2.8) arel (3.0.2) bcrypt-ruby (3.0.1) bootstrap-sass (2.0.2) @@ -74,7 +74,7 @@ GEM mail (~> 2.2) rspec (~> 2.0) erubis (2.7.0) - execjs (1.3.0) + execjs (1.3.1) multi_json (~> 1.0) factory_girl (3.2.0) activesupport (>= 3.0.0) @@ -99,7 +99,7 @@ GEM jquery-rails (2.0.2) railties (>= 3.2.0, < 5.0) thor (~> 0.14) - json (1.6.6) + json (1.7.0) launchy (2.1.0) addressable (~> 2.2.6) libwebsocket (0.1.3) @@ -109,7 +109,7 @@ GEM mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.18) - multi_json (1.3.2) + multi_json (1.3.4) nokogiri (1.5.2) orm_adapter (0.0.7) polyglot (0.3.3) @@ -139,21 +139,21 @@ GEM rdoc (3.12) json (~> 1.4) rolify (3.1.0) - rspec (2.9.0) - rspec-core (~> 2.9.0) - rspec-expectations (~> 2.9.0) - rspec-mocks (~> 2.9.0) - rspec-core (2.9.0) - rspec-expectations (2.9.1) + rspec (2.10.0) + rspec-core (~> 2.10.0) + rspec-expectations (~> 2.10.0) + rspec-mocks (~> 2.10.0) + rspec-core (2.10.0) + rspec-expectations (2.10.0) diff-lcs (~> 1.1.3) - rspec-mocks (2.9.0) - rspec-rails (2.9.0) + rspec-mocks (2.10.1) + rspec-rails (2.10.1) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec (~> 2.9.0) - rubyzip (0.9.7) - sass (3.1.16) + rspec (~> 2.10.0) + rubyzip (0.9.8) + sass (3.1.17) sass-rails (3.2.5) railties (~> 3.2.0) sass (>= 3.1.10) @@ -164,10 +164,10 @@ GEM libwebsocket (~> 0.1.3) multi_json (~> 1.0) rubyzip - simple_form (2.0.1) + simple_form (2.0.2) actionpack (~> 3.0) activemodel (~> 3.0) - sprockets (2.1.2) + sprockets (2.1.3) hike (~> 1.2) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) @@ -215,4 +215,4 @@ DEPENDENCIES simple_form sqlite3 uglifier (>= 1.0.3) - will_paginate (>= 3.0.3) \ No newline at end of file + will_paginate (>= 3.0.3) From c896672c51f57b8b7132ca509e5810607fc51e80 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Sun, 27 May 2012 18:32:39 -0700 Subject: [PATCH 07/41] gemfile changes in attempt to fire up bundle/heroku --- Gemfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gemfile b/Gemfile index c596497..1943eb2 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,9 @@ source 'https://rubygems.org' + +ruby '1.9.3' gem 'rails', '3.2.3' +# gem 'bundler', '1.2.0.pre' + gem 'sqlite3' group :assets do gem 'sass-rails', '~> 3.2.3' From 51210c5db13b999832aabc229acf5e18ac6c1a33 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Sun, 27 May 2012 23:05:05 -0700 Subject: [PATCH 08/41] fetched upstream, merged master, commented out one line in our Gemfile, all tests pass, lights up like a christmas tree --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 1943eb2..fea0f1e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -ruby '1.9.3' +# ruby '1.9.3' gem 'rails', '3.2.3' # gem 'bundler', '1.2.0.pre' From 30f2c180c01a5820dd20e942324d0ea74988ce5e Mon Sep 17 00:00:00 2001 From: Will Schive Date: Wed, 6 Jun 2012 10:57:35 -0700 Subject: [PATCH 09/41] rails to 3.2.5 and Mandrill setups --- Gemfile | 2 +- Gemfile.lock | 56 +++++++++++++++--------------- config/environments/development.rb | 3 +- config/environments/production.rb | 3 +- 4 files changed, 33 insertions(+), 31 deletions(-) diff --git a/Gemfile b/Gemfile index fea0f1e..dbf44b8 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' # ruby '1.9.3' -gem 'rails', '3.2.3' +gem 'rails', '~> 3.2.5' # gem 'bundler', '1.2.0.pre' gem 'sqlite3' diff --git a/Gemfile.lock b/Gemfile.lock index cd9cc93..25dc7ca 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,31 +1,31 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (3.2.3) - actionpack (= 3.2.3) + actionmailer (3.2.5) + actionpack (= 3.2.5) mail (~> 2.4.4) - actionpack (3.2.3) - activemodel (= 3.2.3) - activesupport (= 3.2.3) + actionpack (3.2.5) + activemodel (= 3.2.5) + activesupport (= 3.2.5) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.1) rack (~> 1.4.0) rack-cache (~> 1.2) rack-test (~> 0.6.1) - sprockets (~> 2.1.2) - activemodel (3.2.3) - activesupport (= 3.2.3) + sprockets (~> 2.1.3) + activemodel (3.2.5) + activesupport (= 3.2.5) builder (~> 3.0.0) - activerecord (3.2.3) - activemodel (= 3.2.3) - activesupport (= 3.2.3) + activerecord (3.2.5) + activemodel (= 3.2.5) + activesupport (= 3.2.5) arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.2.3) - activemodel (= 3.2.3) - activesupport (= 3.2.3) - activesupport (3.2.3) + activeresource (3.2.5) + activemodel (= 3.2.5) + activesupport (= 3.2.5) + activesupport (3.2.5) i18n (~> 0.6) multi_json (~> 1.0) addressable (2.2.8) @@ -120,21 +120,21 @@ GEM rack rack-test (0.6.1) rack (>= 1.0) - rails (3.2.3) - actionmailer (= 3.2.3) - actionpack (= 3.2.3) - activerecord (= 3.2.3) - activeresource (= 3.2.3) - activesupport (= 3.2.3) + rails (3.2.5) + actionmailer (= 3.2.5) + actionpack (= 3.2.5) + activerecord (= 3.2.5) + activeresource (= 3.2.5) + activesupport (= 3.2.5) bundler (~> 1.0) - railties (= 3.2.3) - railties (3.2.3) - actionpack (= 3.2.3) - activesupport (= 3.2.3) + railties (= 3.2.5) + railties (3.2.5) + actionpack (= 3.2.5) + activesupport (= 3.2.5) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) - thor (~> 0.14.6) + thor (>= 0.14.6, < 2.0) rake (0.9.2.2) rdoc (3.12) json (~> 1.4) @@ -172,7 +172,7 @@ GEM rack (~> 1.0) tilt (~> 1.1, != 1.3.0) sqlite3 (1.3.6) - thor (0.14.6) + thor (0.15.2) tilt (1.3.3) treetop (1.4.10) polyglot @@ -207,7 +207,7 @@ DEPENDENCIES jquery-datatables-rails jquery-rails launchy (>= 2.1.0) - rails (= 3.2.3) + rails (~> 3.2.5) rolify (>= 3.1.0) rspec-rails (>= 2.10.1) sass-rails (~> 3.2.3) diff --git a/config/environments/development.rb b/config/environments/development.rb index 2dbe4db..3e2a5a7 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -14,7 +14,8 @@ config.action_controller.perform_caching = false # ActionMailer Config - config.action_mailer.default_url_options = { :host => 'localhost:3000' } + config.action_mailer.default_url_options = { :host => 'localhost:3000' } # Development + # config.action_mailer.default_url_options = { :host => 'goodworksonearth.net' } # Production config.action_mailer.delivery_method = :smtp # change to true to allow email to be sent during development config.action_mailer.perform_deliveries = false diff --git a/config/environments/production.rb b/config/environments/production.rb index 1ac17fd..d360233 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -61,7 +61,8 @@ # Send deprecation notices to registered listeners config.active_support.deprecation = :notify - config.action_mailer.default_url_options = { :host => 'example.com' } + config.action_mailer.default_url_options = { :host => 'example.com' } # Development testing + # config.action_mailer.default_url_options = { :host => 'goodworksonearth.net' } # Production # ActionMailer Config # Setup for production - deliveries, no errors raised config.action_mailer.delivery_method = :smtp From 83a8d786a112bc93d01020911632e368cf591ac1 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Wed, 6 Jun 2012 11:03:46 -0700 Subject: [PATCH 10/41] update gemset to rails325 --- .rvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rvmrc b/.rvmrc index 7179de5..9567ee8 100644 --- a/.rvmrc +++ b/.rvmrc @@ -1 +1 @@ -rvm use ruby-1.9.3-p194@rails323 +rvm use ruby-1.9.3-p194@rails325 From cac8bf684c83bb60d6814667e2f45d4ab5ba70c3 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Wed, 6 Jun 2012 21:05:18 -0700 Subject: [PATCH 11/41] changed config.mailer_sender --- config/initializers/devise.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index af93afb..81386ad 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -4,7 +4,7 @@ # ==> Mailer Configuration # Configure the e-mail address which will be shown in Devise::Mailer, # note that it will be overwritten if you use your own mailer class with default "from" parameter. - config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com" + config.mailer_sender = "lexigram@efn.org" # Configure the class responsible to send e-mails. # config.mailer = "Devise::Mailer" From 5eb05e91d932c809f1e3dc8c1d229ab7cdc4b25b Mon Sep 17 00:00:00 2001 From: Will Schive Date: Wed, 6 Jun 2012 21:06:44 -0700 Subject: [PATCH 12/41] updated to bundler 1.2.0.pre.1 --- Gemfile | 6 +++--- Gemfile.lock | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index dbf44b8..19809af 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,8 @@ source 'https://rubygems.org' -# ruby '1.9.3' -gem 'rails', '~> 3.2.5' -# gem 'bundler', '1.2.0.pre' +# ruby "1.9.3" +gem "rails", "~> 3.2.5" +gem "bundler", "~> 1.1.4" gem 'sqlite3' group :assets do diff --git a/Gemfile.lock b/Gemfile.lock index 25dc7ca..0b38989 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -59,7 +59,7 @@ GEM capybara (>= 1.1.2) cucumber (>= 1.1.8) nokogiri (>= 1.5.0) - database_cleaner (0.7.2) + database_cleaner (0.8.0) devise (2.1.0) bcrypt-ruby (~> 3.0) orm_adapter (~> 0.0.7) @@ -110,7 +110,7 @@ GEM treetop (~> 1.4.8) mime-types (1.18) multi_json (1.3.6) - nokogiri (1.5.2) + nokogiri (1.5.3) orm_adapter (0.0.7) polyglot (0.3.3) rack (1.4.1) @@ -158,7 +158,7 @@ GEM railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) - selenium-webdriver (2.22.0) + selenium-webdriver (2.22.2) childprocess (>= 0.2.5) ffi (~> 1.0) libwebsocket (~> 0.1.3) @@ -191,6 +191,7 @@ PLATFORMS DEPENDENCIES bootstrap-sass (>= 2.0.3) + bundler (~> 1.1.4) cancan (>= 1.6.7) capybara (>= 1.1.2) coffee-rails (~> 3.2.1) From 463000939036daffa56369dd40d07e3be905b663 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Wed, 6 Jun 2012 22:20:49 -0700 Subject: [PATCH 13/41] added ruby 1.9.3 to gemfile --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 19809af..97798b1 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -# ruby "1.9.3" +ruby "1.9.3" gem "rails", "~> 3.2.5" gem "bundler", "~> 1.1.4" From 72671a9a3ba8337d3396cb03c1c1b3906fe29394 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Wed, 6 Jun 2012 22:23:01 -0700 Subject: [PATCH 14/41] adjusted gemfile, bundle update --- Gemfile | 1 - Gemfile.lock | 1 - 2 files changed, 2 deletions(-) diff --git a/Gemfile b/Gemfile index 97798b1..093d1f5 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,6 @@ source 'https://rubygems.org' ruby "1.9.3" gem "rails", "~> 3.2.5" -gem "bundler", "~> 1.1.4" gem 'sqlite3' group :assets do diff --git a/Gemfile.lock b/Gemfile.lock index 0b38989..5ecd6dc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -191,7 +191,6 @@ PLATFORMS DEPENDENCIES bootstrap-sass (>= 2.0.3) - bundler (~> 1.1.4) cancan (>= 1.6.7) capybara (>= 1.1.2) coffee-rails (~> 3.2.1) From 1a03112367f835e6c53e37371df5ff0c8345e30f Mon Sep 17 00:00:00 2001 From: Will Schive Date: Wed, 6 Jun 2012 22:28:12 -0700 Subject: [PATCH 15/41] bundle installed heroku --- Gemfile | 3 ++- Gemfile.lock | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 093d1f5..4e238d1 100644 --- a/Gemfile +++ b/Gemfile @@ -27,4 +27,5 @@ gem "rolify", ">= 3.1.0" gem "bootstrap-sass", ">= 2.0.3" gem "simple_form" gem "google_visualr", ">= 2.1.2" -gem "jquery-datatables-rails" \ No newline at end of file +gem "jquery-datatables-rails" +gem "heroku" \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 5ecd6dc..9ef15cb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -73,6 +73,7 @@ GEM mail (~> 2.2) rspec (~> 2.0) erubis (2.7.0) + excon (0.14.0) execjs (1.4.0) multi_json (~> 1.0) factory_girl (3.3.0) @@ -90,6 +91,14 @@ GEM activesupport (~> 3.0) haml (~> 3.0) railties (~> 3.0) + heroku (2.26.6) + heroku-api (~> 0.2.4) + launchy (>= 0.3.2) + netrc (~> 0.7.2) + rest-client (~> 1.6.1) + rubyzip + heroku-api (0.2.4) + excon (~> 0.14.0) hike (1.2.1) hominid (3.0.4) i18n (0.6.0) @@ -110,6 +119,7 @@ GEM treetop (~> 1.4.8) mime-types (1.18) multi_json (1.3.6) + netrc (0.7.4) nokogiri (1.5.3) orm_adapter (0.0.7) polyglot (0.3.3) @@ -138,6 +148,8 @@ GEM rake (0.9.2.2) rdoc (3.12) json (~> 1.4) + rest-client (1.6.7) + mime-types (>= 1.16) rolify (3.1.0) rspec (2.10.0) rspec-core (~> 2.10.0) @@ -203,6 +215,7 @@ DEPENDENCIES google_visualr (>= 2.1.2) haml (>= 3.1.6) haml-rails (>= 0.3.4) + heroku hominid jquery-datatables-rails jquery-rails From 1cd9070458ac2ab8c10a07cf4c858c991b864b12 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Wed, 13 Jun 2012 10:52:38 -0700 Subject: [PATCH 16/41] merged upstream, removed config/database.yml from ./.gitignore file --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 215b712..7d597c4 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,6 @@ db/*.sqlite3 .redcar/ .sass-cache /config/config.yml -/config/database.yml /coverage.data /coverage/ /db/*.javadb/ From f2cd311e11861da51c818a16db81a2299c252953 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Wed, 13 Jun 2012 15:18:48 -0700 Subject: [PATCH 17/41] fixed deprecation notice on :confirm --- app/views/devise/registrations/edit.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/devise/registrations/edit.html.haml b/app/views/devise/registrations/edit.html.haml index 204278e..adc4bae 100644 --- a/app/views/devise/registrations/edit.html.haml +++ b/app/views/devise/registrations/edit.html.haml @@ -27,5 +27,5 @@ %p= f.submit "Update" %h3 Cancel my account %p - Unhappy? #{link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete}. + Unhappy? #{link_to "Cancel my account", registration_path(resource_name), :data => { :confirm => 'Are you sure', :method => :delete} }. = link_to "Back", :back From 5d64451e5c1c0544e6313d5697815bc9dc39617e Mon Sep 17 00:00:00 2001 From: Will Schive Date: Wed, 13 Jun 2012 15:20:41 -0700 Subject: [PATCH 18/41] explanation for seeds.db in production --- Gemfile.lock | 62 +++++++++++++++++++++++++------------------------- README.textile | 3 ++- db/seeds.rb | 13 ++++++++++- 3 files changed, 45 insertions(+), 33 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 373f2da..805b556 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,12 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (3.2.5) - actionpack (= 3.2.5) + actionmailer (3.2.6) + actionpack (= 3.2.6) mail (~> 2.4.4) - actionpack (3.2.5) - activemodel (= 3.2.5) - activesupport (= 3.2.5) + actionpack (3.2.6) + activemodel (= 3.2.6) + activesupport (= 3.2.6) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.1) @@ -14,18 +14,18 @@ GEM rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.1.3) - activemodel (3.2.5) - activesupport (= 3.2.5) + activemodel (3.2.6) + activesupport (= 3.2.6) builder (~> 3.0.0) - activerecord (3.2.5) - activemodel (= 3.2.5) - activesupport (= 3.2.5) + activerecord (3.2.6) + activemodel (= 3.2.6) + activesupport (= 3.2.6) arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.2.5) - activemodel (= 3.2.5) - activesupport (= 3.2.5) - activesupport (3.2.5) + activeresource (3.2.6) + activemodel (= 3.2.6) + activesupport (= 3.2.6) + activesupport (3.2.6) i18n (~> 0.6) multi_json (~> 1.0) addressable (2.2.8) @@ -76,10 +76,10 @@ GEM excon (0.14.0) execjs (1.4.0) multi_json (~> 1.0) - factory_girl (3.3.0) + factory_girl (3.4.0) activesupport (>= 3.0.0) - factory_girl_rails (3.3.0) - factory_girl (~> 3.3.0) + factory_girl_rails (3.4.0) + factory_girl (~> 3.4.0) railties (>= 3.0.0) ffi (1.0.11) gherkin (2.11.0) @@ -91,13 +91,13 @@ GEM activesupport (~> 3.0) haml (~> 3.0) railties (~> 3.0) - heroku (2.26.6) + heroku (2.26.7) heroku-api (~> 0.2.4) launchy (>= 0.3.2) - netrc (~> 0.7.2) + netrc (~> 0.7.4) rest-client (~> 1.6.1) rubyzip - heroku-api (0.2.4) + heroku-api (0.2.5) excon (~> 0.14.0) hike (1.2.1) hominid (3.0.4) @@ -120,7 +120,7 @@ GEM mime-types (1.18) multi_json (1.3.6) netrc (0.7.4) - nokogiri (1.5.3) + nokogiri (1.5.4) orm_adapter (0.0.7) polyglot (0.3.3) rack (1.4.1) @@ -130,17 +130,17 @@ GEM rack rack-test (0.6.1) rack (>= 1.0) - rails (3.2.5) - actionmailer (= 3.2.5) - actionpack (= 3.2.5) - activerecord (= 3.2.5) - activeresource (= 3.2.5) - activesupport (= 3.2.5) + rails (3.2.6) + actionmailer (= 3.2.6) + actionpack (= 3.2.6) + activerecord (= 3.2.6) + activeresource (= 3.2.6) + activesupport (= 3.2.6) bundler (~> 1.0) - railties (= 3.2.5) - railties (3.2.5) - actionpack (= 3.2.5) - activesupport (= 3.2.5) + railties (= 3.2.6) + railties (3.2.6) + actionpack (= 3.2.6) + activesupport (= 3.2.6) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) diff --git a/README.textile b/README.textile index 9e7b30c..6cb2b8a 100644 --- a/README.textile +++ b/README.textile @@ -501,10 +501,11 @@ attr_accessible :name, :email, :password, :password_confirmation, :remember_me, Then run @$ rake db:reset@ to recreate the database and visit the site again. +Remember to remove those open doors to your database before your site goes live. h2. Deploy to Heroku -For your convenience, here are instructions for "deploying your app to Heroku":http://railsapps.github.com/rails-heroku-tutorial.html. Heroku provides low cost, easily configured Rails application hosting. +For your convenience, here are instructions for "deploying your app to Heroku":http://railsapps.github.com/rails-heroku-tutorial.html. Heroku provides low cost, easily configured Rails application hosting. Small sites can begin with no cost whatsoever, to allow for development of the site. h2. Where to Get Help diff --git a/db/seeds.rb b/db/seeds.rb index 93ed0cb..8a4d378 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1,10 +1,21 @@ # 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). +# The data can then be loaded with the $ rake db:seed command, or as part of the db creation command $ rake db:setup # # Examples: # # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) # Mayor.create(name: 'Emanuel', city: cities.first) + +# Production Instructions : AFTER you push your app to the repository, and Heroku or your server, +# immediately change these passwords seeded into the database, long before any public sees it. +# The command to seed the database is $ rake db:seed and this command is usually run after $ rake db:migrate +# YOU MUST enter your real email when you change the password online, otherwise, your Verification email will go into the void, +# and you are locked out because you cannot click on the Changing a Password Verification link. +# To change your passwords on your application, simply visit your site address on the net, and log in with the email and +# the passwords shown here. DO NOT PUT your real passwords into this seeds.db if you are putting your code into a public repository. +# The seeded passwords shown below should really be 'please_change_me_immediately_online_by_logging_into_your_app_on_the_net. +# The @example.com email address seeds allow for development testing. In production, change the emails to your real emails, +# so you will receive the Verification email when you change the password. puts 'SETTING UP DEFAULT USER LOGIN' user = User.create! :name => 'First User', :email => 'user@example.com', :password => 'please', :password_confirmation => 'please', :confirmed_at => Time.now.utc puts 'New user created: ' << user.name From 00c10792d7be4dcfd63e74143c42f9e1fa0a8def Mon Sep 17 00:00:00 2001 From: Will Schive Date: Sun, 17 Jun 2012 00:29:56 -0700 Subject: [PATCH 19/41] keeping our database.yml for heroku reasons --- config/database.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/database.yml b/config/database.yml index 09cc85a..f33bc33 100644 --- a/config/database.yml +++ b/config/database.yml @@ -19,8 +19,8 @@ test: &test timeout: 5000 production: - adapter: sqlite3 - database: db/production.sqlite3 + adapter: postgresql + database: db/production.pg pool: 5 timeout: 5000 From 85bcef2b3667857125ed996ceaaff6198fe94245 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Mon, 30 Jul 2012 17:12:15 -0700 Subject: [PATCH 20/41] bundle update --- Gemfile.lock | 89 ++++++++++++++++++++++++++-------------------------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b4e0a6c..b77dec1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,34 +1,34 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (3.2.6) - actionpack (= 3.2.6) + actionmailer (3.2.7) + actionpack (= 3.2.7) mail (~> 2.4.4) - actionpack (3.2.6) - activemodel (= 3.2.6) - activesupport (= 3.2.6) + actionpack (3.2.7) + activemodel (= 3.2.7) + activesupport (= 3.2.7) builder (~> 3.0.0) erubis (~> 2.7.0) - journey (~> 1.0.1) + journey (~> 1.0.4) rack (~> 1.4.0) rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.1.3) - activemodel (3.2.6) - activesupport (= 3.2.6) + activemodel (3.2.7) + activesupport (= 3.2.7) builder (~> 3.0.0) - activerecord (3.2.6) - activemodel (= 3.2.6) - activesupport (= 3.2.6) + activerecord (3.2.7) + activemodel (= 3.2.7) + activesupport (= 3.2.7) arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.2.6) - activemodel (= 3.2.6) - activesupport (= 3.2.6) - activesupport (3.2.6) + activeresource (3.2.7) + activemodel (= 3.2.7) + activesupport (= 3.2.7) + activesupport (3.2.7) i18n (~> 0.6) multi_json (~> 1.0) - addressable (2.2.8) + addressable (2.3.2) arel (3.0.2) bcrypt-ruby (3.0.1) bootstrap-sass (2.0.4.0) @@ -41,8 +41,8 @@ GEM rack-test (>= 0.5.4) selenium-webdriver (~> 2.0) xpath (~> 0.1.4) - childprocess (0.3.3) - ffi (~> 1.0.6) + childprocess (0.3.4) + ffi (~> 1.0, >= 1.0.6) coffee-rails (3.2.2) coffee-script (>= 2.2.0) railties (~> 3.2.0) @@ -65,15 +65,16 @@ GEM orm_adapter (~> 0.1) railties (~> 3.1) warden (~> 1.2.1) - devise_invitable (1.0.2) + devise_invitable (1.0.3) + actionmailer (~> 3.0) devise (>= 2.0.0) - rails (~> 3.0) + railties (~> 3.0) diff-lcs (1.1.3) email_spec (1.2.1) mail (~> 2.2) rspec (~> 2.0) erubis (2.7.0) - excon (0.14.3) + excon (0.15.4) execjs (1.4.0) multi_json (~> 1.0) factory_girl (3.5.0) @@ -81,24 +82,24 @@ GEM factory_girl_rails (3.5.0) factory_girl (~> 3.5.0) railties (>= 3.0.0) - ffi (1.0.11) + ffi (1.1.2) gherkin (2.11.1) json (>= 1.4.6) - google_visualr (2.1.2) + google_visualr (2.1.3) haml (3.1.6) haml-rails (0.3.4) actionpack (~> 3.0) activesupport (~> 3.0) haml (~> 3.0) railties (~> 3.0) - heroku (2.28.10) - heroku-api (~> 0.2.7) + heroku (2.30.1) + heroku-api (~> 0.3.1) launchy (>= 0.3.2) netrc (~> 0.7.5) rest-client (~> 1.6.1) rubyzip - heroku-api (0.2.7) - excon (~> 0.14.3) + heroku-api (0.3.1) + excon (~> 0.15.4) hike (1.2.1) hominid (3.0.4) i18n (0.6.0) @@ -108,10 +109,10 @@ GEM jquery-rails (2.0.2) railties (>= 3.2.0, < 5.0) thor (~> 0.14) - json (1.7.3) - launchy (2.1.0) - addressable (~> 2.2.6) - libwebsocket (0.1.3) + json (1.7.4) + launchy (2.1.1) + addressable (~> 2.3) + libwebsocket (0.1.5) addressable mail (2.4.4) i18n (>= 0.4.0) @@ -130,17 +131,17 @@ GEM rack rack-test (0.6.1) rack (>= 1.0) - rails (3.2.6) - actionmailer (= 3.2.6) - actionpack (= 3.2.6) - activerecord (= 3.2.6) - activeresource (= 3.2.6) - activesupport (= 3.2.6) + rails (3.2.7) + actionmailer (= 3.2.7) + actionpack (= 3.2.7) + activerecord (= 3.2.7) + activeresource (= 3.2.7) + activesupport (= 3.2.7) bundler (~> 1.0) - railties (= 3.2.6) - railties (3.2.6) - actionpack (= 3.2.6) - activesupport (= 3.2.6) + railties (= 3.2.7) + railties (3.2.7) + actionpack (= 3.2.7) + activesupport (= 3.2.7) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) @@ -155,8 +156,8 @@ GEM rspec-core (~> 2.11.0) rspec-expectations (~> 2.11.0) rspec-mocks (~> 2.11.0) - rspec-core (2.11.0) - rspec-expectations (2.11.1) + rspec-core (2.11.1) + rspec-expectations (2.11.2) diff-lcs (~> 1.1.3) rspec-mocks (2.11.1) rspec-rails (2.11.0) @@ -170,7 +171,7 @@ GEM railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) - selenium-webdriver (2.24.0) + selenium-webdriver (2.25.0) childprocess (>= 0.2.5) libwebsocket (~> 0.1.3) multi_json (~> 1.0) From 1a5ffebf018f3a61d4838fba80b4fab728e20f46 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Mon, 30 Jul 2012 21:59:49 -0700 Subject: [PATCH 21/41] updated to Rails 3.2.7 --- Gemfile | 2 +- Gemfile.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index d6b802c..4ac767d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' ruby "1.9.3" -gem "rails", "~> 3.2.5" +gem "rails", "~> 3.2.7" gem 'sqlite3' group :assets do diff --git a/Gemfile.lock b/Gemfile.lock index b77dec1..eed1ec8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -220,7 +220,7 @@ DEPENDENCIES jquery-datatables-rails (>= 1.10.0) jquery-rails launchy (>= 2.1.0) - rails (~> 3.2.5) + rails (~> 3.2.7) rolify (>= 3.1.0) rspec-rails (>= 2.10.1) sass-rails (~> 3.2.3) From c1d40fe4b4863ace95b97ab77b1fa3b6a2f78279 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Thu, 23 Aug 2012 10:42:47 -0700 Subject: [PATCH 22/41] updated to Rails 3.2.8 --- Gemfile | 1 + Gemfile.lock | 102 ++++++++++++++++++++++++++------------------------- 2 files changed, 53 insertions(+), 50 deletions(-) diff --git a/Gemfile b/Gemfile index 4ac767d..3ffd5bf 100644 --- a/Gemfile +++ b/Gemfile @@ -9,6 +9,7 @@ group :assets do gem 'coffee-rails', '~> 3.2.1' gem 'uglifier', '>= 1.0.3' end +gem "rubygems-update", "~> 1.8.24" gem 'jquery-rails' gem "haml", ">= 3.1.6" gem "haml-rails", ">= 0.3.4", :group => :development diff --git a/Gemfile.lock b/Gemfile.lock index eed1ec8..59f21e2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,12 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (3.2.7) - actionpack (= 3.2.7) + actionmailer (3.2.8) + actionpack (= 3.2.8) mail (~> 2.4.4) - actionpack (3.2.7) - activemodel (= 3.2.7) - activesupport (= 3.2.7) + actionpack (3.2.8) + activemodel (= 3.2.8) + activesupport (= 3.2.8) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) @@ -14,18 +14,18 @@ GEM rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.1.3) - activemodel (3.2.7) - activesupport (= 3.2.7) + activemodel (3.2.8) + activesupport (= 3.2.8) builder (~> 3.0.0) - activerecord (3.2.7) - activemodel (= 3.2.7) - activesupport (= 3.2.7) + activerecord (3.2.8) + activemodel (= 3.2.8) + activesupport (= 3.2.8) arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.2.7) - activemodel (= 3.2.7) - activesupport (= 3.2.7) - activesupport (3.2.7) + activeresource (3.2.8) + activemodel (= 3.2.8) + activesupport (= 3.2.8) + activesupport (3.2.8) i18n (~> 0.6) multi_json (~> 1.0) addressable (2.3.2) @@ -41,7 +41,7 @@ GEM rack-test (>= 0.5.4) selenium-webdriver (~> 2.0) xpath (~> 0.1.4) - childprocess (0.3.4) + childprocess (0.3.5) ffi (~> 1.0, >= 1.0.6) coffee-rails (3.2.2) coffee-script (>= 2.2.0) @@ -65,52 +65,52 @@ GEM orm_adapter (~> 0.1) railties (~> 3.1) warden (~> 1.2.1) - devise_invitable (1.0.3) + devise_invitable (1.1.0) actionmailer (~> 3.0) - devise (>= 2.0.0) + devise (>= 2.1.0) railties (~> 3.0) diff-lcs (1.1.3) email_spec (1.2.1) mail (~> 2.2) rspec (~> 2.0) erubis (2.7.0) - excon (0.15.4) + excon (0.16.1) execjs (1.4.0) multi_json (~> 1.0) - factory_girl (3.5.0) + factory_girl (4.0.0) activesupport (>= 3.0.0) - factory_girl_rails (3.5.0) - factory_girl (~> 3.5.0) + factory_girl_rails (4.0.0) + factory_girl (~> 4.0.0) railties (>= 3.0.0) - ffi (1.1.2) - gherkin (2.11.1) + ffi (1.1.5) + gherkin (2.11.2) json (>= 1.4.6) google_visualr (2.1.3) - haml (3.1.6) + haml (3.1.7) haml-rails (0.3.4) actionpack (~> 3.0) activesupport (~> 3.0) haml (~> 3.0) railties (~> 3.0) - heroku (2.30.1) - heroku-api (~> 0.3.1) + heroku (2.30.5) + heroku-api (~> 0.3.4) launchy (>= 0.3.2) - netrc (~> 0.7.5) + netrc (~> 0.7.7) rest-client (~> 1.6.1) rubyzip - heroku-api (0.3.1) - excon (~> 0.15.4) + heroku-api (0.3.4) + excon (~> 0.16.1) hike (1.2.1) - hominid (3.0.4) + hominid (3.0.5) i18n (0.6.0) journey (1.0.4) jquery-datatables-rails (1.10.0) jquery-rails - jquery-rails (2.0.2) - railties (>= 3.2.0, < 5.0) + jquery-rails (2.1.1) + railties (>= 3.1.0, < 5.0) thor (~> 0.14) - json (1.7.4) - launchy (2.1.1) + json (1.7.5) + launchy (2.1.2) addressable (~> 2.3) libwebsocket (0.1.5) addressable @@ -120,7 +120,7 @@ GEM treetop (~> 1.4.8) mime-types (1.19) multi_json (1.3.6) - netrc (0.7.5) + netrc (0.7.7) nokogiri (1.5.5) orm_adapter (0.4.0) polyglot (0.3.3) @@ -131,17 +131,17 @@ GEM rack rack-test (0.6.1) rack (>= 1.0) - rails (3.2.7) - actionmailer (= 3.2.7) - actionpack (= 3.2.7) - activerecord (= 3.2.7) - activeresource (= 3.2.7) - activesupport (= 3.2.7) + rails (3.2.8) + actionmailer (= 3.2.8) + actionpack (= 3.2.8) + activerecord (= 3.2.8) + activeresource (= 3.2.8) + activesupport (= 3.2.8) bundler (~> 1.0) - railties (= 3.2.7) - railties (3.2.7) - actionpack (= 3.2.7) - activesupport (= 3.2.7) + railties (= 3.2.8) + railties (3.2.8) + actionpack (= 3.2.8) + activesupport (= 3.2.8) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) @@ -151,7 +151,7 @@ GEM json (~> 1.4) rest-client (1.6.7) mime-types (>= 1.16) - rolify (3.1.0) + rolify (3.2.0) rspec (2.11.0) rspec-core (~> 2.11.0) rspec-expectations (~> 2.11.0) @@ -159,14 +159,15 @@ GEM rspec-core (2.11.1) rspec-expectations (2.11.2) diff-lcs (~> 1.1.3) - rspec-mocks (2.11.1) + rspec-mocks (2.11.2) rspec-rails (2.11.0) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) rspec (~> 2.11.0) + rubygems-update (1.8.24) rubyzip (0.9.9) - sass (3.1.20) + sass (3.2.1) sass-rails (3.2.5) railties (~> 3.2.0) sass (>= 3.1.10) @@ -184,13 +185,13 @@ GEM rack (~> 1.0) tilt (~> 1.1, != 1.3.0) sqlite3 (1.3.6) - thor (0.15.4) + thor (0.16.0) tilt (1.3.3) treetop (1.4.10) polyglot polyglot (>= 0.3.1) tzinfo (0.3.33) - uglifier (1.2.6) + uglifier (1.2.7) execjs (>= 0.3.0) multi_json (~> 1.3) warden (1.2.1) @@ -223,6 +224,7 @@ DEPENDENCIES rails (~> 3.2.7) rolify (>= 3.1.0) rspec-rails (>= 2.10.1) + rubygems-update (~> 1.8.24) sass-rails (~> 3.2.3) simple_form sqlite3 From 271f70b01d1c6bdcebcd18edd8dd5ceaf40f303c Mon Sep 17 00:00:00 2001 From: Will Schive Date: Thu, 23 Aug 2012 10:54:50 -0700 Subject: [PATCH 23/41] merged upstream --- Gemfile.lock | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 59f21e2..bf8b22b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -65,10 +65,6 @@ GEM orm_adapter (~> 0.1) railties (~> 3.1) warden (~> 1.2.1) - devise_invitable (1.1.0) - actionmailer (~> 3.0) - devise (>= 2.1.0) - railties (~> 3.0) diff-lcs (1.1.3) email_spec (1.2.1) mail (~> 2.2) @@ -210,7 +206,6 @@ DEPENDENCIES cucumber-rails (>= 1.3.0) database_cleaner (>= 0.8.0) devise (>= 2.1.2) - devise_invitable (>= 1.0.2) email_spec (>= 1.2.1) factory_girl_rails (>= 3.5.0) google_visualr (>= 2.1.2) From 6f25660c219c99e7d051ab09e347b23ddd5191f5 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Mon, 3 Sep 2012 10:00:25 -0700 Subject: [PATCH 24/41] bundle updated --- Gemfile.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index bf8b22b..d81e63d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -31,7 +31,7 @@ GEM addressable (2.3.2) arel (3.0.2) bcrypt-ruby (3.0.1) - bootstrap-sass (2.0.4.0) + bootstrap-sass (2.0.4.2) builder (3.0.0) cancan (1.6.8) capybara (1.1.2) @@ -70,7 +70,7 @@ GEM mail (~> 2.2) rspec (~> 2.0) erubis (2.7.0) - excon (0.16.1) + excon (0.16.2) execjs (1.4.0) multi_json (~> 1.0) factory_girl (4.0.0) @@ -88,7 +88,7 @@ GEM activesupport (~> 3.0) haml (~> 3.0) railties (~> 3.0) - heroku (2.30.5) + heroku (2.31.2) heroku-api (~> 0.3.4) launchy (>= 0.3.2) netrc (~> 0.7.7) @@ -98,9 +98,9 @@ GEM excon (~> 0.16.1) hike (1.2.1) hominid (3.0.5) - i18n (0.6.0) + i18n (0.6.1) journey (1.0.4) - jquery-datatables-rails (1.10.0) + jquery-datatables-rails (1.11.0) jquery-rails jquery-rails (2.1.1) railties (>= 3.1.0, < 5.0) @@ -187,9 +187,9 @@ GEM polyglot polyglot (>= 0.3.1) tzinfo (0.3.33) - uglifier (1.2.7) + uglifier (1.3.0) execjs (>= 0.3.0) - multi_json (~> 1.3) + multi_json (~> 1.0, >= 1.0.2) warden (1.2.1) rack (>= 1.0) xpath (0.1.4) From d947ef2d176bd12aaff77862a33f3aa6336fce49 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Mon, 3 Sep 2012 10:19:37 -0700 Subject: [PATCH 25/41] merged upstream all tests pass --- Gemfile.lock | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7d29d05..a41cba8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -139,6 +139,8 @@ GEM rake (0.9.2.2) rdoc (3.12) json (~> 1.4) + rest-client (1.6.7) + mime-types (>= 1.16) rolify (3.2.0) rspec (2.11.0) rspec-core (~> 2.11.0) @@ -153,6 +155,7 @@ GEM activesupport (>= 3.0) railties (>= 3.0) rspec (~> 2.11.0) + rubygems-update (1.8.24) rubyzip (0.9.9) sass (3.2.1) sass-rails (3.2.5) @@ -205,9 +208,10 @@ DEPENDENCIES jquery-datatables-rails (>= 1.10.0) jquery-rails launchy (>= 2.1.2) - rails (= 3.2.8) + rails (~> 3.2.8) rolify (>= 3.2.0) rspec-rails (>= 2.11.0) + rubygems-update (~> 1.8.24) sass-rails (~> 3.2.3) simple_form (>= 2.0.2) sqlite3 From 5ca628b9faaa8ea56e6acf608a2baeb321b063b5 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Sat, 24 Nov 2012 09:54:24 -0800 Subject: [PATCH 26/41] installed Heroku CLI, removed Heroku gem --- Gemfile | 1 - Gemfile.lock | 29 ++++++++++------------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/Gemfile b/Gemfile index 0a3c2c3..8a1f8f8 100644 --- a/Gemfile +++ b/Gemfile @@ -28,4 +28,3 @@ gem "simple_form", ">= 2.0.4" gem "google_visualr", ">= 2.1.2" gem "jquery-datatables-rails", ">= 1.11.1" gem "quiet_assets", ">= 1.0.1", :group => :development -gem "heroku" diff --git a/Gemfile.lock b/Gemfile.lock index efec627..ffdbff6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -31,11 +31,11 @@ GEM addressable (2.3.2) arel (3.0.2) bcrypt-ruby (3.0.1) - bootstrap-sass (2.2.1.0) + bootstrap-sass (2.2.1.1) sass (~> 3.2) builder (3.0.4) cancan (1.6.8) - capybara (2.0.0) + capybara (2.0.1) mime-types (>= 1.16) nokogiri (>= 1.3.3) rack (>= 1.0.0) @@ -71,7 +71,6 @@ GEM launchy (~> 2.1) mail (~> 2.2) erubis (2.7.0) - excon (0.16.2) execjs (1.4.0) multi_json (~> 1.0) factory_girl (4.1.0) @@ -79,18 +78,10 @@ GEM factory_girl_rails (4.1.0) factory_girl (~> 4.1.0) railties (>= 3.0.0) - ffi (1.1.5) + ffi (1.2.0) gherkin (2.11.5) json (>= 1.4.6) google_visualr (2.1.5) - heroku (2.31.2) - heroku-api (~> 0.3.4) - launchy (>= 0.3.2) - netrc (~> 0.7.7) - rest-client (~> 1.6.1) - rubyzip - heroku-api (0.3.4) - excon (~> 0.16.1) hike (1.2.1) hominid (3.0.5) i18n (0.6.1) @@ -103,15 +94,14 @@ GEM json (1.7.5) launchy (2.1.2) addressable (~> 2.3) - libwebsocket (0.1.5) - addressable + libwebsocket (0.1.6.1) + websocket mail (2.4.4) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.19) multi_json (1.3.7) - netrc (0.7.7) nokogiri (1.5.5) orm_adapter (0.4.0) polyglot (0.3.3) @@ -139,11 +129,9 @@ GEM rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) - rake (10.0.1) + rake (10.0.2) rdoc (3.12) json (~> 1.4) - rest-client (1.6.7) - mime-types (>= 1.16) rolify (3.2.0) rspec-core (2.12.0) rspec-expectations (2.12.0) @@ -156,6 +144,7 @@ GEM rspec-core (~> 2.12.0) rspec-expectations (~> 2.12.0) rspec-mocks (~> 2.12.0) + rubygems-update (1.8.24) rubyzip (0.9.9) sass (3.2.3) sass-rails (3.2.5) @@ -187,6 +176,7 @@ GEM multi_json (~> 1.0, >= 1.0.2) warden (1.2.1) rack (>= 1.0) + websocket (1.0.4) xpath (1.0.0) nokogiri (~> 1.3) @@ -204,15 +194,16 @@ DEPENDENCIES email_spec (>= 1.2.1) factory_girl_rails (>= 4.1.0) google_visualr (>= 2.1.2) - heroku hominid (>= 3.0.5) jquery-datatables-rails (>= 1.11.1) jquery-rails launchy (>= 2.1.2) quiet_assets (>= 1.0.1) rails (= 3.2.9) + railties (~> 3.2.8) rolify (>= 3.2.0) rspec-rails (>= 2.11.4) + rubygems-update (~> 1.8.24) sass-rails (~> 3.2.3) simple_form (>= 2.0.4) sqlite3 From a6061c532a2f90102ce7dfa918c8462016036fb9 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Sat, 5 Jan 2013 19:55:23 -0800 Subject: [PATCH 27/41] updated to rails 3.2.10 --- Gemfile | 2 +- Gemfile.lock | 74 ++++++++++++++++++++++++++-------------------------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/Gemfile b/Gemfile index 2536561..8035d0d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' ruby "1.9.3" -gem 'rails', '3.2.9' +gem 'rails', '3.2.10' gem 'sqlite3' group :assets do diff --git a/Gemfile.lock b/Gemfile.lock index 32fab82..18e5db3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,12 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (3.2.9) - actionpack (= 3.2.9) + actionmailer (3.2.10) + actionpack (= 3.2.10) mail (~> 2.4.4) - actionpack (3.2.9) - activemodel (= 3.2.9) - activesupport (= 3.2.9) + actionpack (3.2.10) + activemodel (= 3.2.10) + activesupport (= 3.2.10) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) @@ -14,28 +14,28 @@ GEM rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.2.1) - activemodel (3.2.9) - activesupport (= 3.2.9) + activemodel (3.2.10) + activesupport (= 3.2.10) builder (~> 3.0.0) - activerecord (3.2.9) - activemodel (= 3.2.9) - activesupport (= 3.2.9) + activerecord (3.2.10) + activemodel (= 3.2.10) + activesupport (= 3.2.10) arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.2.9) - activemodel (= 3.2.9) - activesupport (= 3.2.9) - activesupport (3.2.9) + activeresource (3.2.10) + activemodel (= 3.2.10) + activesupport (= 3.2.10) + activesupport (3.2.10) i18n (~> 0.6) multi_json (~> 1.0) addressable (2.3.2) arel (3.0.2) bcrypt-ruby (3.0.1) - bootstrap-sass (2.2.1.1) + bootstrap-sass (2.2.2.0) sass (~> 3.2) builder (3.0.4) cancan (1.6.8) - capybara (2.0.1) + capybara (2.0.2) mime-types (>= 1.16) nokogiri (>= 1.3.3) rack (>= 1.0.0) @@ -91,7 +91,7 @@ GEM jquery-rails (2.1.4) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - json (1.7.5) + json (1.7.6) launchy (2.1.2) addressable (~> 2.3) libwebsocket (0.1.7.1) @@ -102,8 +102,8 @@ GEM mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.19) - multi_json (1.4.0) - nokogiri (1.5.5) + multi_json (1.5.0) + nokogiri (1.5.6) orm_adapter (0.4.0) polyglot (0.3.3) quiet_assets (1.0.1) @@ -115,29 +115,29 @@ GEM rack rack-test (0.6.2) rack (>= 1.0) - rails (3.2.9) - actionmailer (= 3.2.9) - actionpack (= 3.2.9) - activerecord (= 3.2.9) - activeresource (= 3.2.9) - activesupport (= 3.2.9) + rails (3.2.10) + actionmailer (= 3.2.10) + actionpack (= 3.2.10) + activerecord (= 3.2.10) + activeresource (= 3.2.10) + activesupport (= 3.2.10) bundler (~> 1.0) - railties (= 3.2.9) - railties (3.2.9) - actionpack (= 3.2.9) - activesupport (= 3.2.9) + railties (= 3.2.10) + railties (3.2.10) + actionpack (= 3.2.10) + activesupport (= 3.2.10) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) - rake (10.0.2) + rake (10.0.3) rdoc (3.12) json (~> 1.4) rolify (3.2.0) - rspec-core (2.12.1) - rspec-expectations (2.12.0) + rspec-core (2.12.2) + rspec-expectations (2.12.1) diff-lcs (~> 1.1.3) - rspec-mocks (2.12.0) + rspec-mocks (2.12.1) rspec-rails (2.12.0) actionpack (>= 3.0) activesupport (>= 3.0) @@ -147,12 +147,12 @@ GEM rspec-mocks (~> 2.12.0) rubygems-update (1.8.24) rubyzip (0.9.9) - sass (3.2.3) + sass (3.2.5) sass-rails (3.2.5) railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) - selenium-webdriver (2.27.1) + selenium-webdriver (2.27.2) childprocess (>= 0.2.5) libwebsocket (~> 0.1.3) multi_json (~> 1.0) @@ -177,7 +177,7 @@ GEM multi_json (~> 1.0, >= 1.0.2) warden (1.2.1) rack (>= 1.0) - websocket (1.0.4) + websocket (1.0.6) xpath (1.0.0) nokogiri (~> 1.3) @@ -200,7 +200,7 @@ DEPENDENCIES jquery-rails launchy (>= 2.1.2) quiet_assets (>= 1.0.1) - rails (= 3.2.9) + rails (= 3.2.10) railties (~> 3.2.8) rolify (>= 3.2.0) rspec-rails (>= 2.11.4) From daef98425521db1da9984b62cba2d952169628f5 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Thu, 10 Jan 2013 22:17:14 -0800 Subject: [PATCH 28/41] update to rails 3.2.11 --- Gemfile | 2 +- Gemfile.lock | 52 ++++++++++++++++++++++++++-------------------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Gemfile b/Gemfile index 8035d0d..97e4dab 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' ruby "1.9.3" -gem 'rails', '3.2.10' +gem 'rails', '3.2.11' gem 'sqlite3' group :assets do diff --git a/Gemfile.lock b/Gemfile.lock index 18e5db3..47984ce 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,12 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (3.2.10) - actionpack (= 3.2.10) + actionmailer (3.2.11) + actionpack (= 3.2.11) mail (~> 2.4.4) - actionpack (3.2.10) - activemodel (= 3.2.10) - activesupport (= 3.2.10) + actionpack (3.2.11) + activemodel (= 3.2.11) + activesupport (= 3.2.11) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) @@ -14,18 +14,18 @@ GEM rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.2.1) - activemodel (3.2.10) - activesupport (= 3.2.10) + activemodel (3.2.11) + activesupport (= 3.2.11) builder (~> 3.0.0) - activerecord (3.2.10) - activemodel (= 3.2.10) - activesupport (= 3.2.10) + activerecord (3.2.11) + activemodel (= 3.2.11) + activesupport (= 3.2.11) arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.2.10) - activemodel (= 3.2.10) - activesupport (= 3.2.10) - activesupport (3.2.10) + activeresource (3.2.11) + activemodel (= 3.2.11) + activesupport (= 3.2.11) + activesupport (3.2.11) i18n (~> 0.6) multi_json (~> 1.0) addressable (2.3.2) @@ -108,24 +108,24 @@ GEM polyglot (0.3.3) quiet_assets (1.0.1) railties (~> 3.1) - rack (1.4.1) + rack (1.4.3) rack-cache (1.2) rack (>= 0.4) rack-ssl (1.3.2) rack rack-test (0.6.2) rack (>= 1.0) - rails (3.2.10) - actionmailer (= 3.2.10) - actionpack (= 3.2.10) - activerecord (= 3.2.10) - activeresource (= 3.2.10) - activesupport (= 3.2.10) + rails (3.2.11) + actionmailer (= 3.2.11) + actionpack (= 3.2.11) + activerecord (= 3.2.11) + activeresource (= 3.2.11) + activesupport (= 3.2.11) bundler (~> 1.0) - railties (= 3.2.10) - railties (3.2.10) - actionpack (= 3.2.10) - activesupport (= 3.2.10) + railties (= 3.2.11) + railties (3.2.11) + actionpack (= 3.2.11) + activesupport (= 3.2.11) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) @@ -200,7 +200,7 @@ DEPENDENCIES jquery-rails launchy (>= 2.1.2) quiet_assets (>= 1.0.1) - rails (= 3.2.10) + rails (= 3.2.11) railties (~> 3.2.8) rolify (>= 3.2.0) rspec-rails (>= 2.11.4) From fad30a5a072c30d0c526dd69e8c8577d1dcad3fb Mon Sep 17 00:00:00 2001 From: Will Schive Date: Thu, 14 Mar 2013 15:03:57 -0700 Subject: [PATCH 29/41] updated to Ruby-2.0 Rails-3.2.12 --- .rvmrc | 19 +++++-- Gemfile | 2 +- Gemfile.lock | 151 +++++++++++++++++++++++++-------------------------- 3 files changed, 89 insertions(+), 83 deletions(-) diff --git a/.rvmrc b/.rvmrc index 7375be8..e8dbccc 100644 --- a/.rvmrc +++ b/.rvmrc @@ -6,10 +6,10 @@ # First we specify our desired [@], the @gemset name is optional, # Only full ruby name is supported here, for short names use: # echo "rvm use 1.9.3" > .rvmrc -environment_id="ruby-1.9.3@rails329" +environment_id="ruby-1.9.3-p392@Rails3.2.12" # Uncomment the following lines if you want to verify rvm version per project -# rvmrc_rvm_version="1.14.2 (latest)" # 1.10.1 seams as a safe start +# rvmrc_rvm_version="1.18.19 (master)" # 1.10.1 seams as a safe start # eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || { # echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading." # return 1 @@ -23,11 +23,20 @@ if [[ -d "${rvm_path:-$HOME/.rvm}/environments" && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]] then \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id" - [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] && - \. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true + for __hook in "${rvm_path:-$HOME/.rvm}/hooks/after_use"* + do + if [[ -f "${__hook}" && -x "${__hook}" && -s "${__hook}" ]] + then \. "${__hook}" || true + fi + done + unset __hook + if [[ $- == *i* ]] # check for interactive shells + then echo "Using: $(tput setaf 2)$GEM_HOME$(tput sgr0)" # show the user the ruby and gemset they are using in green + else echo "Using: $GEM_HOME" # don't use colors in non-interactive shells + fi else # If the environment file has not yet been created, use the RVM CLI to select. - rvm --create "$environment_id" || { + rvm --create use "$environment_id" || { echo "Failed to create RVM environment '${environment_id}'." return 1 } diff --git a/Gemfile b/Gemfile index af376bb..42d5bd3 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' -gem 'rails', '3.2.11' +gem 'rails', '3.2.12' gem 'sqlite3' group :assets do gem 'sass-rails', '~> 3.2.3' diff --git a/Gemfile.lock b/Gemfile.lock index 9fca4e0..a933533 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,40 +1,40 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (3.2.11) - actionpack (= 3.2.11) + actionmailer (3.2.12) + actionpack (= 3.2.12) mail (~> 2.4.4) - actionpack (3.2.11) - activemodel (= 3.2.11) - activesupport (= 3.2.11) + actionpack (3.2.12) + activemodel (= 3.2.12) + activesupport (= 3.2.12) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) - rack (~> 1.4.0) + rack (~> 1.4.5) rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.2.1) - activemodel (3.2.11) - activesupport (= 3.2.11) + activemodel (3.2.12) + activesupport (= 3.2.12) builder (~> 3.0.0) - activerecord (3.2.11) - activemodel (= 3.2.11) - activesupport (= 3.2.11) + activerecord (3.2.12) + activemodel (= 3.2.12) + activesupport (= 3.2.12) arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.2.11) - activemodel (= 3.2.11) - activesupport (= 3.2.11) - activesupport (3.2.11) + activeresource (3.2.12) + activemodel (= 3.2.12) + activesupport (= 3.2.12) + activesupport (3.2.12) i18n (~> 0.6) multi_json (~> 1.0) - addressable (2.3.2) + addressable (2.3.3) arel (3.0.2) bcrypt-ruby (3.0.1) - bootstrap-sass (2.2.2.0) + bootstrap-sass (2.3.0.1) sass (~> 3.2) builder (3.0.4) - cancan (1.6.8) + cancan (1.6.9) capybara (2.0.2) mime-types (>= 1.16) nokogiri (>= 1.3.3) @@ -42,122 +42,119 @@ GEM rack-test (>= 0.5.4) selenium-webdriver (~> 2.0) xpath (~> 1.0.0) - childprocess (0.3.6) - ffi (~> 1.0, >= 1.0.6) + childprocess (0.3.9) + ffi (~> 1.0, >= 1.0.11) coffee-rails (3.2.2) coffee-script (>= 2.2.0) railties (~> 3.2.0) coffee-script (2.2.0) coffee-script-source execjs - coffee-script-source (1.4.0) - cucumber (1.2.1) + coffee-script-source (1.6.1) + cucumber (1.2.3) builder (>= 2.1.2) diff-lcs (>= 1.1.3) - gherkin (~> 2.11.0) - json (>= 1.4.6) + gherkin (~> 2.11.6) + multi_json (~> 1.3) cucumber-rails (1.3.0) capybara (>= 1.1.2) cucumber (>= 1.1.8) nokogiri (>= 1.5.0) database_cleaner (0.9.1) - devise (2.2.0) + devise (2.2.3) bcrypt-ruby (~> 3.0) orm_adapter (~> 0.1) railties (~> 3.1) warden (~> 1.2.1) - diff-lcs (1.1.3) + diff-lcs (1.2.1) email_spec (1.4.0) launchy (~> 2.1) mail (~> 2.2) erubis (2.7.0) execjs (1.4.0) multi_json (~> 1.0) - factory_girl (4.1.0) + factory_girl (4.2.0) activesupport (>= 3.0.0) - factory_girl_rails (4.1.0) - factory_girl (~> 4.1.0) + factory_girl_rails (4.2.1) + factory_girl (~> 4.2.0) railties (>= 3.0.0) - ffi (1.3.0) - gherkin (2.11.5) - json (>= 1.4.6) - google_visualr (2.1.5) + ffi (1.4.0) + gherkin (2.11.6) + json (>= 1.7.6) + google_visualr (2.1.7) hike (1.2.1) hominid (3.0.5) - i18n (0.6.1) + i18n (0.6.4) journey (1.0.4) jquery-datatables-rails (1.11.2) jquery-rails - jquery-rails (2.1.4) + jquery-rails (2.2.1) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - json (1.7.6) - launchy (2.1.2) + json (1.7.7) + launchy (2.2.0) addressable (~> 2.3) - libwebsocket (0.1.7.1) - addressable - websocket mail (2.4.4) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) - mime-types (1.19) - multi_json (1.5.0) + mime-types (1.21) + multi_json (1.6.1) nokogiri (1.5.6) orm_adapter (0.4.0) polyglot (0.3.3) - quiet_assets (1.0.1) - railties (~> 3.1) - rack (1.4.3) + quiet_assets (1.0.2) + railties (>= 3.1, < 5.0) + rack (1.4.5) rack-cache (1.2) rack (>= 0.4) - rack-ssl (1.3.2) + rack-ssl (1.3.3) rack rack-test (0.6.2) rack (>= 1.0) - rails (3.2.11) - actionmailer (= 3.2.11) - actionpack (= 3.2.11) - activerecord (= 3.2.11) - activeresource (= 3.2.11) - activesupport (= 3.2.11) + rails (3.2.12) + actionmailer (= 3.2.12) + actionpack (= 3.2.12) + activerecord (= 3.2.12) + activeresource (= 3.2.12) + activesupport (= 3.2.12) bundler (~> 1.0) - railties (= 3.2.11) - railties (3.2.11) - actionpack (= 3.2.11) - activesupport (= 3.2.11) + railties (= 3.2.12) + railties (3.2.12) + actionpack (= 3.2.12) + activesupport (= 3.2.12) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) rake (10.0.3) - rdoc (3.12) + rdoc (3.12.2) json (~> 1.4) rolify (3.2.0) - rspec-core (2.12.2) - rspec-expectations (2.12.1) - diff-lcs (~> 1.1.3) - rspec-mocks (2.12.1) - rspec-rails (2.12.1) + rspec-core (2.13.1) + rspec-expectations (2.13.0) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.13.0) + rspec-rails (2.13.0) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 2.12.0) - rspec-expectations (~> 2.12.0) - rspec-mocks (~> 2.12.0) - rubygems-update (1.8.24) + rspec-core (~> 2.13.0) + rspec-expectations (~> 2.13.0) + rspec-mocks (~> 2.13.0) + rubygems-update (1.8.25) rubyzip (0.9.9) - sass (3.2.5) - sass-rails (3.2.5) + sass (3.2.7) + sass-rails (3.2.6) railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) - selenium-webdriver (2.27.2) + selenium-webdriver (2.31.0) childprocess (>= 0.2.5) - libwebsocket (~> 0.1.3) multi_json (~> 1.0) rubyzip - simple_form (2.0.4) + websocket (~> 1.0.4) + simple_form (2.1.0) actionpack (~> 3.0) activemodel (~> 3.0) sprockets (2.2.2) @@ -165,19 +162,19 @@ GEM multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sqlite3 (1.3.6) - thor (0.16.0) - tilt (1.3.3) + sqlite3 (1.3.7) + thor (0.17.0) + tilt (1.3.5) treetop (1.4.12) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.35) + tzinfo (0.3.37) uglifier (1.3.0) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) warden (1.2.1) rack (>= 1.0) - websocket (1.0.6) + websocket (1.0.7) xpath (1.0.0) nokogiri (~> 1.3) @@ -200,7 +197,7 @@ DEPENDENCIES jquery-rails launchy (>= 2.1.2) quiet_assets (>= 1.0.1) - rails (= 3.2.11) + rails (= 3.2.12) railties (~> 3.2.8) rolify (>= 3.2.0) rspec-rails (>= 2.12.1) From e3802f500e69d9c813d14c4dc3426af026f55f3b Mon Sep 17 00:00:00 2001 From: Will Schive Date: Thu, 14 Mar 2013 16:16:13 -0700 Subject: [PATCH 30/41] .rvmrc changes --- .rvmrc | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/.rvmrc b/.rvmrc index 696e7d6..9b091f4 100644 --- a/.rvmrc +++ b/.rvmrc @@ -5,15 +5,14 @@ # First we specify our desired [@], the @gemset name is optional, # Only full ruby name is supported here, for short names use: -# echo "rvm use 1.9.3" > .rvmrc +# echo "rvm use 1.9.3" > .rvmrc environment_id="ruby-2.0.0@rails-prelaunch-signup" # Uncomment the following lines if you want to verify rvm version per project # rvmrc_rvm_version="1.18.6 (latest)" # 1.10.1 seams as a safe start - # eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || { -# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading." -# return 1 +# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading." +# return 1 # } # First we attempt to load the desired environment directly from the environment @@ -24,26 +23,16 @@ if [[ -d "${rvm_path:-$HOME/.rvm}/environments" && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]] then \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id" -<<<<<<< HEAD - for __hook in "${rvm_path:-$HOME/.rvm}/hooks/after_use"* - do - if [[ -f "${__hook}" && -x "${__hook}" && -s "${__hook}" ]] - then \. "${__hook}" || true - fi - done - unset __hook -======= [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] && \. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true ->>>>>>> upstream/master if [[ $- == *i* ]] # check for interactive shells then echo "Using: $(tput setaf 2)$GEM_HOME$(tput sgr0)" # show the user the ruby and gemset they are using in green else echo "Using: $GEM_HOME" # don't use colors in non-interactive shells fi else # If the environment file has not yet been created, use the RVM CLI to select. - rvm --create use "$environment_id" || { + rvm --create use "$environment_id" || { echo "Failed to create RVM environment '${environment_id}'." return 1 } -fi +fi \ No newline at end of file From 88076e10ca8beb325fc8702189f4338c9df83102 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Thu, 14 Mar 2013 21:37:04 -0700 Subject: [PATCH 31/41] updated Ruby-2.0 Rails-3.2.13.rc2 --- .rvmrc | 2 +- Gemfile | 2 +- Gemfile.lock | 50 +++++++++++++++++++++++++------------------------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.rvmrc b/.rvmrc index 9b091f4..6cf8dc9 100644 --- a/.rvmrc +++ b/.rvmrc @@ -6,7 +6,7 @@ # First we specify our desired [@], the @gemset name is optional, # Only full ruby name is supported here, for short names use: # echo "rvm use 1.9.3" > .rvmrc -environment_id="ruby-2.0.0@rails-prelaunch-signup" +environment_id="ruby-2.0.0@Rails3.2.13_prelaunch" # Uncomment the following lines if you want to verify rvm version per project # rvmrc_rvm_version="1.18.6 (latest)" # 1.10.1 seams as a safe start diff --git a/Gemfile b/Gemfile index d6824fe..2bfd4ce 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' -gem 'rails', '3.2.13.rc1' +gem 'rails', '3.2.13.rc2' gem 'sqlite3' group :assets do gem 'sass-rails', '~> 3.2.3' diff --git a/Gemfile.lock b/Gemfile.lock index d09720c..548004f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,12 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (3.2.13.rc1) - actionpack (= 3.2.13.rc1) + actionmailer (3.2.13.rc2) + actionpack (= 3.2.13.rc2) mail (~> 2.5.3) - actionpack (3.2.13.rc1) - activemodel (= 3.2.13.rc1) - activesupport (= 3.2.13.rc1) + actionpack (3.2.13.rc2) + activemodel (= 3.2.13.rc2) + activesupport (= 3.2.13.rc2) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) @@ -14,18 +14,18 @@ GEM rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.2.1) - activemodel (3.2.13.rc1) - activesupport (= 3.2.13.rc1) + activemodel (3.2.13.rc2) + activesupport (= 3.2.13.rc2) builder (~> 3.0.0) - activerecord (3.2.13.rc1) - activemodel (= 3.2.13.rc1) - activesupport (= 3.2.13.rc1) + activerecord (3.2.13.rc2) + activemodel (= 3.2.13.rc2) + activesupport (= 3.2.13.rc2) arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.2.13.rc1) - activemodel (= 3.2.13.rc1) - activesupport (= 3.2.13.rc1) - activesupport (3.2.13.rc1) + activeresource (3.2.13.rc2) + activemodel (= 3.2.13.rc2) + activesupport (= 3.2.13.rc2) + activesupport (3.2.13.rc2) i18n (= 0.6.1) multi_json (~> 1.0) addressable (2.3.3) @@ -122,17 +122,17 @@ GEM rack rack-test (0.6.2) rack (>= 1.0) - rails (3.2.13.rc1) - actionmailer (= 3.2.13.rc1) - actionpack (= 3.2.13.rc1) - activerecord (= 3.2.13.rc1) - activeresource (= 3.2.13.rc1) - activesupport (= 3.2.13.rc1) + rails (3.2.13.rc2) + actionmailer (= 3.2.13.rc2) + actionpack (= 3.2.13.rc2) + activerecord (= 3.2.13.rc2) + activeresource (= 3.2.13.rc2) + activesupport (= 3.2.13.rc2) bundler (~> 1.0) - railties (= 3.2.13.rc1) - railties (3.2.13.rc1) - actionpack (= 3.2.13.rc1) - activesupport (= 3.2.13.rc1) + railties (= 3.2.13.rc2) + railties (3.2.13.rc2) + actionpack (= 3.2.13.rc2) + activesupport (= 3.2.13.rc2) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) @@ -210,7 +210,7 @@ DEPENDENCIES jquery-rails launchy (>= 2.2.0) quiet_assets (>= 1.0.1) - rails (= 3.2.13.rc1) + rails (= 3.2.13.rc2) railties (~> 3.2.8) rolify (>= 3.2.0) rspec-rails (>= 2.12.2) From 443e60143ff6d121eb368ef8a924ca4fa76e4b16 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Wed, 31 Jul 2013 18:26:25 -0700 Subject: [PATCH 32/41] reset gibbon gem to 0.4.6 --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 9f6fb11..47617d6 100644 --- a/Gemfile +++ b/Gemfile @@ -21,7 +21,7 @@ gem "devise", ">= 2.2.3" gem "cancan", ">= 1.6.9" gem "rolify", ">= 3.2.0" gem "simple_form", ">= 2.1.0" -gem "gibbon", ">= 0.4.2" +gem "gibbon", "= 0.4.6" gem "selenium-webdriver", "~> 2.32.1" gem "quiet_assets", ">= 1.0.2", :group => :development gem "figaro", ">= 0.6.3" diff --git a/Gemfile.lock b/Gemfile.lock index 0cc139f..f949a10 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -92,7 +92,7 @@ GEM rails (>= 3, < 5) gherkin (2.12.0) multi_json (~> 1.3) - gibbon (0.5.0) + gibbon (0.4.6) httparty multi_json (>= 1.3.4) hike (1.2.3) @@ -210,7 +210,7 @@ DEPENDENCIES email_spec (>= 1.4.0) factory_girl_rails (>= 4.2.0) figaro (>= 0.6.3) - gibbon (>= 0.4.2) + gibbon (= 0.4.6) jquery-rails launchy (>= 2.2.0) quiet_assets (>= 1.0.2) From 8d9e2688012b2d91e8d4b7e8141f6de3d9a1a09b Mon Sep 17 00:00:00 2001 From: Will Schive Date: Wed, 31 Jul 2013 19:56:12 -0700 Subject: [PATCH 33/41] reverted confing/environments/production.rb --- config/environments/production.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 98488d3..5dc3d15 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -61,8 +61,8 @@ # Send deprecation notices to registered listeners config.active_support.deprecation = :notify - # config.action_mailer.default_url_options = { :host => 'example.com' } # Development testing - config.action_mailer.default_url_options = { :host => 'goodworksonearth.net' } # Production + config.action_mailer.default_url_options = { :host => 'example.com' } # Development / testing / fork + # config.action_mailer.default_url_options = { :host => 'goodworksonearth.net' } # Production # ActionMailer Config # Setup for production - deliveries, no errors raised config.action_mailer.delivery_method = :smtp From ef8a4a8e75202f1f4a2cb72da25d2547b0c9d540 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Sun, 12 Apr 2015 08:59:13 -0700 Subject: [PATCH 34/41] added devise error message, fixed method typo --- app/controllers/confirmations_controller.rb | 2 +- config/locales/devise.en.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/confirmations_controller.rb b/app/controllers/confirmations_controller.rb index b85b490..4b8678e 100644 --- a/app/controllers/confirmations_controller.rb +++ b/app/controllers/confirmations_controller.rb @@ -26,7 +26,7 @@ def update @confirmable.errors.clear #so that we won't render :new end else - self.class.add_error_on(self, :email, :password_allready_set) + self.class.add_error_on(self, :email, :password_already_set) end end diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index 00f6dc6..95309df 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -28,6 +28,7 @@ en: success: "Successfully authenticated from %{kind} account." passwords: no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided." + password_already_set: "The password has already been set" send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes." send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes." updated: "Your password was changed successfully. You are now signed in." From a51a1668b228cd3c0c6d877c58e05257f4e5fda4 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Mon, 13 Apr 2015 09:17:37 -0700 Subject: [PATCH 35/41] running on Rails 4.0.0, tests need work --- .gitignore | 7 +- .ruby-gemset | 2 +- Gemfile | 57 +- Gemfile.lock | 308 ++++----- README | 13 +- README.textile | 592 +----------------- .../bootstrap_and_overrides.css.scss | 1 - app/controllers/registrations_controller.rb | 6 +- app/models/user.rb | 12 +- bin/bundle | 3 + bin/rails | 4 + bin/rake | 4 + config/application.rb | 67 +- config/application.yml | 17 +- config/boot.rb | 2 - config/environment.rb | 4 +- config/environments/development.rb | 59 +- config/environments/production.rb | 86 +-- config/environments/test.rb | 28 +- config/initializers/cookies.rb | 3 + config/initializers/devise.rb | 7 +- .../devise_permitted_parameters.rb | 18 + .../initializers/filter_parameter_logging.rb | 4 + config/initializers/inflections.rb | 11 +- config/initializers/secret_token.rb | 8 +- config/initializers/session_store.rb | 2 +- config/initializers/wrap_parameters.rb | 12 +- config/locales/en.yml | 22 +- config/routes.rb | 57 +- db/schema.rb | 34 +- db/seeds.rb | 10 +- features/step_definitions/visitor_steps.rb | 5 +- spec/spec_helper.rb | 6 +- 33 files changed, 512 insertions(+), 959 deletions(-) create mode 100755 bin/bundle create mode 100755 bin/rails create mode 100755 bin/rake create mode 100644 config/initializers/cookies.rb create mode 100644 config/initializers/devise_permitted_parameters.rb create mode 100644 config/initializers/filter_parameter_logging.rb diff --git a/.gitignore b/.gitignore index 221f757..dc1f87d 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,11 @@ db/*.sqlite3 .rspec .redcar/ .sass-cache +/config/application.yml +/config/database.yml /config/config.yml +/config/local_env.yml +/config/secrets.yml /coverage.data /coverage/ /db/*.javadb/ @@ -72,6 +76,3 @@ pickle-email-*.html # vim artifacts **.swp - -# Ignore application configuration -/config/application.yml diff --git a/.ruby-gemset b/.ruby-gemset index 1f0d951..7bc4364 100644 --- a/.ruby-gemset +++ b/.ruby-gemset @@ -1 +1 @@ -rails-prelaunch-signup +Rails4.0_prelaunch diff --git a/Gemfile b/Gemfile index 47617d6..e6373d7 100644 --- a/Gemfile +++ b/Gemfile @@ -1,29 +1,36 @@ source 'https://rubygems.org' -gem 'rails', '3.2.13' +ruby '2.0.0' +gem 'rails', '4.0.0' +gem 'rubyzip', '< 1.0.0' gem 'sqlite3' -group :assets do - gem 'sass-rails', '~> 3.2.3' - gem 'coffee-rails', '~> 3.2.1' - gem 'uglifier', '>= 1.0.3' +group :development, :test do + gem 'binding_of_caller', '~> 0.7.2', :platforms => [:mri_19, :rbx] + gem 'rspec-rails', '>= 2.12.2' + gem 'factory_girl_rails', '>= 4.2.0' end -gem 'railties', "~> 3.2.8" -gem "rubygems-update", "~> 1.8.24" +group :test do + gem 'cucumber-rails', '>= 1.3.1', :require => false + gem 'capybara', '>= 2.0.3' + gem 'database_cleaner', '>= 1.0.0.RC1' + gem 'email_spec', '>= 1.4.0' + gem 'launchy', '>= 2.2.0' + gem 'pry' +end +group :development do + gem 'quiet_assets', '>= 1.0.2' + gem 'better_errors', '>= 0.7.2' +end +gem 'bootstrap-sass', '~> 3.3.4.1' +gem 'cancan', '>= 1.6.9' +gem 'coffee-rails', '~> 4.0.0' +gem 'devise', '>= 2.2.3' +gem 'gibbon', git: 'git://github.com/amro/gibbon.git' gem 'jquery-rails' -gem "rspec-rails", ">= 2.12.2", :group => [:development, :test] -gem "database_cleaner", ">= 1.0.0.RC1", :group => :test -gem "email_spec", ">= 1.4.0", :group => :test -gem "cucumber-rails", ">= 1.3.1", :group => :test, :require => false -gem "launchy", ">= 2.2.0", :group => :test -gem "capybara", ">= 2.0.3", :group => :test -gem "factory_girl_rails", ">= 4.2.0", :group => [:development, :test] -gem "bootstrap-sass", ">= 2.3.0.0" -gem "devise", ">= 2.2.3" -gem "cancan", ">= 1.6.9" -gem "rolify", ">= 3.2.0" -gem "simple_form", ">= 2.1.0" -gem "gibbon", "= 0.4.6" -gem "selenium-webdriver", "~> 2.32.1" -gem "quiet_assets", ">= 1.0.2", :group => :development -gem "figaro", ">= 0.6.3" -gem "better_errors", ">= 0.7.2", :group => :development -gem "binding_of_caller", ">= 0.7.1", :group => :development, :platforms => [:mri_19, :rbx] +gem 'protected_attributes' +gem 'railties', '~> 4.0.0' +gem 'rolify', '>= 3.2.0' +gem 'rubygems-update', '~> 2.4.6' +gem 'sass-rails', '~> 4.0.0' +gem 'selenium-webdriver', '~> 2.32.1' +gem 'simple_form', '>= 2.1.0' +gem 'uglifier', '~> 2.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index f949a10..ae76bfc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,191 +1,211 @@ +GIT + remote: git://github.com/amro/gibbon.git + revision: 1d8ee00f576d354d5cc1f5bd1ec166d8565db1ca + specs: + gibbon (1.1.5) + httparty + multi_json (>= 1.9.0) + GEM remote: https://rubygems.org/ specs: - actionmailer (3.2.13) - actionpack (= 3.2.13) + actionmailer (4.0.0) + actionpack (= 4.0.0) mail (~> 2.5.3) - actionpack (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) - builder (~> 3.0.0) + actionpack (4.0.0) + activesupport (= 4.0.0) + builder (~> 3.1.0) erubis (~> 2.7.0) - journey (~> 1.0.4) - rack (~> 1.4.5) - rack-cache (~> 1.2) - rack-test (~> 0.6.1) - sprockets (~> 2.2.1) - activemodel (3.2.13) - activesupport (= 3.2.13) - builder (~> 3.0.0) - activerecord (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) - arel (~> 3.0.2) - tzinfo (~> 0.3.29) - activeresource (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) - activesupport (3.2.13) - i18n (= 0.6.1) - multi_json (~> 1.0) - addressable (2.3.5) - arel (3.0.2) - bcrypt-ruby (3.1.1) - better_errors (0.9.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.4) + activesupport (4.0.0) + i18n (~> 0.6, >= 0.6.4) + minitest (~> 4.2) + multi_json (~> 1.3) + thread_safe (~> 0.1) + tzinfo (~> 0.3.37) + addressable (2.3.8) + arel (4.0.2) + autoprefixer-rails (5.1.8.1) + execjs + json + bcrypt (3.1.10) + better_errors (2.1.1) coderay (>= 1.0.0) erubis (>= 2.6.6) + rack (>= 0.9.0) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) - bootstrap-sass (2.3.2.1) - sass (~> 3.2) - builder (3.0.4) + bootstrap-sass (3.3.4.1) + autoprefixer-rails (>= 5.0.0.1) + sass (>= 3.2.19) + builder (3.1.4) cancan (1.6.10) - capybara (2.1.0) + capybara (2.4.4) mime-types (>= 1.16) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - childprocess (0.3.9) + childprocess (0.5.6) ffi (~> 1.0, >= 1.0.11) - coderay (1.0.9) - coffee-rails (3.2.2) + coderay (1.1.0) + coffee-rails (4.0.1) coffee-script (>= 2.2.0) - railties (~> 3.2.0) - coffee-script (2.2.0) + railties (>= 4.0.0, < 5.0) + coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.6.3) - cucumber (1.3.5) + coffee-script-source (1.9.1) + cucumber (1.3.19) builder (>= 2.1.2) diff-lcs (>= 1.1.3) - gherkin (~> 2.12.0) - multi_json (~> 1.7.5) - multi_test (>= 0.0.2) - cucumber-rails (1.3.1) - capybara (>= 1.1.2) - cucumber (>= 1.2.0) - nokogiri (>= 1.5.0) - rails (~> 3.0) - database_cleaner (1.0.1) + gherkin (~> 2.12) + multi_json (>= 1.7.5, < 2.0) + multi_test (>= 0.1.2) + cucumber-rails (1.4.2) + capybara (>= 1.1.2, < 3) + cucumber (>= 1.3.8, < 2) + mime-types (>= 1.16, < 3) + nokogiri (~> 1.5) + rails (>= 3, < 5) + database_cleaner (1.4.1) debug_inspector (0.0.2) - devise (3.0.0) - bcrypt-ruby (~> 3.0) + devise (3.4.1) + bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 3.2.6, < 5) + responders + thread_safe (~> 0.1) warden (~> 1.2.3) - diff-lcs (1.2.4) - email_spec (1.5.0) + diff-lcs (1.2.5) + email_spec (1.6.0) launchy (~> 2.1) mail (~> 2.2) erubis (2.7.0) - execjs (1.4.0) - multi_json (~> 1.0) - factory_girl (4.2.0) + execjs (2.5.2) + factory_girl (4.5.0) activesupport (>= 3.0.0) - factory_girl_rails (4.2.1) - factory_girl (~> 4.2.0) + factory_girl_rails (4.5.0) + factory_girl (~> 4.5.0) railties (>= 3.0.0) - ffi (1.9.0) - figaro (0.7.0) - bundler (~> 1.0) - rails (>= 3, < 5) - gherkin (2.12.0) + ffi (1.9.8) + gherkin (2.12.2) multi_json (~> 1.3) - gibbon (0.4.6) - httparty - multi_json (>= 1.3.4) hike (1.2.3) - httparty (0.11.0) - multi_json (~> 1.0) + httparty (0.13.3) + json (~> 1.8) multi_xml (>= 0.5.2) - i18n (0.6.1) - journey (1.0.4) - jquery-rails (3.0.4) + i18n (0.7.0) + jquery-rails (3.1.2) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - json (1.8.0) - launchy (2.3.0) + json (1.8.2) + launchy (2.4.3) addressable (~> 2.3) mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) - mime-types (1.23) - mini_portile (0.5.1) - multi_json (1.7.7) - multi_test (0.0.2) - multi_xml (0.5.4) - nokogiri (1.6.0) - mini_portile (~> 0.5.0) - orm_adapter (0.4.0) - polyglot (0.3.3) - quiet_assets (1.0.2) + method_source (0.8.2) + mime-types (1.25.1) + mini_portile (0.6.2) + minitest (4.7.5) + multi_json (1.11.0) + multi_test (0.1.2) + multi_xml (0.5.5) + nokogiri (1.6.6.2) + mini_portile (~> 0.6.0) + orm_adapter (0.5.0) + polyglot (0.3.5) + protected_attributes (1.0.3) + activemodel (>= 4.0.0, < 5.0) + pry (0.10.1) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + quiet_assets (1.1.0) railties (>= 3.1, < 5.0) - rack (1.4.5) - rack-cache (1.2) - rack (>= 0.4) - rack-ssl (1.3.3) - rack - rack-test (0.6.2) + rack (1.5.2) + rack-test (0.6.3) rack (>= 1.0) - rails (3.2.13) - actionmailer (= 3.2.13) - actionpack (= 3.2.13) - activerecord (= 3.2.13) - activeresource (= 3.2.13) - activesupport (= 3.2.13) - bundler (~> 1.0) - railties (= 3.2.13) - railties (3.2.13) - actionpack (= 3.2.13) - activesupport (= 3.2.13) - rack-ssl (~> 1.3.2) + rails (4.0.0) + actionmailer (= 4.0.0) + actionpack (= 4.0.0) + activerecord (= 4.0.0) + activesupport (= 4.0.0) + bundler (>= 1.3.0, < 2.0) + railties (= 4.0.0) + sprockets-rails (~> 2.0.0) + railties (4.0.0) + actionpack (= 4.0.0) + activesupport (= 4.0.0) rake (>= 0.8.7) - rdoc (~> 3.4) - thor (>= 0.14.6, < 2.0) - rake (10.1.0) - rdoc (3.12.2) - json (~> 1.4) - rolify (3.2.0) - rspec-core (2.14.4) - rspec-expectations (2.14.0) - diff-lcs (>= 1.1.3, < 2.0) - rspec-mocks (2.14.2) - rspec-rails (2.14.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 2.14.0) - rspec-expectations (~> 2.14.0) - rspec-mocks (~> 2.14.0) - rubygems-update (1.8.25) + thor (>= 0.18.1, < 2.0) + rake (10.4.2) + responders (1.1.2) + railties (>= 3.2, < 4.2) + rolify (4.0.0) + rspec-core (3.2.3) + rspec-support (~> 3.2.0) + rspec-expectations (3.2.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.2.0) + rspec-mocks (3.2.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.2.0) + rspec-rails (3.2.1) + actionpack (>= 3.0, < 4.3) + activesupport (>= 3.0, < 4.3) + railties (>= 3.0, < 4.3) + rspec-core (~> 3.2.0) + rspec-expectations (~> 3.2.0) + rspec-mocks (~> 3.2.0) + rspec-support (~> 3.2.0) + rspec-support (3.2.2) + rubygems-update (2.4.6) rubyzip (0.9.9) - sass (3.2.10) - sass-rails (3.2.6) - railties (~> 3.2.0) - sass (>= 3.1.10) - tilt (~> 1.3) + sass (3.2.19) + sass-rails (4.0.5) + railties (>= 4.0.0, < 5.0) + sass (~> 3.2.2) + sprockets (~> 2.8, < 3.0) + sprockets-rails (~> 2.0) selenium-webdriver (2.32.1) childprocess (>= 0.2.5) multi_json (~> 1.0) rubyzip websocket (~> 1.0.4) - simple_form (2.1.0) - actionpack (~> 3.0) - activemodel (~> 3.0) - sprockets (2.2.2) + simple_form (3.1.0) + actionpack (~> 4.0) + activemodel (~> 4.0) + slop (3.6.0) + sprockets (2.12.3) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sqlite3 (1.3.7) - thor (0.18.1) + sprockets-rails (2.0.1) + actionpack (>= 3.0) + activesupport (>= 3.0) + sprockets (~> 2.8) + sqlite3 (1.3.10) + thor (0.19.1) + thread_safe (0.3.5) tilt (1.4.1) - treetop (1.4.14) + treetop (1.4.15) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.37) - uglifier (2.1.2) + tzinfo (0.3.43) + uglifier (2.0.1) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) warden (1.2.3) @@ -199,28 +219,30 @@ PLATFORMS DEPENDENCIES better_errors (>= 0.7.2) - binding_of_caller (>= 0.7.1) - bootstrap-sass (>= 2.3.0.0) + binding_of_caller (~> 0.7.2) + bootstrap-sass (~> 3.3.4.1) cancan (>= 1.6.9) capybara (>= 2.0.3) - coffee-rails (~> 3.2.1) + coffee-rails (~> 4.0.0) cucumber-rails (>= 1.3.1) database_cleaner (>= 1.0.0.RC1) devise (>= 2.2.3) email_spec (>= 1.4.0) factory_girl_rails (>= 4.2.0) - figaro (>= 0.6.3) - gibbon (= 0.4.6) + gibbon! jquery-rails launchy (>= 2.2.0) + protected_attributes + pry quiet_assets (>= 1.0.2) - rails (= 3.2.13) - railties (~> 3.2.8) + rails (= 4.0.0) + railties (~> 4.0.0) rolify (>= 3.2.0) rspec-rails (>= 2.12.2) - rubygems-update (~> 1.8.24) - sass-rails (~> 3.2.3) + rubygems-update (~> 2.4.6) + rubyzip (< 1.0.0) + sass-rails (~> 4.0.0) selenium-webdriver (~> 2.32.1) simple_form (>= 2.1.0) sqlite3 - uglifier (>= 1.0.3) + uglifier (~> 2.0.0) diff --git a/README b/README index b26ea68..af3553e 100644 --- a/README +++ b/README @@ -1,19 +1,18 @@ Rails Prelaunch Signup ======================== -An example Rails 3.2 app for a web startup prelaunch page. +Note of 20150413 : this application is currently being updated to Ruby 2.2.1, Rails 4.2.1. -You can use this project as a starting point for a Rails web application. It requires Rails 3.2 or newer and uses Devise http://github.com/plataformatec/devise for user management and authentication. -________________________ +What began as an example Rails 3.2 app for a web startup prelaunch page, is being brought current. -See the README file on GitHub +________________________ -For more information, please see the updated README file on GitHub: +For more information, please see the README file on GitHub: https://github.com/railsapps/rails-prelaunch-signup ________________________ -License +MIT License -Contact the author for license terms. \ No newline at end of file +Copyright © 2012-2015 Daniel Kehoe \ No newline at end of file diff --git a/README.textile b/README.textile index 697df7e..244bba5 100644 --- a/README.textile +++ b/README.textile @@ -1,10 +1,12 @@ h1. !http://railsapps.github.io/images/rails-36x36.jpg(Rails App for a Startup Prelaunch Signup Site)! Rails App for a Startup Prelaunch Signup Site -Rails 3.2 example application for a “beta launching soon” startup prelaunch signup site. +Note of 20150413 : This fork of the original Rails 3.2 example application for a “beta launching soon” startup prelaunch signup site, is currently being updated to Rails 4.2.1 Ruby 2.2.1. + +Please refer to the original materials : * "Rails Prelaunch Signup App":http://railsapps.github.io/rails-prelaunch-signup/ project page -Best of all, there's a "detailed tutorial":https://tutorials.railsapps.org/rails-prelaunch-signup to show how it is built. +Best of all, there's a "detailed tutorial":https://tutorials.railsapps.org/rails-prelaunch-signup to show how it is built. Go 'Hobo' for free access. You can build this application in only a few minutes using the "Rails Composer":http://railsapps.github.io/rails-composer/ tool. @@ -12,593 +14,17 @@ You can build this application in only a few minutes using the "Rails Composer": Read an "interview with Michael Gajda":http://blog.railsapps.org/post/22543541226/powered-up-by-the-railsapps-project-xplaygrounds-com about how he used the project to launch his startup site. -h4. Notable Forks - -|_. Alternative version |_. |_. Author | -| "rails-prelaunch-signup-1click":https://github.com/chadokruse/rails-prelaunch-signup-1click | single-click email submit (no modal) | "Chad Kruse":http://twitter.com/chadkruser | - h2. !http://twitter-badges.s3.amazonaws.com/t_logo-a.png(Follow on Twitter)!:http://www.twitter.com/rails_apps Follow on Twitter -Follow the project on Twitter: "@rails_apps":http://twitter.com/rails_apps. Please tweet some praise if you like what you've found. +Follow the RailsApps projects on Twitter: "@rails_apps":http://twitter.com/rails_apps. Please tweet some praise to Daniel if you like what you've found. h2. Introduction The initial app for a typical web startup announces the founders' plans and encourages visitors to enter an email address for future notification of the site launch. It's not difficult to build such an app in Rails. -But why build it yourself if others have already done so? This project aims to: - -* eliminate effort spent building an application that meets a common need; -* offer code that is already implemented and tested by a large community; -* provide a well-thought-out app containing most of the features you'll need. - -By using code from this project, you'll be able to: - -* direct your attention to the design and product offer for your prelaunch site; -* get started faster building the ultimate application for your business. - -h2. What Is Implemented — and What Is Not - -This is a complete and fully functional application. - -h4. For the user: - -* an offer with a "request invite" button -* a "request invitation" form in a modal window -* "Thank you" acknowledgement includes social sharing buttons (Twitter, Facebook, Google+) -* visitor receives an email acknowledging their request -* visitor's request for an invitation creates an "unconfirmed" account -* a welcome email when a user is invited by a site administrator -* a link in the welcome email confirms the user's account and sets a password - -h4. For the site owner: - -* administrative dashboard page -* list of all visitors who have requested invitations -* site owner can send individual invitations -* "bulk invitation" feature to send 50, 100, or more invitations -* see status for any user: "uninvited", "confirmed", "last visit" - -h4. Implementation details: - -* Twitter Bootstrap -* modal window for invitation requests updated by AJAX -* Javascript updates the modal window for any form submission errors -* uses an email service provider for transactional email -* captures visitor email addresses for a MailChimp mailing list - -h4. Tutorial shows how to: - -* write user stories -* use Devise for user management and authentication -* use CanCan for role-based authorization -* keep account passwords secret using environment variables -* use git and GitHub for source control -* deploy using Heroku - -h4. Unimplemented - -* queuing (asynchronous processing) for transactional email and MailChimp list capture -* caching -* A/B testing of offers -* Google analytics -* "about" and "contact" pages - -If you add features or improve the implementation, please consider contributing by submitting an issue or pull request from your fork. - -h2. Alternatives - -This is an application for Rails developers who wish to deploy their own application. It is a good stepping stone to building a more complex application for your startup. You'll own your own code and can customize to your needs. - -Unlike a service such as "LaunchRock":http://launchrock.co/, "KickoffLabs":http://kickofflabs.com/ and "Unbounce":http://unbounce.com/, you'll have your own application you can customize as you wish. Just as important, when your visitors sign up, they are creating real user accounts in a user management system you can use after you launch. - -If you do not want to build an application, or you are not a Rails developer, you may wish to consider alternatives. - -h3. Hosted Services - -* "LaunchRock":http://launchrock.com/ - "set up a social launching-soon page in minutes" -* "KickoffLabs":http://www.kickofflabs.com/ - "viral landing pages you'll love in 60 seconds" -* "Prefinery":http://www.prefinery.com/ - "complete beta management platform that encourages social sharing" -* "Unbounce":http://unbounce.com/ - "create, publish & A/B test landing pages" - -h3. WordPress Themes - -WordPress themes are a popular way to stage a startup prelaunch page. - -* "Launch Effect":http://launcheffectapp.com/ - "a WordPress theme for viral launches" - -h3. Similar Projects - -You can find other projects on GitHub that offer similar functionality. - -|_. Author |_. Project |_. Description | -| codelitt | "launchpage-rails":https://github.com/codelitt/launchpage-rails | Signup for two different types of users | -| johngrimes | "t-minus":https://github.com/johngrimes/t-minus | Instant prelaunch page for your Rails 3 app | -| renderedtext | "coming-soon":https://github.com/renderedtext/coming-soon | Sinatra app to show a pre-launch page and collect emails | -| hashrocket | "coming-soon":https://github.com/hashrocket/coming-soon | Sinatra app to register email addresses | -| jbeyers | "django-prelaunch":https://github.com/jbeyers/django-prelaunch | Django app to gather email addresses with a referral mechanism | - -Found others? Please create an issue with your suggestion or email the author. - -h3. Articles and Discussion - -Here are some articles that describe the purpose and options for a startup prelaunch page: - -* "Building An Effective 'Coming Soon' Page for Your Product":http://www.smashingmagazine.com/2011/05/24/building-an-effective-coming-soon-page-for-your-product/ from Smashing Magazine -* "Elements Of A Viral Launch Page":http://spking.com/2011/08/30/roll-your-own-pre-launch-page/ from Smashing Magazine -* "Which Are the Best Startup Prelaunch Pages?":http://www.quora.com/Which-are-the-best-startup-prelaunch-pages from Quora - -Have other suggestions? Please create an issue with your suggestion or email the author. - -h2. RailsApps Examples and Tutorials - -This is one in a series of Rails example apps and tutorials from the "RailsApps Project":http://railsapps.github.io/. - -This application is based on two of the RailsApps example apps: - -* "rails3-devise-rspec-cucumber":https://github.com/RailsApps/rails3-devise-rspec-cucumber -* "rails3-bootstrap-devise-cancan":https://github.com/RailsApps/rails3-bootstrap-devise-cancan - -The first example shows how to set up Devise for user authentication. It also shows how to set up the app to use RSpec and Cucumber for testing. - -The second example shows how to set up Devise and add CanCan to manage access to administrative pages. It also shows how to set up Twitter Bootstrap as a front-end framework for CSS styling. - -You can use this example without studying these example applications; if you find you are lost, it may be helpful to look at the two simpler examples. - -If you want to use the MongoDB datastore instead of ActiveRecord and a SQL database, look at "rails3-mongoid-devise":https://github.com/RailsApps/rails3-mongoid-devise example. - -h2. Tutorial - -An in-depth tutorial is available (subscription required). Subscriptions provide financial support for the RailsApps project. - -You can use the starter app without getting the tutorial. The tutorial provides a detailed explanation of the code: - -h4. "Get the Tutorial":https://tutorials.railsapps.org/rails-prelaunch-signup - -The tutorial documents each step to follow to create the application. Every step is documented concisely, so a complete beginner can create this application without any additional knowledge. However, no explanation is offered for any of the steps, so if you are a beginner, you’re advised to look for an introduction to Rails elsewhere. If you’re new to Rails, see recommendations for a "Rails tutorial":https://tutorials.railsapps.org/rails-tutorial and a list of top resources for "Ruby and Rails":http://railsapps.github.io/ruby-and-rails.html. The article "What is Ruby? And Rails?":http://railsapps.github.io/what-is-ruby-rails.html is a good place to get a basic introduction to Rails. - -If you simply wish to modify the application for your own project, you can generate the application and set it up as described below, without following the tutorial. - -h2. Dependencies - -Before generating your application, you will need: - -* The Ruby language (version 1.9.3 or 2.0.0) -* The Rails gem (version 3.2.13) - -See "Installing Rails":http://railsapps.github.io/installing-rails.html for detailed instructions and advice. - -h2. Accounts You May Need - -Before you start, you may need to set up accounts for hosting and email. - -h3. Hosting - -For easy deployment, use a "platform as a service" provider such as: - -* "Heroku":http://www.heroku.com/ -* "CloudFoundry":http://www.cloudfoundry.com/ -* "EngineYard":http://www.engineyard.com/ -* "OpenShift":https://openshift.redhat.com/app/ - -Instructions are provided for deployment to Heroku. - -h3. Transactional Email - -For simple testing of email, it's easy to use Gmail to send email messages from the application. For deployment, when the application must send dozens or thousands of acknowledgments or invitations, you will need a hosted SMTP relay service (also known as an ESP or "email service provider"). We provide instructions for "Mandrill by MailChimp":http://mandrill.com/. The Mandrill transactional email service integrates well with the MailChimp email list manager service. Plus, you can send up to 12,000 emails/month from the service for free. - -Sign up for a MailChimp account to get started. After you've created your MailChimp account, see the instructions to "Use Mandrill with MailChimp":http://help.mandrill.com/customer/portal/articles/464750-use-mandrill-with-mailchimp. Then get the "Access Information":http://help.mandrill.com/customer/portal/articles/464828-access-information (your SMTP username and password, which is an API key). - -h3. Mailing List - -In addition to sending transactional email messages, you likely will want to send newsletters or announcements to your entire mailing list. The tutorial shows how to add visitors who request an invitation to a "MailChimp":http://mailchimp.com/ list. MailChimp allows you to send up to 12,000 emails/month to list of 2000 or fewer subscribers for free. After you sign up for a MailChimp account, get your API key. Look under "Account" for "API Keys and Authorized Apps." Note that the Mandrill API key (which you get on the "mandrill.com":http://mandrill.com/ site) is different from the MailChimp API key (which you get on the "mailchimp.com":http://mailchimp.com/ site). - -h2. Getting the Application - -You have several options for getting the code. You can _fork_, _clone_, or _generate_. - -h3. Fork - -If you'd like to add features (or bug fixes) to improve the example application, you can fork the GitHub repo and "make pull requests":http://help.github.com/send-pull-requests/. Your code contributions are welcome! - -h3. Clone - -If you want to copy and customize the app with changes that are only useful for your own project, you can clone the GitHub repo. You'll need to search-and-replace the project name throughout the application. You probably should generate the app instead (see below). To clone: - -
-$ git clone git://github.com/RailsApps/rails-prelaunch-signup.git
-
- -You'll need "git":http://git-scm.com/ on your machine. See "Rails and Git":http://railsapps.github.io/rails-git.html. - -h3. Generate - -If you want to use the project as a starter app, use the "Rails Composer":http://railsapps.github.io/rails-composer/ tool to generate a new version of the example app. You'll be able to give it your own project name when you generate the app. Generating the application gives you many additional options. - -To build the example application, run the command: - -
-$ rails new rails-prelaunch-signup -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb -T
-
- -Use the @-T@ flag to skip Test::Unit files. - -The @$@ character indicates a shell prompt; don't include it when you run the command. - -This creates a new Rails app named @rails-prelaunch-signup@ on your computer. You can use a different name if you wish. - -You'll see a prompt: - -
-question  Install an example application?
-      1)  I want to build my own application
-      2)  membership/subscription/saas
-      3)  rails-prelaunch-signup
-      4)  rails3-bootstrap-devise-cancan
-      5)  rails3-devise-rspec-cucumber
-      6)  rails3-mongoid-devise
-      7)  rails3-mongoid-omniauth
-      8)  rails3-subdomains
-
- -Choose *rails-prelaunch-signup*. The Rails Composer tool may give you other options (other choices may have been added since these notes were written). - -The application generator template will ask you for additional preferences: - -
- question  Git branch for the prelaunch app?
-       1)  wip (work-in-progress)
-       2)  master
-       3)  prelaunch
-       4)  staging
- question  Git branch for the main app?
-       1)  None
-       2)  wip (work-in-progress)
-       3)  edge
- question  Web server for development?
-       1)  WEBrick (default)
-       2)  Thin
-       3)  Unicorn
-       4)  Puma
- question  Web server for production?
-       1)  Same as development
-       2)  Thin
-       3)  Unicorn
-       4)  Puma
- question  Template engine?
-       1)  ERB
-       2)  Haml
-       3)  Slim
-   extras  Set a robots.txt file to ban spiders? (y/n)
-   extras  Use or create a project-specific rvm gemset? (y/n)
-   extras  Create a GitHub repository? (y/n)
-
- -h4. Git Branches - -The application template will create Git branches for you. This allows you to maintain two versions of the application: one for immdediate deployment as a prelaunch app; and another version that you can use for ongoing development. I recommend deploying the prelaunch app in the "master" branch. Work on your ultimate application in a "wip" branch. - -h4. Web Servers - -We recommend Thin in development for speed and less noise in the log files. - -If you plan to deploy to Heroku, select Thin as your production webserver. - -h4. Template Engine - -The example application uses the default "ERB" Rails template engine. Optionally, you can use another template engine, such as Haml or Slim. See instructions for "Haml and Rails":http://railsapps.github.io/rails-haml.html. - -h4. Other Choices - -Set a robots.txt file to ban spiders if you want to keep your new site out of Google search results. - -It is a good idea to use "rvm":https://rvm.io/, the Ruby Version Manager, and create a project-specific rvm gemset (not available on Windows). See "Installing Rails":http://railsapps.github.io/installing-rails.html. - -If you choose to create a GitHub repository, the generator will prompt you for a GitHub username and password. - -h4. Troubleshooting - -If you get an error "OpenSSL certificate verify failed" or "Gem::RemoteFetcher::FetchError: SSL_connect" see the article "OpenSSL errors and Rails":http://railsapps.github.io/openssl-certificate-verify-failed.html. - -If you get an error like this: - -
-Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
-    composer  Running 'after bundler' callbacks.
-The template [...] could not be loaded.
-Error: You have already activated ..., but your Gemfile requires ....
-Using bundle exec may solve this.
-
- -It's due to conflicting gem versions. See the article "Rails Error: “You have already activated (…)”":http://railsapps.github.io/rails-error-you-have-already-activated.html. - -h3. Edit the README - -If you're storing the app in a GitHub repository, please edit the README files to add a description of the app and your contact info. If you don't change the README, people will think I am the author of your version of the application. - -h2. Getting Started - -See the article "Installing Rails":http://railsapps.github.io/installing-rails.html to make sure your development environment is prepared properly. - -h3. Use RVM - -I recommend using "rvm":https://rvm.io/, the Ruby Version Manager, to create a project-specific gemset for the application. If you generate the application with the Rails Composer tool, you can create a project-specific gemset. - -h3. Install the Required Gems - -Check the Gemfile to see which gems are used by this application. - -If you used the "Rails Composer":http://railsapps.github.io/rails-composer/ tool to generate the example app, the application template script has already run the @bundle install@ command. - -If not, you should run the @bundle install@ command to install the required gems on your computer: - -
-$ bundle install
-
- -You can check which gems are installed on your computer with: - -
-$ gem list
-
- -Keep in mind that you have installed these gems locally. When you deploy the app to another server, the same gems (and versions) must be available. - -I recommend using "rvm":https://rvm.io/, the Ruby Version Manager, to create a project-specific gemset for the application. See the article "Installing Rails":http://railsapps.github.io/installing-rails.html. - -h3. Configure Email - -You must configure the application for your email account. See the article "Send Email with Rails":http://railsapps.github.io/rails-send-email.html. - -h3. Configure Devise - -You can modify the configuration file for Devise if you want to use something other than the defaults: - -* *config/initializers/devise.rb* - -h3. Configuration File - -The application uses the "figaro gem":https://github.com/laserlemon/figaro to set environment variables. Credentials for your administrator account and email account are set in the *config/application.yml* file. The *.gitignore* file prevents the *config/application.yml* file from being saved in the git repository so your credentials are kept private. See the article "Rails Environment Variables":http://railsapps.github.io/rails-environment-variables.html for more information. - -Modify the file *config/application.yml*: - -
-# Add account credentials and API keys here.
-# See http://railsapps.github.io/rails-environment-variables.html
-# This file should be listed in .gitignore to keep your settings secret!
-# Each entry sets a local environment variable and overrides ENV variables in the Unix shell.
-# For example, setting:
-# GMAIL_USERNAME: Your_Gmail_Username
-# makes 'Your_Gmail_Username' available as ENV["GMAIL_USERNAME"]
-# Add application configuration variables here, as shown below.
-#
-MANDRILL_USERNAME: Your_Username
-MANDRILL_API_KEY: Your_Mandrill_API_Key
-MAILCHIMP_API_KEY: Your_MailChimp_API_Key
-MAILCHIMP_LIST_ID: My_List_ID
-ADMIN_NAME: First User
-ADMIN_EMAIL: user@example.com
-ADMIN_PASSWORD: changeme
-ROLES: [admin, user]
-EMAIL_ADDRESS: user@example.com
-DOMAIN: example.com
-
- -We use Mandrill to increase deliverability for email messages from the application. Provide a @MANDRILL_USERNAME@ and @MANDRILL_API_KEY@. - -When visitors sign up to be notified of our launch, we'll add them to a MailChimp list. Add an environment variable for the MailChimp API key: @MAILCHIMP_API_KEY@. You can find the MailChimp API key under the tab for "Account" on the MailChimp website after you log in. Look for the "Api Keys and Authorized Apps" menu item. - -We'll add @MAILCHIMP_LIST_ID@ for the ID of the mailing list we'll set up in MailChimp. To find the list ID, on the MailChimp "Lists" page, look for the dropdown "gear" menu for the mailing list you've created and click "List Settings and Unique ID." At the bottom of the List Settings page, you'll find the unique ID for the mailing list. - -If you wish, set your name, email address, and password for an administrator's account. If you prefer, you can use the default to sign in to the application and edit the account after deployment. It is always a good idea to change the administrator's password after the application is deployed. - -Specify roles in the configuration file. You will need an "admin" role and "user" role. Remove the "VIP" role as we won't use it. - -We'll add @EMAIL_ADDRESS@ to provide the default sender email address we use when sending email from the application. - -Finally, we'll add @DOMAIN@ which is also used when sending email. - -All configuration values in the *config/application.yml* file are available anywhere in the application as environment variables. For example, @ENV["GMAIL_USERNAME"]@ will return the string "Your_Username". - -If you prefer, you can delete the *config/application.yml* file and set each value as an environment variable in the Unix shell. - -h3. Set Up a Database Seed File - -The *db/seeds.rb* file initializes the database with default values. To keep some data private, and consolidate configuration settings in a single location, we use the *config/application.yml* file to set environment variables and then use the environment variables in the *db/seeds.rb* file. - -
-puts 'ROLES'
-YAML.load(ENV['ROLES']).each do |role|
-  Role.find_or_create_by_name({ :name => role }, :without_protection => true)
-  puts 'role: ' << role
-end
-puts 'DEFAULT USERS'
-user = User.find_or_create_by_email :name => ENV['ADMIN_NAME'].dup, :email => ENV['ADMIN_EMAIL'].dup, :password => ENV['ADMIN_PASSWORD'].dup, :password_confirmation => ENV['ADMIN_PASSWORD'].dup
-puts 'user: ' << user.name
-user.add_role :admin
-user.skip_confirmation!
-user.save!
-
- -The *db/seeds.rb* file reads a list of roles from the *config/application.yml* file and adds the roles to the database. In fact, any new role can be added to the roles datatable with a statement such @user.add_role :superhero@. Setting the roles in the *db/seeds.rb* file simply makes sure each role is listed and available. - -You can change the administrator name, email, and password in this file but it is better to make the changes in the *config/application.yml* file to keep the credentials private. If you decide to include your private password in the *db/seeds.rb* file, be sure to add the filename to your *.gitignore* file so that your password doesn't become available in your public GitHub repository. - -Note that it's not necessary to personalize the *db/seeds.rb* file before you deploy your app. You can deploy the app with an example user and then use the application's "Edit Account" feature to change name, email address, and password after you log in. Use this feature to log in as an administrator and change the user name and password to your own. - -Don't overlook the @user.skip_confirmation!@ and @user.save!@ statements. This application uses the Devise Confirmable module to require that a user confirm a new account by clicking on a link in an email message. You won't be sending the administrator an email message with a confirmation link so you must set the account with the @user.skip_confirmation!@ and @user.save!@ statements. - -You may wish to include additional sample users: - -
-user2 = User.find_or_create_by_email :name => 'Second User', :email => 'user2@example.com', :password => 'changeme', :password_confirmation => 'changeme'
-puts 'user: ' << user2.name
-user2.add_role :VIP
-
- -This will add a second user to the database with a "VIP" role. - -h3. Set the Database - -Prepare the database and add the default user to the database by running the commands: - -
-$ rake db:migrate
-$ rake db:seed
-
- -Use @rake db:reset@ if you want to empty and reseed the database. - -Set the database for running tests: - -
-$ rake db:test:prepare
-
- -If you’re not using "rvm":https://rvm.io/, the Ruby Version Manager, you should preface each rake command with @bundle exec@. You don’t need to use @bundle exec@ if you are using rvm version 1.11.0 or newer. - -h3. Change your Application's Secret Token - -If you've used the Rails Composer tool to generate the application, the application's secret token will be unique, just as with any Rails application generated with the @rails new@ command. - -However, if you've cloned the application directly from GitHub, it is crucial that you change the application's secret token before deploying your application in production mode. Otherwise, people could change their session information, and potentially access your site without permission. Your secret token should be at least 30 characters long and completely random. - -Get a unique secret token: - -
-rake secret
-
- -Edit your *config/initializers/secret_token.rb* file to add the secret token: - -
-RailsPrelaunchSignup::Application.config.secret_token = '...some really long, random string...'
-
- -h2. Test the App - -You can check that your app runs properly by entering the command - -@$ rails server@ - -To see your application in action, open a browser window and navigate to "http://localhost:3000/":http://localhost:3000. - -Sign in as the first user (the administrator) using: - -* email: user@example.com -* password: changeme - -You'll see a navigation link for Admin. Clicking the link will display a page with a list of users at -"http://localhost:3000/users":http://localhost:3000/users. - -If you want to see what the administrative dashboard looks like with many users, you can add a line to the *db/seeds.rb* file to create a hundred bogus users: - -
-100.times {|i| User.create! :name => "User #{i+3}", :email => "user#{i+3}@example.com", :password => 'changeme', :password_confirmation => 'changeme'}
-
- -Then run @$ rake db:reset@ to recreate the database and visit the site again. - -h2. Deploy to Heroku - -Heroku provides low cost, easily configured Rails application hosting. - -For your convenience, here is a "Tutorial for Rails on Heroku":http://railsapps.github.io/rails-heroku-tutorial.html. See the article for details about preparing your application to deploy to Heroku. - -Be sure to set up SSL before you make your application available in production. See the "Heroku documentation on SSL":https://devcenter.heroku.com/articles/ssl or use CloudFlare as described in the tutorial. - -After you've prepared your application as described in the "Tutorial for Rails on Heroku":http://railsapps.github.io/rails-heroku-tutorial.html article, precompile assets, commit to git, and push to Heroku: - -
-$ rake assets:precompile
-$ git add -A
-$ git commit -m "assets compiled for Heroku"
-$ git push heroku master
-
- -You'll need to set the configuration values from the *config/application.yml* file as Heroku environment variables. See the article "Rails Environment Variables":http://railsapps.github.io/rails-environment-variables.html for more information. - -With the figaro gem, just run: - -
-$ rake figaro:heroku
-
- -Alternatively, you can set Heroku environment variables directly. - -Here's how to set environment variables directly on Heroku with @heroku config:add@. - -
-$ heroku config:add MANDRILL_USERNAME='Your_Username' MANDRILL_API_KEY='Your_Mandrill_API_Key'
-$ heroku config:add MAILCHIMP_LIST_ID='Your_List_ID'
-$ heroku config:add ADMIN_NAME='First User' ADMIN_EMAIL='user@example.com' ADMIN_PASSWORD='changeme'
-$ heroku config:add 'ROLES=[admin, user]'
-$ heroku config:add EMAIL_ADDRESS='me@example.com' DOMAIN='example.com'
-
- -Complete Heroku deployment with: - -
-$ heroku run rake db:migrate
-$ heroku run rake db:seed
-
- -h2. Testing - -The example application contains a suite of RSpec unit tests and Cucumber scenarios and step definitions. - -After installing the application, run @rake -T@ to check that rake tasks for RSpec and Cucumber are available. - -Run @rake spec@ to run RSpec tests. - -Run @rake cucumber@ (or more simply, @cucumber@) to run Cucumber scenarios. - -Please send the author a message, create an issue, or submit a pull request if you can contribute improved RSpec or Cucumber files. - -h2. Issues - -Please create a "GitHub issue":http://github.com/RailsApps/rails-prelaunch-signup/issues if you identify any problems or have suggestions for improvements. - -h2. Where to Get Help - -Your best source for help with problems is "Stack Overflow":http://stackoverflow.com/questions/tagged/ruby-on-rails-3. Your issue may have been encountered and addressed by others. - -You can also try "Rails Hotline":http://www.railshotline.com/, a free telephone hotline for Rails help staffed by volunteers. - -h2. Contributing - -If you make improvements to this application, please share with others. - -Send the author a message, create an "issue":http://github.com/RailsApps/rails-prelaunch-signup/issues, or fork the project and submit a pull request. - -If you add functionality to this application, create an alternative implementation, or build an application that is similar, please contact me and I'll add a note to the README so that others can find your work. - -h2. Credits - -Daniel Kehoe implemented the application and wrote the tutorial. - -Is the app useful to you? Follow the project on Twitter: "@rails_apps":http://twitter.com/rails_apps -and tweet some praise. I'd love to know you were helped out by what I've put together. - -h2. MIT License - -"MIT License":http://www.opensource.org/licenses/mit-license - -Copyright © 2012 Daniel Kehoe - -h2. Useful Links +But why build it yourself if others have already done so? -|_. Getting Started |_. Articles |_. Tutorials | -| "Learn Rails":http://learn-rails.com/ | "Twitter Bootstrap and Rails":http://railsapps.github.io/twitter-bootstrap-rails.html | "Rails and Bootstrap":http://railsapps.github.io/rails-bootstrap/ | -| "Ruby and Rails":http://railsapps.github.io/ruby-and-rails.html | "Analytics for Rails":http://railsapps.github.io/rails-google-analytics.html | | -| "What is Ruby on Rails?":http://railsapps.github.io/what-is-ruby-rails.html | "Heroku and Rails":http://railsapps.github.io/rails-heroku-tutorial.html | "Devise with CanCan and Twitter Bootstrap":https://tutorials.railsapps.org/rails3-bootstrap-devise-cancan | -| "Rails Tutorial":https://tutorials.railsapps.org/rails-tutorial | "JavaScript and Rails":http://railsapps.github.io/rails-javascript-include-external.html | "Rails Membership Site with Stripe":https://tutorials.railsapps.org/rails-stripe-membership-saas | -| "Installing Rails":http://railsapps.github.io/installing-rails.html | "Rails Environment Variables":http://railsapps.github.io/rails-environment-variables.html | "Rails Subscription Site with Recurly":https://tutorials.railsapps.org/rails-recurly-subscription-saas | -| "Updating Rails":http://railsapps.github.io/updating-rails.html | "Git and Rails":http://railsapps.github.io/rails-git.html | "Startup Prelaunch Signup Application":http://railsapps.github.io/tutorial-rails-prelaunch-signup.html | -| "Rails Composer":http://railsapps.github.io/rails-composer/ | "Email and Rails":http://railsapps.github.io/rails-send-email.html | "Devise with RSpec and Cucumber":http://railsapps.github.io/tutorial-rails-devise-rspec-cucumber.html | -| "Rails Examples":http://railsapps.github.io/ | "Haml and Rails":http://railsapps.github.io/rails-haml.html | "Devise with Mongoid":http://railsapps.github.io/tutorial-rails-mongoid-devise.html | -| "Rails Starter Apps":http://railsapps.github.io/rails-examples-tutorials.html | "Rails Application Layout":http://railsapps.github.io/rails-default-application-layout.html | "OmniAuth with Mongoid":http://railsapps.github.io/tutorial-rails-mongoid-omniauth.html | -| | "HTML5 Boilerplate for Rails":http://railsapps.github.io/rails-html5-boilerplate.html | "Subdomains with Devise":http://railsapps.github.io/tutorial-rails-subdomains.html | -| | "Example Gemfiles for Rails":http://railsapps.github.io/rails-3-2-example-gemfile.html | | -| | "Rails Application Templates":http://railsapps.github.io/rails-application-templates.html | | +To continue reading and to see the reasons, please see the : "Rails Prelaunch Signup App":http://railsapps.github.io/rails-prelaunch-signup/ project page -!https://cruel-carlota.pagodabox.com/6ffdc588dd4075aa7827bd7806ed40f7(githalytics.com alpha)! +Kathy Onu +a SiteKeeper diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.scss b/app/assets/stylesheets/bootstrap_and_overrides.css.scss index fc66ab6..43df589 100644 --- a/app/assets/stylesheets/bootstrap_and_overrides.css.scss +++ b/app/assets/stylesheets/bootstrap_and_overrides.css.scss @@ -1,3 +1,2 @@ @import "bootstrap"; body { padding-top: 60px; } -@import "bootstrap-responsive"; diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 308a177..a576911 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -1,8 +1,12 @@ class RegistrationsController < Devise::RegistrationsController + helper_method :resource, :resource_name, :devise_mapping # 20150412 addition # override #create to respond to AJAX with a partial def create build_resource + #build_resource(sign_up_params) + resource.email = resource_params[:email] + # ^^ ref https://github.com/RailsApps/rails-prelaunch-signup/commit/ec01a952b56ccf49b4dfa4d529caea22b4dbdae8 if resource.save if resource.active_for_authentication? @@ -10,7 +14,7 @@ def create (render(:partial => 'thankyou', :layout => false) && return) if request.xhr? respond_with resource, :location => after_sign_up_path_for(resource) else - expire_session_data_after_sign_in! + expire_data_after_sign_in! (render(:partial => 'thankyou', :layout => false) && return) if request.xhr? respond_with resource, :location => after_inactive_sign_up_path_for(resource) end diff --git a/app/models/user.rb b/app/models/user.rb index 01fdb05..2983c03 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -5,15 +5,13 @@ class User < ActiveRecord::Base devise :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable, :trackable, :validatable - # Setup accessible (or protected) attributes for your model - attr_accessible :name, :email, :password, :password_confirmation, :remember_me - after_create :add_user_to_mailchimp before_destroy :remove_user_from_mailchimp # override Devise method # no password is required when the account is created; validate password when the user sets one validates_confirmation_of :password + def password_required? if !persisted? !(password != "") @@ -41,7 +39,7 @@ def send_reset_password_instructions end # new function to set the password - def attempt_set_password(params) + def attempt_set_password(id_params) p = {} p[:password] = params[:password] p[:password_confirmation] = params[:password_confirmation] @@ -60,6 +58,12 @@ def only_if_unconfirmed private + # using strong_parameters + def id_params + require(:user).permit(:email, :password, :password_confirmation) + #require(:user).permit(:name, :email, :password, :password_confirmation, :remember_me) + end + def add_user_to_mailchimp return if email.include?(ENV['ADMIN_EMAIL']) mailchimp = Gibbon::API.new 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..728cd85 --- /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/config/application.rb b/config/application.rb index 6c5eb5c..2b31fad 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,50 +1,17 @@ require File.expand_path('../boot', __FILE__) -# Pick the frameworks you want: -require "active_record/railtie" -require "action_controller/railtie" -require "action_mailer/railtie" -require "active_resource/railtie" -require "sprockets/railtie" -# require "rails/test_unit/railtie" +require 'rails/all' -if defined?(Bundler) - # If you precompile assets before deploying to production, use this line - Bundler.require(*Rails.groups(:assets => %w(development test))) - # If you want your assets lazily compiled in production, use this line - # Bundler.require(:default, :assets, Rails.env) -end +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(:default, Rails.env) module RailsPrelaunchSignup class Application < Rails::Application - - # don't generate RSpec tests for views and helpers - config.generators do |g| - - g.test_framework :rspec, fixture: true - g.fixture_replacement :factory_girl, dir: 'spec/factories' - - - g.view_specs false - g.helper_specs false - end - # 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. - # Custom directories with classes and modules you want to be autoloadable. - # config.autoload_paths += %W(#{config.root}/extras) - config.autoload_paths += %W(#{config.root}/lib) - - - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named. - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # Activate observers that should always be running. - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - # 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)' @@ -53,25 +20,13 @@ class Application < Rails::Application # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de - # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = "utf-8" - - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters += [:password, :password_confirmation] - - # Enable escaping HTML in JSON. - config.active_support.escape_html_entities_in_json = true - - # Use SQL instead of Active Record's schema dumper when creating the database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Enforce whitelist mode for mass assignment. - # This will create an empty whitelist of attributes available for mass-assignment for all models - # in your app. As such, your models will need to explicitly whitelist or blacklist accessible - # parameters by using an attr_accessible or attr_protected declaration. - config.active_record.whitelist_attributes = true + # don't generate RSpec tests for views and helpers + config.generators do |g| + g.test_framework :rspec, fixture: true + g.fixture_replacement :factory_girl, dir: 'spec/factories' + g.view_specs false + g.helper_specs false + end # Enable the asset pipeline config.assets.enabled = true diff --git a/config/application.yml b/config/application.yml index 9d272da..79ec061 100644 --- a/config/application.yml +++ b/config/application.yml @@ -7,13 +7,18 @@ # makes 'Your_Gmail_Username' available as ENV["GMAIL_USERNAME"] # Add application configuration variables here, as shown below. # -MANDRILL_USERNAME: Your_Username -MANDRILL_API_KEY: Your_Mandrill_API_Key -MAILCHIMP_API_KEY: Your_MailChimp_API_Key -MAILCHIMP_LIST_ID: My_List_ID ADMIN_NAME: First User ADMIN_EMAIL: user@example.com ADMIN_PASSWORD: changeme -ROLES: [admin, user] -EMAIL_ADDRESS: user@example.com DOMAIN: example.com +EMAIL_ADDRESS: user@example.com +MANDRILL_USERNAME: Your_Username +MANDRILL_API_KEY: Your_Mandrill_API_Key +MANDRILL_USERNAME: Your_Manrill_UserName +MAILCHIMP_API_KEY: Your_MailChimp_API_Key +MAILCHIMP_LIST_ID: My_List_ID +ROLES: ['admin', 'user'] +# in transition from Rails3.2 to 4.0, showing all keys +SECRET_KEY: 1279ab267148f5ff7472cddc1177dcf4dda3b3873bbcf98024fe24bd95c51d008966513cec0f544f515777da013546415f83884a3883a258f98e8a9d47ef53ae +SECRET_TOKEN: 1ba85dd1130cb8eed4b810a598d953d218b51c7a05503474fe24eac65df0f9d9f828a59dcc5adbf1183fba51dcadda34832e04bbd31b44854de0dd3f8cabf45a +SECRET_KEY_BASE: ba410eb94c87c28d417e790a1e887e144a88474502170a7c58441cdb273eb61e856c4ab38160f4f4fcc752a11331c7fd7f021eb51f4d2a6499b41d3e7af52104 diff --git a/config/boot.rb b/config/boot.rb index 4489e58..3596736 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,5 +1,3 @@ -require 'rubygems' - # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) diff --git a/config/environment.rb b/config/environment.rb index ba9b72f..63103d1 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,5 @@ -# Load the rails application +# Load the Rails application. require File.expand_path('../application', __FILE__) -# Initialize the rails application +# Initialize the Rails application. RailsPrelaunchSignup::Application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index 886b6c2..4ca98c2 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,50 +1,49 @@ RailsPrelaunchSignup::Application.configure do - # Settings specified here will take precedence over those in config/application.rb + # 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 - # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true + # Do not eager load code on boot. + config.eager_load = false - # Show full error reports and disable caching + # 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 + + # Do not compress assets in development. + config.assets.compress = false + + # 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 + # ActionMailer Config - config.action_mailer.default_url_options = { :host => 'localhost:3000' } # Development - # config.action_mailer.default_url_options = { :host => 'goodworksonearth.net' } # Production + config.action_mailer.default_url_options = { :host => 'example.com' } + config.action_mailer.delivery_method = :smtp # change to true to allow email to be sent during development config.action_mailer.perform_deliveries = false config.action_mailer.raise_delivery_errors = true config.action_mailer.default :charset => "utf-8" - config.action_mailer.smtp_settings = { - :address => "smtp.mandrillapp.com", - :port => 25, - :user_name => ENV["MANDRILL_USERNAME"], - :password => ENV["MANDRILL_API_KEY"] - } + config.action_mailer.smtp_settings = { + :address => "smtp.mandrillapp.com", + :port => 25, + :user_name => ENV["MANDRILL_USERNAME"], + :password => ENV["MANDRILL_API_KEY"] + } - # Print deprecation notices to the Rails logger - config.active_support.deprecation = :log - - # Only use best-standards-support built into browsers - config.action_dispatch.best_standards_support = :builtin - - # Raise exception on mass assignment protection for Active Record models - config.active_record.mass_assignment_sanitizer = :strict - - # Log the query plan for queries taking more than this (works - # with SQLite, MySQL, and PostgreSQL) - config.active_record.auto_explain_threshold_in_seconds = 0.5 - - # Do not compress assets - config.assets.compress = false - - # Expands the lines which load the assets - config.assets.debug = true end diff --git a/config/environments/production.rb b/config/environments/production.rb index 5dc3d15..e2cc88f 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,68 +1,85 @@ RailsPrelaunchSignup::Application.configure do - # Settings specified here will take precedence over those in config/application.rb + # Settings specified here will take precedence over those in config/application.rb. - # Code is not reloaded between requests + # Code is not reloaded between requests. config.cache_classes = true - # Full error reports are disabled and caching is turned on + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both thread 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 - # Disable Rails's static asset server (Apache or nginx will already do this) + # 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 Rails's static asset server (Apache or nginx will already do this). config.serve_static_assets = false - # Compress JavaScripts and CSS - config.assets.compress = true + # Compress JavaScripts and CSS. + config.assets.js_compressor = :uglifier + # config.assets.css_compressor = :sass - # Don't fallback to assets pipeline if a precompiled asset is missed + # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false - # Generate digests for assets URLs + # Generate digests for assets URLs. config.assets.digest = true - # Defaults to nil and saved in location specified by config.assets.prefix - # config.assets.manifest = YOUR_PATH + # Version of your assets, change this if you want to expire all your assets. + config.assets.version = '1.0' - # Specifies the header that your server uses for sending files + # 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 - # See everything in the log (default is :info) - # config.log_level = :debug + # Set to :debug to see everything in the log. + config.log_level = :info - # Prepend all log lines with the following tags + # Prepend all log lines with the following tags. # config.log_tags = [ :subdomain, :uuid ] - # Use a different logger for distributed setups + # Use a different logger for distributed setups. # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) - # Use a different cache store in production + # Use a different cache store in production. # config.cache_store = :mem_cache_store - # Enable serving of images, stylesheets, and JavaScripts from an asset server + # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = "http://assets.example.com" - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) + # Precompile additional assets. + # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # config.assets.precompile += %w( search.js ) - # Disable delivery errors, bad email addresses will be ignored + # 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 threaded mode - # config.threadsafe! - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) + # the I18n.default_locale when a translation can not be found). config.i18n.fallbacks = true - # Send deprecation notices to registered listeners + # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify - config.action_mailer.default_url_options = { :host => 'example.com' } # Development / testing / fork - # config.action_mailer.default_url_options = { :host => 'goodworksonearth.net' } # Production + # Disable automatic flushing of the log to improve performance. + # config.autoflush_log = false + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + config.action_mailer.default_url_options = { :host => 'example.com' } + # ActionMailer Config # Setup for production - deliveries, no errors raised config.action_mailer.delivery_method = :smtp @@ -70,16 +87,11 @@ config.action_mailer.raise_delivery_errors = false config.action_mailer.default :charset => "utf-8" - config.action_mailer.smtp_settings = { - :address => "smtp.mandrillapp.com", - :port => 25, - :user_name => ENV["MANDRILL_USERNAME"], - :password => ENV["MANDRILL_API_KEY"] - } - - + config.action_mailer.smtp_settings = { + :address => "smtp.mandrillapp.com", + :port => 25, + :user_name => ENV["MANDRILL_USERNAME"], + :password => ENV["MANDRILL_API_KEY"] + } - # Log the query plan for queries taking more than this (works - # with SQLite, MySQL, and PostgreSQL) - # config.active_record.auto_explain_threshold_in_seconds = 0.5 end diff --git a/config/environments/test.rb b/config/environments/test.rb index 0ca469d..9bcb3e2 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,5 +1,5 @@ RailsPrelaunchSignup::Application.configure do - # Settings specified here will take precedence over those in config/application.rb + # 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 @@ -7,35 +7,33 @@ # and recreated between test runs. Don't rely on the data there! config.cache_classes = true - # Configure static asset server for tests with Cache-Control for performance - config.serve_static_assets = true - config.static_cache_control = "public, max-age=3600" + # 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 - # Log error messages when you accidentally call methods on nil - config.whiny_nils = true + # Configure static asset server for tests with Cache-Control for performance. + config.serve_static_assets = true + config.static_cache_control = "public, max-age=3600" - # Show full error reports and disable caching + # 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 + # 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 + # 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 - # Raise exception on mass assignment protection for Active Record models - config.active_record.mass_assignment_sanitizer = :strict - - # Print deprecation notices to the stderr + # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr # ActionMailer Config config.action_mailer.default_url_options = { :host => 'example.com' } - end diff --git a/config/initializers/cookies.rb b/config/initializers/cookies.rb new file mode 100644 index 0000000..90baf61 --- /dev/null +++ b/config/initializers/cookies.rb @@ -0,0 +1,3 @@ +# Be sure to restart your server when you modify this file. + +Rails.application.config.action_dispatch.cookies_serializer = :hybrid \ No newline at end of file diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index f378738..f680861 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -1,10 +1,15 @@ # Use this hook to configure devise mailer, warden hooks and so forth. # Many of these configuration options can be set straight in your model. Devise.setup do |config| + # The secret key used by Devise. Devise uses this key to generate + # random tokens. Changing this key will render invalid all existing + # confirmation, reset password and unlock tokens in the database. + config.secret_key = '1279ab267148f5ff7472cddc1177dcf4dda3b3873bbcf98024fe24bd95c51d008966513cec0f544f515777da013546415f83884a3883a258f98e8a9d47ef53ae' + # ==> Mailer Configuration # Configure the e-mail address which will be shown in Devise::Mailer, # note that it will be overwritten if you use your own mailer class with default "from" parameter. - config.mailer_sender = "lexigram@efn.org" + config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com" # Configure the class responsible to send e-mails. # config.mailer = "Devise::Mailer" diff --git a/config/initializers/devise_permitted_parameters.rb b/config/initializers/devise_permitted_parameters.rb new file mode 100644 index 0000000..f295708 --- /dev/null +++ b/config/initializers/devise_permitted_parameters.rb @@ -0,0 +1,18 @@ +module DevisePermittedParameters + extend ActiveSupport::Concern + + included do + before_filter :configure_permitted_parameters + end + + protected + + def configure_permitted_parameters + devise_parameter_sanitizer.for(:sign_up) << :email + devise_parameter_sanitizer.for(:account_update) { |u| u.permit(:email, :password, :password_confirmation, :current_password) } + devise_parameter_sanitizer.for(:sign_in) { |u| u.permit(:email, :password) } + end + +end + +DeviseController.send :include, DevisePermittedParameters 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 index 5d8d9be..ac033bf 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -1,15 +1,16 @@ # Be sure to restart your server when you modify this file. -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| +# 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 do |inflect| +# ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.acronym 'RESTful' # end diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index ea0e466..e9fe840 100644 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -1,7 +1,11 @@ # Be sure to restart your server when you modify this file. -# Your secret key for verifying the integrity of signed cookies. +# 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. -RailsPrelaunchSignup::Application.config.secret_token = '1ba85dd1130cb8eed4b810a598d953d218b51c7a05503474fe24eac65df0f9d9f828a59dcc5adbf1183fba51dcadda34832e04bbd31b44854de0dd3f8cabf45a' + +# Make sure your secret_key_base is kept private +RailsPrelaunchSignup::Application.config.secret_token = ENV["SECRET_TOKEN"] +RailsPrelaunchSignup::Application.config.secret_key_base = ENV["SECRET_KEY_BASE"] diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 11f0848..402bfa4 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,6 +1,6 @@ # Be sure to restart your server when you modify this file. -RailsPrelaunchSignup::Application.config.session_store :cookie_store, key: '_rails-prelaunch-signup_session' +RailsPrelaunchSignup::Application.config.session_store :cookie_store, key: '_rails_prelaunch_signup_session' # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb index 999df20..33725e9 100644 --- a/config/initializers/wrap_parameters.rb +++ b/config/initializers/wrap_parameters.rb @@ -1,14 +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] + wrap_parameters format: [:json] if respond_to?(:wrap_parameters) end -# Disable root element in JSON by default. -ActiveSupport.on_load(:active_record) do - self.include_root_in_json = false -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 index 179c14c..0653957 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,5 +1,23 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. +# 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 index fa5f804..d95c608 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,61 @@ RailsPrelaunchSignup::Application.routes.draw do + # The priority is based upon order of creation: first created -> highest priority. + # See how all your routes lay out with "rake routes". + + # You can have the root of your site routed with "root" + # root 'welcome#index' + + # Example of regular route: + # get 'products/:id' => 'catalog#view' + + # Example of named route that can be invoked with purchase_url(id: product.id) + # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase + + # Example resource route (maps HTTP verbs to controller actions automatically): + # resources :products + + # Example resource route with options: + # resources :products do + # member do + # get 'short' + # post 'toggle' + # end + # + # collection do + # get 'sold' + # end + # end + + # Example resource route with sub-resources: + # resources :products do + # resources :comments, :sales + # resource :seller + # end + + # Example resource route with more complex sub-resources: + # resources :products do + # resources :comments + # resources :sales do + # get 'recent', on: :collection + # end + # end + + # Example resource route with concerns: + # concern :toggleable do + # post 'toggle' + # end + # resources :posts, concerns: :toggleable + # resources :photos, concerns: :toggleable + + # Example resource route within a namespace: + # namespace :admin do + # # Directs /admin/products/* to Admin::ProductsController + # # (app/controllers/admin/products_controller.rb) + # resources :products + # end + authenticated :user do - root :to => 'home#index' + match '/home/index', :via => :get end devise_scope :user do root :to => "devise/registrations#new" diff --git a/db/schema.rb b/db/schema.rb index 9d7f068..24cd9c8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -9,34 +9,34 @@ # 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 to check this file into your version control system. +# It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(:version => 20120826102940) do +ActiveRecord::Schema.define(version: 20120826102855) do - create_table "roles", :force => true do |t| + create_table "roles", force: true do |t| t.string "name" t.integer "resource_id" t.string "resource_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - add_index "roles", ["name", "resource_type", "resource_id"], :name => "index_roles_on_name_and_resource_type_and_resource_id" - add_index "roles", ["name"], :name => "index_roles_on_name" + add_index "roles", ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id" + add_index "roles", ["name"], name: "index_roles_on_name" - create_table "users", :force => true do |t| - t.string "email", :default => "", :null => false - t.string "encrypted_password", :default => "", :null => false + create_table "users", force: true do |t| + t.string "email", default: "", null: false + t.string "encrypted_password", default: "", null: false t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" - t.integer "sign_in_count", :default => 0 + t.integer "sign_in_count", default: 0 t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" t.string "current_sign_in_ip" t.string "last_sign_in_ip" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "name" t.string "confirmation_token" t.datetime "confirmed_at" @@ -44,14 +44,14 @@ t.string "unconfirmed_email" end - add_index "users", ["email"], :name => "index_users_on_email", :unique => true - add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true + add_index "users", ["email"], name: "index_users_on_email", unique: true + add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true - create_table "users_roles", :id => false, :force => true do |t| + create_table "users_roles", id: false, force: true do |t| t.integer "user_id" t.integer "role_id" end - add_index "users_roles", ["user_id", "role_id"], :name => "index_users_roles_on_user_id_and_role_id" + add_index "users_roles", ["user_id", "role_id"], name: "index_users_roles_on_user_id_and_role_id" end diff --git a/db/seeds.rb b/db/seeds.rb index ab6dc33..895863b 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -9,12 +9,14 @@ # See http://railsapps.github.io/rails-environment-variables.html puts 'ROLES' YAML.load(ENV['ROLES']).each do |role| - Role.find_or_create_by_name({ :name => role }, :without_protection => true) + Role.find_or_create_by({ name: role }) #, :without_protection => true) puts 'role: ' << role end puts 'DEFAULT USERS' -user = User.find_or_create_by_email :name => ENV['ADMIN_NAME'].dup, :email => ENV['ADMIN_EMAIL'].dup, :password => ENV['ADMIN_PASSWORD'].dup, :password_confirmation => ENV['ADMIN_PASSWORD'].dup -puts 'user: ' << user.name -user.add_role :admin +user = User.where(email: ENV['ADMIN_EMAIL'].dup).first_or_create +puts 'user: ' << user.email +user.password = 'please123' +user.password_confirmation = 'please123' +user.add_role 'admin' user.skip_confirmation! user.save! diff --git a/features/step_definitions/visitor_steps.rb b/features/step_definitions/visitor_steps.rb index 2b94f43..9c45e49 100644 --- a/features/step_definitions/visitor_steps.rb +++ b/features/step_definitions/visitor_steps.rb @@ -1,6 +1,5 @@ def new_user - @user ||= { :email => "example@example.com", - :password => "please", :password_confirmation => "please" } + @user ||= { :email => "example@example.com", :password => "please123", :password_confirmation => "please123" } end def invitation_request user @@ -11,7 +10,7 @@ def invitation_request user end When /^I visit the home page$/ do - visit root_path + visit root_path end When /^I fill in "(.*?)" with "(.*?)"$/ do |field, value| diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 280231a..23dbc45 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,7 +3,7 @@ require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require 'email_spec' -require 'rspec/autorun' +#require 'rspec/autorun' # 20150412 no longer required per terminal response # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. @@ -12,6 +12,10 @@ RSpec.configure do |config| config.include(EmailSpec::Helpers) config.include(EmailSpec::Matchers) + + # turns deprecation notice into errors and their locations + config.raise_errors_for_deprecations! + # ## Mock Framework # # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line: From 86668833b1094812cbc4833e37f65e77220bbfd2 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Mon, 13 Apr 2015 15:43:40 -0700 Subject: [PATCH 36/41] now on Ruby2.1.0 Rails4.1.0, tests need work --- .ruby-gemset | 2 +- .ruby-version | 2 +- Gemfile | 7 +- Gemfile.lock | 93 ++++++++++++----------- bin/rails | 4 + bin/rake | 4 + bin/spring | 15 ++++ config/application.rb | 2 +- config/application.yml | 6 +- config/boot.rb | 2 +- config/environment.rb | 2 +- config/environments/development.rb | 15 ++-- config/environments/production.rb | 13 ++-- config/environments/test.rb | 6 +- config/initializers/cookies_serializer.rb | 3 + config/initializers/mime_types.rb | 2 +- config/initializers/secret_token.rb | 11 --- config/initializers/session_store.rb | 7 +- config/routes.rb | 3 +- spec/controllers/home_controller_spec.rb | 2 +- spec/models/user_spec.rb | 27 ++++--- 21 files changed, 131 insertions(+), 97 deletions(-) create mode 100755 bin/spring create mode 100644 config/initializers/cookies_serializer.rb delete mode 100644 config/initializers/secret_token.rb diff --git a/.ruby-gemset b/.ruby-gemset index 7bc4364..f1bcc55 100644 --- a/.ruby-gemset +++ b/.ruby-gemset @@ -1 +1 @@ -Rails4.0_prelaunch +Rails4.1_prelaunch 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 e6373d7..ed3d79d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -ruby '2.0.0' -gem 'rails', '4.0.0' +ruby '2.1.0' +gem 'rails', '4.1.0' gem 'rubyzip', '< 1.0.0' gem 'sqlite3' group :development, :test do @@ -19,6 +19,7 @@ end group :development do gem 'quiet_assets', '>= 1.0.2' gem 'better_errors', '>= 0.7.2' + gem 'spring', '~> 1.3.4' end gem 'bootstrap-sass', '~> 3.3.4.1' gem 'cancan', '>= 1.6.9' @@ -27,7 +28,7 @@ gem 'devise', '>= 2.2.3' gem 'gibbon', git: 'git://github.com/amro/gibbon.git' gem 'jquery-rails' gem 'protected_attributes' -gem 'railties', '~> 4.0.0' +gem 'railties', '~> 4.1.0' gem 'rolify', '>= 3.2.0' gem 'rubygems-update', '~> 2.4.6' gem 'sass-rails', '~> 4.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index ae76bfc..3b671d9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,33 +9,35 @@ GIT 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.4) - 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.8) - arel (4.0.2) - autoprefixer-rails (5.1.8.1) + arel (5.0.1.20140414130214) + autoprefixer-rails (5.1.9) execjs json bcrypt (3.1.10) @@ -48,7 +50,7 @@ GEM bootstrap-sass (3.3.4.1) autoprefixer-rails (>= 5.0.0.1) sass (>= 3.2.19) - builder (3.1.4) + builder (3.2.2) cancan (1.6.10) capybara (2.4.4) mime-types (>= 1.16) @@ -65,7 +67,7 @@ GEM coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.9.1) + coffee-script-source (1.9.1.1) cucumber (1.3.19) builder (>= 2.1.2) diff-lcs (>= 1.1.3) @@ -118,7 +120,7 @@ GEM method_source (0.8.2) mime-types (1.25.1) mini_portile (0.6.2) - minitest (4.7.5) + minitest (5.5.1) multi_json (1.11.0) multi_test (0.1.2) multi_xml (0.5.5) @@ -126,8 +128,8 @@ GEM mini_portile (~> 0.6.0) orm_adapter (0.5.0) polyglot (0.3.5) - protected_attributes (1.0.3) - activemodel (>= 4.0.0, < 5.0) + protected_attributes (1.0.9) + activemodel (>= 4.0.1, < 5.0) pry (0.10.1) coderay (~> 1.1.0) method_source (~> 0.8.1) @@ -137,17 +139,19 @@ GEM rack (1.5.2) rack-test (0.6.3) 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) - railties (4.0.0) - actionpack (= 4.0.0) - activesupport (= 4.0.0) + railties (= 4.1.0) + sprockets-rails (~> 2.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.4.2) @@ -188,15 +192,16 @@ GEM actionpack (~> 4.0) activemodel (~> 4.0) slop (3.6.0) + spring (1.3.4) sprockets (2.12.3) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.0.1) + sprockets-rails (2.2.4) actionpack (>= 3.0) activesupport (>= 3.0) - sprockets (~> 2.8) + sprockets (>= 2.8, < 4.0) sqlite3 (1.3.10) thor (0.19.1) thread_safe (0.3.5) @@ -204,7 +209,8 @@ GEM treetop (1.4.15) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.43) + tzinfo (1.2.2) + thread_safe (~> 0.1) uglifier (2.0.1) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) @@ -235,8 +241,8 @@ DEPENDENCIES protected_attributes pry quiet_assets (>= 1.0.2) - rails (= 4.0.0) - railties (~> 4.0.0) + rails (= 4.1.0) + railties (~> 4.1.0) rolify (>= 3.2.0) rspec-rails (>= 2.12.2) rubygems-update (~> 2.4.6) @@ -244,5 +250,6 @@ DEPENDENCIES sass-rails (~> 4.0.0) selenium-webdriver (~> 2.32.1) simple_form (>= 2.1.0) + spring (~> 1.3.4) sqlite3 uglifier (~> 2.0.0) diff --git a/bin/rails b/bin/rails index 728cd85..7feb6a3 100755 --- a/bin/rails +++ b/bin/rails @@ -1,4 +1,8 @@ #!/usr/bin/env ruby +begin + load File.expand_path("../spring", __FILE__) +rescue LoadError +end APP_PATH = File.expand_path('../../config/application', __FILE__) require_relative '../config/boot' require 'rails/commands' diff --git a/bin/rake b/bin/rake index 1724048..8017a02 100755 --- a/bin/rake +++ b/bin/rake @@ -1,4 +1,8 @@ #!/usr/bin/env ruby +begin + load File.expand_path("../spring", __FILE__) +rescue LoadError +end require_relative '../config/boot' require 'rake' Rake.application.run diff --git a/bin/spring b/bin/spring new file mode 100755 index 0000000..7b45d37 --- /dev/null +++ b/bin/spring @@ -0,0 +1,15 @@ +#!/usr/bin/env ruby + +# This file loads spring without using Bundler, in order to be fast. +# It gets overwritten when you run the `spring binstub` command. + +unless defined?(Spring) + require "rubygems" + require "bundler" + + if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m) + Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq } + gem "spring", match[1] + require "spring/binstub" + end +end diff --git a/config/application.rb b/config/application.rb index 2b31fad..7556a20 100644 --- a/config/application.rb +++ b/config/application.rb @@ -4,7 +4,7 @@ # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. -Bundler.require(:default, Rails.env) +Bundler.require(*Rails.groups) module RailsPrelaunchSignup class Application < Rails::Application diff --git a/config/application.yml b/config/application.yml index 79ec061..8d9828e 100644 --- a/config/application.yml +++ b/config/application.yml @@ -17,8 +17,8 @@ MANDRILL_API_KEY: Your_Mandrill_API_Key MANDRILL_USERNAME: Your_Manrill_UserName MAILCHIMP_API_KEY: Your_MailChimp_API_Key MAILCHIMP_LIST_ID: My_List_ID -ROLES: ['admin', 'user'] +ROLES: [admin, user] # in transition from Rails3.2 to 4.0, showing all keys -SECRET_KEY: 1279ab267148f5ff7472cddc1177dcf4dda3b3873bbcf98024fe24bd95c51d008966513cec0f544f515777da013546415f83884a3883a258f98e8a9d47ef53ae -SECRET_TOKEN: 1ba85dd1130cb8eed4b810a598d953d218b51c7a05503474fe24eac65df0f9d9f828a59dcc5adbf1183fba51dcadda34832e04bbd31b44854de0dd3f8cabf45a +#SECRET_KEY: 1279ab267148f5ff7472cddc1177dcf4dda3b3873bbcf98024fe24bd95c51d008966513cec0f544f515777da013546415f83884a3883a258f98e8a9d47ef53ae +#SECRET_TOKEN: 1ba85dd1130cb8eed4b810a598d953d218b51c7a05503474fe24eac65df0f9d9f828a59dcc5adbf1183fba51dcadda34832e04bbd31b44854de0dd3f8cabf45a SECRET_KEY_BASE: ba410eb94c87c28d417e790a1e887e144a88474502170a7c58441cdb273eb61e856c4ab38160f4f4fcc752a11331c7fd7f021eb51f4d2a6499b41d3e7af52104 diff --git a/config/boot.rb b/config/boot.rb index 3596736..5e5f0c1 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,4 @@ # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) +require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) diff --git a/config/environment.rb b/config/environment.rb index 63103d1..ee8d90d 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -2,4 +2,4 @@ require File.expand_path('../application', __FILE__) # Initialize the Rails application. -RailsPrelaunchSignup::Application.initialize! +Rails.application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index 4ca98c2..16b3ac0 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,4 +1,4 @@ -RailsPrelaunchSignup::Application.configure do +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 @@ -19,7 +19,7 @@ # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log - # Raise an error on page load if there are pending migrations + # Raise an error on page load if there are pending migrations. config.active_record.migration_error = :page_load # Do not compress assets in development. @@ -30,15 +30,18 @@ # number of complex assets. config.assets.debug = true - # ActionMailer Config - config.action_mailer.default_url_options = { :host => 'example.com' } + # 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 - config.action_mailer.delivery_method = :smtp + # ActionMailer Config # change to true to allow email to be sent during development config.action_mailer.perform_deliveries = false config.action_mailer.raise_delivery_errors = true config.action_mailer.default :charset => "utf-8" - + config.action_mailer.default_url_options = { :host => 'example.com' } + config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :address => "smtp.mandrillapp.com", :port => 25, diff --git a/config/environments/production.rb b/config/environments/production.rb index e2cc88f..167a4f5 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,11 +1,11 @@ -RailsPrelaunchSignup::Application.configure do +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 thread web servers + # 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 @@ -66,7 +66,7 @@ # 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 can not be found). + # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true # Send deprecation notices to registered listeners. @@ -78,15 +78,16 @@ # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new - config.action_mailer.default_url_options = { :host => 'example.com' } + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false # ActionMailer Config # Setup for production - deliveries, no errors raised + config.action_mailer.default :charset => "utf-8" + config.action_mailer.default_url_options = { :host => 'example.com' } config.action_mailer.delivery_method = :smtp config.action_mailer.perform_deliveries = true config.action_mailer.raise_delivery_errors = false - config.action_mailer.default :charset => "utf-8" - config.action_mailer.smtp_settings = { :address => "smtp.mandrillapp.com", :port => 25, diff --git a/config/environments/test.rb b/config/environments/test.rb index 9bcb3e2..8f21a1b 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,4 +1,4 @@ -RailsPrelaunchSignup::Application.configure do +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 @@ -14,7 +14,7 @@ # Configure static asset server for tests with Cache-Control for performance. config.serve_static_assets = true - config.static_cache_control = "public, max-age=3600" + config.static_cache_control = 'public, max-age=3600' # Show full error reports and disable caching. config.consider_all_requests_local = true @@ -35,5 +35,7 @@ config.active_support.deprecation = :stderr # ActionMailer Config + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true config.action_mailer.default_url_options = { :host => 'example.com' } end diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb new file mode 100644 index 0000000..7a06a89 --- /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 \ No newline at end of file diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index 72aca7e..2b3611c 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -2,4 +2,4 @@ # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone +# Mime::Type.register_alias "text/html", :iphone # 20150413 $ rake rails:update removes this line diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb deleted file mode 100644 index e9fe840..0000000 --- a/config/initializers/secret_token.rb +++ /dev/null @@ -1,11 +0,0 @@ -# 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. - -# Make sure your secret_key_base is kept private -RailsPrelaunchSignup::Application.config.secret_token = ENV["SECRET_TOKEN"] -RailsPrelaunchSignup::Application.config.secret_key_base = ENV["SECRET_KEY_BASE"] diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 402bfa4..210ce8c 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,8 +1,3 @@ # Be sure to restart your server when you modify this file. -RailsPrelaunchSignup::Application.config.session_store :cookie_store, key: '_rails_prelaunch_signup_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") -# RailsPrelaunchSignup::Application.config.session_store :active_record_store +Rails.application.config.session_store :cookie_store, key: '_rails_prelaunch_signup_session' diff --git a/config/routes.rb b/config/routes.rb index d95c608..4f21e00 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,5 @@ -RailsPrelaunchSignup::Application.routes.draw do +Rails.application.routes.draw do + # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". diff --git a/spec/controllers/home_controller_spec.rb b/spec/controllers/home_controller_spec.rb index 8e8c5c3..ad3b1a8 100644 --- a/spec/controllers/home_controller_spec.rb +++ b/spec/controllers/home_controller_spec.rb @@ -5,7 +5,7 @@ describe "GET 'index'" do it "should be successful" do get 'index' - response.should be_success + expect(response).to be_success end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index a1d36b1..8bd1430 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -1,14 +1,23 @@ require 'spec_helper' -describe User do - - before(:each) do - @attr = { - :name => "Example User", - :email => "user@example.com", - :password => "changeme", - :password_confirmation => "changeme" - } +include Warden::Test::Helpers +Warden.test_mode! + +RSpec.configure do + valid_session = { "user_id" => 1 }, + + @attr = { + :name => "Test User", + :email => "testuser@example.com", + :password => "changemenow", + :password_confirmation => "changemenow", + } +end + +RSpec.describe User do + + after(:each) do + Warden.test_reset! end it "should create a new instance given a valid attribute" do From e5c4642cef833895c231c5f1c8ea43a083a07c55 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Mon, 13 Apr 2015 18:10:31 -0700 Subject: [PATCH 37/41] upgrade to Ruby2.2.1, Rails4.2.1 --- .ruby-gemset | 2 +- .ruby-version | 2 +- Gemfile | 16 +-- Gemfile.lock | 159 ++++++++++++++++------------- bin/setup | 29 ++++++ config/application.rb | 8 +- config/boot.rb | 3 +- config/environments/development.rb | 10 +- config/environments/production.rb | 3 - config/environments/test.rb | 7 +- config/initializers/assets.rb | 11 ++ config/initializers/mime_types.rb | 1 - config/routes.rb | 1 - 13 files changed, 153 insertions(+), 99 deletions(-) create mode 100755 bin/setup create mode 100644 config/initializers/assets.rb diff --git a/.ruby-gemset b/.ruby-gemset index f1bcc55..d5c6ad2 100644 --- a/.ruby-gemset +++ b/.ruby-gemset @@ -1 +1 @@ -Rails4.1_prelaunch +Rails4.2_prelaunch diff --git a/.ruby-version b/.ruby-version index 7ec1d6d..ccbccc3 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.1.0 +2.2.0 diff --git a/Gemfile b/Gemfile index ed3d79d..aab67ef 100644 --- a/Gemfile +++ b/Gemfile @@ -1,11 +1,12 @@ source 'https://rubygems.org' -ruby '2.1.0' -gem 'rails', '4.1.0' -gem 'rubyzip', '< 1.0.0' +ruby '2.2.1' +gem 'rails', '4.2.1' +gem 'rubyzip', '~> 1.0.0' gem 'sqlite3' group :development, :test do gem 'binding_of_caller', '~> 0.7.2', :platforms => [:mri_19, :rbx] gem 'rspec-rails', '>= 2.12.2' + gem 'sass-rails', '~> 5.0' gem 'factory_girl_rails', '>= 4.2.0' end group :test do @@ -23,15 +24,14 @@ group :development do end gem 'bootstrap-sass', '~> 3.3.4.1' gem 'cancan', '>= 1.6.9' -gem 'coffee-rails', '~> 4.0.0' +gem 'coffee-rails', '~> 4.1.0' gem 'devise', '>= 2.2.3' gem 'gibbon', git: 'git://github.com/amro/gibbon.git' gem 'jquery-rails' gem 'protected_attributes' -gem 'railties', '~> 4.1.0' +gem 'railties', '~> 4.2.0' gem 'rolify', '>= 3.2.0' gem 'rubygems-update', '~> 2.4.6' -gem 'sass-rails', '~> 4.0.0' -gem 'selenium-webdriver', '~> 2.32.1' +gem 'selenium-webdriver', '~> 2.45.0' gem 'simple_form', '>= 2.1.0' -gem 'uglifier', '~> 2.0.0' +gem 'uglifier', '~> 2.7.1' diff --git a/Gemfile.lock b/Gemfile.lock index 3b671d9..988b532 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,34 +9,43 @@ GIT GEM remote: https://rubygems.org/ specs: - 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) + actionmailer (4.2.1) + actionpack (= 4.2.1) + actionview (= 4.2.1) + activejob (= 4.2.1) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.1) + actionview (= 4.2.1) + activesupport (= 4.2.1) + rack (~> 1.6) rack-test (~> 0.6.2) - actionview (4.1.0) - activesupport (= 4.1.0) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.1) + actionview (4.2.1) + activesupport (= 4.2.1) builder (~> 3.1) erubis (~> 2.7.0) - activemodel (4.1.0) - activesupport (= 4.1.0) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.1) + activejob (4.2.1) + activesupport (= 4.2.1) + globalid (>= 0.3.0) + activemodel (4.2.1) + activesupport (= 4.2.1) 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) + activerecord (4.2.1) + activemodel (= 4.2.1) + activesupport (= 4.2.1) + arel (~> 6.0) + activesupport (4.2.1) + i18n (~> 0.7) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) - thread_safe (~> 0.1) + thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) addressable (2.3.8) - arel (5.0.1.20140414130214) + arel (6.0.0) autoprefixer-rails (5.1.9) execjs json @@ -61,7 +70,7 @@ GEM childprocess (0.5.6) ffi (~> 1.0, >= 1.0.11) coderay (1.1.0) - coffee-rails (4.0.1) + coffee-rails (4.1.0) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.0) coffee-script (2.4.1) @@ -103,31 +112,33 @@ GEM ffi (1.9.8) gherkin (2.12.2) multi_json (~> 1.3) - hike (1.2.3) + globalid (0.3.5) + activesupport (>= 4.1.0) httparty (0.13.3) json (~> 1.8) multi_xml (>= 0.5.2) i18n (0.7.0) - jquery-rails (3.1.2) - railties (>= 3.0, < 5.0) + jquery-rails (4.0.3) + rails-dom-testing (~> 1.0) + railties (>= 4.2.0) thor (>= 0.14, < 2.0) json (1.8.2) launchy (2.4.3) addressable (~> 2.3) - mail (2.5.4) - mime-types (~> 1.16) - treetop (~> 1.4.8) + loofah (2.0.1) + nokogiri (>= 1.5.9) + mail (2.6.3) + mime-types (>= 1.16, < 3) method_source (0.8.2) - mime-types (1.25.1) + mime-types (2.4.3) mini_portile (0.6.2) - minitest (5.5.1) + minitest (5.6.0) multi_json (1.11.0) multi_test (0.1.2) multi_xml (0.5.5) nokogiri (1.6.6.2) mini_portile (~> 0.6.0) orm_adapter (0.5.0) - polyglot (0.3.5) protected_attributes (1.0.9) activemodel (>= 4.0.1, < 5.0) pry (0.10.1) @@ -136,27 +147,36 @@ GEM slop (~> 3.4) quiet_assets (1.1.0) railties (>= 3.1, < 5.0) - rack (1.5.2) + rack (1.6.0) rack-test (0.6.3) rack (>= 1.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) + rails (4.2.1) + actionmailer (= 4.2.1) + actionpack (= 4.2.1) + actionview (= 4.2.1) + activejob (= 4.2.1) + activemodel (= 4.2.1) + activerecord (= 4.2.1) + activesupport (= 4.2.1) bundler (>= 1.3.0, < 2.0) - railties (= 4.1.0) - sprockets-rails (~> 2.0) - railties (4.1.0) - actionpack (= 4.1.0) - activesupport (= 4.1.0) + railties (= 4.2.1) + sprockets-rails + rails-deprecated_sanitizer (1.0.3) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.6) + 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.1) + actionpack (= 4.2.1) + activesupport (= 4.2.1) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (10.4.2) - responders (1.1.2) - railties (>= 3.2, < 4.2) + responders (2.1.0) + railties (>= 4.2.0, < 5) rolify (4.0.0) rspec-core (3.2.3) rspec-support (~> 3.2.0) @@ -176,28 +196,26 @@ GEM rspec-support (~> 3.2.0) rspec-support (3.2.2) rubygems-update (2.4.6) - rubyzip (0.9.9) - sass (3.2.19) - sass-rails (4.0.5) + rubyzip (1.0.0) + sass (3.4.13) + sass-rails (5.0.3) railties (>= 4.0.0, < 5.0) - sass (~> 3.2.2) - sprockets (~> 2.8, < 3.0) - sprockets-rails (~> 2.0) - selenium-webdriver (2.32.1) - childprocess (>= 0.2.5) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (~> 1.1) + selenium-webdriver (2.45.0) + childprocess (~> 0.5) multi_json (~> 1.0) - rubyzip - websocket (~> 1.0.4) + rubyzip (~> 1.0) + websocket (~> 1.0) simple_form (3.1.0) actionpack (~> 4.0) activemodel (~> 4.0) slop (3.6.0) spring (1.3.4) - sprockets (2.12.3) - hike (~> 1.2) - multi_json (~> 1.0) + sprockets (3.0.0) rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) sprockets-rails (2.2.4) actionpack (>= 3.0) activesupport (>= 3.0) @@ -206,17 +224,14 @@ GEM thor (0.19.1) thread_safe (0.3.5) tilt (1.4.1) - treetop (1.4.15) - polyglot - polyglot (>= 0.3.1) tzinfo (1.2.2) thread_safe (~> 0.1) - uglifier (2.0.1) + uglifier (2.7.1) execjs (>= 0.3.0) - multi_json (~> 1.0, >= 1.0.2) + json (>= 1.8.0) warden (1.2.3) rack (>= 1.0) - websocket (1.0.7) + websocket (1.2.1) xpath (2.0.0) nokogiri (~> 1.3) @@ -229,7 +244,7 @@ DEPENDENCIES bootstrap-sass (~> 3.3.4.1) cancan (>= 1.6.9) capybara (>= 2.0.3) - coffee-rails (~> 4.0.0) + coffee-rails (~> 4.1.0) cucumber-rails (>= 1.3.1) database_cleaner (>= 1.0.0.RC1) devise (>= 2.2.3) @@ -241,15 +256,15 @@ DEPENDENCIES protected_attributes pry quiet_assets (>= 1.0.2) - rails (= 4.1.0) - railties (~> 4.1.0) + rails (= 4.2.1) + railties (~> 4.2.0) rolify (>= 3.2.0) rspec-rails (>= 2.12.2) rubygems-update (~> 2.4.6) - rubyzip (< 1.0.0) - sass-rails (~> 4.0.0) - selenium-webdriver (~> 2.32.1) + rubyzip (~> 1.0.0) + sass-rails (~> 5.0) + selenium-webdriver (~> 2.45.0) simple_form (>= 2.1.0) spring (~> 1.3.4) sqlite3 - uglifier (~> 2.0.0) + uglifier (~> 2.7.1) 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/application.rb b/config/application.rb index 7556a20..5d1f087 100644 --- a/config/application.rb +++ b/config/application.rb @@ -20,6 +20,9 @@ class Application < Rails::Application # 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 + # don't generate RSpec tests for views and helpers config.generators do |g| g.test_framework :rspec, fixture: true @@ -28,10 +31,5 @@ class Application < Rails::Application g.helper_specs false end - # Enable the asset pipeline - config.assets.enabled = true - - # Version of your assets, change this if you want to expire all your assets - config.assets.version = '1.0' end end diff --git a/config/boot.rb b/config/boot.rb index 5e5f0c1..6b750f0 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,3 @@ -# Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) +require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/config/environments/development.rb b/config/environments/development.rb index 16b3ac0..c7a5194 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -22,19 +22,23 @@ # Raise an error on page load if there are pending migrations. config.active_record.migration_error = :page_load - # Do not compress assets in development. - config.assets.compress = false - # 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 + # ActionMailer Config # change to true to allow email to be sent during development config.action_mailer.perform_deliveries = false diff --git a/config/environments/production.rb b/config/environments/production.rb index 167a4f5..62858a2 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -72,9 +72,6 @@ # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify - # Disable automatic flushing of the log to improve performance. - # config.autoflush_log = false - # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new diff --git a/config/environments/test.rb b/config/environments/test.rb index 8f21a1b..4962aac 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -12,8 +12,8 @@ # preloads Rails for running tests, you may have to set it to true. config.eager_load = false - # Configure static asset server for tests with Cache-Control for performance. - config.serve_static_assets = true + # 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. @@ -31,6 +31,9 @@ # 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 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/mime_types.rb b/config/initializers/mime_types.rb index 2b3611c..dc18996 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -2,4 +2,3 @@ # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone # 20150413 $ rake rails:update removes this line diff --git a/config/routes.rb b/config/routes.rb index 4f21e00..66676e2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,4 @@ Rails.application.routes.draw do - # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". From 67a62e23ab4cd1277ef4b3c169fc52d00632e52a Mon Sep 17 00:00:00 2001 From: Will Schive Date: Mon, 13 Apr 2015 20:46:40 -0700 Subject: [PATCH 38/41] shifted env variables to config/local_env.yml --- config/application.example.yml | 19 ----------------- config/application.rb | 10 ++++++++- config/application.yml | 24 --------------------- config/local_env_example.yml | 38 ++++++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 44 deletions(-) delete mode 100644 config/application.example.yml delete mode 100644 config/application.yml create mode 100644 config/local_env_example.yml diff --git a/config/application.example.yml b/config/application.example.yml deleted file mode 100644 index 9d272da..0000000 --- a/config/application.example.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Add account credentials and API keys here. -# See http://railsapps.github.io/rails-environment-variables.html -# This file should be listed in .gitignore to keep your settings secret! -# Each entry sets a local environment variable and overrides ENV variables in the Unix shell. -# For example, setting: -# GMAIL_USERNAME: Your_Gmail_Username -# makes 'Your_Gmail_Username' available as ENV["GMAIL_USERNAME"] -# Add application configuration variables here, as shown below. -# -MANDRILL_USERNAME: Your_Username -MANDRILL_API_KEY: Your_Mandrill_API_Key -MAILCHIMP_API_KEY: Your_MailChimp_API_Key -MAILCHIMP_LIST_ID: My_List_ID -ADMIN_NAME: First User -ADMIN_EMAIL: user@example.com -ADMIN_PASSWORD: changeme -ROLES: [admin, user] -EMAIL_ADDRESS: user@example.com -DOMAIN: example.com diff --git a/config/application.rb b/config/application.rb index 5d1f087..47a1049 100644 --- a/config/application.rb +++ b/config/application.rb @@ -8,6 +8,14 @@ module RailsPrelaunchSignup class Application < Rails::Application + # http://railsapps.github.io/rails-environment-variables.html + config.before_configuration do + env_file = File.join(Rails.root, 'config', 'local_env.yml') + YAML.load(File.open(env_file)).each do |key, value| + ENV[key.to_s] = value + end if File.exists?(env_file) + end + # 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. @@ -30,6 +38,6 @@ class Application < Rails::Application g.view_specs false g.helper_specs false end - + end end diff --git a/config/application.yml b/config/application.yml deleted file mode 100644 index 8d9828e..0000000 --- a/config/application.yml +++ /dev/null @@ -1,24 +0,0 @@ -# Add account credentials and API keys here. -# See http://railsapps.github.io/rails-environment-variables.html -# This file should be listed in .gitignore to keep your settings secret! -# Each entry sets a local environment variable and overrides ENV variables in the Unix shell. -# For example, setting: -# GMAIL_USERNAME: Your_Gmail_Username -# makes 'Your_Gmail_Username' available as ENV["GMAIL_USERNAME"] -# Add application configuration variables here, as shown below. -# -ADMIN_NAME: First User -ADMIN_EMAIL: user@example.com -ADMIN_PASSWORD: changeme -DOMAIN: example.com -EMAIL_ADDRESS: user@example.com -MANDRILL_USERNAME: Your_Username -MANDRILL_API_KEY: Your_Mandrill_API_Key -MANDRILL_USERNAME: Your_Manrill_UserName -MAILCHIMP_API_KEY: Your_MailChimp_API_Key -MAILCHIMP_LIST_ID: My_List_ID -ROLES: [admin, user] -# in transition from Rails3.2 to 4.0, showing all keys -#SECRET_KEY: 1279ab267148f5ff7472cddc1177dcf4dda3b3873bbcf98024fe24bd95c51d008966513cec0f544f515777da013546415f83884a3883a258f98e8a9d47ef53ae -#SECRET_TOKEN: 1ba85dd1130cb8eed4b810a598d953d218b51c7a05503474fe24eac65df0f9d9f828a59dcc5adbf1183fba51dcadda34832e04bbd31b44854de0dd3f8cabf45a -SECRET_KEY_BASE: ba410eb94c87c28d417e790a1e887e144a88474502170a7c58441cdb273eb61e856c4ab38160f4f4fcc752a11331c7fd7f021eb51f4d2a6499b41d3e7af52104 diff --git a/config/local_env_example.yml b/config/local_env_example.yml new file mode 100644 index 0000000..1cafe15 --- /dev/null +++ b/config/local_env_example.yml @@ -0,0 +1,38 @@ +# Rename this file to local_env.yml for use, to keep your data private. +# NOTE: The local_env.yml file MUST FIRST be listed in .gitignore BEFORE you save it, to keep your settings secret +# Do that now by opening your git ignore file : $ open -e .gitignore +# NOW, uncomment this line /config/local_env.yml + +# If you accidentally save your file, then uncomment the git ignore statement, your file will still show in the repository, including changes. To resolve do this : $ git rm configl/local_env.yml +# Only then, will it be safe to add your private data into this file. + +# Add account settings and API keys here. +# Each entry in local_env.yml gets set as a local environment variable. +# The local_env.yml file overrides ENV variables in the Unix shell. +# For example, setting: +# GMAIL_USERNAME: 'Your_Gmail_Username' +# makes 'Your_Gmail_Username' available as ENV["GMAIL_USERNAME"] + +# See the 2nd part of using local_env.yml in config/application.rb +# With that code in place, the secrets.yml file environment variables +# will look in the local_env.yml file to access the data. +# Source Reference : http://railsapps.github.com/rails-environment-variables.html + +ADMIN_NAME: Admin +ADMIN_EMAIL: 'user@example.com' +ADMIN_PASSWORD: 'changeme' +DOMAIN_NAME: 'example.com' +GMAIL_USERNAME: 'Your_Gmail_Username' +GMAIL_PASSWORD: 'Your_Gmail_Password' +MAILCHIMP_API_KEY: 'Your_MailChimp_API_key' +MAILCHIMP_LIST_ID: 'Your_MailChimp_List_ID' +STRIPE_API_KEY: 'Your_Stripe_Test_or_Production_Private_API_key' +STRIPE_PUBLISHABLE_KEY: 'Your_Stripe_Test_or_Production_Publishable_Key' +ROLES: [admin, silver, gold, platinum] + +# Generate your own new key with $ rake secret +SECRET_KEY_BASE: 'your_very_long_secret_key' + +# uncomment if you use Mandrill : +#MANDRILL_USERNAME: 'Your_Mandrill_User_Name' +#MANDRILL_API_KEY: 'Your_Mandrill_Test_or_Production_Private_API_key' From 51bbc814f984845c06f5f2b7c8e9174961e9c546 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Mon, 13 Apr 2015 21:01:51 -0700 Subject: [PATCH 39/41] removed singular quotes on local_env_example.yml --- config/local_env_example.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/config/local_env_example.yml b/config/local_env_example.yml index 1cafe15..36629ee 100644 --- a/config/local_env_example.yml +++ b/config/local_env_example.yml @@ -19,20 +19,19 @@ # Source Reference : http://railsapps.github.com/rails-environment-variables.html ADMIN_NAME: Admin -ADMIN_EMAIL: 'user@example.com' -ADMIN_PASSWORD: 'changeme' -DOMAIN_NAME: 'example.com' -GMAIL_USERNAME: 'Your_Gmail_Username' -GMAIL_PASSWORD: 'Your_Gmail_Password' -MAILCHIMP_API_KEY: 'Your_MailChimp_API_key' -MAILCHIMP_LIST_ID: 'Your_MailChimp_List_ID' -STRIPE_API_KEY: 'Your_Stripe_Test_or_Production_Private_API_key' -STRIPE_PUBLISHABLE_KEY: 'Your_Stripe_Test_or_Production_Publishable_Key' -ROLES: [admin, silver, gold, platinum] +ADMIN_EMAIL: user@example.com +ADMIN_PASSWORD: changeme +DOMAIN_NAME: example.com +GMAIL_USERNAME: Your_Gmail_Username +GMAIL_PASSWORD: Your_Gmail_Password +MAILCHIMP_API_KEY: Your_MailChimp_API_key +MAILCHIMP_LIST_ID: Your_MailChimp_List_ID +EMAIL_ADDRESS: user@example.com +ROLES: '[admin, user]' # Generate your own new key with $ rake secret -SECRET_KEY_BASE: 'your_very_long_secret_key' +SECRET_KEY_BASE: your_very_long_secret_key # uncomment if you use Mandrill : -#MANDRILL_USERNAME: 'Your_Mandrill_User_Name' -#MANDRILL_API_KEY: 'Your_Mandrill_Test_or_Production_Private_API_key' +#MANDRILL_USERNAME: Your_Mandrill_User_Name +#MANDRILL_API_KEY: Your_Mandrill_Test_or_Production_Private_API_key \ No newline at end of file From 4ee64a40fc4776b7c7ef6403012d54c4b2525044 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Mon, 13 Apr 2015 21:16:09 -0700 Subject: [PATCH 40/41] update the .ruby-version file to 2.2.1 --- .ruby-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruby-version b/.ruby-version index ccbccc3..c043eea 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.2.0 +2.2.1 From a7c06314c45c39f427474deb926a4b6b21f43879 Mon Sep 17 00:00:00 2001 From: Will Schive Date: Tue, 14 Apr 2015 09:08:34 -0700 Subject: [PATCH 41/41] changed to new hash form, added missed gems --- Gemfile | 6 ++-- Gemfile.lock | 7 +++++ app/controllers/application_controller.rb | 2 +- app/controllers/confirmations_controller.rb | 2 +- app/controllers/registrations_controller.rb | 10 +++---- app/controllers/users_controller.rb | 26 ++++++++-------- app/mailers/user_mailer.rb | 4 +-- app/models/role.rb | 4 +-- app/models/user.rb | 20 ++++++------- app/views/devise/confirmations/show.html.erb | 2 +- .../mailer/confirmation_instructions.html.erb | 2 +- app/views/devise/registrations/edit.html.erb | 16 +++++----- app/views/devise/registrations/edit.html.haml | 6 ++-- app/views/devise/registrations/new.html.erb | 6 ++-- app/views/devise/sessions/new.html.erb | 8 ++--- app/views/layouts/_messages.html.erb | 2 +- app/views/layouts/_navigation.html.erb | 4 +-- app/views/layouts/application.html.erb | 2 +- app/views/users/_user.html.erb | 6 ++-- app/views/users/index.html.erb | 14 ++++----- config/environments/development.rb | 12 ++++---- config/environments/production.rb | 12 ++++---- config/environments/test.rb | 4 +-- config/initializers/cookies.rb | 3 -- config/initializers/cookies_serializer.rb | 2 +- config/routes.rb | 12 ++++---- .../20120826102855_rolify_create_roles.rb | 4 +-- features/step_definitions/admin_steps.rb | 4 +-- features/step_definitions/email_steps.rb | 10 +++---- features/step_definitions/user_steps.rb | 30 +++++++++---------- features/step_definitions/visitor_steps.rb | 6 ++-- spec/controllers/users_controller_spec.rb | 4 +-- spec/models/user_spec.rb | 24 +++++++-------- spec/support/devise.rb | 2 +- 34 files changed, 142 insertions(+), 136 deletions(-) delete mode 100644 config/initializers/cookies.rb diff --git a/Gemfile b/Gemfile index aab67ef..a34ab17 100644 --- a/Gemfile +++ b/Gemfile @@ -4,13 +4,13 @@ gem 'rails', '4.2.1' gem 'rubyzip', '~> 1.0.0' gem 'sqlite3' group :development, :test do - gem 'binding_of_caller', '~> 0.7.2', :platforms => [:mri_19, :rbx] + gem 'binding_of_caller', '~> 0.7.2', platforms: [:mri_19, :rbx] gem 'rspec-rails', '>= 2.12.2' gem 'sass-rails', '~> 5.0' gem 'factory_girl_rails', '>= 4.2.0' end group :test do - gem 'cucumber-rails', '>= 1.3.1', :require => false + gem 'cucumber-rails', '>= 1.3.1', require: false gem 'capybara', '>= 2.0.3' gem 'database_cleaner', '>= 1.0.0.RC1' gem 'email_spec', '>= 1.4.0' @@ -31,7 +31,9 @@ gem 'jquery-rails' gem 'protected_attributes' gem 'railties', '~> 4.2.0' gem 'rolify', '>= 3.2.0' +gem 'responders', '~> 2.0' gem 'rubygems-update', '~> 2.4.6' gem 'selenium-webdriver', '~> 2.45.0' gem 'simple_form', '>= 2.1.0' gem 'uglifier', '~> 2.7.1' +gem 'web-console', '~> 2.0' \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 988b532..4cf214d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -231,6 +231,11 @@ GEM json (>= 1.8.0) warden (1.2.3) rack (>= 1.0) + web-console (2.1.2) + activemodel (>= 4.0) + binding_of_caller (>= 0.7.2) + railties (>= 4.0) + sprockets-rails (>= 2.0, < 4.0) websocket (1.2.1) xpath (2.0.0) nokogiri (~> 1.3) @@ -258,6 +263,7 @@ DEPENDENCIES quiet_assets (>= 1.0.2) rails (= 4.2.1) railties (~> 4.2.0) + responders (~> 2.0) rolify (>= 3.2.0) rspec-rails (>= 2.12.2) rubygems-update (~> 2.4.6) @@ -268,3 +274,4 @@ DEPENDENCIES spring (~> 1.3.4) sqlite3 uglifier (~> 2.7.1) + web-console (~> 2.0) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f9a089f..d142970 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -2,7 +2,7 @@ class ApplicationController < ActionController::Base protect_from_forgery rescue_from CanCan::AccessDenied do |exception| - redirect_to root_path, :alert => exception.message + redirect_to root_path, alert: exception.message end end diff --git a/app/controllers/confirmations_controller.rb b/app/controllers/confirmations_controller.rb index 4b8678e..e12aacb 100644 --- a/app/controllers/confirmations_controller.rb +++ b/app/controllers/confirmations_controller.rb @@ -8,7 +8,7 @@ class ConfirmationsController < Devise::PasswordsController def create self.resource = resource_class.send_confirmation_instructions(resource_params) if successfully_sent?(resource) - respond_with({}, :location => after_resending_confirmation_instructions_path_for(resource_name)) + respond_with({}, location: after_resending_confirmation_instructions_path_for(resource_name)) else respond_with(resource) end diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index a576911..92a535c 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -11,16 +11,16 @@ def create if resource.save if resource.active_for_authentication? sign_in(resource_name, resource) - (render(:partial => 'thankyou', :layout => false) && return) if request.xhr? - respond_with resource, :location => after_sign_up_path_for(resource) + (render(partial: 'thankyou', layout: false) && return) if request.xhr? + respond_with resource, location: after_sign_up_path_for(resource) else expire_data_after_sign_in! - (render(:partial => 'thankyou', :layout => false) && return) if request.xhr? - respond_with resource, :location => after_inactive_sign_up_path_for(resource) + (render(partial: 'thankyou', layout: false) && return) if request.xhr? + respond_with resource, location: after_inactive_sign_up_path_for(resource) end else clean_up_passwords resource - render :action => :new, :layout => !request.xhr? + render action: :new, layout: !request.xhr? end end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 125c23c..364996a 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -2,7 +2,7 @@ class UsersController < ApplicationController before_filter :authenticate_user! def index - authorize! :index, @user, :message => 'Not authorized as an administrator.' + authorize! :index, @user, message: 'Not authorized as an administrator.' @users = User.all end @@ -11,41 +11,41 @@ def show end def update - authorize! :update, @user, :message => 'Not authorized as an administrator.' + authorize! :update, @user, message: 'Not authorized as an administrator.' @user = User.find(params[:id]) - if @user.update_attributes(params[:user], :as => :admin) - redirect_to users_path, :notice => "User updated." + if @user.update_attributes(params[:user], as: :admin) + redirect_to users_path, notice: "User updated." else - redirect_to users_path, :alert => "Unable to update user." + redirect_to users_path, alert: "Unable to update user." end end def destroy - authorize! :destroy, @user, :message => 'Not authorized as an administrator.' + authorize! :destroy, @user, message: 'Not authorized as an administrator.' user = User.find(params[:id]) unless user == current_user user.destroy - redirect_to users_path, :notice => "User deleted." + redirect_to users_path, notice: "User deleted." else - redirect_to users_path, :notice => "Can't delete yourself." + redirect_to users_path, notice: "Can't delete yourself." end end def invite - authorize! :invite, @user, :message => 'Not authorized as an administrator.' + authorize! :invite, @user, message: 'Not authorized as an administrator.' @user = User.find(params[:id]) @user.send_confirmation_instructions - redirect_to :back, :only_path => true, :notice => "Sent invitation to #{@user.email}." + redirect_to :back, only_path: true, notice: "Sent invitation to #{@user.email}." end def bulk_invite - authorize! :bulk_invite, @user, :message => 'Not authorized as an administrator.' - users = User.where(:confirmation_token => nil).order(:created_at).limit(params[:quantity]) + authorize! :bulk_invite, @user, message: 'Not authorized as an administrator.' + users = User.where(confirmation_token: nil).order(:created_at).limit(params[:quantity]) count = users.count users.each do |user| user.send_confirmation_instructions end - redirect_to :back, :only_path => true, :notice => "Sent invitation to #{count} users." + redirect_to :back, only_path: true, notice: "Sent invitation to #{count} users." end end diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 80dd22b..983a996 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -1,8 +1,8 @@ class UserMailer < ActionMailer::Base - default :from => ENV["EMAIL_ADDRESS"] + default from: ENV["EMAIL_ADDRESS"] def welcome_email(user) - mail(:to => user.email, :subject => "Invitation Request Received") + mail(to: user.email, subject: "Invitation Request Received") headers['X-MC-GoogleAnalytics'] = ENV["DOMAIN"] headers['X-MC-Tags'] = "welcome" end diff --git a/app/models/role.rb b/app/models/role.rb index 145baa7..b966425 100644 --- a/app/models/role.rb +++ b/app/models/role.rb @@ -1,6 +1,6 @@ class Role < ActiveRecord::Base - has_and_belongs_to_many :users, :join_table => :users_roles - belongs_to :resource, :polymorphic => true + has_and_belongs_to_many :users, join_table: :users_roles + belongs_to :resource, polymorphic: true scopify end diff --git a/app/models/user.rb b/app/models/user.rb index 2983c03..8b5a9c0 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -68,11 +68,11 @@ def add_user_to_mailchimp return if email.include?(ENV['ADMIN_EMAIL']) mailchimp = Gibbon::API.new result = mailchimp.lists.subscribe({ - :id => ENV['MAILCHIMP_LIST_ID'], - :email => {:email => self.email}, - :double_optin => false, - :update_existing => true, - :send_welcome => true + id: ENV['MAILCHIMP_LIST_ID'], + email: { email: self.email }, + double_optin: false, + update_existing: true, + send_welcome: true }) Rails.logger.info("Subscribed #{self.email} to MailChimp") if result end @@ -80,11 +80,11 @@ def add_user_to_mailchimp def remove_user_from_mailchimp mailchimp = Gibbon::API.new result = mailchimp.lists.unsubscribe({ - :id => ENV['MAILCHIMP_LIST_ID'], - :email => {:email => self.email}, - :delete_member => true, - :send_goodbye => false, - :send_notify => true + id: ENV['MAILCHIMP_LIST_ID'], + email: { email: self.email}, + delete_member: true, + send_goodbye: false, + send_notify: true }) Rails.logger.info("Unsubscribed #{self.email} from MailChimp") if result end diff --git a/app/views/devise/confirmations/show.html.erb b/app/views/devise/confirmations/show.html.erb index fe8c0a1..e819418 100644 --- a/app/views/devise/confirmations/show.html.erb +++ b/app/views/devise/confirmations/show.html.erb @@ -1,5 +1,5 @@

Account Activation

-<%= simple_form_for resource, :as => resource_name, :url => update_user_confirmation_path, :html => {:class => 'form-horizontal', :method => 'put'}, :id => 'activation-form' do |f| %> +<%= simple_form_for resource, as: resource_name, url: update_user_confirmation_path, html: { class: 'form-horizontal', method: 'put' }, id: 'activation-form' do |f| %> <%= devise_error_messages! %>
diff --git a/app/views/devise/mailer/confirmation_instructions.html.erb b/app/views/devise/mailer/confirmation_instructions.html.erb index 7077efe..0da47ee 100644 --- a/app/views/devise/mailer/confirmation_instructions.html.erb +++ b/app/views/devise/mailer/confirmation_instructions.html.erb @@ -4,4 +4,4 @@

Please click the link below to confirm your email address and set your password:

-

<%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %>

+

<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @resource.confirmation_token) %>

diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index 4ac1775..85ed775 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -1,14 +1,14 @@

Edit <%= resource_name.to_s.humanize %>

-<%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => 'form-vertical' }) do |f| %> +<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: 'form-vertical' }) do |f| %> <%= f.error_notification %> <%= display_base_errors resource %> - <%= f.input :name, :autofocus => true %> - <%= f.input :email, :required => true %> - <%= f.input :password, :autocomplete => "off", :hint => "leave it blank if you don't want to change it", :required => false %> - <%= f.input :password_confirmation, :required => false %> - <%= f.input :current_password, :hint => "we need your current password to confirm your changes", :required => true %> - <%= f.button :submit, 'Update', :class => 'btn-primary' %> + <%= f.input :name, autofocus: true %> + <%= f.input :email, required: true %> + <%= f.input :password, autocomplete: "off", hint: "leave it blank if you don't want to change it", required: false %> + <%= f.input :password_confirmation, required: false %> + <%= f.input :current_password, hint: "we need your current password to confirm your changes", required: true %> + <%= f.button :submit, 'Update', class: 'btn-primary' %> <% end %>

Cancel my account

-

Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %>.

+

Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %>.

<%= link_to "Back", :back %> diff --git a/app/views/devise/registrations/edit.html.haml b/app/views/devise/registrations/edit.html.haml index ce9b682..6ebfd54 100644 --- a/app/views/devise/registrations/edit.html.haml +++ b/app/views/devise/registrations/edit.html.haml @@ -1,6 +1,6 @@

Edit <%= resource_name.to_s.humanize %>

-<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %> +<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> <%= devise_error_messages! %>

<%= f.label :name %>
<%= f.text_field :name %>

@@ -9,7 +9,7 @@ <%= f.email_field :email %>
<%= f.label :password %> (leave blank if you don't want to change it)
- <%= f.password_field :password, :autocomplete => "off" %>
+ <%= f.password_field :password, autocomplete: "off" %>
<%= f.label :password_confirmation %>
<%= f.password_field :password_confirmation %>
@@ -22,6 +22,6 @@

Cancel my account

-

Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %>.

+

Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %>.

<%= link_to "Back", :back %> \ No newline at end of file diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index cef4671..ce2f757 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -1,15 +1,15 @@