Commit 782cb04944f98f48243bf37e0d4da6affed7b91c
1 parent
59595278
Exists in
master
and in
1 other branch
initial bundler support
Showing
9 changed files
with
200 additions
and
90 deletions
Show diff stats
| @@ -0,0 +1,53 @@ | @@ -0,0 +1,53 @@ | ||
| 1 | +source :rubygems | ||
| 2 | +source "http://gems.github.com" | ||
| 3 | + | ||
| 4 | +gem "rails", "2.3.5", :require => nil | ||
| 5 | +gem "hoptoad_notifier", "2.4.9" | ||
| 6 | +gem "ambethia-smtp-tls", "1.1.2", :require => "smtp-tls" | ||
| 7 | +gem "thoughtbot-paperclip", "2.3.1", | ||
| 8 | + :require => "paperclip" | ||
| 9 | +gem "mime-types", "1.16", | ||
| 10 | + :require => "mime/types" | ||
| 11 | +gem "xml-simple", "1.0.12", | ||
| 12 | + :require => "xmlsimple" | ||
| 13 | +gem "yfactorial-utility_scopes", "0.2.2", | ||
| 14 | + :require => "utility_scopes" | ||
| 15 | +gem "justinfrench-formtastic", "0.2.2", | ||
| 16 | + :require => "formtastic" | ||
| 17 | +gem "inherited_resources", "1.0.4" | ||
| 18 | +gem "has_scope", "0.4.2" | ||
| 19 | +gem "responders", "0.4.8" | ||
| 20 | +gem "thoughtbot-clearance", "0.8.2", | ||
| 21 | + :require => "clearance" | ||
| 22 | +gem "fastercsv", "1.5.1" | ||
| 23 | +gem "delayed_job", "2.0.6" | ||
| 24 | +gem "redis", "1.0.7" | ||
| 25 | +gem "newrelic_rpm", "3.3.0" | ||
| 26 | + | ||
| 27 | +gem "sendgrid", "0.1.4" | ||
| 28 | +gem "json_pure", "1.4.6" | ||
| 29 | +gem "rubaidh-google_analytics", "1.1.4", :require => "rubaidh/google_analytics" | ||
| 30 | + | ||
| 31 | +group :development do | ||
| 32 | + gem 'mysql', '2.8.1' | ||
| 33 | +end | ||
| 34 | + | ||
| 35 | + | ||
| 36 | +group :cucumber do | ||
| 37 | + gem 'cucumber', '0.8.5' | ||
| 38 | + gem 'webrat', "0.5.3" | ||
| 39 | + gem 'fakeweb', '1.2.5' | ||
| 40 | + gem 'factory_girl', '1.2.3' | ||
| 41 | +end | ||
| 42 | + | ||
| 43 | +group :test do | ||
| 44 | + gem "rspec", "~>1.3.1" | ||
| 45 | + gem "rspec-rails", "1.3.4" | ||
| 46 | + gem "factory_girl", "1.2.3" | ||
| 47 | + gem "shoulda", "~>2.10.1" | ||
| 48 | + gem "jtrupiano-timecop", "0.2.1", | ||
| 49 | + :require => "timecop" | ||
| 50 | + gem "fakeweb", "1.2.5" | ||
| 51 | + gem "jferris-mocha", "0.9.5.0.1241126838", | ||
| 52 | + :require => "mocha" | ||
| 53 | +end |
| @@ -0,0 +1,111 @@ | @@ -0,0 +1,111 @@ | ||
| 1 | +GEM | ||
| 2 | + remote: http://rubygems.org/ | ||
| 3 | + remote: http://gems.github.com/ | ||
| 4 | + specs: | ||
| 5 | + actionmailer (2.3.5) | ||
| 6 | + actionpack (= 2.3.5) | ||
| 7 | + actionpack (2.3.5) | ||
| 8 | + activesupport (= 2.3.5) | ||
| 9 | + rack (~> 1.0.0) | ||
| 10 | + activerecord (2.3.5) | ||
| 11 | + activesupport (= 2.3.5) | ||
| 12 | + activeresource (2.3.5) | ||
| 13 | + activesupport (= 2.3.5) | ||
| 14 | + activesupport (2.3.5) | ||
| 15 | + ambethia-smtp-tls (1.1.2) | ||
| 16 | + builder (2.1.2) | ||
| 17 | + cucumber (0.8.5) | ||
| 18 | + builder (~> 2.1.2) | ||
| 19 | + diff-lcs (~> 1.1.2) | ||
| 20 | + gherkin (~> 2.1.4) | ||
| 21 | + json_pure (~> 1.4.3) | ||
| 22 | + term-ansicolor (~> 1.0.4) | ||
| 23 | + daemons (1.1.6) | ||
| 24 | + delayed_job (2.0.6) | ||
| 25 | + daemons | ||
| 26 | + diff-lcs (1.1.3) | ||
| 27 | + factory_girl (1.2.3) | ||
| 28 | + fakeweb (1.2.5) | ||
| 29 | + fastercsv (1.5.1) | ||
| 30 | + gherkin (2.1.5) | ||
| 31 | + trollop (~> 1.16.2) | ||
| 32 | + has_scope (0.4.2) | ||
| 33 | + hoptoad_notifier (2.4.9) | ||
| 34 | + activesupport | ||
| 35 | + builder | ||
| 36 | + inherited_resources (1.0.4) | ||
| 37 | + has_scope (~> 0.4.2) | ||
| 38 | + responders (~> 0.4.3) | ||
| 39 | + jferris-mocha (0.9.5.0.1241126838) | ||
| 40 | + rake | ||
| 41 | + json_pure (1.4.6) | ||
| 42 | + jtrupiano-timecop (0.2.1) | ||
| 43 | + justinfrench-formtastic (0.2.2) | ||
| 44 | + mime-types (1.16) | ||
| 45 | + mysql (2.8.1) | ||
| 46 | + newrelic_rpm (3.3.0) | ||
| 47 | + nokogiri (1.5.0) | ||
| 48 | + rack (1.0.1) | ||
| 49 | + rails (2.3.5) | ||
| 50 | + actionmailer (= 2.3.5) | ||
| 51 | + actionpack (= 2.3.5) | ||
| 52 | + activerecord (= 2.3.5) | ||
| 53 | + activeresource (= 2.3.5) | ||
| 54 | + activesupport (= 2.3.5) | ||
| 55 | + rake (>= 0.8.3) | ||
| 56 | + rake (0.9.2.2) | ||
| 57 | + redis (1.0.7) | ||
| 58 | + responders (0.4.8) | ||
| 59 | + rspec (1.3.2) | ||
| 60 | + rspec-rails (1.3.4) | ||
| 61 | + rack (>= 1.0.0) | ||
| 62 | + rspec (~> 1.3.1) | ||
| 63 | + rubaidh-google_analytics (1.1.4) | ||
| 64 | + actionpack | ||
| 65 | + activesupport | ||
| 66 | + sendgrid (0.1.4) | ||
| 67 | + shoulda (2.10.3) | ||
| 68 | + term-ansicolor (1.0.7) | ||
| 69 | + thoughtbot-clearance (0.8.2) | ||
| 70 | + thoughtbot-paperclip (2.3.1) | ||
| 71 | + trollop (1.16.2) | ||
| 72 | + webrat (0.5.3) | ||
| 73 | + nokogiri (>= 1.2.0) | ||
| 74 | + rack (>= 1.0) | ||
| 75 | + xml-simple (1.0.12) | ||
| 76 | + yfactorial-utility_scopes (0.2.2) | ||
| 77 | + activerecord (>= 2.1.0) | ||
| 78 | + | ||
| 79 | +PLATFORMS | ||
| 80 | + ruby | ||
| 81 | + | ||
| 82 | +DEPENDENCIES | ||
| 83 | + ambethia-smtp-tls (= 1.1.2) | ||
| 84 | + cucumber (= 0.8.5) | ||
| 85 | + delayed_job (= 2.0.6) | ||
| 86 | + factory_girl (= 1.2.3) | ||
| 87 | + fakeweb (= 1.2.5) | ||
| 88 | + fastercsv (= 1.5.1) | ||
| 89 | + has_scope (= 0.4.2) | ||
| 90 | + hoptoad_notifier (= 2.4.9) | ||
| 91 | + inherited_resources (= 1.0.4) | ||
| 92 | + jferris-mocha (= 0.9.5.0.1241126838) | ||
| 93 | + json_pure (= 1.4.6) | ||
| 94 | + jtrupiano-timecop (= 0.2.1) | ||
| 95 | + justinfrench-formtastic (= 0.2.2) | ||
| 96 | + mime-types (= 1.16) | ||
| 97 | + mysql (= 2.8.1) | ||
| 98 | + newrelic_rpm (= 3.3.0) | ||
| 99 | + rails (= 2.3.5) | ||
| 100 | + redis (= 1.0.7) | ||
| 101 | + responders (= 0.4.8) | ||
| 102 | + rspec (~> 1.3.1) | ||
| 103 | + rspec-rails (= 1.3.4) | ||
| 104 | + rubaidh-google_analytics (= 1.1.4) | ||
| 105 | + sendgrid (= 0.1.4) | ||
| 106 | + shoulda (~> 2.10.1) | ||
| 107 | + thoughtbot-clearance (= 0.8.2) | ||
| 108 | + thoughtbot-paperclip (= 2.3.1) | ||
| 109 | + webrat (= 0.5.3) | ||
| 110 | + xml-simple (= 1.0.12) | ||
| 111 | + yfactorial-utility_scopes (= 0.2.2) |
config/boot.rb
| @@ -106,5 +106,19 @@ module Rails | @@ -106,5 +106,19 @@ module Rails | ||
| 106 | end | 106 | end |
| 107 | end | 107 | end |
| 108 | 108 | ||
| 109 | +class Rails::Boot | ||
| 110 | + def run | ||
| 111 | + load_initializer | ||
| 112 | + | ||
| 113 | + Rails::Initializer.class_eval do | ||
| 114 | + def load_gems | ||
| 115 | + @bundler_loaded ||= Bundler.require :default, Rails.env | ||
| 116 | + end | ||
| 117 | + end | ||
| 118 | + | ||
| 119 | + Rails::Initializer.run(:set_load_path) | ||
| 120 | + end | ||
| 121 | +end | ||
| 122 | + | ||
| 109 | # All that for this: | 123 | # All that for this: |
| 110 | Rails.boot! | 124 | Rails.boot! |
config/environment.rb
| @@ -14,50 +14,5 @@ Rails::Initializer.run do |config| | @@ -14,50 +14,5 @@ Rails::Initializer.run do |config| | ||
| 14 | config.active_record.default_timezone = 'Eastern Time (US & Canada)' | 14 | config.active_record.default_timezone = 'Eastern Time (US & Canada)' |
| 15 | config.action_mailer.delivery_method = :smtp | 15 | config.action_mailer.delivery_method = :smtp |
| 16 | #config.action_mailer.delivery_method = :sendmail | 16 | #config.action_mailer.delivery_method = :sendmail |
| 17 | - | ||
| 18 | - config.gem 'hoptoad_notifier', | ||
| 19 | - :version => '2.4.9' | ||
| 20 | - config.gem "ambethia-smtp-tls", | ||
| 21 | - :lib => "smtp-tls", | ||
| 22 | - :version => "1.1.2", | ||
| 23 | - :source => "http://gems.github.com" | ||
| 24 | - config.gem "thoughtbot-paperclip", | ||
| 25 | - :lib => "paperclip", | ||
| 26 | - :version => "2.3.1", | ||
| 27 | - :source => "http://gems.github.com" | ||
| 28 | - config.gem "mime-types", | ||
| 29 | - :lib => "mime/types", | ||
| 30 | - :version => "1.16" | ||
| 31 | - config.gem "xml-simple", | ||
| 32 | - :lib => "xmlsimple", | ||
| 33 | - :version => "1.0.12" | ||
| 34 | - config.gem "yfactorial-utility_scopes", | ||
| 35 | - :lib => "utility_scopes", | ||
| 36 | - :version => "0.2.2", | ||
| 37 | - :source => "http://gems.github.com" | ||
| 38 | - config.gem "justinfrench-formtastic", | ||
| 39 | - :lib => 'formtastic', | ||
| 40 | - :source => 'http://gems.github.com', | ||
| 41 | - :version => '0.2.2' | ||
| 42 | - config.gem "josevalim-inherited_resources", | ||
| 43 | - :lib => 'inherited_resources', | ||
| 44 | - :source => 'http://gems.github.com', | ||
| 45 | - :version => '0.9.1' | ||
| 46 | - config.gem "thoughtbot-clearance", | ||
| 47 | - :lib => 'clearance', | ||
| 48 | - :source => 'http://gems.github.com', | ||
| 49 | - :version => '0.8.2' | ||
| 50 | - config.gem "fastercsv", | ||
| 51 | - :lib => 'fastercsv', | ||
| 52 | - :version => '1.5.1' | ||
| 53 | - config.gem 'delayed_job', | ||
| 54 | - :version => '2.0.6' | ||
| 55 | - config.gem 'redis', | ||
| 56 | - :version => '1.0.7' | ||
| 57 | - config.gem 'newrelic_rpm', | ||
| 58 | - :version => '3.3.0' | ||
| 59 | - | ||
| 60 | - config.gem 'sendgrid' | ||
| 61 | - config.gem 'json' | ||
| 62 | end | 17 | end |
| 63 | 18 |
config/environments/cucumber.rb
| @@ -19,23 +19,6 @@ config.action_controller.allow_forgery_protection = false | @@ -19,23 +19,6 @@ config.action_controller.allow_forgery_protection = false | ||
| 19 | # ActionMailer::Base.deliveries array. | 19 | # ActionMailer::Base.deliveries array. |
| 20 | config.action_mailer.delivery_method = :test | 20 | config.action_mailer.delivery_method = :test |
| 21 | 21 | ||
| 22 | -unless File.directory?(File.join(Rails.root, 'vendor/plugins/cucumber')) | ||
| 23 | - config.gem 'cucumber', | ||
| 24 | - :lib => false, | ||
| 25 | - :version => '>=0.4.2' | ||
| 26 | -end | ||
| 27 | - | ||
| 28 | -unless File.directory?(File.join(Rails.root, 'vendor/plugins/webrat')) | ||
| 29 | - config.gem 'webrat', | ||
| 30 | - :lib => false, | ||
| 31 | - :version => '>=0.5.0' | ||
| 32 | -end | ||
| 33 | - | ||
| 34 | -config.gem 'fakeweb', | ||
| 35 | - :version => '>= 1.2.5' | ||
| 36 | -config.gem 'factory_girl', | ||
| 37 | - :source => 'http://gemcutter.org', | ||
| 38 | - :version => '>= 1.2.3' | ||
| 39 | 22 | ||
| 40 | HOST = "localhost" | 23 | HOST = "localhost" |
| 41 | AUTHORIZE_NET_API_LOGIN_ID = '' | 24 | AUTHORIZE_NET_API_LOGIN_ID = '' |
config/environments/production.rb
| @@ -17,11 +17,6 @@ config.action_controller.perform_caching = true | @@ -17,11 +17,6 @@ config.action_controller.perform_caching = true | ||
| 17 | # Disable delivery errors, bad email addresses will be ignored | 17 | # Disable delivery errors, bad email addresses will be ignored |
| 18 | config.action_mailer.raise_delivery_errors = false | 18 | config.action_mailer.raise_delivery_errors = false |
| 19 | 19 | ||
| 20 | -config.gem "rubaidh-google_analytics", | ||
| 21 | - :lib => "rubaidh/google_analytics", | ||
| 22 | - :version => "1.1.4", | ||
| 23 | - :source => "http://gems.github.com" | ||
| 24 | - | ||
| 25 | PHOTOCRACY_SITE_ID = 8 | 20 | PHOTOCRACY_SITE_ID = 8 |
| 26 | ALLOURIDEAS_SITE_ID = 1 | 21 | ALLOURIDEAS_SITE_ID = 1 |
| 27 | 22 |
config/environments/test.rb
| @@ -21,26 +21,6 @@ config.action_controller.allow_forgery_protection = false | @@ -21,26 +21,6 @@ config.action_controller.allow_forgery_protection = false | ||
| 21 | # ActionMailer::Base.deliveries array. | 21 | # ActionMailer::Base.deliveries array. |
| 22 | config.action_mailer.delivery_method = :test | 22 | config.action_mailer.delivery_method = :test |
| 23 | 23 | ||
| 24 | -# rake gems:install RAILS_ENV=test | ||
| 25 | - | ||
| 26 | -config.gem 'factory_girl', | ||
| 27 | - :source => 'http://gemcutter.org', | ||
| 28 | - :version => '>= 1.2.3' | ||
| 29 | -config.gem 'thoughtbot-shoulda', | ||
| 30 | - :lib => 'shoulda', | ||
| 31 | - :source => 'http://gems.github.com', | ||
| 32 | - :version => '>= 2.10.1' | ||
| 33 | -config.gem 'jtrupiano-timecop', | ||
| 34 | - :lib => 'timecop', | ||
| 35 | - :source => 'http://gems.github.com', | ||
| 36 | - :version => '0.2.1' | ||
| 37 | -config.gem 'fakeweb', | ||
| 38 | - :version => '>= 1.2.5' | ||
| 39 | -config.gem 'jferris-mocha', | ||
| 40 | - :version => '0.9.5.0.1241126838', | ||
| 41 | - :source => 'http://gems.github.com', | ||
| 42 | - :lib => 'mocha' | ||
| 43 | - | ||
| 44 | HOST = 'localhost' | 24 | HOST = 'localhost' |
| 45 | 25 | ||
| 46 | AUTHORIZE_NET_API_LOGIN_ID = '' | 26 | AUTHORIZE_NET_API_LOGIN_ID = '' |
config/initializers/google_analytics.rb
| 1 | # Google Analytics is only available in production by default | 1 | # Google Analytics is only available in production by default |
| 2 | # http://github.com/rubaidh/google_analytics | 2 | # http://github.com/rubaidh/google_analytics |
| 3 | 3 | ||
| 4 | -if ENV['GOOGLE_ANALYTICS_TRACKER_ID'] | ||
| 5 | - Rubaidh::GoogleAnalytics.tracker_id = ENV['GOOGLE_ANALYTICS_TRACKER_ID'] | ||
| 6 | -end | 4 | +Rubaidh::GoogleAnalytics.environments = ['production', 'staging'] |
| 5 | +Rubaidh::GoogleAnalytics.tracker_id = ENV['GOOGLE_ANALYTICS_TRACKER_ID'] || "UA-11703548-1" |
| @@ -0,0 +1,20 @@ | @@ -0,0 +1,20 @@ | ||
| 1 | +begin | ||
| 2 | + require "rubygems" | ||
| 3 | + require "bundler" | ||
| 4 | +rescue LoadError | ||
| 5 | + raise "Could not load the bundler gem. Install it with `gem install bundler`." | ||
| 6 | +end | ||
| 7 | + | ||
| 8 | +if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.24") | ||
| 9 | + raise RuntimeError, "Your bundler version is too old for Rails 2.3." + | ||
| 10 | + "Run `gem install bundler` to upgrade." | ||
| 11 | +end | ||
| 12 | + | ||
| 13 | +begin | ||
| 14 | + # Set up load paths for all bundled gems | ||
| 15 | + ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__) | ||
| 16 | + Bundler.setup | ||
| 17 | +rescue Bundler::GemNotFound | ||
| 18 | + raise RuntimeError, "Bundler couldn't find some gems." + | ||
| 19 | + "Did you run `bundle install`?" | ||
| 20 | +end |