rubygems-update 2.1.8 → 2.1.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 +0 -0
- data.tar.gz.sig +0 -0
- data/History.txt +9 -0
- data/lib/rubygems.rb +1 -1
- data/lib/rubygems/request.rb +2 -2
- data/lib/rubygems/spec_fetcher.rb +3 -2
- data/lib/rubygems/specification.rb +16 -15
- data/lib/rubygems/uri_formatter.rb +3 -13
- data/test/rubygems/test_gem_request.rb +11 -0
- data/test/rubygems/test_gem_uri_formatter.rb +8 -0
- metadata +2 -2
- 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: 9c40d563e56e2ad5fca4399ca5741c2e6e06e55a
|
4
|
+
data.tar.gz: d7599e269aa41b908c32cc4d84525a6f486e0c06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbbbf53b6339a8a2faab7a489cf0f8981e58b1c935e3b8a941d033d0da086b934d6cd1eb478f15fb3b583f2d1aef807ef1d7c7e0602200ffa836f46e1fca5ede
|
7
|
+
data.tar.gz: 3597cbd0eed7bc0b4151f3781d9f56ad23cbac4559f232b01af68e24c99b86d4c12706199f5ea6187cb9ec87ef5fde04acf62fcc3c8728aecce9d97a51b99ee7
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# coding: UTF-8
|
2
2
|
|
3
|
+
=== 2.1.9 / 2013-10-14
|
4
|
+
|
5
|
+
Bug fixes:
|
6
|
+
|
7
|
+
* Reduce sorting when fetching specifications. This speeds up the update and
|
8
|
+
outdated commands, and others. Issue #657 by windwiny.
|
9
|
+
* Proxy usernames and passwords are now escaped properly. Ruby Bug #8979 by
|
10
|
+
Masahiro Tomita, Issue #668 by Kouhei Sutou.
|
11
|
+
|
3
12
|
=== 2.1.8 / 2013-10-10
|
4
13
|
|
5
14
|
Bug fixes:
|
data/lib/rubygems.rb
CHANGED
data/lib/rubygems/request.rb
CHANGED
@@ -225,13 +225,14 @@ class Gem::SpecFetcher
|
|
225
225
|
|
226
226
|
tuples =
|
227
227
|
begin
|
228
|
-
cache[source.uri] ||=
|
228
|
+
cache[source.uri] ||=
|
229
|
+
source.load_specs(type).sort_by { |tup| tup.name }
|
229
230
|
rescue Gem::RemoteFetcher::FetchError
|
230
231
|
raise unless gracefully_ignore
|
231
232
|
[]
|
232
233
|
end
|
233
234
|
|
234
|
-
tuples
|
235
|
+
tuples
|
235
236
|
end
|
236
237
|
|
237
238
|
end
|
@@ -35,18 +35,8 @@ class Date; end
|
|
35
35
|
# end
|
36
36
|
#
|
37
37
|
# Starting in RubyGems 2.0, a Specification can hold arbitrary
|
38
|
-
# metadata.
|
39
|
-
#
|
40
|
-
#
|
41
|
-
# * Must be a Hash object
|
42
|
-
# * All keys and values must be Strings
|
43
|
-
# * Keys can be a maximum of 128 bytes and values can be a
|
44
|
-
# maximum of 1024 bytes
|
45
|
-
# * All strings must be UTF8, no binary data is allowed
|
46
|
-
#
|
47
|
-
# For example, to add metadata for the location of a bugtracker:
|
48
|
-
#
|
49
|
-
# s.metadata = { "bugtracker" => "http://somewhere.com/blah" }
|
38
|
+
# metadata. See #metadata for restrictions on the format and size of metadata
|
39
|
+
# items you may add to a specification.
|
50
40
|
|
51
41
|
class Gem::Specification < Gem::BasicSpecification
|
52
42
|
|
@@ -398,10 +388,21 @@ class Gem::Specification < Gem::BasicSpecification
|
|
398
388
|
##
|
399
389
|
# :attr_accessor: metadata
|
400
390
|
#
|
401
|
-
#
|
391
|
+
# The metadata holds extra data for this gem that may be useful to other
|
392
|
+
# consumers and is settable by gem authors without requiring an update to
|
393
|
+
# the rubygems software.
|
394
|
+
#
|
395
|
+
# Metadata items have the following restrictions:
|
396
|
+
#
|
397
|
+
# * The metadata must be a Hash object
|
398
|
+
# * All keys and values must be Strings
|
399
|
+
# * Keys can be a maximum of 128 bytes and values can be a maximum of 1024
|
400
|
+
# bytes
|
401
|
+
# * All strings must be UTF-8, no binary data is allowed
|
402
|
+
#
|
403
|
+
# To add metadata for the location of a issue tracker:
|
402
404
|
#
|
403
|
-
#
|
404
|
-
# data that could be useful to other consumers.
|
405
|
+
# s.metadata = { "issue_tracker" => "https://example/issues" }
|
405
406
|
|
406
407
|
attr_accessor :metadata
|
407
408
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'cgi'
|
1
2
|
require 'uri'
|
2
3
|
|
3
4
|
class Gem::UriFormatter
|
@@ -9,7 +10,7 @@ class Gem::UriFormatter
|
|
9
10
|
|
10
11
|
def escape
|
11
12
|
return unless @uri
|
12
|
-
|
13
|
+
CGI.escape @uri
|
13
14
|
end
|
14
15
|
|
15
16
|
##
|
@@ -21,18 +22,7 @@ class Gem::UriFormatter
|
|
21
22
|
|
22
23
|
def unescape
|
23
24
|
return unless @uri
|
24
|
-
|
25
|
-
end
|
26
|
-
|
27
|
-
private
|
28
|
-
|
29
|
-
def escaper
|
30
|
-
@uri_parser ||=
|
31
|
-
begin
|
32
|
-
URI::Parser.new
|
33
|
-
rescue NameError
|
34
|
-
URI
|
35
|
-
end
|
25
|
+
CGI.unescape @uri
|
36
26
|
end
|
37
27
|
|
38
28
|
end
|
@@ -62,6 +62,17 @@ class TestGemRequest < Gem::TestCase
|
|
62
62
|
assert_equal 'my bar', Gem::UriFormatter.new(proxy.password).unescape
|
63
63
|
end
|
64
64
|
|
65
|
+
def test_get_proxy_from_env_escape
|
66
|
+
ENV['http_proxy'] = @proxy_uri
|
67
|
+
ENV['http_proxy_user'] = 'foo@user'
|
68
|
+
ENV['http_proxy_pass'] = 'my@bar'
|
69
|
+
|
70
|
+
proxy = @request.get_proxy_from_env
|
71
|
+
|
72
|
+
assert_equal 'foo%40user', proxy.user
|
73
|
+
assert_equal 'my%40bar', proxy.password
|
74
|
+
end
|
75
|
+
|
65
76
|
def test_get_proxy_from_env_normalize
|
66
77
|
ENV['HTTP_PROXY'] = 'fakeurl:12345'
|
67
78
|
|
@@ -16,5 +16,13 @@ class TestGemUriFormatter < Gem::TestCase
|
|
16
16
|
Gem::UriFormatter.new('example/').normalize
|
17
17
|
end
|
18
18
|
|
19
|
+
def test_escape
|
20
|
+
assert_equal 'a%40b%5Cc', Gem::UriFormatter.new('a@b\c').escape
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_unescape
|
24
|
+
assert_equal 'a@b\c', Gem::UriFormatter.new('a%40b%5Cc').unescape
|
25
|
+
end
|
26
|
+
|
19
27
|
end
|
20
28
|
|
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.1.
|
4
|
+
version: 2.1.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-10-
|
35
|
+
date: 2013-10-14 00:00:00.000000000 Z
|
36
36
|
dependencies:
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: minitest
|
metadata.gz.sig
CHANGED
Binary file
|