forked from brightbox/isitruby19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade for changes in Bundler 0.9.x series
* see also http://gist.github.com/302406. Signed-off-by: Alex Coles <alex@alexcolesportfolio.com>
- Loading branch information
Showing
4 changed files
with
73 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
clear_sources | ||
bundle_path 'vendor/bundler_gems' | ||
source :gemcutter | ||
|
||
source 'http://gemcutter.org' | ||
source 'http://gems.github.com' | ||
|
||
gem 'rails', '2.3.5' | ||
gem 'rails', '2.3.5', :require => nil | ||
gem 'ferret', '0.11.6' | ||
gem 'will_paginate', '2.3.11' | ||
gem 'ruby-recaptcha', '1.0.0' | ||
gem 'newrelic_rpm' | ||
|
||
only :test do | ||
group :test do | ||
gem 'rspec', '1.2.9' | ||
gem 'rspec-rails', '1.2.9' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
dependencies: | ||
- rails: = 2.3.5 | ||
- ferret: = 0.11.6 | ||
- will_paginate: = 2.3.11 | ||
- ruby-recaptcha: = 1.0.0 | ||
- newrelic_rpm: ">= 0" | ||
- rspec: = 1.2.9 | ||
- rspec-rails: = 1.2.9 | ||
specs: | ||
- activesupport: | ||
version: 2.3.5 | ||
- actionmailer: | ||
version: 2.3.5 | ||
- will_paginate: | ||
version: 2.3.11 | ||
- rack: | ||
version: 1.0.1 | ||
- actionpack: | ||
version: 2.3.5 | ||
- rspec: | ||
version: 1.2.9 | ||
- rspec-rails: | ||
version: 1.2.9 | ||
- newrelic_rpm: | ||
version: 2.9.9 | ||
- rake: | ||
version: 0.8.7 | ||
- ferret: | ||
version: 0.11.6 | ||
- activerecord: | ||
version: 2.3.5 | ||
- activeresource: | ||
version: 2.3.5 | ||
- rails: | ||
version: 2.3.5 | ||
- ruby-recaptcha: | ||
version: 1.0.0 | ||
hash: c2397dcbd396cedcf5ecd4d51527d76c691b4a1d | ||
sources: | ||
- Rubygems: | ||
uri: http://gemcutter.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,12 @@ | ||
require "#{File.dirname(__FILE__)}/../vendor/bundler_gems/environment" | ||
begin | ||
# Require the preresolved locked set of gems. | ||
require File.expand_path('../../.bundle/environment', __FILE__) | ||
rescue LoadError | ||
raise RuntimeError, "You have not locked your bundle. Run `bundle lock`." | ||
|
||
class Rails::Boot | ||
def run | ||
load_initializer | ||
extend_environment | ||
Rails::Initializer.run(:set_load_path) | ||
end | ||
|
||
def extend_environment | ||
Rails::Initializer.class_eval do | ||
old_load = instance_method(:load_environment) | ||
define_method(:load_environment) do | ||
Bundler.require_env RAILS_ENV | ||
old_load.bind(self).call | ||
end | ||
end | ||
end | ||
# Fallback on doing the resolve at runtime. | ||
# This does not work with rails 2.3.5 as of bundler 0.9.5. | ||
require "rubygems" | ||
require "bundler" | ||
Bundler.setup | ||
end |