From 46c45a1aea8fe7875b631b8ab463e85d0b960b8f Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 20 Aug 2012 11:17:48 -0400 Subject: [PATCH 01/13] add temp staging config for testing --- config/mongoid.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/config/mongoid.yml b/config/mongoid.yml index 5e76b5b..780b00a 100644 --- a/config/mongoid.yml +++ b/config/mongoid.yml @@ -12,6 +12,24 @@ test: hosts: - localhost:27017 +staging2: + sessions: + default: + database: cs_comments_service_staging + hosts: + - alex.mongohq.com:10079 + username: forum + password: forum + +staging: + sessions: + default: + database: cs_comments_service_staging + hosts: + - ds037047.mongolab.com:37047 + username: forum + password: forum + defaults: &defaults use_utc: false use_activesupport_time_zone: true From 3d6f6182a77798075050e4a06d16e6c00a67881d Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 20 Aug 2012 11:32:32 -0400 Subject: [PATCH 02/13] Add Gemfile.lock --- .gitignore | 1 - Gemfile.lock | 181 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 181 insertions(+), 1 deletion(-) create mode 100644 Gemfile.lock diff --git a/.gitignore b/.gitignore index a90fb9d..5156ada 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,6 @@ tmp _yardoc doc/ -Gemfile.lock *.sqlite3 .*.swp .*.swo diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..3f3731b --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,181 @@ +GIT + remote: git@github.com:dementrock/delayed_job_mongoid.git + revision: 48b1420d59bc01e0b1aba1c2ad66bda4a5e04b9a + specs: + delayed_job_mongoid (1.0.8) + delayed_job (~> 3.0.0) + mongoid (>= 3.0.0.rc) + +GIT + remote: git@github.com:dementrock/kaminari.git + revision: 82a38e07db1ca1598c8daf073a8f6be22ae714d6 + specs: + kaminari (0.13.0) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) + +GIT + remote: git@github.com:dementrock/mongoid-magic-counter-cache.git + revision: 28bc5e617cab19187b323e7d97d49fe73a7de68a + specs: + mongoid_magic_counter_cache (0.1.1) + mongoid (>= 3.0) + rake + +GIT + remote: git@github.com:dementrock/mongoid-tree.git + revision: 5aa7a4ee16cd90dbbcac3ad702446d2119e971df + specs: + mongoid-tree (1.0.0) + mongoid (>= 3.0, <= 4.0) + +GIT + remote: git@github.com:dementrock/mongoid_taggable_with_context.git + revision: 7cf165bd828f969cdd386102eed04ac35431a920 + specs: + mongoid_taggable_with_context (0.8.1.1) + mongoid (>= 3.0.1) + +GIT + remote: git@github.com:dementrock/voteable_mongo.git + revision: 538e86856daa1c180ba80b7c6f2805e531ba420c + specs: + voteable_mongo (0.9.3) + +GEM + remote: http://rubygems.org/ + specs: + actionpack (3.2.8) + activemodel (= 3.2.8) + activesupport (= 3.2.8) + builder (~> 3.0.0) + erubis (~> 2.7.0) + journey (~> 1.0.4) + rack (~> 1.4.0) + rack-cache (~> 1.2) + rack-test (~> 0.6.1) + sprockets (~> 2.1.3) + activemodel (3.2.8) + activesupport (= 3.2.8) + builder (~> 3.0.0) + activesupport (3.2.8) + i18n (~> 0.6) + multi_json (~> 1.0) + ampex (2.0.0) + blankslate + blankslate (2.1.2.4) + bson (1.6.4) + bson_ext (1.6.4) + bson (~> 1.6.4) + builder (3.0.0) + coderay (1.0.7) + columnize (0.3.6) + debugger (1.2.0) + columnize (>= 0.3.1) + debugger-linecache (~> 1.1.1) + debugger-ruby_core_source (~> 1.1.3) + debugger-linecache (1.1.2) + debugger-ruby_core_source (>= 1.1.1) + debugger-ruby_core_source (1.1.3) + delayed_job (3.0.3) + activesupport (~> 3.0) + diff-lcs (1.1.3) + erubis (2.7.0) + faker (1.0.1) + i18n (~> 0.4) + hashr (0.0.21) + hike (1.2.1) + i18n (0.6.0) + journey (1.0.4) + method_source (0.8) + mime-types (1.19) + mongo (1.6.4) + bson (~> 1.6.4) + mongoid (3.0.4) + activemodel (~> 3.1) + moped (~> 1.1) + origin (~> 1.0) + tzinfo (~> 0.3.22) + moped (1.2.0) + multi_json (1.3.6) + nokogiri (1.5.5) + origin (1.0.6) + pry (0.9.10) + coderay (~> 1.0.5) + method_source (~> 0.8) + slop (~> 3.3.1) + pry-nav (0.2.2) + pry (~> 0.9.10) + rack (1.4.1) + rack-cache (1.2) + rack (>= 0.4) + rack-protection (1.2.0) + rack + rack-test (0.6.1) + rack (>= 1.0) + rake (0.9.2.2) + rdiscount (1.6.8) + rest-client (1.6.7) + mime-types (>= 1.16) + rspec (2.11.0) + rspec-core (~> 2.11.0) + rspec-expectations (~> 2.11.0) + rspec-mocks (~> 2.11.0) + rspec-core (2.11.1) + rspec-expectations (2.11.2) + diff-lcs (~> 1.1.3) + rspec-mocks (2.11.2) + sinatra (1.3.3) + rack (~> 1.3, >= 1.3.6) + rack-protection (~> 1.2) + tilt (~> 1.3, >= 1.3.3) + slop (3.3.2) + sprockets (2.1.3) + hike (~> 1.2) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + sqlite3 (1.3.6) + tilt (1.3.3) + tire (0.4.2) + activemodel (>= 3.0) + hashr (~> 0.0.19) + multi_json (~> 1.0) + rake + rest-client (~> 1.6) + tire-contrib (0.1.1) + tire + tzinfo (0.3.33) + yajl-ruby (1.1.0) + +PLATFORMS + ruby + +DEPENDENCIES + ampex + bson_ext + bundler + debugger + delayed_job + delayed_job_mongoid! + faker + kaminari! + mongo + mongoid (~> 3.0) + mongoid-tree! + mongoid_magic_counter_cache! + mongoid_taggable_with_context! + moped + nokogiri + pry + pry-nav + rack-test + rake + rdiscount + rest-client + rspec + sinatra + sqlite3 + tire + tire-contrib + voteable_mongo! + yajl-ruby From 8d03d03c33cc4de7f7323905c05ff84f33f3123f Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 20 Aug 2012 11:39:57 -0400 Subject: [PATCH 03/13] Add Procfile for running web task --- Procfile | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Procfile diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..d84e0f7 --- /dev/null +++ b/Procfile @@ -0,0 +1,2 @@ +web: bundle exec ruby app.rb -e staging + From 42d98cd96877c950bf16d70e20fb853c152ddd3f Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 20 Aug 2012 11:55:55 -0400 Subject: [PATCH 04/13] Use a Rack config file --- Procfile | 2 -- config.ru | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) delete mode 100644 Procfile create mode 100644 config.ru diff --git a/Procfile b/Procfile deleted file mode 100644 index d84e0f7..0000000 --- a/Procfile +++ /dev/null @@ -1,2 +0,0 @@ -web: bundle exec ruby app.rb -e staging - diff --git a/config.ru b/config.ru new file mode 100644 index 0000000..36374e7 --- /dev/null +++ b/config.ru @@ -0,0 +1,3 @@ +require './app' +run Sinatra::Application + From a57df03d3f9e652f6ea211ef7c14c78074ef5e4d Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 20 Aug 2012 12:08:06 -0400 Subject: [PATCH 05/13] Re-add a diff procfile --- Procfile | 1 + 1 file changed, 1 insertion(+) create mode 100644 Procfile diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..21fcb55 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: bundle exec ruby app.rb -p $PORT From eb03c47566c650745f6037df1ccf24af00d95031 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 20 Aug 2012 12:32:51 -0400 Subject: [PATCH 06/13] Try http in gemfile --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 869bd12..b900f44 100644 --- a/Gemfile +++ b/Gemfile @@ -22,7 +22,7 @@ gem 'mongoid', "~> 3.0" gem 'bson_ext' gem 'delayed_job' -gem 'delayed_job_mongoid', :git => 'git@github.com:dementrock/delayed_job_mongoid.git' +gem 'delayed_job_mongoid', :git => 'https://github.com/dementrock/delayed_job_mongoid.git' gem 'mongoid-tree', :git => 'git@github.com:dementrock/mongoid-tree.git' gem 'voteable_mongo', :git => 'git@github.com:dementrock/voteable_mongo.git' From a1bcd77edf64fa5078c1226b4ead6360de85f7ab Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 20 Aug 2012 12:35:07 -0400 Subject: [PATCH 07/13] Update gems to pull public ones from http so we don't need to worry about keys --- Gemfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index b900f44..fec4f68 100644 --- a/Gemfile +++ b/Gemfile @@ -24,12 +24,12 @@ gem 'bson_ext' gem 'delayed_job' gem 'delayed_job_mongoid', :git => 'https://github.com/dementrock/delayed_job_mongoid.git' -gem 'mongoid-tree', :git => 'git@github.com:dementrock/mongoid-tree.git' -gem 'voteable_mongo', :git => 'git@github.com:dementrock/voteable_mongo.git' -gem 'mongoid_taggable_with_context', :git => 'git@github.com:dementrock/mongoid_taggable_with_context.git' -gem 'mongoid_magic_counter_cache', :git => 'git@github.com:dementrock/mongoid-magic-counter-cache.git' +gem 'mongoid-tree', :git => 'https://github.com/dementrock/mongoid-tree.git' +gem 'voteable_mongo', :git => 'https://github.com/dementrock/voteable_mongo.git' +gem 'mongoid_taggable_with_context', :git => 'https://github.com/dementrock/mongoid_taggable_with_context.git' +gem 'mongoid_magic_counter_cache', :git => 'https://github.com/dementrock/mongoid-magic-counter-cache.git' -gem 'kaminari', :require => 'kaminari/sinatra', :git => 'git@github.com:dementrock/kaminari.git' +gem 'kaminari', :require => 'kaminari/sinatra', :git => 'https://github.com/dementrock/kaminari.git' gem 'faker' From 269f0411ec8f883dd3fdd47c735656cd47514d17 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 20 Aug 2012 12:40:17 -0400 Subject: [PATCH 08/13] Update Gemfile.lock with https locations --- Gemfile.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3f3731b..6eedfe8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,5 +1,5 @@ GIT - remote: git@github.com:dementrock/delayed_job_mongoid.git + remote: https://github.com/dementrock/delayed_job_mongoid.git revision: 48b1420d59bc01e0b1aba1c2ad66bda4a5e04b9a specs: delayed_job_mongoid (1.0.8) @@ -7,7 +7,7 @@ GIT mongoid (>= 3.0.0.rc) GIT - remote: git@github.com:dementrock/kaminari.git + remote: https://github.com/dementrock/kaminari.git revision: 82a38e07db1ca1598c8daf073a8f6be22ae714d6 specs: kaminari (0.13.0) @@ -15,7 +15,7 @@ GIT activesupport (>= 3.0.0) GIT - remote: git@github.com:dementrock/mongoid-magic-counter-cache.git + remote: https://github.com/dementrock/mongoid-magic-counter-cache.git revision: 28bc5e617cab19187b323e7d97d49fe73a7de68a specs: mongoid_magic_counter_cache (0.1.1) @@ -23,21 +23,21 @@ GIT rake GIT - remote: git@github.com:dementrock/mongoid-tree.git + remote: https://github.com/dementrock/mongoid-tree.git revision: 5aa7a4ee16cd90dbbcac3ad702446d2119e971df specs: mongoid-tree (1.0.0) mongoid (>= 3.0, <= 4.0) GIT - remote: git@github.com:dementrock/mongoid_taggable_with_context.git + remote: https://github.com/dementrock/mongoid_taggable_with_context.git revision: 7cf165bd828f969cdd386102eed04ac35431a920 specs: mongoid_taggable_with_context (0.8.1.1) mongoid (>= 3.0.1) GIT - remote: git@github.com:dementrock/voteable_mongo.git + remote: https://github.com/dementrock/voteable_mongo.git revision: 538e86856daa1c180ba80b7c6f2805e531ba420c specs: voteable_mongo (0.9.3) From dd73d8fee57f658dfeaeaffd0d66f81a9b2bcd5f Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 20 Aug 2012 12:43:17 -0400 Subject: [PATCH 09/13] Specify ruby version for heroku's sake --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index fec4f68..ee6d16f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,5 @@ source :rubygems +ruby "1.9.3" gem 'pry' gem 'pry-nav' From 86672a5380931ba6fa42054d5c38a61d6b41315f Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 20 Aug 2012 12:49:15 -0400 Subject: [PATCH 10/13] Heroku doesn't like the sqlite3 gem --- Gemfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index ee6d16f..36e2e51 100644 --- a/Gemfile +++ b/Gemfile @@ -13,7 +13,6 @@ gem 'sinatra' gem 'yajl-ruby' -gem 'sqlite3' gem 'ampex' @@ -45,4 +44,10 @@ gem 'rest-client' group :test do gem 'rspec' gem 'rack-test', :require => "rack/test" + gem 'sqlite3' end + +group :dev do + gem 'sqlite3' +end + From 93ffba9c5007a9625d9eba7f7b520ef414f7aaa9 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 20 Aug 2012 12:51:33 -0400 Subject: [PATCH 11/13] Completely remove sqlite3 from gems --- Gemfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Gemfile b/Gemfile index 36e2e51..ce129b0 100644 --- a/Gemfile +++ b/Gemfile @@ -44,10 +44,5 @@ gem 'rest-client' group :test do gem 'rspec' gem 'rack-test', :require => "rack/test" - gem 'sqlite3' -end - -group :dev do - gem 'sqlite3' end From 67471ec727776b813d6e36e3c10536e04aab5605 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 20 Aug 2012 12:52:49 -0400 Subject: [PATCH 12/13] updated gemlock file without sqlite3 --- Gemfile.lock | 2 -- 1 file changed, 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6eedfe8..c66ed74 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -134,7 +134,6 @@ GEM hike (~> 1.2) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sqlite3 (1.3.6) tilt (1.3.3) tire (0.4.2) activemodel (>= 3.0) @@ -174,7 +173,6 @@ DEPENDENCIES rest-client rspec sinatra - sqlite3 tire tire-contrib voteable_mongo! From 6610af4cfca5a0465cf92d91efcecdf89a77c4b8 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 20 Aug 2012 13:00:00 -0400 Subject: [PATCH 13/13] Update MongoDB to point to staging test server --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index 21fcb55..b10645c 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: bundle exec ruby app.rb -p $PORT +web: bundle exec ruby app.rb -e staging2 -p $PORT