rubygems-update 2.1.8 → 2.1.9

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rubygems-update might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3eb7f711990fd0f87cb87eca6c1627ebb4ff6c7
4
- data.tar.gz: c4f84f383343a06eaa173d95a7e67d909f041cb2
3
+ metadata.gz: 9c40d563e56e2ad5fca4399ca5741c2e6e06e55a
4
+ data.tar.gz: d7599e269aa41b908c32cc4d84525a6f486e0c06
5
5
  SHA512:
6
- metadata.gz: 902cedce83b8ec3fab27ec81b8c3e0722c4517b71cfe132b30f366b51aafa01d69195233d0645d3a2e27d750c2ee63902794dcdd9cce682613910ab5f28e1da3
7
- data.tar.gz: 3116347b7dcd216652caff56d52ef2c55940f67c7117623d49d75313a8f89dd6f2989327375ea8a9ea9b70aee66d87c8ba11daa72d1aec2ee41806eaacdd9c8c
6
+ metadata.gz: fbbbf53b6339a8a2faab7a489cf0f8981e58b1c935e3b8a941d033d0da086b934d6cd1eb478f15fb3b583f2d1aef807ef1d7c7e0602200ffa836f46e1fca5ede
7
+ data.tar.gz: 3597cbd0eed7bc0b4151f3781d9f56ad23cbac4559f232b01af68e24c99b86d4c12706199f5ea6187cb9ec87ef5fde04acf62fcc3c8728aecce9d97a51b99ee7
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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:
@@ -8,7 +8,7 @@
8
8
  require 'rbconfig'
9
9
 
10
10
  module Gem
11
- VERSION = '2.1.8'
11
+ VERSION = '2.1.9'
12
12
  end
13
13
 
14
14
  # Must be first since it unloads the prelude from 1.9.2
@@ -78,8 +78,8 @@ class Gem::Request
78
78
  net_http_args += [
79
79
  @proxy_uri.host,
80
80
  @proxy_uri.port,
81
- @proxy_uri.user,
82
- @proxy_uri.password
81
+ Gem::UriFormatter.new(@proxy_uri.user).unescape,
82
+ Gem::UriFormatter.new(@proxy_uri.password).unescape,
83
83
  ]
84
84
  end
85
85
 
@@ -225,13 +225,14 @@ class Gem::SpecFetcher
225
225
 
226
226
  tuples =
227
227
  begin
228
- cache[source.uri] ||= source.load_specs(type)
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.sort_by { |tup| tup.name }
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. This metadata is accessed via Specification#metadata
39
- # and has the following restrictions:
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
- # Arbitrary metadata for this gem. An instance of Hash.
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
- # metadata is simply a Symbol => String association that contains arbitary
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
- escaper.escape @uri
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
- escaper.unescape @uri
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.8
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-10 00:00:00.000000000 Z
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