rubygems-update 3.4.19 → 3.4.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -0
- data/bundler/CHANGELOG.md +29 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/info.rb +1 -1
- data/bundler/lib/bundler/cli/update.rb +1 -0
- data/bundler/lib/bundler/fetcher/base.rb +2 -2
- data/bundler/lib/bundler/fetcher/compact_index.rb +1 -5
- data/bundler/lib/bundler/fetcher/dependency.rb +1 -1
- data/bundler/lib/bundler/fetcher.rb +31 -30
- data/bundler/lib/bundler/index.rb +62 -31
- data/bundler/lib/bundler/installer/standalone.rb +8 -1
- data/bundler/lib/bundler/lockfile_parser.rb +3 -15
- data/bundler/lib/bundler/man/gemfile.5 +11 -0
- data/bundler/lib/bundler/man/gemfile.5.ronn +5 -0
- data/bundler/lib/bundler/plugin.rb +1 -1
- data/bundler/lib/bundler/resolver.rb +18 -3
- data/bundler/lib/bundler/retry.rb +1 -1
- data/bundler/lib/bundler/ruby_dsl.rb +23 -2
- data/bundler/lib/bundler/self_manager.rb +2 -0
- data/bundler/lib/bundler/settings.rb +37 -13
- data/bundler/lib/bundler/source/git/git_proxy.rb +14 -2
- data/bundler/lib/bundler/source/rubygems.rb +22 -25
- data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +1 -1
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems/available_set.rb +1 -1
- data/lib/rubygems/basic_specification.rb +2 -2
- data/lib/rubygems/command.rb +16 -19
- data/lib/rubygems/commands/cert_command.rb +1 -1
- data/lib/rubygems/commands/dependency_command.rb +3 -4
- data/lib/rubygems/commands/owner_command.rb +8 -10
- data/lib/rubygems/commands/uninstall_command.rb +6 -7
- data/lib/rubygems/commands/unpack_command.rb +4 -6
- data/lib/rubygems/config_file.rb +1 -1
- data/lib/rubygems/core_ext/kernel_gem.rb +1 -1
- data/lib/rubygems/core_ext/kernel_warn.rb +4 -5
- data/lib/rubygems/dependency_installer.rb +8 -12
- data/lib/rubygems/deprecate.rb +2 -2
- data/lib/rubygems/gemcutter_utilities.rb +2 -2
- data/lib/rubygems/installer.rb +9 -11
- data/lib/rubygems/name_tuple.rb +1 -1
- data/lib/rubygems/package/tar_reader/entry.rb +18 -20
- data/lib/rubygems/package/tar_reader.rb +0 -5
- data/lib/rubygems/package.rb +10 -4
- data/lib/rubygems/query_utils.rb +1 -1
- data/lib/rubygems/request_set/gem_dependency_api.rb +1 -1
- data/lib/rubygems/resolver/activation_request.rb +2 -4
- data/lib/rubygems/resolver/installed_specification.rb +1 -1
- data/lib/rubygems/resolver/local_specification.rb +1 -1
- data/lib/rubygems/s3_uri_signer.rb +1 -1
- data/lib/rubygems/security/trust_dir.rb +4 -6
- data/lib/rubygems/security.rb +1 -1
- data/lib/rubygems/source/local.rb +34 -37
- data/lib/rubygems/source.rb +2 -2
- data/lib/rubygems/source_list.rb +2 -2
- data/lib/rubygems/spec_fetcher.rb +29 -33
- data/lib/rubygems/specification.rb +34 -26
- data/lib/rubygems/specification_policy.rb +33 -32
- data/lib/rubygems/stub_specification.rb +13 -10
- data/lib/rubygems/uninstaller.rb +1 -1
- data/lib/rubygems/user_interaction.rb +2 -2
- data/lib/rubygems/util/licenses.rb +115 -0
- data/lib/rubygems/validator.rb +5 -7
- data/lib/rubygems.rb +5 -7
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/helper.rb +17 -19
- data/test/rubygems/test_gem.rb +4 -4
- data/test/rubygems/test_gem_commands_build_command.rb +2 -1
- data/test/rubygems/test_gem_commands_stale_command.rb +1 -1
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.lock +28 -12
- data/test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.toml +1 -1
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock +16 -14
- data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml +1 -1
- data/test/rubygems/test_gem_indexer.rb +1 -1
- data/test/rubygems/test_gem_package.rb +117 -2
- data/test/rubygems/test_gem_package_tar_header.rb +7 -7
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +53 -1
- data/test/rubygems/test_gem_package_tar_writer.rb +13 -13
- data/test/rubygems/test_gem_remote_fetcher.rb +21 -25
- data/test/rubygems/test_gem_requirement.rb +1 -1
- data/test/rubygems/test_gem_specification.rb +42 -6
- data/test/rubygems/test_gem_update_suggestion.rb +14 -20
- data/test/rubygems/test_require.rb +4 -6
- data/test/rubygems/utilities.rb +2 -2
- metadata +3 -3
@@ -28,7 +28,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def test_add_file
|
31
|
-
Time.stub :now, Time.at(
|
31
|
+
Time.stub :now, Time.at(1_458_518_157) do
|
32
32
|
@tar_writer.add_file "x", 0644 do |f|
|
33
33
|
f.write "a" * 10
|
34
34
|
end
|
@@ -42,7 +42,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
|
|
42
42
|
|
43
43
|
def test_add_file_source_date_epoch
|
44
44
|
ENV["SOURCE_DATE_EPOCH"] = "123456789"
|
45
|
-
Time.stub :now, Time.at(
|
45
|
+
Time.stub :now, Time.at(1_458_518_157) do
|
46
46
|
@tar_writer.mkdir "foo", 0644
|
47
47
|
|
48
48
|
assert_headers_equal tar_dir_header("foo", "", 0644, Time.at(ENV["SOURCE_DATE_EPOCH"].to_i).utc),
|
@@ -51,7 +51,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def test_add_symlink
|
54
|
-
Time.stub :now, Time.at(
|
54
|
+
Time.stub :now, Time.at(1_458_518_157) do
|
55
55
|
@tar_writer.add_symlink "x", "y", 0644
|
56
56
|
|
57
57
|
assert_headers_equal(tar_symlink_header("x", "", 0644, Time.now, "y"),
|
@@ -62,7 +62,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
|
|
62
62
|
|
63
63
|
def test_add_symlink_source_date_epoch
|
64
64
|
ENV["SOURCE_DATE_EPOCH"] = "123456789"
|
65
|
-
Time.stub :now, Time.at(
|
65
|
+
Time.stub :now, Time.at(1_458_518_157) do
|
66
66
|
@tar_writer.add_symlink "x", "y", 0644
|
67
67
|
|
68
68
|
assert_headers_equal(tar_symlink_header("x", "", 0644, Time.at(ENV["SOURCE_DATE_EPOCH"].to_i).utc, "y"),
|
@@ -73,7 +73,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
|
|
73
73
|
def test_add_file_digest
|
74
74
|
digest_algorithms = Digest::SHA1.new, Digest::SHA512.new
|
75
75
|
|
76
|
-
Time.stub :now, Time.at(
|
76
|
+
Time.stub :now, Time.at(1_458_518_157) do
|
77
77
|
digests = @tar_writer.add_file_digest "x", 0644, digest_algorithms do |io|
|
78
78
|
io.write "a" * 10
|
79
79
|
end
|
@@ -96,7 +96,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
|
|
96
96
|
def test_add_file_digest_multiple
|
97
97
|
digest_algorithms = [Digest::SHA1.new, Digest::SHA512.new]
|
98
98
|
|
99
|
-
Time.stub :now, Time.at(
|
99
|
+
Time.stub :now, Time.at(1_458_518_157) do
|
100
100
|
digests = @tar_writer.add_file_digest "x", 0644, digest_algorithms do |io|
|
101
101
|
io.write "a" * 10
|
102
102
|
end
|
@@ -121,7 +121,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
|
|
121
121
|
|
122
122
|
signer = Gem::Security::Signer.new PRIVATE_KEY, [PUBLIC_CERT]
|
123
123
|
|
124
|
-
Time.stub :now, Time.at(
|
124
|
+
Time.stub :now, Time.at(1_458_518_157) do
|
125
125
|
@tar_writer.add_file_signed "x", 0644, signer do |io|
|
126
126
|
io.write "a" * 10
|
127
127
|
end
|
@@ -149,7 +149,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
|
|
149
149
|
def test_add_file_signer_empty
|
150
150
|
signer = Gem::Security::Signer.new nil, nil
|
151
151
|
|
152
|
-
Time.stub :now, Time.at(
|
152
|
+
Time.stub :now, Time.at(1_458_518_157) do
|
153
153
|
@tar_writer.add_file_signed "x", 0644, signer do |io|
|
154
154
|
io.write "a" * 10
|
155
155
|
end
|
@@ -163,7 +163,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
|
|
163
163
|
end
|
164
164
|
|
165
165
|
def test_add_file_simple
|
166
|
-
Time.stub :now, Time.at(
|
166
|
+
Time.stub :now, Time.at(1_458_518_157) do
|
167
167
|
@tar_writer.add_file_simple "x", 0644, 10 do |io|
|
168
168
|
io.write "a" * 10
|
169
169
|
end
|
@@ -178,7 +178,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
|
|
178
178
|
|
179
179
|
def test_add_file_simple_source_date_epoch
|
180
180
|
ENV["SOURCE_DATE_EPOCH"] = "123456789"
|
181
|
-
Time.stub :now, Time.at(
|
181
|
+
Time.stub :now, Time.at(1_458_518_157) do
|
182
182
|
@tar_writer.add_file_simple "x", 0644, 10 do |io|
|
183
183
|
io.write "a" * 10
|
184
184
|
end
|
@@ -189,7 +189,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
|
|
189
189
|
end
|
190
190
|
|
191
191
|
def test_add_file_simple_padding
|
192
|
-
Time.stub :now, Time.at(
|
192
|
+
Time.stub :now, Time.at(1_458_518_157) do
|
193
193
|
@tar_writer.add_file_simple "x", 0, 100
|
194
194
|
|
195
195
|
assert_headers_equal tar_file_header("x", "", 0, 100, Time.now),
|
@@ -247,7 +247,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
|
|
247
247
|
end
|
248
248
|
|
249
249
|
def test_mkdir
|
250
|
-
Time.stub :now, Time.at(
|
250
|
+
Time.stub :now, Time.at(1_458_518_157) do
|
251
251
|
@tar_writer.mkdir "foo", 0644
|
252
252
|
|
253
253
|
assert_headers_equal tar_dir_header("foo", "", 0644, Time.now),
|
@@ -259,7 +259,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
|
|
259
259
|
|
260
260
|
def test_mkdir_source_date_epoch
|
261
261
|
ENV["SOURCE_DATE_EPOCH"] = "123456789"
|
262
|
-
Time.stub :now, Time.at(
|
262
|
+
Time.stub :now, Time.at(1_458_518_157) do
|
263
263
|
@tar_writer.mkdir "foo", 0644
|
264
264
|
|
265
265
|
assert_headers_equal tar_dir_header("foo", "", 0644, Time.at(ENV["SOURCE_DATE_EPOCH"].to_i).utc),
|
@@ -749,7 +749,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|
749
749
|
"my-bucket" => { :id => "testuser", :secret => "testpass" },
|
750
750
|
}
|
751
751
|
url = "s3://my-bucket/gems/specs.4.8.gz"
|
752
|
-
Time.stub :now, Time.at(
|
752
|
+
Time.stub :now, Time.at(1_561_353_581) do
|
753
753
|
assert_fetch_s3 url, "20f974027db2f3cd6193565327a7c73457a138efb1a63ea248d185ce6827d41b"
|
754
754
|
end
|
755
755
|
ensure
|
@@ -761,7 +761,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|
761
761
|
"my-bucket" => { :id => "testuser", :secret => "testpass", :region => "us-west-2" },
|
762
762
|
}
|
763
763
|
url = "s3://my-bucket/gems/specs.4.8.gz"
|
764
|
-
Time.stub :now, Time.at(
|
764
|
+
Time.stub :now, Time.at(1_561_353_581) do
|
765
765
|
assert_fetch_s3 url, "4afc3010757f1fd143e769f1d1dabd406476a4fc7c120e9884fd02acbb8f26c9", nil, "us-west-2"
|
766
766
|
end
|
767
767
|
ensure
|
@@ -773,7 +773,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|
773
773
|
"my-bucket" => { :id => "testuser", :secret => "testpass", :security_token => "testtoken" },
|
774
774
|
}
|
775
775
|
url = "s3://my-bucket/gems/specs.4.8.gz"
|
776
|
-
Time.stub :now, Time.at(
|
776
|
+
Time.stub :now, Time.at(1_561_353_581) do
|
777
777
|
assert_fetch_s3 url, "935160a427ef97e7630f799232b8f208c4a4e49aad07d0540572a2ad5fe9f93c", "testtoken"
|
778
778
|
end
|
779
779
|
ensure
|
@@ -788,7 +788,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|
788
788
|
"my-bucket" => { :provider => "env" },
|
789
789
|
}
|
790
790
|
url = "s3://my-bucket/gems/specs.4.8.gz"
|
791
|
-
Time.stub :now, Time.at(
|
791
|
+
Time.stub :now, Time.at(1_561_353_581) do
|
792
792
|
assert_fetch_s3 url, "20f974027db2f3cd6193565327a7c73457a138efb1a63ea248d185ce6827d41b"
|
793
793
|
end
|
794
794
|
ensure
|
@@ -804,7 +804,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|
804
804
|
"my-bucket" => { :provider => "env", :region => "us-west-2" },
|
805
805
|
}
|
806
806
|
url = "s3://my-bucket/gems/specs.4.8.gz"
|
807
|
-
Time.stub :now, Time.at(
|
807
|
+
Time.stub :now, Time.at(1_561_353_581) do
|
808
808
|
assert_fetch_s3 url, "4afc3010757f1fd143e769f1d1dabd406476a4fc7c120e9884fd02acbb8f26c9", nil, "us-west-2"
|
809
809
|
end
|
810
810
|
ensure
|
@@ -820,7 +820,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|
820
820
|
"my-bucket" => { :provider => "env" },
|
821
821
|
}
|
822
822
|
url = "s3://my-bucket/gems/specs.4.8.gz"
|
823
|
-
Time.stub :now, Time.at(
|
823
|
+
Time.stub :now, Time.at(1_561_353_581) do
|
824
824
|
assert_fetch_s3 url, "935160a427ef97e7630f799232b8f208c4a4e49aad07d0540572a2ad5fe9f93c", "testtoken"
|
825
825
|
end
|
826
826
|
ensure
|
@@ -830,7 +830,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|
830
830
|
|
831
831
|
def test_fetch_s3_url_creds
|
832
832
|
url = "s3://testuser:testpass@my-bucket/gems/specs.4.8.gz"
|
833
|
-
Time.stub :now, Time.at(
|
833
|
+
Time.stub :now, Time.at(1_561_353_581) do
|
834
834
|
assert_fetch_s3 url, "20f974027db2f3cd6193565327a7c73457a138efb1a63ea248d185ce6827d41b"
|
835
835
|
end
|
836
836
|
end
|
@@ -841,7 +841,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|
841
841
|
}
|
842
842
|
|
843
843
|
url = "s3://my-bucket/gems/specs.4.8.gz"
|
844
|
-
Time.stub :now, Time.at(
|
844
|
+
Time.stub :now, Time.at(1_561_353_581) do
|
845
845
|
assert_fetch_s3 url, "20f974027db2f3cd6193565327a7c73457a138efb1a63ea248d185ce6827d41b", nil, "us-east-1",
|
846
846
|
'{"AccessKeyId": "testuser", "SecretAccessKey": "testpass"}'
|
847
847
|
end
|
@@ -855,7 +855,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|
855
855
|
}
|
856
856
|
|
857
857
|
url = "s3://my-bucket/gems/specs.4.8.gz"
|
858
|
-
Time.stub :now, Time.at(
|
858
|
+
Time.stub :now, Time.at(1_561_353_581) do
|
859
859
|
assert_fetch_s3 url, "4afc3010757f1fd143e769f1d1dabd406476a4fc7c120e9884fd02acbb8f26c9", nil, "us-west-2",
|
860
860
|
'{"AccessKeyId": "testuser", "SecretAccessKey": "testpass"}'
|
861
861
|
end
|
@@ -869,7 +869,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|
869
869
|
}
|
870
870
|
|
871
871
|
url = "s3://my-bucket/gems/specs.4.8.gz"
|
872
|
-
Time.stub :now, Time.at(
|
872
|
+
Time.stub :now, Time.at(1_561_353_581) do
|
873
873
|
assert_fetch_s3 url, "935160a427ef97e7630f799232b8f208c4a4e49aad07d0540572a2ad5fe9f93c", "testtoken", "us-east-1",
|
874
874
|
'{"AccessKeyId": "testuser", "SecretAccessKey": "testpass", "Token": "testtoken"}'
|
875
875
|
end
|
@@ -1151,14 +1151,12 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|
1151
1151
|
end
|
1152
1152
|
server.ssl_context.tmp_dh_callback = proc { TEST_KEY_DH2048 }
|
1153
1153
|
t = Thread.new do
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
server.shutdown
|
1161
|
-
end
|
1154
|
+
server.start
|
1155
|
+
rescue Exception => ex
|
1156
|
+
puts "ERROR during server thread: #{ex.message}"
|
1157
|
+
raise
|
1158
|
+
ensure
|
1159
|
+
server.shutdown
|
1162
1160
|
end
|
1163
1161
|
while server.status != :Running
|
1164
1162
|
sleep 0.1
|
@@ -1205,13 +1203,11 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|
1205
1203
|
end
|
1206
1204
|
end
|
1207
1205
|
th = Thread.new do
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
s.shutdown
|
1214
|
-
end
|
1206
|
+
s.start
|
1207
|
+
rescue Exception => ex
|
1208
|
+
abort "ERROR during server thread: #{ex.message}"
|
1209
|
+
ensure
|
1210
|
+
s.shutdown
|
1215
1211
|
end
|
1216
1212
|
th[:server] = s
|
1217
1213
|
th
|
@@ -84,7 +84,7 @@ class TestGemRequirement < Gem::TestCase
|
|
84
84
|
Gem::Requirement.parse(Gem::Version.new("2"))
|
85
85
|
end
|
86
86
|
|
87
|
-
|
87
|
+
unless (Gem.java_platform? && ENV["JRUBY_OPTS"].to_s.include?("--debug"))
|
88
88
|
def test_parse_deduplication
|
89
89
|
assert_same "~>", Gem::Requirement.parse("~> 1").first
|
90
90
|
end
|
@@ -1092,6 +1092,25 @@ dependencies: []
|
|
1092
1092
|
assert_equal(yaml_defined, Object.const_defined?("YAML"))
|
1093
1093
|
end
|
1094
1094
|
|
1095
|
+
def test_handles_dependencies_with_other_syck_requirements_argument_error
|
1096
|
+
yaml_defined = Object.const_defined?("YAML")
|
1097
|
+
|
1098
|
+
data = Marshal.dump(Gem::Specification.new do |s|
|
1099
|
+
v = Gem::Version.allocate
|
1100
|
+
v.instance_variable_set :@version, "YAML::Syck::DefaultKey"
|
1101
|
+
s.instance_variable_set :@version, v
|
1102
|
+
end)
|
1103
|
+
|
1104
|
+
assert_raise(ArgumentError) { Marshal.load(data) }
|
1105
|
+
out, err = capture_output do
|
1106
|
+
assert_raise(ArgumentError) { Marshal.load(data) }
|
1107
|
+
end
|
1108
|
+
assert_empty out
|
1109
|
+
assert_empty err
|
1110
|
+
|
1111
|
+
assert_equal(yaml_defined, Object.const_defined?("YAML"))
|
1112
|
+
end
|
1113
|
+
|
1095
1114
|
def test_initialize
|
1096
1115
|
spec = Gem::Specification.new do |s|
|
1097
1116
|
s.name = "blah"
|
@@ -3075,10 +3094,22 @@ Please report a bug if this causes problems.
|
|
3075
3094
|
|
3076
3095
|
assert_match <<-WARNING, @ui.error
|
3077
3096
|
WARNING: licenses is empty, but is recommended. Use a license identifier from
|
3078
|
-
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license
|
3097
|
+
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license,
|
3098
|
+
or set it to nil if you don't want to specify a license.
|
3079
3099
|
WARNING
|
3080
3100
|
end
|
3081
3101
|
|
3102
|
+
def test_validate_nil_license
|
3103
|
+
util_setup_validate
|
3104
|
+
|
3105
|
+
use_ui @ui do
|
3106
|
+
@a1.license = nil
|
3107
|
+
@a1.validate
|
3108
|
+
end
|
3109
|
+
|
3110
|
+
assert_empty @ui.error
|
3111
|
+
end
|
3112
|
+
|
3082
3113
|
def test_validate_license_in_a_non_packaging_context
|
3083
3114
|
util_setup_validate
|
3084
3115
|
|
@@ -3115,7 +3146,8 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
|
3115
3146
|
|
3116
3147
|
assert_match <<-WARNING, @ui.error
|
3117
3148
|
WARNING: license value 'BSD' is invalid. Use a license identifier from
|
3118
|
-
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license
|
3149
|
+
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license,
|
3150
|
+
or set it to nil if you don't want to specify a license.
|
3119
3151
|
WARNING
|
3120
3152
|
end
|
3121
3153
|
|
@@ -3173,11 +3205,13 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
|
3173
3205
|
|
3174
3206
|
assert_match <<-WARNING, @ui.error
|
3175
3207
|
WARNING: license value 'GPL-2.0+ FOO' is invalid. Use a license identifier from
|
3176
|
-
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license
|
3208
|
+
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license,
|
3209
|
+
or set it to nil if you don't want to specify a license.
|
3177
3210
|
WARNING
|
3178
3211
|
assert_match <<-WARNING, @ui.error
|
3179
3212
|
WARNING: license value 'GPL-2.0 FOO' is invalid. Use a license identifier from
|
3180
|
-
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license
|
3213
|
+
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license,
|
3214
|
+
or set it to nil if you don't want to specify a license.
|
3181
3215
|
WARNING
|
3182
3216
|
end
|
3183
3217
|
|
@@ -3191,7 +3225,8 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
|
3191
3225
|
|
3192
3226
|
assert_match <<-WARNING, @ui.error
|
3193
3227
|
WARNING: license value 'GPL-2.0+ WITH Autocofn-exception-2.0' is invalid. Use a license identifier from
|
3194
|
-
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license
|
3228
|
+
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license,
|
3229
|
+
or set it to nil if you don't want to specify a license.
|
3195
3230
|
WARNING
|
3196
3231
|
end
|
3197
3232
|
|
@@ -3205,7 +3240,8 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
|
3205
3240
|
|
3206
3241
|
assert_match <<-WARNING, @ui.error
|
3207
3242
|
WARNING: license value 'ruby' is invalid. Use a license identifier from
|
3208
|
-
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license
|
3243
|
+
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license,
|
3244
|
+
or set it to nil if you don't want to specify a license.
|
3209
3245
|
Did you mean 'Ruby'?
|
3210
3246
|
WARNING
|
3211
3247
|
end
|
@@ -64,9 +64,9 @@ class TestUpdateSuggestion < Gem::TestCase
|
|
64
64
|
|
65
65
|
def test_eglible_for_update
|
66
66
|
with_eglible_environment(cmd: @cmd) do
|
67
|
-
Time.stub :now,
|
67
|
+
Time.stub :now, 123_456_789 do
|
68
68
|
assert @cmd.eglible_for_update?
|
69
|
-
assert_equal Gem.configuration.last_update_check,
|
69
|
+
assert_equal Gem.configuration.last_update_check, 123_456_789
|
70
70
|
|
71
71
|
# test last check is written to config file
|
72
72
|
assert File.read(Gem.configuration.state_file_name).match("123456789")
|
@@ -143,23 +143,19 @@ class TestUpdateSuggestion < Gem::TestCase
|
|
143
143
|
|
144
144
|
def test_eglible_for_update_prevent_config
|
145
145
|
with_eglible_environment(cmd: @cmd) do
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
Gem.configuration[:prevent_update_suggestion] = original_config
|
151
|
-
end
|
146
|
+
original_config, Gem.configuration[:prevent_update_suggestion] = Gem.configuration[:prevent_update_suggestion], true
|
147
|
+
refute @cmd.eglible_for_update?
|
148
|
+
ensure
|
149
|
+
Gem.configuration[:prevent_update_suggestion] = original_config
|
152
150
|
end
|
153
151
|
end
|
154
152
|
|
155
153
|
def test_eglible_for_update_prevent_env
|
156
154
|
with_eglible_environment(cmd: @cmd) do
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
ENV["RUBYGEMS_PREVENT_UPDATE_SUGGESTION"] = original_env
|
162
|
-
end
|
155
|
+
original_env, ENV["RUBYGEMS_PREVENT_UPDATE_SUGGESTION"] = ENV["RUBYGEMS_PREVENT_UPDATE_SUGGESTION"], "yes"
|
156
|
+
refute @cmd.eglible_for_update?
|
157
|
+
ensure
|
158
|
+
ENV["RUBYGEMS_PREVENT_UPDATE_SUGGESTION"] = original_env
|
163
159
|
end
|
164
160
|
end
|
165
161
|
|
@@ -177,12 +173,10 @@ class TestUpdateSuggestion < Gem::TestCase
|
|
177
173
|
|
178
174
|
def test_eglible_for_update_disabled_update
|
179
175
|
with_eglible_environment(cmd: @cmd) do
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
Gem.disable_system_update_message = original_disable
|
185
|
-
end
|
176
|
+
original_disable, Gem.disable_system_update_message = Gem.disable_system_update_message, "disabled"
|
177
|
+
refute @cmd.eglible_for_update?
|
178
|
+
ensure
|
179
|
+
Gem.disable_system_update_message = original_disable
|
186
180
|
end
|
187
181
|
end
|
188
182
|
|
@@ -92,12 +92,10 @@ class TestGemRequire < Gem::TestCase
|
|
92
92
|
|
93
93
|
def create_sync_thread
|
94
94
|
Thread.new do
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
FILE_EXIT_LATCH.await
|
100
|
-
end
|
95
|
+
yield
|
96
|
+
ensure
|
97
|
+
FILE_ENTERED_LATCH.release
|
98
|
+
FILE_EXIT_LATCH.await
|
101
99
|
end
|
102
100
|
end
|
103
101
|
|
data/test/rubygems/utilities.rb
CHANGED
@@ -55,7 +55,7 @@ class Gem::FakeFetcher
|
|
55
55
|
raise Gem::RemoteFetcher::FetchError.new("no data for #{path}", path)
|
56
56
|
end
|
57
57
|
|
58
|
-
if @data[path].
|
58
|
+
if @data[path].is_a?(Array)
|
59
59
|
@data[path].shift
|
60
60
|
else
|
61
61
|
@data[path]
|
@@ -65,7 +65,7 @@ class Gem::FakeFetcher
|
|
65
65
|
def create_response(uri)
|
66
66
|
data = find_data(uri)
|
67
67
|
response = data.respond_to?(:call) ? data.call : data
|
68
|
-
raise TypeError, "#{response.class} is not a type of Net::HTTPResponse" unless response.
|
68
|
+
raise TypeError, "#{response.class} is not a type of Net::HTTPResponse" unless response.is_a?(Net::HTTPResponse)
|
69
69
|
|
70
70
|
response
|
71
71
|
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: 3.4.
|
4
|
+
version: 3.4.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: exe
|
18
18
|
cert_chain: []
|
19
|
-
date: 2023-
|
19
|
+
date: 2023-09-27 00:00:00.000000000 Z
|
20
20
|
dependencies: []
|
21
21
|
description: |-
|
22
22
|
A package (also known as a library) contains a set of functionality
|
@@ -872,7 +872,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
872
872
|
- !ruby/object:Gem::Version
|
873
873
|
version: '0'
|
874
874
|
requirements: []
|
875
|
-
rubygems_version: 3.4.
|
875
|
+
rubygems_version: 3.4.20
|
876
876
|
signing_key:
|
877
877
|
specification_version: 4
|
878
878
|
summary: RubyGems is a package management framework for Ruby. This gem is downloaded
|