mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Drop support for 'gem env packageversion'
https://github.com/rubygems/rubygems/commit/be962ca0c4
This commit is contained in:
parent
62e2b2e66f
commit
a51661d378
3 changed files with 0 additions and 54 deletions
|
@ -9,7 +9,6 @@ class Gem::Commands::EnvironmentCommand < Gem::Command
|
||||||
|
|
||||||
def arguments # :nodoc:
|
def arguments # :nodoc:
|
||||||
args = <<-EOF
|
args = <<-EOF
|
||||||
packageversion display the package version
|
|
||||||
gemdir display the path where gems are installed
|
gemdir display the path where gems are installed
|
||||||
gempath display path used to search for gems
|
gempath display path used to search for gems
|
||||||
version display the gem format version
|
version display the gem format version
|
||||||
|
@ -76,8 +75,6 @@ lib/rubygems/defaults/operating_system.rb
|
||||||
arg = options[:args][0]
|
arg = options[:args][0]
|
||||||
out <<
|
out <<
|
||||||
case arg
|
case arg
|
||||||
when /^packageversion/ then
|
|
||||||
Gem::RubyGemsPackageVersion
|
|
||||||
when /^version/ then
|
when /^version/ then
|
||||||
Gem::VERSION
|
Gem::VERSION
|
||||||
when /^gemdir/, /^gemhome/, /^home/, /^GEM_HOME/ then
|
when /^gemdir/, /^gemhome/, /^home/, /^GEM_HOME/ then
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
# :stopdoc:
|
|
||||||
|
|
||||||
#--
|
|
||||||
# This file contains all sorts of little compatibility hacks that we've
|
|
||||||
# had to introduce over the years. Quarantining them into one file helps
|
|
||||||
# us know when we can get rid of them.
|
|
||||||
#
|
|
||||||
# Ruby 1.9.x has introduced some things that are awkward, and we need to
|
|
||||||
# support them, so we define some constants to use later.
|
|
||||||
#++
|
|
||||||
|
|
||||||
module Gem
|
|
||||||
RubyGemsVersion = VERSION
|
|
||||||
|
|
||||||
# TODO remove at RubyGems 3
|
|
||||||
|
|
||||||
RbConfigPriorities = %w[
|
|
||||||
MAJOR
|
|
||||||
MINOR
|
|
||||||
TEENY
|
|
||||||
EXEEXT RUBY_SO_NAME arch bindir datadir libdir ruby_install_name
|
|
||||||
ruby_version rubylibprefix sitedir sitelibdir vendordir vendorlibdir
|
|
||||||
rubylibdir
|
|
||||||
].freeze
|
|
||||||
|
|
||||||
unless defined?(ConfigMap)
|
|
||||||
##
|
|
||||||
# Configuration settings from ::RbConfig
|
|
||||||
ConfigMap = Hash.new do |cm, key| # TODO remove at RubyGems 3
|
|
||||||
cm[key] = RbConfig::CONFIG[key.to_s]
|
|
||||||
end
|
|
||||||
else
|
|
||||||
RbConfigPriorities.each do |key|
|
|
||||||
ConfigMap[key.to_sym] = RbConfig::CONFIG[key]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
RubyGemsPackageVersion = VERSION
|
|
||||||
end
|
|
|
@ -90,17 +90,6 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
|
||||||
assert_equal '', @ui.error
|
assert_equal '', @ui.error
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_execute_packageversion
|
|
||||||
@cmd.send :handle_options, %w[packageversion]
|
|
||||||
|
|
||||||
use_ui @ui do
|
|
||||||
@cmd.execute
|
|
||||||
end
|
|
||||||
|
|
||||||
assert_equal "#{Gem::RubyGemsPackageVersion}\n", @ui.output
|
|
||||||
assert_equal '', @ui.error
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_execute_remotesources
|
def test_execute_remotesources
|
||||||
orig_sources = Gem.sources.dup
|
orig_sources = Gem.sources.dup
|
||||||
Gem.sources.replace %w[http://gems.example.com]
|
Gem.sources.replace %w[http://gems.example.com]
|
||||||
|
|
Loading…
Add table
Reference in a new issue