diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..b75c2d8 --- /dev/null +++ b/Gemfile @@ -0,0 +1,53 @@ +source :rubygems +source "http://gems.github.com" + +gem "rails", "2.3.5", :require => nil +gem "hoptoad_notifier", "2.4.9" +gem "ambethia-smtp-tls", "1.1.2", :require => "smtp-tls" +gem "thoughtbot-paperclip", "2.3.1", + :require => "paperclip" +gem "mime-types", "1.16", + :require => "mime/types" +gem "xml-simple", "1.0.12", + :require => "xmlsimple" +gem "yfactorial-utility_scopes", "0.2.2", + :require => "utility_scopes" +gem "justinfrench-formtastic", "0.2.2", + :require => "formtastic" +gem "inherited_resources", "1.0.4" +gem "has_scope", "0.4.2" +gem "responders", "0.4.8" +gem "thoughtbot-clearance", "0.8.2", + :require => "clearance" +gem "fastercsv", "1.5.1" +gem "delayed_job", "2.0.6" +gem "redis", "1.0.7" +gem "newrelic_rpm", "3.3.0" + +gem "sendgrid", "0.1.4" +gem "json_pure", "1.4.6" +gem "rubaidh-google_analytics", "1.1.4", :require => "rubaidh/google_analytics" + +group :development do + gem 'mysql', '2.8.1' +end + + +group :cucumber do + gem 'cucumber', '0.8.5' + gem 'webrat', "0.5.3" + gem 'fakeweb', '1.2.5' + gem 'factory_girl', '1.2.3' +end + +group :test do + gem "rspec", "~>1.3.1" + gem "rspec-rails", "1.3.4" + gem "factory_girl", "1.2.3" + gem "shoulda", "~>2.10.1" + gem "jtrupiano-timecop", "0.2.1", + :require => "timecop" + gem "fakeweb", "1.2.5" + gem "jferris-mocha", "0.9.5.0.1241126838", + :require => "mocha" +end diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..ab7ccb8 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,111 @@ +GEM + remote: http://rubygems.org/ + remote: http://gems.github.com/ + specs: + actionmailer (2.3.5) + actionpack (= 2.3.5) + actionpack (2.3.5) + activesupport (= 2.3.5) + rack (~> 1.0.0) + activerecord (2.3.5) + activesupport (= 2.3.5) + activeresource (2.3.5) + activesupport (= 2.3.5) + activesupport (2.3.5) + ambethia-smtp-tls (1.1.2) + builder (2.1.2) + cucumber (0.8.5) + builder (~> 2.1.2) + diff-lcs (~> 1.1.2) + gherkin (~> 2.1.4) + json_pure (~> 1.4.3) + term-ansicolor (~> 1.0.4) + daemons (1.1.6) + delayed_job (2.0.6) + daemons + diff-lcs (1.1.3) + factory_girl (1.2.3) + fakeweb (1.2.5) + fastercsv (1.5.1) + gherkin (2.1.5) + trollop (~> 1.16.2) + has_scope (0.4.2) + hoptoad_notifier (2.4.9) + activesupport + builder + inherited_resources (1.0.4) + has_scope (~> 0.4.2) + responders (~> 0.4.3) + jferris-mocha (0.9.5.0.1241126838) + rake + json_pure (1.4.6) + jtrupiano-timecop (0.2.1) + justinfrench-formtastic (0.2.2) + mime-types (1.16) + mysql (2.8.1) + newrelic_rpm (3.3.0) + nokogiri (1.5.0) + rack (1.0.1) + rails (2.3.5) + actionmailer (= 2.3.5) + actionpack (= 2.3.5) + activerecord (= 2.3.5) + activeresource (= 2.3.5) + activesupport (= 2.3.5) + rake (>= 0.8.3) + rake (0.9.2.2) + redis (1.0.7) + responders (0.4.8) + rspec (1.3.2) + rspec-rails (1.3.4) + rack (>= 1.0.0) + rspec (~> 1.3.1) + rubaidh-google_analytics (1.1.4) + actionpack + activesupport + sendgrid (0.1.4) + shoulda (2.10.3) + term-ansicolor (1.0.7) + thoughtbot-clearance (0.8.2) + thoughtbot-paperclip (2.3.1) + trollop (1.16.2) + webrat (0.5.3) + nokogiri (>= 1.2.0) + rack (>= 1.0) + xml-simple (1.0.12) + yfactorial-utility_scopes (0.2.2) + activerecord (>= 2.1.0) + +PLATFORMS + ruby + +DEPENDENCIES + ambethia-smtp-tls (= 1.1.2) + cucumber (= 0.8.5) + delayed_job (= 2.0.6) + factory_girl (= 1.2.3) + fakeweb (= 1.2.5) + fastercsv (= 1.5.1) + has_scope (= 0.4.2) + hoptoad_notifier (= 2.4.9) + inherited_resources (= 1.0.4) + jferris-mocha (= 0.9.5.0.1241126838) + json_pure (= 1.4.6) + jtrupiano-timecop (= 0.2.1) + justinfrench-formtastic (= 0.2.2) + mime-types (= 1.16) + mysql (= 2.8.1) + newrelic_rpm (= 3.3.0) + rails (= 2.3.5) + redis (= 1.0.7) + responders (= 0.4.8) + rspec (~> 1.3.1) + rspec-rails (= 1.3.4) + rubaidh-google_analytics (= 1.1.4) + sendgrid (= 0.1.4) + shoulda (~> 2.10.1) + thoughtbot-clearance (= 0.8.2) + thoughtbot-paperclip (= 2.3.1) + webrat (= 0.5.3) + xml-simple (= 1.0.12) + yfactorial-utility_scopes (= 0.2.2) diff --git a/config/boot.rb b/config/boot.rb index 0ad0f78..84559a8 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -106,5 +106,19 @@ module Rails end end +class Rails::Boot + def run + load_initializer + + Rails::Initializer.class_eval do + def load_gems + @bundler_loaded ||= Bundler.require :default, Rails.env + end + end + + Rails::Initializer.run(:set_load_path) + end +end + # All that for this: Rails.boot! diff --git a/config/environment.rb b/config/environment.rb index e9bd250..a45d822 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -14,50 +14,5 @@ Rails::Initializer.run do |config| config.active_record.default_timezone = 'Eastern Time (US & Canada)' config.action_mailer.delivery_method = :smtp #config.action_mailer.delivery_method = :sendmail - - config.gem 'hoptoad_notifier', - :version => '2.4.9' - config.gem "ambethia-smtp-tls", - :lib => "smtp-tls", - :version => "1.1.2", - :source => "http://gems.github.com" - config.gem "thoughtbot-paperclip", - :lib => "paperclip", - :version => "2.3.1", - :source => "http://gems.github.com" - config.gem "mime-types", - :lib => "mime/types", - :version => "1.16" - config.gem "xml-simple", - :lib => "xmlsimple", - :version => "1.0.12" - config.gem "yfactorial-utility_scopes", - :lib => "utility_scopes", - :version => "0.2.2", - :source => "http://gems.github.com" - config.gem "justinfrench-formtastic", - :lib => 'formtastic', - :source => 'http://gems.github.com', - :version => '0.2.2' - config.gem "josevalim-inherited_resources", - :lib => 'inherited_resources', - :source => 'http://gems.github.com', - :version => '0.9.1' - config.gem "thoughtbot-clearance", - :lib => 'clearance', - :source => 'http://gems.github.com', - :version => '0.8.2' - config.gem "fastercsv", - :lib => 'fastercsv', - :version => '1.5.1' - config.gem 'delayed_job', - :version => '2.0.6' - config.gem 'redis', - :version => '1.0.7' - config.gem 'newrelic_rpm', - :version => '3.3.0' - - config.gem 'sendgrid' - config.gem 'json' end diff --git a/config/environments/cucumber.rb b/config/environments/cucumber.rb index f8a6729..20696b9 100644 --- a/config/environments/cucumber.rb +++ b/config/environments/cucumber.rb @@ -19,23 +19,6 @@ config.action_controller.allow_forgery_protection = false # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test -unless File.directory?(File.join(Rails.root, 'vendor/plugins/cucumber')) - config.gem 'cucumber', - :lib => false, - :version => '>=0.4.2' -end - -unless File.directory?(File.join(Rails.root, 'vendor/plugins/webrat')) - config.gem 'webrat', - :lib => false, - :version => '>=0.5.0' -end - -config.gem 'fakeweb', - :version => '>= 1.2.5' -config.gem 'factory_girl', - :source => 'http://gemcutter.org', - :version => '>= 1.2.3' HOST = "localhost" AUTHORIZE_NET_API_LOGIN_ID = '' diff --git a/config/environments/production.rb b/config/environments/production.rb index 1be8a1a..d4a7093 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -17,11 +17,6 @@ config.action_controller.perform_caching = true # Disable delivery errors, bad email addresses will be ignored config.action_mailer.raise_delivery_errors = false -config.gem "rubaidh-google_analytics", - :lib => "rubaidh/google_analytics", - :version => "1.1.4", - :source => "http://gems.github.com" - PHOTOCRACY_SITE_ID = 8 ALLOURIDEAS_SITE_ID = 1 diff --git a/config/environments/test.rb b/config/environments/test.rb index 409fb44..2931bcc 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -21,26 +21,6 @@ config.action_controller.allow_forgery_protection = false # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test -# rake gems:install RAILS_ENV=test - -config.gem 'factory_girl', - :source => 'http://gemcutter.org', - :version => '>= 1.2.3' -config.gem 'thoughtbot-shoulda', - :lib => 'shoulda', - :source => 'http://gems.github.com', - :version => '>= 2.10.1' -config.gem 'jtrupiano-timecop', - :lib => 'timecop', - :source => 'http://gems.github.com', - :version => '0.2.1' -config.gem 'fakeweb', - :version => '>= 1.2.5' -config.gem 'jferris-mocha', - :version => '0.9.5.0.1241126838', - :source => 'http://gems.github.com', - :lib => 'mocha' - HOST = 'localhost' AUTHORIZE_NET_API_LOGIN_ID = '' diff --git a/config/initializers/google_analytics.rb b/config/initializers/google_analytics.rb index 5f61efd..9feb319 100644 --- a/config/initializers/google_analytics.rb +++ b/config/initializers/google_analytics.rb @@ -1,6 +1,5 @@ # Google Analytics is only available in production by default # http://github.com/rubaidh/google_analytics -if ENV['GOOGLE_ANALYTICS_TRACKER_ID'] - Rubaidh::GoogleAnalytics.tracker_id = ENV['GOOGLE_ANALYTICS_TRACKER_ID'] -end +Rubaidh::GoogleAnalytics.environments = ['production', 'staging'] +Rubaidh::GoogleAnalytics.tracker_id = ENV['GOOGLE_ANALYTICS_TRACKER_ID'] || "UA-11703548-1" diff --git a/config/preinitializer.rb b/config/preinitializer.rb new file mode 100644 index 0000000..3ad0241 --- /dev/null +++ b/config/preinitializer.rb @@ -0,0 +1,20 @@ +begin + require "rubygems" + require "bundler" +rescue LoadError + raise "Could not load the bundler gem. Install it with `gem install bundler`." +end + +if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.24") + raise RuntimeError, "Your bundler version is too old for Rails 2.3." + + "Run `gem install bundler` to upgrade." +end + +begin + # Set up load paths for all bundled gems + ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__) + Bundler.setup +rescue Bundler::GemNotFound + raise RuntimeError, "Bundler couldn't find some gems." + + "Did you run `bundle install`?" +end -- libgit2 0.21.2