rubygems-update 2.0.8 → 2.0.9
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.
Potentially problematic release.
This version of rubygems-update might be problematic. Click here for more details.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +1 -2
- data.tar.gz.sig +2 -1
- data/History.txt +7 -0
- data/lib/rubygems.rb +1 -1
- data/lib/rubygems/commands/fetch_command.rb +2 -1
- data/lib/rubygems/gemcutter_utilities.rb +2 -1
- data/test/rubygems/test_gem_commands_fetch_command.rb +28 -2
- data/test/rubygems/test_gem_gemcutter_utilities.rb +19 -6
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84c33a4ec9a06853a4fe8f7d0aa48c2c73f33558
|
4
|
+
data.tar.gz: fe65ae2eb8a1f8a7fbee14eee548ecf60abffa71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4ed343fe809058c9b02c6ca5cf2ef41c1c080fd52116f93612128c1549a2f6345d0850a6ec38ffc2efa65bbb79b448aacab9aa600bdfaf509b183488f03ede1
|
7
|
+
data.tar.gz: bbcb13a9cbf5c1a109514c6b32ede3555344ce748551ce90028af4163ab1932bdaaf6163874e16231e9db201540d8abf6608a31f4ffe20903153e5803811725e
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
Oe�����[�[:
|
1
|
+
o���/��-�f�BeA����'~�^������%�G�˸I���q}=e�������&3=~���z�<;�v����mm/ngyO��I<�]�s��J>jb��G��a�"�"�+�k.�a�"K)+�;Ҡ&������F��~<���?3�%�
|
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
U
|
1
|
+
�7��wy̅U��ly� faq)�~���K��bY �m��rx�Kh[rBQh������WJѳNy�,�!t�k�5�.֢�_3ܡ�w;��F�+���*|d�
|
2
|
+
�G����5��4:S/gG.�#�_��DW��g��b�r����)�l��L��J*-�/�d.�x�+��ʿ����U�����`k~��J����t�EeD���>eA!mb������D���:��*E�dArV����+n6�.�p��t�Q���:
|
data/History.txt
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# coding: UTF-8
|
2
2
|
|
3
|
+
=== 2.0.9 / 2013-09-13
|
4
|
+
|
5
|
+
* Gem fetch now fetches the newest (not oldest) gem when --version is given.
|
6
|
+
Issue #643 by Brian Shirai.
|
7
|
+
* Fixed credential creation for `gem push` when `--host` is not given. Pull
|
8
|
+
request #622 by Arthur Nogueira Neves
|
9
|
+
|
3
10
|
=== 2.0.8 / 2013-09-09
|
4
11
|
|
5
12
|
Security fixes:
|
data/lib/rubygems.rb
CHANGED
@@ -43,12 +43,13 @@ class Gem::Commands::FetchCommand < Gem::Command
|
|
43
43
|
dep.prerelease = options[:prerelease]
|
44
44
|
|
45
45
|
specs_and_sources, errors = Gem::SpecFetcher.fetcher.spec_for_dependency dep
|
46
|
+
|
46
47
|
if platform then
|
47
48
|
filtered = specs_and_sources.select { |s,| s.platform == platform }
|
48
49
|
specs_and_sources = filtered unless filtered.empty?
|
49
50
|
end
|
50
51
|
|
51
|
-
spec, source = specs_and_sources.
|
52
|
+
spec, source = specs_and_sources.max_by { |s,| s.version }
|
52
53
|
|
53
54
|
if spec.nil? then
|
54
55
|
show_lookup_failure gem_name, version, errors, options[:domain]
|
@@ -27,7 +27,8 @@ module Gem::GemcutterUtilities
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
-
def sign_in sign_in_host =
|
30
|
+
def sign_in sign_in_host = nil
|
31
|
+
sign_in_host ||= self.host
|
31
32
|
return if Gem.configuration.rubygems_api_key
|
32
33
|
|
33
34
|
pretty_host = if Gem::DEFAULT_HOST == sign_in_host then
|
@@ -34,6 +34,32 @@ class TestGemCommandsFetchCommand < Gem::TestCase
|
|
34
34
|
'gem repository directories must not be created'
|
35
35
|
end
|
36
36
|
|
37
|
+
def test_execute_latest
|
38
|
+
util_setup_fake_fetcher
|
39
|
+
util_setup_spec_fetcher @a1, @a2
|
40
|
+
|
41
|
+
@fetcher.data["#{@gem_repo}gems/#{@a1.file_name}"] =
|
42
|
+
File.read(@a1.cache_file)
|
43
|
+
@fetcher.data["#{@gem_repo}gems/#{@a2.file_name}"] =
|
44
|
+
File.read(@a2.cache_file)
|
45
|
+
|
46
|
+
refute_path_exists File.join(@tempdir, 'cache'), 'sanity check'
|
47
|
+
|
48
|
+
@cmd.options[:args] = [@a2.name]
|
49
|
+
@cmd.options[:version] = req('>= 0.1')
|
50
|
+
|
51
|
+
use_ui @ui do
|
52
|
+
Dir.chdir @tempdir do
|
53
|
+
@cmd.execute
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
assert_path_exists(File.join(@tempdir, @a2.file_name),
|
58
|
+
"#{@a2.full_name} not fetched")
|
59
|
+
refute_path_exists File.join(@tempdir, 'cache'),
|
60
|
+
'gem repository directories must not be created'
|
61
|
+
end
|
62
|
+
|
37
63
|
def test_execute_prerelease
|
38
64
|
util_setup_fake_fetcher true
|
39
65
|
util_clear_gems
|
@@ -53,8 +79,8 @@ class TestGemCommandsFetchCommand < Gem::TestCase
|
|
53
79
|
end
|
54
80
|
end
|
55
81
|
|
56
|
-
assert_path_exists(File.join(@tempdir, @
|
57
|
-
"#{@
|
82
|
+
assert_path_exists(File.join(@tempdir, @a2.file_name),
|
83
|
+
"#{@a2.full_name} not fetched")
|
58
84
|
end
|
59
85
|
|
60
86
|
def test_execute_specific_prerelease
|
@@ -101,7 +101,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
101
101
|
def test_sign_in_with_host
|
102
102
|
api_key = 'a5fdbb6ba150cbb83aad2bb2fede64cf040453903'
|
103
103
|
|
104
|
-
util_sign_in [api_key, 200, 'OK'], 'http://example.com',
|
104
|
+
util_sign_in [api_key, 200, 'OK'], 'http://example.com', ['http://example.com']
|
105
105
|
|
106
106
|
assert_match "Enter your http://example.com credentials.",
|
107
107
|
@sign_in_ui.output
|
@@ -112,6 +112,20 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
112
112
|
assert_equal api_key, credentials[:rubygems_api_key]
|
113
113
|
end
|
114
114
|
|
115
|
+
def test_sign_in_with_host_nil
|
116
|
+
api_key = 'a5fdbb6ba150cbb83aad2bb2fede64cf040453903'
|
117
|
+
|
118
|
+
util_sign_in [api_key, 200, 'OK'], nil, [nil]
|
119
|
+
|
120
|
+
assert_match "Enter your RubyGems.org credentials.",
|
121
|
+
@sign_in_ui.output
|
122
|
+
assert @fetcher.last_request["authorization"]
|
123
|
+
assert_match %r{Signed in.}, @sign_in_ui.output
|
124
|
+
|
125
|
+
credentials = YAML.load_file Gem.configuration.credentials_path
|
126
|
+
assert_equal api_key, credentials[:rubygems_api_key]
|
127
|
+
end
|
128
|
+
|
115
129
|
def test_sign_in_with_host_ENV
|
116
130
|
api_key = 'a5fdbb6ba150cbb83aad2bb2fede64cf040453903'
|
117
131
|
util_sign_in [api_key, 200, 'OK'], 'http://example.com'
|
@@ -163,14 +177,14 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
163
177
|
assert_match %r{Access Denied.}, @sign_in_ui.output
|
164
178
|
end
|
165
179
|
|
166
|
-
def util_sign_in response, host = nil,
|
180
|
+
def util_sign_in response, host = nil, args = []
|
167
181
|
skip 'Always uses $stdin on windows' if Gem.win_platform?
|
168
182
|
|
169
183
|
email = 'you@example.com'
|
170
184
|
password = 'secret'
|
171
185
|
|
172
186
|
if host
|
173
|
-
ENV['RUBYGEMS_HOST'] = host
|
187
|
+
ENV['RUBYGEMS_HOST'] = host
|
174
188
|
else
|
175
189
|
host = Gem.host
|
176
190
|
end
|
@@ -182,8 +196,8 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
182
196
|
@sign_in_ui = Gem::MockGemUi.new "#{email}\n#{password}\n"
|
183
197
|
|
184
198
|
use_ui @sign_in_ui do
|
185
|
-
if
|
186
|
-
@cmd.sign_in
|
199
|
+
if args.length > 0 then
|
200
|
+
@cmd.sign_in(*args)
|
187
201
|
else
|
188
202
|
@cmd.sign_in
|
189
203
|
end
|
@@ -209,4 +223,3 @@ class TestGemGemcutterUtilities < Gem::TestCase
|
|
209
223
|
end
|
210
224
|
|
211
225
|
end
|
212
|
-
|
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: 2.0.
|
4
|
+
version: 2.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -32,7 +32,7 @@ cert_chain:
|
|
32
32
|
KDyY1VIazVgoC8XvR4h/95/iScPiuglzA+DBG1hip1xScAtw05BrXyUNrc9CEMYU
|
33
33
|
wgF94UVoHRp6ywo8I7NP3HcwFQDFNEZPNGXsng==
|
34
34
|
-----END CERTIFICATE-----
|
35
|
-
date: 2013-09-
|
35
|
+
date: 2013-09-14 00:00:00.000000000 Z
|
36
36
|
dependencies:
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: minitest
|
@@ -454,7 +454,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
454
454
|
version: '0'
|
455
455
|
requirements: []
|
456
456
|
rubyforge_project: rubygems-update
|
457
|
-
rubygems_version: 2.1.
|
457
|
+
rubygems_version: 2.1.2
|
458
458
|
signing_key:
|
459
459
|
specification_version: 4
|
460
460
|
summary: RubyGems is a package management framework for Ruby
|
metadata.gz.sig
CHANGED
Binary file
|