Skip to content

Commit 330c9b8

Browse files
committed
Convert to use wycat's Bundler
Signed-off-by: Alex Coles <[email protected]>
1 parent ae8aa48 commit 330c9b8

File tree

4 files changed

+38
-13
lines changed

4 files changed

+38
-13
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ config/database.yml
1010
config/deploy.rb
1111
config/deploy/*
1212
config/exceptional.yml
13+
vendor/bundler_gems/*
14+
!vendor/bundler_gems/cache/
15+
bin/

Gemfile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
clear_sources
2+
bundle_path 'vendor/bundler_gems'
3+
4+
source 'http://gemcutter.org'
5+
source 'http://gems.github.com'
6+
7+
gem 'rails', '2.3.5'
8+
gem 'ferret', '0.11.6'
9+
gem 'will_paginate', '2.3.11'
10+
gem 'ruby-recaptcha', '1.0.0'
11+
gem 'newrelic_rpm'
12+
13+
only :test do
14+
gem 'rspec', '1.2.9'
15+
gem 'rspec-rails', '1.2.9'
16+
end

config/environment.rb

-13
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,6 @@
1616
# you must remove the Active Record framework.
1717
# config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
1818

19-
# Specify gems that this application depends on.
20-
# They can then be installed with "rake gems:install" on new installations.
21-
# You have to specify the :lib option for libraries, where the Gem name (sqlite3-ruby) differs from the file itself (sqlite3)
22-
# config.gem "bj"
23-
# config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
24-
# config.gem "sqlite3-ruby", :lib => "sqlite3"
25-
# config.gem "aws-s3", :lib => "aws/s3"
26-
27-
config.gem "ferret"
28-
config.gem "mislav-will_paginate", :lib => 'will_paginate', :source => 'http://gems.github.com/'
29-
config.gem "ruby-recaptcha", :lib => 'ruby-recaptcha'
30-
config.gem 'newrelic_rpm'
31-
3219
# Only load the plugins named here, in the order given. By default, all plugins
3320
# in vendor/plugins are loaded in alphabetical order.
3421
# :all can be used as a placeholder for all plugins not explicitly named

config/preinitializer.rb

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
require "#{File.dirname(__FILE__)}/../vendor/bundler_gems/environment"
2+
3+
class Rails::Boot
4+
def run
5+
load_initializer
6+
extend_environment
7+
Rails::Initializer.run(:set_load_path)
8+
end
9+
10+
def extend_environment
11+
Rails::Initializer.class_eval do
12+
old_load = instance_method(:load_environment)
13+
define_method(:load_environment) do
14+
Bundler.require_env RAILS_ENV
15+
old_load.bind(self).call
16+
end
17+
end
18+
end
19+
end

0 commit comments

Comments
 (0)