Remove support for bundler < 1.5

This commit is contained in:
Godfrey Chan 2015-04-23 15:24:20 -04:00 committed by Arthur Neves
parent 5c0b6ef19a
commit fd5b0bb26b
No known key found for this signature in database
GPG Key ID: 04A390FB1E433E17

36
Gemfile
View File

@ -34,40 +34,6 @@ if rails_master?
end
# Monkey patch bundler to support mri_21
unless Bundler::Dependency::PLATFORM_MAP.include? :mri_21
STDERR.puts
STDERR.puts "WARNING: --------------------------------------------------------------------------"
STDERR.puts "You are running an old version of bundler, please update by running: gem install bundler"
STDERR.puts
map = Bundler::Dependency::PLATFORM_MAP.dup
map[:mri_21] = Gem::Platform::RUBY
map.freeze
Bundler::Dependency.send(:remove_const, "PLATFORM_MAP")
Bundler::Dependency.const_set("PLATFORM_MAP", map)
Bundler::Dsl.send(:remove_const, "VALID_PLATFORMS")
Bundler::Dsl.const_set("VALID_PLATFORMS", map.keys.freeze)
class ::Bundler::CurrentRuby
def on_21?
RUBY_VERSION =~ /^2\.1/
end
def mri_21?
mri? && on_21?
end
end
class ::Bundler::Dependency
private
def on_21?
RUBY_VERSION =~ /^2\.1/
end
def mri_21?
mri? && on_21?
end
end
end
if rails_master?
gem 'arel', git: 'https://github.com/rails/arel.git'
gem 'rails', git: 'https://github.com/rails/rails.git'
@ -241,8 +207,6 @@ gem 'ruby-readability', require: false
gem 'simple-rss', require: false
# TODO mri_22 should be here, but bundler was real slow to pick it up
# not even in production bundler yet, monkey patching it in feels bad
gem 'gctools', require: false, platform: :mri_21
begin