rubygems-update 1.8.11 → 1.8.12

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.

data/History.txt CHANGED
@@ -1,5 +1,11 @@
1
1
  # coding: UTF-8
2
2
 
3
+ === 1.8.12 / 2011-12-02
4
+
5
+ * Bug fix:
6
+ * Handle more cases where Syck's DefaultKey showed up in requirements
7
+ and wasn't cleaned out.
8
+
3
9
  === 1.8.11 / 2011-10-03
4
10
 
5
11
  * Bug fix:
data/Manifest.txt CHANGED
@@ -94,6 +94,7 @@ lib/rubygems/server.rb
94
94
  lib/rubygems/source_index.rb
95
95
  lib/rubygems/spec_fetcher.rb
96
96
  lib/rubygems/specification.rb
97
+ lib/rubygems/syck_hack.rb
97
98
  lib/rubygems/test_case.rb
98
99
  lib/rubygems/test_utilities.rb
99
100
  lib/rubygems/text.rb
data/lib/rubygems.rb CHANGED
@@ -118,7 +118,7 @@ require "rubygems/deprecate"
118
118
  # -The RubyGems Team
119
119
 
120
120
  module Gem
121
- VERSION = '1.8.11'
121
+ VERSION = '1.8.12'
122
122
 
123
123
  ##
124
124
  # Raised when RubyGems is unable to load or activate a gem. Contains the
@@ -658,16 +658,9 @@ module Gem
658
658
  require 'yaml'
659
659
  end
660
660
 
661
- # Hack to handle syck's DefaultKey bug with psych.
662
- # See the note at the top of lib/rubygems/requirement.rb for
663
- # why we end up defining DefaultKey more than once.
664
- if !defined? YAML::Syck
665
- YAML.module_eval do
666
- const_set 'Syck', Module.new {
667
- const_set 'DefaultKey', Class.new
668
- }
669
- end
670
- end
661
+ # Now that we're sure some kind of yaml library is loaded, pull
662
+ # in our hack to deal with Syck's DefaultKey ugliness.
663
+ require 'rubygems/syck_hack'
671
664
  end
672
665
 
673
666
  ##
@@ -28,7 +28,7 @@ class Gem::Format
28
28
  # representing the data in the gem
29
29
 
30
30
  def self.from_file_by_path(file_path, security_policy = nil)
31
- unless File.exist?(file_path)
31
+ unless File.file?(file_path)
32
32
  raise Gem::Exception, "Cannot load gem at [#{file_path}] in #{Dir.pwd}"
33
33
  end
34
34
 
@@ -1,31 +1,5 @@
1
1
  require "rubygems/version"
2
2
 
3
- # :stopdoc:
4
-
5
- # Hack to handle syck's DefaultKey bug with psych
6
- #
7
- # Quick note! If/when psych loads in 1.9, it will redefine
8
- # YAML to point to Psych by removing the YAML constant.
9
- # Thusly, over in Gem.load_yaml, we define DefaultKey again
10
- # after proper yaml library has been loaded.
11
- #
12
- # All this is so that there is always a YAML::Syck::DefaultKey
13
- # class no matter if the full yaml library has loaded or not.
14
- #
15
- module YAML
16
- if !defined? Syck
17
- module Syck
18
- class DefaultKey
19
- def to_s
20
- '='
21
- end
22
- end
23
- end
24
- end
25
- end
26
-
27
- # :startdoc:
28
-
29
3
  ##
30
4
  # A Requirement is a set of one or more version restrictions. It supports a
31
5
  # few (<tt>=, !=, >, <, >=, <=, ~></tt>) different restriction operators.
@@ -147,6 +121,18 @@ class Gem::Requirement
147
121
  fix_syck_default_key_in_requirements
148
122
  end
149
123
 
124
+ def yaml_initialize(tag, vals) # :nodoc:
125
+ vals.each do |ivar, val|
126
+ instance_variable_set "@#{ivar}", val
127
+ end
128
+
129
+ fix_syck_default_key_in_requirements
130
+ end
131
+
132
+ def init_with coder # :nodoc:
133
+ yaml_initialize coder.tag, coder.map
134
+ end
135
+
150
136
  def prerelease?
