rubygems-update 3.0.5 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/History.txt +6 -0
- data/Manifest.txt +1 -0
- data/lib/rubygems.rb +1 -1
- data/lib/rubygems/commands/environment_command.rb +3 -0
- data/lib/rubygems/compatibility.rb +40 -0
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/test_gem_commands_environment_command.rb +11 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d07fade2e3531734d58f367561fcbca85bea5fbca01417f39b37b9d6f542416
|
4
|
+
data.tar.gz: 77b6447e1aa296876e220fb8eeb154337876718be48f7ae33d752059f5ab8a8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 198623ff0935264c13fab1fab96dc42ae5a9bc47553b1158e174c2c03422e8ba97f7b50901bb29cba162619f67de274c8e03a9e5f1a049a0981cd4c6459649f9
|
7
|
+
data.tar.gz: 45f566e5133f29d440733273f9763bc33bf12c888b2583cf91e3bea1e7b86bac6486510291b0630e1f665efa62c1857858bfc461851ec8f798d7c41dfb5fa17d
|
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -307,6 +307,7 @@ lib/rubygems/commands/unpack_command.rb
|
|
307
307
|
lib/rubygems/commands/update_command.rb
|
308
308
|
lib/rubygems/commands/which_command.rb
|
309
309
|
lib/rubygems/commands/yank_command.rb
|
310
|
+
lib/rubygems/compatibility.rb
|
310
311
|
lib/rubygems/config_file.rb
|
311
312
|
lib/rubygems/core_ext/kernel_gem.rb
|
312
313
|
lib/rubygems/core_ext/kernel_require.rb
|
data/lib/rubygems.rb
CHANGED
@@ -9,6 +9,7 @@ class Gem::Commands::EnvironmentCommand < Gem::Command
|
|
9
9
|
|
10
10
|
def arguments # :nodoc:
|
11
11
|
args = <<-EOF
|
12
|
+
packageversion display the package version
|
12
13
|
gemdir display the path where gems are installed
|
13
14
|
gempath display path used to search for gems
|
14
15
|
version display the gem format version
|
@@ -75,6 +76,8 @@ lib/rubygems/defaults/operating_system.rb
|
|
75
76
|
arg = options[:args][0]
|
76
77
|
out <<
|
77
78
|
case arg
|
79
|
+
when /^packageversion/ then
|
80
|
+
Gem::RubyGemsPackageVersion
|
78
81
|
when /^version/ then
|
79
82
|
Gem::VERSION
|
80
83
|
when /^gemdir/, /^gemhome/, /^home/, /^GEM_HOME/ then
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# :stopdoc:
|
3
|
+
|
4
|
+
#--
|
5
|
+
# This file contains all sorts of little compatibility hacks that we've
|
6
|
+
# had to introduce over the years. Quarantining them into one file helps
|
7
|
+
# us know when we can get rid of them.
|
8
|
+
#
|
9
|
+
# Ruby 1.9.x has introduced some things that are awkward, and we need to
|
10
|
+
# support them, so we define some constants to use later.
|
11
|
+
#++
|
12
|
+
|
13
|
+
module Gem
|
14
|
+
RubyGemsVersion = VERSION
|
15
|
+
|
16
|
+
# TODO remove at RubyGems 3
|
17
|
+
|
18
|
+
RbConfigPriorities = %w[
|
19
|
+
MAJOR
|
20
|
+
MINOR
|
21
|
+
TEENY
|
22
|
+
EXEEXT RUBY_SO_NAME arch bindir datadir libdir ruby_install_name
|
23
|
+
ruby_version rubylibprefix sitedir sitelibdir vendordir vendorlibdir
|
24
|
+
rubylibdir
|
25
|
+
].freeze
|
26
|
+
|
27
|
+
unless defined?(ConfigMap)
|
28
|
+
##
|
29
|
+
# Configuration settings from ::RbConfig
|
30
|
+
ConfigMap = Hash.new do |cm, key| # TODO remove at RubyGems 3
|
31
|
+
cm[key] = RbConfig::CONFIG[key.to_s]
|
32
|
+
end
|
33
|
+
else
|
34
|
+
RbConfigPriorities.each do |key|
|
35
|
+
ConfigMap[key.to_sym] = RbConfig::CONFIG[key]
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
RubyGemsPackageVersion = VERSION
|
40
|
+
end
|
data/rubygems-update.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "rubygems-update"
|
5
|
-
s.version = "3.0.
|
5
|
+
s.version = "3.0.6"
|
6
6
|
s.authors = ["Jim Weirich", "Chad Fowler", "Eric Hodel", "Luis Lavena", "Aaron Patterson", "Samuel Giddins", "André Arko", "Evan Phoenix", "Hiroshi SHIBATA"]
|
7
7
|
s.email = ["", "", "drbrain@segment7.net", "luislavena@gmail.com", "aaron@tenderlovemaking.com", "segiddins@segiddins.me", "andre@arko.net", "evan@phx.io", "hsbt@ruby-lang.org"]
|
8
8
|
|
@@ -90,6 +90,17 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
|
|
90
90
|
assert_equal '', @ui.error
|
91
91
|
end
|
92
92
|
|
93
|
+
def test_execute_packageversion
|
94
|
+
@cmd.send :handle_options, %w[packageversion]
|
95
|
+
|
96
|
+
use_ui @ui do
|
97
|
+
@cmd.execute
|
98
|
+
end
|
99
|
+
|
100
|
+
assert_equal "#{Gem::RubyGemsPackageVersion}\n", @ui.output
|
101
|
+
assert_equal '', @ui.error
|
102
|
+
end
|
103
|
+
|
93
104
|
def test_execute_remotesources
|
94
105
|
orig_sources = Gem.sources.dup
|
95
106
|
Gem.sources.replace %w[http://gems.example.com]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-update
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -449,6 +449,7 @@ files:
|
|
449
449
|
- lib/rubygems/commands/update_command.rb
|
450
450
|
- lib/rubygems/commands/which_command.rb
|
451
451
|
- lib/rubygems/commands/yank_command.rb
|
452
|
+
- lib/rubygems/compatibility.rb
|
452
453
|
- lib/rubygems/config_file.rb
|
453
454
|
- lib/rubygems/core_ext/kernel_gem.rb
|
454
455
|
- lib/rubygems/core_ext/kernel_require.rb
|