Skip to content

Commit

Permalink
Reinstating change: "Use bundler for managing gem dependencies instea…
Browse files Browse the repository at this point in the history
…d of wiring up gems in environment.rb.""

This reverts commit d6a1fd5.
  • Loading branch information
Tom Elkin committed Sep 23, 2010
1 parent d6a1fd5 commit 347bccb
Show file tree
Hide file tree
Showing 841 changed files with 166 additions and 63,278 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@ debug.html
.autotest
*.iml
tags
vendor/ruby/1.8/bin/
vendor/ruby/1.8/doc/
vendor/ruby/1.8/specifications/
vendor/ruby/1.8/gems/
/.bundle/

29 changes: 29 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
source :gemcutter

gem 'couchrest', '0.34'
gem 'dictionary', '1.0.0'
gem 'fastercsv', '1.5.3'
gem 'json', '1.4.6'
gem 'json_pure', '1.4.6'
gem 'mime-types', '1.16'
gem 'mini_magick', '1.3.2'
gem 'pdf-reader', '0.8.6'
gem 'prawn', '0.8.4'
gem 'rails', '2.3.5'
gem 'rest-client', '1.3.0'
gem 'subexec', '0.0.4'
gem 'uuidtools', '2.1.1'
gem 'validatable', '1.6.7'

group :cucumber do
gem 'cucumber', '0.8.5'
gem 'cucumber-rails', '0.3.2'
gem 'hpricot', '0.8.2'
end

group :test do
gem 'rspec', '1.3.0'
gem 'rspec-rails', '1.3.2'
gem 'webrat', '0.7.1'
end

98 changes: 98 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
GEM
remote: http://rubygems.org/
specs:
Ascii85 (1.0.0)
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)
builder (2.1.2)
couchrest (0.34)
mime-types (>= 1.15)
rest-client (>= 0.5)
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)
cucumber-rails (0.3.2)
cucumber (>= 0.8.0)
dictionary (1.0.0)
diff-lcs (1.1.2)
fastercsv (1.5.3)
gherkin (2.1.5)
trollop (~> 1.16.2)
hpricot (0.8.2)
json (1.4.6)
json_pure (1.4.6)
mime-types (1.16)
mini_magick (1.3.2)
subexec (~> 0.0.4)
nokogiri (1.4.3.1)
pdf-reader (0.8.6)
Ascii85 (>= 0.9)
prawn (0.8.4)
prawn-core (>= 0.8.4, < 0.9)
prawn-layout (>= 0.8.4, < 0.9)
prawn-security (>= 0.8.4, < 0.9)
prawn-core (0.8.4)
prawn-layout (0.8.4)
prawn-security (0.8.4)
rack (1.0.1)
rack-test (0.5.4)
rack (>= 1.0)
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.8.7)
rest-client (1.3.0)
mime-types (>= 1.16)
rspec (1.3.0)
rspec-rails (1.3.2)
rack (>= 1.0.0)
rspec (>= 1.3.0)
subexec (0.0.4)
term-ansicolor (1.0.5)
trollop (1.16.2)
uuidtools (2.1.1)
validatable (1.6.7)
webrat (0.7.1)
nokogiri (>= 1.2.0)
rack (>= 1.0)
rack-test (>= 0.5.3)

PLATFORMS
ruby

DEPENDENCIES
couchrest (= 0.34)
cucumber (= 0.8.5)
cucumber-rails (= 0.3.2)
dictionary (= 1.0.0)
fastercsv (= 1.5.3)
hpricot (= 0.8.2)
json (= 1.4.6)
json_pure (= 1.4.6)
mime-types (= 1.16)
mini_magick (= 1.3.2)
pdf-reader (= 0.8.6)
prawn (= 0.8.4)
rails (= 2.3.5)
rest-client (= 1.3.0)
rspec (= 1.3.0)
rspec-rails (= 1.3.2)
subexec (= 0.0.4)
uuidtools (= 2.1.1)
validatable (= 1.6.7)
webrat (= 0.7.1)
13 changes: 13 additions & 0 deletions config/boot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,19 @@ def read_environment_rb
end
end
end
class Rails::Boot
def run
load_initializer

Rails::Initializer.class_eval do
def load_gems
@bundler_loaded ||= Bundler.require :default, (ENV['RAILS_ENV']||'development')
end
end

Rails::Initializer.run(:set_load_path)
end
end

# All that for this:
Rails.boot!
8 changes: 0 additions & 8 deletions config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +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 "json", :lib => false, :version => '>= 1.4.6'
config.gem "json_pure", :lib => false, :version => '>= 1.4.6'
config.gem "uuidtools", :lib =>false
config.gem "dictionary"
config.gem "prawn"
config.gem "pdf-reader", :lib => false
config.gem "fastercsv"
config.gem "mini_magick"

# config.gem "couchrest", :lib => false
# config.gem "validatable", :lib => false
Expand Down
21 changes: 21 additions & 0 deletions config/preinitializer.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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

Loading

0 comments on commit 347bccb

Please sign in to comment.