151
137
  requirements.any? { |r| r.last.prerelease? }
152
138
  end
@@ -190,7 +176,7 @@ class Gem::Requirement
190
176
  def fix_syck_default_key_in_requirements
191
177
  # Fixup the Syck DefaultKey bug
192
178
  @requirements.each do |r|
193
- if r[0].kind_of? YAML::Syck::DefaultKey
179
+ if r[0].kind_of? Gem::SyckDefaultKey
194
180
  r[0] = "="
195
181
  end
196
182
  end
@@ -0,0 +1,61 @@
1
+ # :stopdoc:
2
+
3
+ # Hack to handle syck's DefaultKey bug
4
+ #
5
+ # This file is always loaded AFTER either syck or psych are already
6
+ # loaded. It then looks at what constants are available and creates
7
+ # a consistent view on all rubys.
8
+ #
9
+ # All this is so that there is always a YAML::Syck::DefaultKey
10
+ # class no matter if the full yaml library has loaded or not.
11
+ #
12
+
13
+ module YAML
14
+ # In newer 1.9.2, there is a Syck toplevel constant instead of it
15
+ # being underneith YAML. If so, reference it back under YAML as
16
+ # well.
17
+ if defined? ::Syck
18
+ Syck = ::Syck
19
+
20
+ # Otherwise, if there is no YAML::Syck, then we've got just psych
21
+ # loaded, so lets define a stub for DefaultKey.
22
+ elsif !defined? YAML::Syck
23
+ module Syck
24
+ class DefaultKey
25
+ end
26
+ end
27
+ end
28
+
29
+ # Now that we've got something that is always here, define #to_s
30
+ # so when code tries to use this, it at least just shows up like it
31
+ # should.
32
+ module Syck
33
+ class DefaultKey
34
+ def to_s
35
+ '='
36
+ end
37
+ end
38
+ end
39
+ end
40
+
41
+ # Sometime in the 1.9 dev cycle, the Syck constant was moved from under YAML
42
+ # to be a toplevel constant. So gemspecs created under these versions of Syck
43
+ # will have references to Syck::DefaultKey.
44
+ #
45
+ # So we need to be sure that we reference Syck at the toplevel too so that
46
+ # we can always load these kind of gemspecs.
47
+ #
48
+ if !defined?(Syck)
49
+ Syck = YAML::Syck
50
+ end
51
+
52
+ # Now that we've got Syck setup in all the right places, store
53
+ # a reference to the DefaultKey class inside Gem. We do this so that
54
+ # if later on YAML, etc are redefined, we've still got a consistent
55
+ # place to find the DefaultKey class for comparison.
56
+
57
+ module Gem
58
+ SyckDefaultKey = YAML::Syck::DefaultKey
59
+ end
60
+
61
+ # :startdoc:
@@ -57,7 +57,7 @@ class TestGemFormat < Gem::Package::TarTestCase
57
57
 
58
58
  def test_class_from_file_by_path_nonexistent
59
59
  assert_raises Gem::Exception do
60
- Gem::Format.from_file_by_path '/nonexistent'
60
+ Gem::Format.from_file_by_path '/a/path/that/is/nonexistent'
61
61
  end
62
62
  end
63
63
 
@@ -129,7 +129,6 @@ end
129
129
  end
130
130
 
131
131
  def test_self_from_yaml_syck_default_key_bug
132
- skip 'syck default_key bug is only for ruby 1.8' unless RUBY_VERSION < '1.9'
133
132
  # This is equivalent to (and totally valid) psych 1.0 output and
134
133
  # causes parse errors on syck.
135
134
  yaml = <<-YAML
@@ -137,7 +136,7 @@ end
137
136
  name: posix-spawn
138
137
  version: !ruby/object:Gem::Version
139
138
  version: 0.3.6
140
- prerelease:
139
+ prerelease:
141
140
  dependencies:
142
141
  - !ruby/object:Gem::Dependency
143
142
  name: rake-compiler
@@ -160,9 +159,81 @@ bindir:
160
159
  Gem::Specification.from_yaml yaml
161
160
  end
162
161
 
