summaryrefslogtreecommitdiff
path: root/lib/rubygems/request_set/gem_dependency_api.rb
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/request_set/gem_dependency_api.rb30
1 files changed, 15 insertions, 15 deletions
@@ -50,10 +50,10 @@ class Gem::RequestSet::GemDependencyAPI
:ruby_21 => %w[ruby rbx maglev truffleruby],
}.freeze
- mswin = Gem::Platform.new 'x86-mswin32'
- mswin64 = Gem::Platform.new 'x64-mswin64'
- x86_mingw = Gem::Platform.new 'x86-mingw32'
- x64_mingw = Gem::Platform.new 'x64-mingw32'
PLATFORM_MAP = { # :nodoc:
:jruby => Gem::Platform::RUBY,
@@ -91,11 +91,11 @@ class Gem::RequestSet::GemDependencyAPI
:x64_mingw_21 => x64_mingw,
}.freeze
- gt_eq_0 = Gem::Requirement.new '>= 0'
- tilde_gt_1_8_0 = Gem::Requirement.new '~> 1.8.0'
- tilde_gt_1_9_0 = Gem::Requirement.new '~> 1.9.0'
- tilde_gt_2_0_0 = Gem::Requirement.new '~> 2.0.0'
- tilde_gt_2_1_0 = Gem::Requirement.new '~> 2.1.0'
VERSION_MAP = { # :nodoc:
:jruby => gt_eq_0,
@@ -435,7 +435,7 @@ Gem dependencies file #{@path} requires #{name} more than once.
reference ||= ref
reference ||= branch
reference ||= tag
- reference ||= 'master'
if ref && branch
warn <<-WARNING
@@ -637,8 +637,8 @@ Gem dependencies file #{@path} includes git reference for both ref/branch and ta
# :development. Only one group may be specified.
def gemspec(options = {})
- name = options.delete(:name) || '{,*}'
- path = options.delete(:path) || '.'
development_group = options.delete(:development_group) || :development
spec = find_gemspec name, path
@@ -697,11 +697,11 @@ Gem dependencies file #{@path} includes git reference for both ref/branch and ta
def pin_gem_source(name, type = :default, source = nil)
source_description =
case type
- when :default then '(default)'
when :path then "path: #{source}"
when :git then "git: #{source}"
when :source then "source: #{source}"
- else '(unknown)'
end
raise ArgumentError,
@@ -788,7 +788,7 @@ Gem dependencies file #{@path} includes git reference for both ref/branch and ta
engine_version = options[:engine_version]
raise ArgumentError,
- 'You must specify engine_version along with the Ruby engine' if
engine and not engine_version
return true if @installing