rubygems-update 2.5.0 → 2.5.1
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.txt +32 -2
- data/Manifest.txt +1 -1
- data/README.rdoc +3 -3
- data/Rakefile +10 -21
- data/lib/rubygems.rb +3 -4
- data/lib/rubygems/basic_specification.rb +56 -39
- data/lib/rubygems/commands/list_command.rb +1 -1
- data/lib/rubygems/core_ext/kernel_require.rb +1 -3
- data/lib/rubygems/installer.rb +2 -2
- data/lib/rubygems/request.rb +4 -1
- data/lib/rubygems/requirement.rb +3 -3
- data/lib/rubygems/resolver.rb +2 -2
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +82 -71
- data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb +16 -12
- data/lib/rubygems/specification.rb +76 -33
- data/lib/rubygems/stub_specification.rb +68 -58
- data/lib/rubygems/util/licenses.rb +21 -1
- data/lib/rubygems/version.rb +1 -1
- data/test/rubygems/specifications/{foo-0.0.1.gemspec → foo-0.0.1-x86-mswin32.gemspec} +0 -0
- data/test/rubygems/test_bundled_ca.rb +2 -2
- data/test/rubygems/test_gem_resolver.rb +1 -1
- data/test/rubygems/test_gem_specification.rb +76 -0
- data/test/rubygems/test_gem_stub_specification.rb +10 -8
- data/test/rubygems/test_require.rb +15 -0
- data/util/generate_spdx_license_list.rb +18 -3
- metadata +5 -5
- metadata.gz.sig +0 -0
@@ -4,7 +4,8 @@ class Gem::Licenses
|
|
4
4
|
# Software Package Data Exchange (SPDX) standard open-source software
|
5
5
|
# license identifiers
|
6
6
|
IDENTIFIERS = %w(
|
7
|
-
|
7
|
+
0BSD
|
8
|
+
AAL
|
8
9
|
ADSL
|
9
10
|
AFL-1.1
|
10
11
|
AFL-1.2
|
@@ -89,6 +90,7 @@ class Gem::Licenses
|
|
89
90
|
CECILL-1.0
|
90
91
|
CECILL-1.1
|
91
92
|
CECILL-2.0
|
93
|
+
CECILL-2.1
|
92
94
|
CECILL-B
|
93
95
|
CECILL-C
|
94
96
|
CNRI-Jython
|
@@ -102,6 +104,7 @@ class Gem::Licenses
|
|
102
104
|
ClArtistic
|
103
105
|
Condor-1.1
|
104
106
|
Crossword
|
107
|
+
CrystalStacker
|
105
108
|
Cube
|
106
109
|
D-FSL-1.0
|
107
110
|
DOC
|
@@ -146,6 +149,7 @@ class Gem::Licenses
|
|
146
149
|
Imlib2
|
147
150
|
Intel
|
148
151
|
Intel-ACPI
|
152
|
+
Interbase-1.0
|
149
153
|
JSON
|
150
154
|
JasPer-2.0
|
151
155
|
LGPL-2.0
|
@@ -254,6 +258,7 @@ class Gem::Licenses
|
|
254
258
|
SPL-1.0
|
255
259
|
SWL
|
256
260
|
Saxpath
|
261
|
+
Sendmail
|
257
262
|
SimPL-2.0
|
258
263
|
Sleepycat
|
259
264
|
Spencer-86
|
@@ -306,4 +311,19 @@ class Gem::Licenses
|
|
306
311
|
xpp
|
307
312
|
zlib-acknowledgement
|
308
313
|
).freeze
|
314
|
+
|
315
|
+
REGEXP = %r{
|
316
|
+
\A
|
317
|
+
(
|
318
|
+
#{Regexp.union(IDENTIFIERS)}
|
319
|
+
\+?
|
320
|
+
(\s WITH \s .+)?
|
321
|
+
| #{NONSTANDARD}
|
322
|
+
)
|
323
|
+
\Z
|
324
|
+
}ox.freeze
|
325
|
+
|
326
|
+
def self.match?(license)
|
327
|
+
!REGEXP.match(license).nil?
|
328
|
+
end
|
309
329
|
end
|
data/lib/rubygems/version.rb
CHANGED
@@ -107,7 +107,7 @@
|
|
107
107
|
# Client A needs a stack with basic push/pop capability. They write to the
|
108
108
|
# original interface (no <tt>top</tt>), so their version constraint looks like:
|
109
109
|
#
|
110
|
-
# gem 'stack', '
|
110
|
+
# gem 'stack', '>= 0.0'
|
111
111
|
#
|
112
112
|
# Essentially, any version is OK with Client A. An incompatible change to
|
113
113
|
# the library will cause them grief, but they are willing to take the chance
|
File without changes
|
@@ -52,8 +52,8 @@ class TestBundledCA < Gem::TestCase
|
|
52
52
|
assert_https('d2chzxaqi4y7f8.cloudfront.net')
|
53
53
|
end
|
54
54
|
|
55
|
-
def
|
56
|
-
assert_https('
|
55
|
+
def test_accessing_fastly
|
56
|
+
assert_https('rubygems.global.ssl.fastly.net')
|
57
57
|
end
|
58
58
|
|
59
59
|
end if ENV['TRAVIS']
|
@@ -516,7 +516,7 @@ class TestGemResolver < Gem::TestCase
|
|
516
516
|
|
517
517
|
dependency = e.conflict.dependency
|
518
518
|
|
519
|
-
|
519
|
+
assert_includes %w(a b), dependency.name
|
520
520
|
assert_equal req('>= 0'), dependency.requirement
|
521
521
|
|
522
522
|
activated = e.conflict.activated
|
@@ -2128,6 +2128,27 @@ dependencies: []
|
|
2128
2128
|
assert_nil @ext.to_fullpath("notexist")
|
2129
2129
|
end
|
2130
2130
|
|
2131
|
+
def test_fullpath_return_rb_extension_file_when_exist_the_same_name_file
|
2132
|
+
ext_spec
|
2133
|
+
|
2134
|
+
@ext.require_paths = 'lib'
|
2135
|
+
|
2136
|
+
dir = File.join(@gemhome, 'gems', @ext.original_name, 'lib')
|
2137
|
+
expected_rb = File.join(dir, 'code.rb')
|
2138
|
+
FileUtils.mkdir_p dir
|
2139
|
+
FileUtils.touch expected_rb
|
2140
|
+
|
2141
|
+
dir = @ext.extension_dir
|
2142
|
+
ext = RbConfig::CONFIG["DLEXT"]
|
2143
|
+
expected_so = File.join(dir, "code.#{ext}")
|
2144
|
+
FileUtils.mkdir_p dir
|
2145
|
+
FileUtils.touch expected_so
|
2146
|
+
|
2147
|
+
@ext.activate
|
2148
|
+
|
2149
|
+
assert_equal expected_rb, @ext.to_fullpath("code")
|
2150
|
+
end
|
2151
|
+
|
2131
2152
|
def test_require_already_activated
|
2132
2153
|
save_loaded_features do
|
2133
2154
|
a1 = new_spec "a", "1", nil, "lib/d.rb"
|
@@ -2657,6 +2678,21 @@ duplicate dependency on c (>= 1.2.3, development), (~> 1.2) use:
|
|
2657
2678
|
end
|
2658
2679
|
end
|
2659
2680
|
|
2681
|
+
def test_validate_prerelease_dependencies_with_prerelease_version
|
2682
|
+
util_setup_validate
|
2683
|
+
|
2684
|
+
Dir.chdir @tempdir do
|
2685
|
+
@a1.version = '1.0.0.beta.1'
|
2686
|
+
@a1.add_runtime_dependency 'b', '~> 1.2.0.beta.1'
|
2687
|
+
|
2688
|
+
use_ui @ui do
|
2689
|
+
@a1.validate
|
2690
|
+
end
|
2691
|
+
|
2692
|
+
assert_equal '', @ui.error, 'warning'
|
2693
|
+
end
|
2694
|
+
end
|
2695
|
+
|
2660
2696
|
def test_validate_description
|
2661
2697
|
util_setup_validate
|
2662
2698
|
|
@@ -2874,6 +2910,46 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
|
2874
2910
|
warning
|
2875
2911
|
end
|
2876
2912
|
|
2913
|
+
def test_validate_license_values_plus
|
2914
|
+
util_setup_validate
|
2915
|
+
|
2916
|
+
use_ui @ui do
|
2917
|
+
@a1.licenses = ['GPL-2.0+']
|
2918
|
+
@a1.validate
|
2919
|
+
end
|
2920
|
+
|
2921
|
+
assert_empty @ui.error
|
2922
|
+
end
|
2923
|
+
|
2924
|
+
def test_validate_license_values_with
|
2925
|
+
util_setup_validate
|
2926
|
+
|
2927
|
+
use_ui @ui do
|
2928
|
+
@a1.licenses = ['GPL-2.0+ WITH Autoconf-exception-2.0']
|
2929
|
+
@a1.validate
|
2930
|
+
end
|
2931
|
+
|
2932
|
+
assert_empty @ui.error
|
2933
|
+
end
|
2934
|
+
|
2935
|
+
def test_validate_license_with_nonsense_suffix
|
2936
|
+
util_setup_validate
|
2937
|
+
|
2938
|
+
use_ui @ui do
|
2939
|
+
@a1.licenses = ['GPL-2.0+ FOO', 'GPL-2.0 FOO']
|
2940
|
+
@a1.validate
|
2941
|
+
end
|
2942
|
+
|
2943
|
+
assert_match <<-warning, @ui.error
|
2944
|
+
WARNING: license value 'GPL-2.0+ FOO' is invalid. Use a license identifier from
|
2945
|
+
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
2946
|
+
warning
|
2947
|
+
assert_match <<-warning, @ui.error
|
2948
|
+
WARNING: license value 'GPL-2.0 FOO' is invalid. Use a license identifier from
|
2949
|
+
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
2950
|
+
warning
|
2951
|
+
end
|
2952
|
+
|
2877
2953
|
def test_validate_name
|
2878
2954
|
util_setup_validate
|
2879
2955
|
|
@@ -3,13 +3,15 @@ require "rubygems/stub_specification"
|
|
3
3
|
|
4
4
|
class TestStubSpecification < Gem::TestCase
|
5
5
|
SPECIFICATIONS = File.expand_path(File.join("..", "specifications"), __FILE__)
|
6
|
-
FOO = File.join SPECIFICATIONS, "foo-0.0.1.gemspec"
|
6
|
+
FOO = File.join SPECIFICATIONS, "foo-0.0.1-x86-mswin32.gemspec"
|
7
7
|
BAR = File.join SPECIFICATIONS, "bar-0.0.2.gemspec"
|
8
8
|
|
9
9
|
def setup
|
10
10
|
super
|
11
11
|
|
12
|
-
@
|
12
|
+
@base_dir = File.dirname(SPECIFICATIONS)
|
13
|
+
@gems_dir = File.join File.dirname(SPECIFICATIONS), 'gem'
|
14
|
+
@foo = Gem::StubSpecification.gemspec_stub FOO, @base_dir, @gems_dir
|
13
15
|
end
|
14
16
|
|
15
17
|
def test_initialize
|
@@ -31,7 +33,7 @@ class TestStubSpecification < Gem::TestCase
|
|
31
33
|
end
|
32
34
|
|
33
35
|
def test_initialize_missing_stubline
|
34
|
-
stub = Gem::StubSpecification.gemspec_stub(BAR)
|
36
|
+
stub = Gem::StubSpecification.gemspec_stub(BAR, @base_dir, @gems_dir)
|
35
37
|
assert_equal "bar", stub.name
|
36
38
|
assert_equal Gem::Version.new("0.0.2"), stub.version
|
37
39
|
assert_equal Gem::Platform.new("ruby"), stub.platform
|
@@ -118,7 +120,7 @@ class TestStubSpecification < Gem::TestCase
|
|
118
120
|
io.write spec.to_ruby_for_cache
|
119
121
|
end
|
120
122
|
|
121
|
-
default_spec = Gem::StubSpecification.gemspec_stub spec.loaded_from
|
123
|
+
default_spec = Gem::StubSpecification.gemspec_stub spec.loaded_from, spec.base_dir, spec.gems_dir
|
122
124
|
|
123
125
|
refute default_spec.missing_extensions?
|
124
126
|
end
|
@@ -140,7 +142,7 @@ class TestStubSpecification < Gem::TestCase
|
|
140
142
|
def test_to_spec_with_other_specs_loaded_does_not_warn
|
141
143
|
real_foo = util_spec @foo.name, @foo.version
|
142
144
|
real_foo.activate
|
143
|
-
bar = Gem::StubSpecification.gemspec_stub BAR
|
145
|
+
bar = Gem::StubSpecification.gemspec_stub BAR, real_foo.base_dir, real_foo.gems_dir
|
144
146
|
refute_predicate Gem.loaded_specs, :empty?
|
145
147
|
assert bar.to_spec
|
146
148
|
end
|
@@ -148,7 +150,7 @@ class TestStubSpecification < Gem::TestCase
|
|
148
150
|
def test_to_spec_activated
|
149
151
|
assert @foo.to_spec.is_a?(Gem::Specification)
|
150
152
|
assert_equal "foo", @foo.to_spec.name
|
151
|
-
refute @foo.to_spec.
|
153
|
+
refute @foo.to_spec.instance_variable_get :@ignored
|
152
154
|
end
|
153
155
|
|
154
156
|
def test_to_spec_missing_extensions
|
@@ -179,7 +181,7 @@ end
|
|
179
181
|
|
180
182
|
io.flush
|
181
183
|
|
182
|
-
stub = Gem::StubSpecification.gemspec_stub io.path
|
184
|
+
stub = Gem::StubSpecification.gemspec_stub io.path, @gemhome, File.join(@gemhome, 'gems')
|
183
185
|
|
184
186
|
yield stub if block_given?
|
185
187
|
|
@@ -202,7 +204,7 @@ end
|
|
202
204
|
|
203
205
|
io.flush
|
204
206
|
|
205
|
-
stub = Gem::StubSpecification.gemspec_stub io.path
|
207
|
+
stub = Gem::StubSpecification.gemspec_stub io.path, @gemhome, File.join(@gemhome, 'gems')
|
206
208
|
|
207
209
|
yield stub if block_given?
|
208
210
|
|
@@ -277,6 +277,21 @@ class TestGemRequire < Gem::TestCase
|
|
277
277
|
assert_equal %w(a-1.0 b-2.0), loaded_spec_names
|
278
278
|
end
|
279
279
|
|
280
|
+
def test_require_doesnt_traverse_development_dependencies
|
281
|
+
a = new_spec("a", "1", nil, "lib/a.rb")
|
282
|
+
z = new_spec("z", "1", "w" => "> 0")
|
283
|
+
w1 = new_spec("w", "1") { |s| s.add_development_dependency "non-existent" }
|
284
|
+
w2 = new_spec("w", "2") { |s| s.add_development_dependency "non-existent" }
|
285
|
+
|
286
|
+
install_specs a, w1, w2, z
|
287
|
+
|
288
|
+
assert gem("z")
|
289
|
+
assert_equal %w(z-1), loaded_spec_names
|
290
|
+
assert_equal ["w (> 0)"], unresolved_names
|
291
|
+
|
292
|
+
assert require("a")
|
293
|
+
end
|
294
|
+
|
280
295
|
def test_default_gem_only
|
281
296
|
default_gem_spec = new_default_spec("default", "2.0.0.0",
|
282
297
|
nil, "default/gem.rb")
|
@@ -7,15 +7,30 @@ licenses = JSON.parse(json)['licenses'].map do |licenseObject|
|
|
7
7
|
end
|
8
8
|
|
9
9
|
open 'lib/rubygems/util/licenses.rb', 'w' do |io|
|
10
|
-
io.write <<-
|
10
|
+
io.write <<-RUBY
|
11
11
|
class Gem::Licenses
|
12
12
|
NONSTANDARD = 'Nonstandard'.freeze
|
13
13
|
|
14
14
|
# Software Package Data Exchange (SPDX) standard open-source software
|
15
15
|
# license identifiers
|
16
16
|
IDENTIFIERS = %w(
|
17
|
-
|
17
|
+
#{licenses.sort.join "\n "}
|
18
18
|
).freeze
|
19
|
+
|
20
|
+
REGEXP = %r{
|
21
|
+
\\A
|
22
|
+
(
|
23
|
+
\#{Regexp.union(IDENTIFIERS)}
|
24
|
+
\\+?
|
25
|
+
(\\s WITH \\s .+)?
|
26
|
+
| \#{NONSTANDARD}
|
27
|
+
)
|
28
|
+
\\Z
|
29
|
+
}ox.freeze
|
30
|
+
|
31
|
+
def self.match?(license)
|
32
|
+
!REGEXP.match(license).nil?
|
33
|
+
end
|
19
34
|
end
|
20
|
-
|
35
|
+
RUBY
|
21
36
|
end
|
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.5.
|
4
|
+
version: 2.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
+paXWY9JmO3d13yH2/nhDPAo/y7KwmEETFvtUoBmX4o44n/ELqSgb9NrL+613z9j
|
32
32
|
n8mbTOXmLGlTBA==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-11
|
34
|
+
date: 2015-12-11 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: minitest
|
@@ -411,7 +411,7 @@ files:
|
|
411
411
|
- test/rubygems/sff/discover.rb
|
412
412
|
- test/rubygems/simple_gem.rb
|
413
413
|
- test/rubygems/specifications/bar-0.0.2.gemspec
|
414
|
-
- test/rubygems/specifications/foo-0.0.1.gemspec
|
414
|
+
- test/rubygems/specifications/foo-0.0.1-x86-mswin32.gemspec
|
415
415
|
- test/rubygems/ssl_cert.pem
|
416
416
|
- test/rubygems/ssl_key.pem
|
417
417
|
- test/rubygems/test_bundled_ca.rb
|
@@ -547,7 +547,7 @@ files:
|
|
547
547
|
- util/create_encrypted_key.rb
|
548
548
|
- util/generate_spdx_license_list.rb
|
549
549
|
- util/update_bundled_ca_certificates.rb
|
550
|
-
homepage:
|
550
|
+
homepage: https://rubygems.org
|
551
551
|
licenses:
|
552
552
|
- Ruby
|
553
553
|
- MIT
|
@@ -571,7 +571,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
571
571
|
version: '0'
|
572
572
|
requirements: []
|
573
573
|
rubyforge_project:
|
574
|
-
rubygems_version: 2.
|
574
|
+
rubygems_version: 2.5.0
|
575
575
|
signing_key:
|
576
576
|
specification_version: 4
|
577
577
|
summary: RubyGems is a package management framework for Ruby
|
metadata.gz.sig
CHANGED
Binary file
|