162
+ op = new_spec.dependencies.first.requirement.requirements.first.first
163
+ refute_kind_of YAML::Syck::DefaultKey, op
164
+
165
+ refute_match %r%DefaultKey%, new_spec.to_ruby
166
+ end
167
+
168
+ def test_self_from_yaml_cleans_up_defaultkey
169
+ yaml = <<-YAML
170
+ --- !ruby/object:Gem::Specification
171
+ name: posix-spawn
172
+ version: !ruby/object:Gem::Version
173
+ version: 0.3.6
174
+ prerelease:
175
+ dependencies:
176
+ - !ruby/object:Gem::Dependency
177
+ name: rake-compiler
178
+ requirement: &70243867725240 !ruby/object:Gem::Requirement
179
+ none: false
180
+ requirements:
181
+ - - !ruby/object:YAML::Syck::DefaultKey {}
182
+
183
+ - !ruby/object:Gem::Version
184
+ version: 0.7.6
185
+ type: :development
186
+ prerelease: false
187
+ version_requirements: *70243867725240
188
+ platform: ruby
189
+ files: []
190
+ test_files: []
191
+ bindir:
192
+ YAML
193
+
194
+ new_spec = Gem::Specification.from_yaml yaml
195
+
196
+ op = new_spec.dependencies.first.requirement.requirements.first.first
197
+ refute_kind_of YAML::Syck::DefaultKey, op
198
+
163
199
  refute_match %r%DefaultKey%, new_spec.to_ruby
164
200
  end
165
201
 
202
+ def test_self_from_yaml_cleans_up_defaultkey_from_newer_192
203
+ yaml = <<-YAML
204
+ --- !ruby/object:Gem::Specification
205
+ name: posix-spawn
206
+ version: !ruby/object:Gem::Version
207
+ version: 0.3.6
208
+ prerelease:
209
+ dependencies:
210
+ - !ruby/object:Gem::Dependency
211
+ name: rake-compiler
212
+ requirement: &70243867725240 !ruby/object:Gem::Requirement
213
+ none: false
214
+ requirements:
215
+ - - !ruby/object:Syck::DefaultKey {}
216
+
217
+ - !ruby/object:Gem::Version
218
+ version: 0.7.6
219
+ type: :development
220
+ prerelease: false
221
+ version_requirements: *70243867725240
222
+ platform: ruby
223
+ files: []
224
+ test_files: []
225
+ bindir:
226
+ YAML
227
+
228
+ new_spec = Gem::Specification.from_yaml yaml
229
+
230
+ op = new_spec.dependencies.first.requirement.requirements.first.first
231
+ refute_kind_of YAML::Syck::DefaultKey, op
232
+
233
+ refute_match %r%DefaultKey%, new_spec.to_ruby
234
+ end
235
+
236
+
166
237
  def test_self_load
167
238
  full_path = @a2.spec_file
168
239
  write_file full_path do |io|
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubygems-update
3
3
  version: !ruby/object:Gem::Version
4
- hash: 33
4
+ hash: 47
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 8
9
- - 11
10
- version: 1.8.11
9
+ - 12
10
+ version: 1.8.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jim Weirich
@@ -15,30 +15,9 @@ authors:
15
15
  - Eric Hodel
16
16
  autorequire:
17
17
  bindir: bin
