Permalink
Browse files

Convert gem management to Bundler

  • Loading branch information...
1 parent c1556cf commit ea9e59d87aa471d0971646c3b16a22102054d09f @leesmith committed Dec 19, 2011
Showing 900 changed files with 124 additions and 104,918 deletions.
View
@@ -0,0 +1,17 @@
+source 'http://rubygems.org'
+
+gem 'authlogic', '2.1.6'
+gem 'faker', '0.3.1'
+gem 'paperclip', '2.3.3'
+gem 'populator', '1.0.0'
+gem 'postgres', '~> 0.7.9.2008.01.28'
+gem 'prawn', '0.6.3'
+gem 'rails', '2.3.11'
+gem 'rake', '0.8.7'
+gem 'ruby-debug'
+gem 'searchlogic', '2.4.25'
+gem 'will_paginate', '2.3.15'
+
+group :development, :test do
+ gem 'factory_girl'
+end
View
@@ -0,0 +1,71 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionmailer (2.3.11)
+ actionpack (= 2.3.11)
+ actionpack (2.3.11)
+ activesupport (= 2.3.11)
+ rack (~> 1.1.0)
+ activerecord (2.3.11)
+ activesupport (= 2.3.11)
+ activeresource (2.3.11)
+ activesupport (= 2.3.11)
+ activesupport (2.3.11)
+ authlogic (2.1.6)
+ activesupport
+ columnize (0.3.6)
+ factory_girl (2.3.2)
+ activesupport
+ faker (0.3.1)
+ linecache (0.46)
+ rbx-require-relative (> 0.0.4)
+ paperclip (2.3.3)
+ activerecord
+ activesupport
+ populator (1.0.0)
+ postgres (0.7.9.2008.01.28)
+ prawn (0.6.3)
+ prawn-core (>= 0.6.3, < 0.7)
+ prawn-format (>= 0.2.3, < 0.3)
+ prawn-layout (>= 0.3.2, < 0.4)
+ prawn-security (>= 0.1.1, < 0.2)
+ prawn-core (0.6.3)
+ prawn-format (0.2.3)
+ prawn-core
+ prawn-layout (0.3.2)
+ prawn-security (0.1.1)
+ rack (1.1.2)
+ rails (2.3.11)
+ actionmailer (= 2.3.11)
+ actionpack (= 2.3.11)
+ activerecord (= 2.3.11)
+ activeresource (= 2.3.11)
+ activesupport (= 2.3.11)
+ rake (>= 0.8.3)
+ rake (0.8.7)
+ rbx-require-relative (0.0.5)
+ ruby-debug (0.10.4)
+ columnize (>= 0.1)
+ ruby-debug-base (~> 0.10.4.0)
+ ruby-debug-base (0.10.4)
+ linecache (>= 0.3)
+ searchlogic (2.4.25)
+ activerecord (>= 2.0.0)
+ will_paginate (2.3.15)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ authlogic (= 2.1.6)
+ factory_girl
+ faker (= 0.3.1)
+ paperclip (= 2.3.3)
+ populator (= 1.0.0)
+ postgres (~> 0.7.9.2008.01.28)
+ prawn (= 0.6.3)
+ rails (= 2.3.11)
+ rake (= 0.8.7)
+ ruby-debug
+ searchlogic (= 2.4.25)
+ will_paginate (= 2.3.15)
View
@@ -19,7 +19,7 @@ class User < ActiveRecord::Base
# Validations
validates_presence_of :first_name, :last_name
- validates_confirmation_of :email
+ validates_confirmation_of :email, :on => :create
# Scopes
named_scope :enabled, :order => 'username', :conditions => { :disabled_at => nil }
View
@@ -106,5 +106,20 @@ def read_environment_rb
end
end
+# Bundler
+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!
@@ -19,13 +19,6 @@
# config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
# config.gem "sqlite3-ruby", :lib => "sqlite3"
# config.gem "aws-s3", :lib => "aws/s3"
- config.gem 'will_paginate'
- config.gem 'authlogic'
- config.gem 'searchlogic'
- config.gem 'paperclip'
- config.gem 'prawn'
- config.gem 'populator'
- config.gem 'faker'
# Only load the plugins named here, in the order given. By default, all plugins
# in vendor/plugins are loaded in alphabetical order.
@@ -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
@@ -81,7 +81,6 @@ namespace :fake do
c.office_phone = Faker::PhoneNumber.phone_number
c.affiliation = Faker::Company.name
c.notes = Faker::Lorem.paragraph(sentence_count=5)
- c.created_at = Time.now
end
end
@@ -1,8 +0,0 @@
-.DS_Store
-.swp
-*.log
-*.sqlite3
-pkg/*
-coverage/*
-doc/*
-benchmarks/*
Oops, something went wrong.

0 comments on commit ea9e59d

Please sign in to comment.