Skip to content

Commit

Permalink
RubyGems 1.5 requires 1.8.7 or newer
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed Feb 1, 2011
1 parent 898d874 commit 80fa5ec
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -29,7 +29,7 @@ hoe = Hoe.spec 'rubygems-update' do
self.readme_file = 'README.rdoc'

spec_extras[:required_rubygems_version] = Gem::Requirement.default
spec_extras[:required_ruby_version] = Gem::Requirement.new '> 1.8.3'
spec_extras[:required_ruby_version] = Gem::Requirement.new '>= 1.8.7'
spec_extras[:executables] = ['update_rubygems']

clean_globs.push('**/debug.log',
Expand Down
2 changes: 1 addition & 1 deletion bin/gem
Expand Up @@ -9,7 +9,7 @@ require 'rubygems'
require 'rubygems/gem_runner'
require 'rubygems/exceptions'

required_version = Gem::Requirement.new ">= 1.8.6"
required_version = Gem::Requirement.new ">= 1.8.7"

unless required_version.satisfied_by? Gem.ruby_version then
abort "Expected Ruby Version #{required_version}, is #{Gem.ruby_version}"
Expand Down
10 changes: 2 additions & 8 deletions lib/rubygems/commands/setup_command.rb
Expand Up @@ -27,13 +27,7 @@ def initialize
end

add_option '--[no-]vendor',
'Install into vendorlibdir not sitelibdir',
'(Requires Ruby 1.8.7)' do |vendor, options|
if vendor and Gem.ruby_version < Gem::Version.new('1.8.7') then
raise OptionParser::InvalidOption,
"requires ruby 1.8.7+ (you have #{Gem.ruby_version})"
end

'Install into vendorlibdir not sitelibdir' do |vendor, options|
options[:site_or_vendor] = vendor ? :vendorlibdir : :sitelibdir
end

Expand All @@ -55,7 +49,7 @@ def initialize
end

def check_ruby_version
required_version = Gem::Requirement.new '>= 1.8.6'
required_version = Gem::Requirement.new '>= 1.8.7'

unless required_version.satisfied_by? Gem.ruby_version then
alert_error "Expected Ruby version #{required_version}, is #{Gem.ruby_version}"
Expand Down
2 changes: 1 addition & 1 deletion lib/rubygems/spec_fetcher.rb
Expand Up @@ -173,7 +173,7 @@ def find_matching(*args)
def suggest_gems_from_name gem_name
gem_name = gem_name.downcase
max = gem_name.size / 2
specs = list.values.flatten(1) # flatten(1) is 1.8.7 and up
specs = list.values.flatten 1

matches = specs.map { |name, version, platform|
next unless Gem::Platform.match platform
Expand Down

0 comments on commit 80fa5ec

Please sign in to comment.