18
- cert_chain:
19
- - |
20
- -----BEGIN CERTIFICATE-----
21
- MIIDNjCCAh6gAwIBAgIBADANBgkqhkiG9w0BAQUFADBBMRAwDgYDVQQDDAdkcmJy
22
- YWluMRgwFgYKCZImiZPyLGQBGRYIc2VnbWVudDcxEzARBgoJkiaJk/IsZAEZFgNu
23
- ZXQwHhcNMDcxMjIxMDIwNDE0WhcNMDgxMjIwMDIwNDE0WjBBMRAwDgYDVQQDDAdk
24
- cmJyYWluMRgwFgYKCZImiZPyLGQBGRYIc2VnbWVudDcxEzARBgoJkiaJk/IsZAEZ
25
- FgNuZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCbbgLrGLGIDE76
26
- LV/cvxdEzCuYuS3oG9PrSZnuDweySUfdp/so0cDq+j8bqy6OzZSw07gdjwFMSd6J
27
- U5ddZCVywn5nnAQ+Ui7jMW54CYt5/H6f2US6U0hQOjJR6cpfiymgxGdfyTiVcvTm
28
- Gj/okWrQl0NjYOYBpDi+9PPmaH2RmLJu0dB/NylsDnW5j6yN1BEI8MfJRR+HRKZY
29
- mUtgzBwF1V4KIZQ8EuL6I/nHVu07i6IkrpAgxpXUfdJQJi0oZAqXurAV3yTxkFwd
30
- g62YrrW26mDe+pZBzR6bpLE+PmXCzz7UxUq3AE0gPHbiMXie3EFE0oxnsU3lIduh
31
- sCANiQ8BAgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
32
- BBS5k4Z75VSpdM0AclG2UvzFA/VW5DANBgkqhkiG9w0BAQUFAAOCAQEAHagT4lfX
33
- kP/hDaiwGct7XPuVGbrOsKRVD59FF5kETBxEc9UQ1clKWngf8JoVuEoKD774dW19
34
- bU0GOVWO+J6FMmT/Cp7nuFJ79egMf/gy4gfUfQMuvfcr6DvZUPIs9P/TlK59iMYF
35
- DIOQ3DxdF3rMzztNUCizN4taVscEsjCcgW6WkUJnGdqlu3OHWpQxZBJkBTjPCoc6
36
- UW6on70SFPmAy/5Cq0OJNGEWBfgD9q7rrs/X8GGwUWqXb85RXnUVi/P8Up75E0ag
37
- 14jEc90kN+C7oI/AGCBN0j6JnEtYIEJZibjjDJTSMWlUKKkj30kq7hlUC2CepJ4v
38
- x52qPcexcYZR7w==
39
- -----END CERTIFICATE-----
18
+ cert_chain: []
40
19
 
41
- date: 2011-10-03 00:00:00 Z
20
+ date: 2011-12-02 00:00:00 Z
42
21
  dependencies:
43
22
  - !ruby/object:Gem::Dependency
44
23
  name: minitest
@@ -46,13 +25,14 @@ dependencies:
46
25
  requirement: &id001 !ruby/object:Gem::Requirement
47
26
  none: false
48
27
  requirements:
49
- - - ~>
28
+ - - ">="
50
29
  - !ruby/object:Gem::Version
51
- hash: 15
30
+ hash: 11
52
31
  segments:
53
32
  - 2
54
- - 6
55
- version: "2.6"
33
+ - 1
34
+ - 0
35
+ version: 2.1.0
56
36
  type: :development
57
37
  version_requirements: *id001
58
38
  - !ruby/object:Gem::Dependency
@@ -161,6 +141,21 @@ dependencies:
161
141
  version: "2.12"
162
142
  type: :development
163
143
  version_requirements: *id008
144
+ - !ruby/object:Gem::Dependency
145
+ name: rdoc
146
+ prerelease: false
147
+ requirement: &id009 !ruby/object:Gem::Requirement
148
+ none: false
149
+ requirements:
150
+ - - ~>
151
+ - !ruby/object:Gem::Version
152
+ hash: 19
153
+ segments:
154
+ - 3
155
+ - 10
156
+ version: "3.10"
157
+ type: :development
158
+ version_requirements: *id009
164
159
  description: |-
165
160
  RubyGems is a package management framework for Ruby.
166
161
 
@@ -297,6 +292,7 @@ files:
297
292
  - lib/rubygems/source_index.rb
298
293
  - lib/rubygems/spec_fetcher.rb
299
294
  - lib/rubygems/specification.rb
295
+ - lib/rubygems/syck_hack.rb
300
296
  - lib/rubygems/test_case.rb
301
297
  - lib/rubygems/test_utilities.rb
302
298
  - lib/rubygems/text.rb
@@ -403,7 +399,7 @@ post_install_message:
403
399
  rdoc_options:
404
400
  - --main
405
401
  - README.rdoc
406
- - --title=RubyGems 1.8.11 Documentation
402
+ - --title=RubyGems 1.8.12 Documentation
407
403
  require_paths:
408
404
  - hide_lib_for_update
409
405
  required_ruby_version: !ruby/object:Gem::Requirement
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
Binary file