rubygems-update 3.2.17 → 3.2.21
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +39 -0
- data/Manifest.txt +3 -0
- data/Rakefile +6 -6
- data/bundler/CHANGELOG.md +54 -0
- data/bundler/bundler.gemspec +2 -3
- data/bundler/lib/bundler.rb +2 -1
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli.rb +13 -33
- data/bundler/lib/bundler/cli/check.rb +4 -2
- data/bundler/lib/bundler/cli/install.rb +6 -7
- data/bundler/lib/bundler/cli/outdated.rb +9 -10
- data/bundler/lib/bundler/definition.rb +29 -82
- data/bundler/lib/bundler/feature_flag.rb +0 -2
- data/bundler/lib/bundler/fetcher/compact_index.rb +1 -1
- data/bundler/lib/bundler/fetcher/index.rb +0 -1
- data/bundler/lib/bundler/friendly_errors.rb +2 -4
- data/bundler/lib/bundler/index.rb +1 -2
- data/bundler/lib/bundler/installer.rb +1 -8
- data/bundler/lib/bundler/man/bundle-add.1 +1 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
- data/bundler/lib/bundler/man/bundle-check.1 +1 -1
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +1 -7
- data/bundler/lib/bundler/man/bundle-config.1.ronn +0 -8
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +1 -1
- data/bundler/lib/bundler/man/bundle-init.1 +1 -1
- data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
- data/bundler/lib/bundler/man/bundle-install.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
- data/bundler/lib/bundler/man/bundle-open.1 +1 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +1 -1
- data/bundler/lib/bundler/man/bundle-update.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
- data/bundler/lib/bundler/man/bundle.1 +1 -1
- data/bundler/lib/bundler/man/gemfile.5 +1 -1
- data/bundler/lib/bundler/plugin/api/source.rb +14 -0
- data/bundler/lib/bundler/resolver.rb +15 -96
- data/bundler/lib/bundler/resolver/spec_group.rb +0 -24
- data/bundler/lib/bundler/rubygems_ext.rb +2 -2
- data/bundler/lib/bundler/rubygems_integration.rb +4 -3
- data/bundler/lib/bundler/settings.rb +21 -3
- data/bundler/lib/bundler/source.rb +11 -0
- data/bundler/lib/bundler/source/rubygems.rb +24 -11
- data/bundler/lib/bundler/source/rubygems_aggregate.rb +64 -0
- data/bundler/lib/bundler/source_list.rb +35 -10
- data/bundler/lib/bundler/source_map.rb +58 -0
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +2 -2
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems.rb +1 -1
- data/lib/rubygems/command.rb +2 -0
- data/lib/rubygems/commands/build_command.rb +1 -1
- data/lib/rubygems/config_file.rb +1 -1
- data/lib/rubygems/ext/ext_conf_builder.rb +4 -4
- data/lib/rubygems/installer.rb +4 -0
- data/lib/rubygems/request.rb +1 -1
- data/lib/rubygems/specification.rb +0 -2
- data/lib/rubygems/specification_policy.rb +5 -4
- data/lib/rubygems/test_case.rb +106 -18
- data/lib/rubygems/util/licenses.rb +107 -2
- data/rubygems-update.gemspec +1 -1
- data/setup.rb +1 -2
- data/test/rubygems/packages/ill-formatted-platform-1.0.0.10.gem +0 -0
- data/test/rubygems/test_bundled_ca.rb +2 -2
- data/test/rubygems/test_deprecate.rb +3 -3
- data/test/rubygems/test_gem.rb +33 -31
- data/test/rubygems/test_gem_bundler_version_finder.rb +3 -5
- data/test/rubygems/test_gem_command.rb +13 -1
- data/test/rubygems/test_gem_command_manager.rb +5 -5
- data/test/rubygems/test_gem_commands_build_command.rb +10 -10
- data/test/rubygems/test_gem_commands_cert_command.rb +36 -36
- data/test/rubygems/test_gem_commands_check_command.rb +5 -5
- data/test/rubygems/test_gem_commands_cleanup_command.rb +24 -24
- data/test/rubygems/test_gem_commands_contents_command.rb +3 -3
- data/test/rubygems/test_gem_commands_dependency_command.rb +2 -2
- data/test/rubygems/test_gem_commands_environment_command.rb +1 -1
- data/test/rubygems/test_gem_commands_fetch_command.rb +9 -9
- data/test/rubygems/test_gem_commands_help_command.rb +8 -1
- data/test/rubygems/test_gem_commands_install_command.rb +60 -60
- data/test/rubygems/test_gem_commands_list_command.rb +1 -1
- data/test/rubygems/test_gem_commands_lock_command.rb +1 -1
- data/test/rubygems/test_gem_commands_open_command.rb +8 -9
- data/test/rubygems/test_gem_commands_owner_command.rb +3 -3
- data/test/rubygems/test_gem_commands_pristine_command.rb +14 -14
- data/test/rubygems/test_gem_commands_push_command.rb +6 -11
- data/test/rubygems/test_gem_commands_query_command.rb +7 -7
- data/test/rubygems/test_gem_commands_server_command.rb +2 -2
- data/test/rubygems/test_gem_commands_setup_command.rb +21 -21
- data/test/rubygems/test_gem_commands_signin_command.rb +13 -6
- data/test/rubygems/test_gem_commands_sources_command.rb +5 -5
- data/test/rubygems/test_gem_commands_specification_command.rb +6 -6
- data/test/rubygems/test_gem_commands_uninstall_command.rb +4 -4
- data/test/rubygems/test_gem_commands_unpack_command.rb +2 -2
- data/test/rubygems/test_gem_commands_update_command.rb +10 -10
- data/test/rubygems/test_gem_commands_which_command.rb +3 -3
- data/test/rubygems/test_gem_commands_yank_command.rb +1 -1
- data/test/rubygems/test_gem_config_file.rb +9 -9
- data/test/rubygems/test_gem_dependency.rb +12 -6
- data/test/rubygems/test_gem_dependency_installer.rb +4 -4
- data/test/rubygems/test_gem_doctor.rb +30 -30
- data/test/rubygems/test_gem_ext_builder.rb +20 -20
- data/test/rubygems/test_gem_ext_cmake_builder.rb +4 -4
- data/test/rubygems/test_gem_ext_configure_builder.rb +4 -4
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +14 -13
- data/test/rubygems/test_gem_ext_rake_builder.rb +1 -1
- data/test/rubygems/test_gem_gemcutter_utilities.rb +8 -14
- data/test/rubygems/test_gem_install_update_options.rb +9 -9
- data/test/rubygems/test_gem_installer.rb +162 -140
- data/test/rubygems/test_gem_local_remote_options.rb +1 -1
- data/test/rubygems/test_gem_package.rb +48 -48
- data/test/rubygems/test_gem_package_old.rb +9 -9
- data/test/rubygems/test_gem_package_tar_header.rb +5 -5
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +8 -8
- data/test/rubygems/test_gem_package_tar_writer.rb +18 -20
- data/test/rubygems/test_gem_package_task.rb +2 -2
- data/test/rubygems/test_gem_path_support.rb +1 -1
- data/test/rubygems/test_gem_rdoc.rb +9 -9
- data/test/rubygems/test_gem_remote_fetcher.rb +17 -18
- data/test/rubygems/test_gem_request.rb +2 -2
- data/test/rubygems/test_gem_request_connection_pools.rb +1 -1
- data/test/rubygems/test_gem_request_set.rb +15 -14
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +16 -16
- data/test/rubygems/test_gem_request_set_lockfile.rb +3 -3
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +3 -3
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +4 -4
- data/test/rubygems/test_gem_requirement.rb +13 -13
- data/test/rubygems/test_gem_resolver.rb +11 -11
- data/test/rubygems/test_gem_resolver_best_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_git_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_git_specification.rb +2 -2
- data/test/rubygems/test_gem_resolver_index_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_installer_set.rb +4 -4
- data/test/rubygems/test_gem_resolver_local_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_vendor_set.rb +2 -2
- data/test/rubygems/test_gem_security.rb +5 -5
- data/test/rubygems/test_gem_security_policy.rb +27 -27
- data/test/rubygems/test_gem_security_signer.rb +7 -7
- data/test/rubygems/test_gem_security_trust_dir.rb +4 -4
- data/test/rubygems/test_gem_server.rb +2 -2
- data/test/rubygems/test_gem_silent_ui.rb +9 -9
- data/test/rubygems/test_gem_source.rb +2 -2
- data/test/rubygems/test_gem_source_fetch_problem.rb +1 -1
- data/test/rubygems/test_gem_source_git.rb +11 -11
- data/test/rubygems/test_gem_source_specific_file.rb +1 -1
- data/test/rubygems/test_gem_spec_fetcher.rb +1 -1
- data/test/rubygems/test_gem_specification.rb +86 -106
- data/test/rubygems/test_gem_stream_ui.rb +1 -1
- data/test/rubygems/test_gem_stub_specification.rb +4 -4
- data/test/rubygems/test_gem_uninstaller.rb +16 -16
- data/test/rubygems/test_gem_util.rb +8 -6
- data/test/rubygems/test_gem_version.rb +4 -13
- data/test/rubygems/test_kernel.rb +6 -4
- data/test/rubygems/test_project_sanity.rb +1 -1
- data/test/rubygems/test_remote_fetch_error.rb +1 -1
- data/test/rubygems/test_require.rb +12 -14
- data/test/test_changelog_generator.rb +1 -2
- metadata +6 -3
@@ -327,7 +327,7 @@ class TestGemRequest < Gem::TestCase
|
|
327
327
|
end
|
328
328
|
|
329
329
|
def test_verify_certificate
|
330
|
-
|
330
|
+
pend if Gem.java_platform?
|
331
331
|
store = OpenSSL::X509::Store.new
|
332
332
|
context = OpenSSL::X509::StoreContext.new store
|
333
333
|
context.error = OpenSSL::X509::V_ERR_OUT_OF_MEM
|
@@ -341,7 +341,7 @@ class TestGemRequest < Gem::TestCase
|
|
341
341
|
end
|
342
342
|
|
343
343
|
def test_verify_certificate_extra_message
|
344
|
-
|
344
|
+
pend if Gem.java_platform?
|
345
345
|
store = OpenSSL::X509::Store.new
|
346
346
|
context = OpenSSL::X509::StoreContext.new store
|
347
347
|
context.error = OpenSSL::X509::V_ERR_INVALID_CA
|
@@ -64,8 +64,8 @@ class TestGemRequestSet < Gem::TestCase
|
|
64
64
|
end
|
65
65
|
|
66
66
|
assert_includes installed, 'a-2'
|
67
|
-
|
68
|
-
|
67
|
+
assert_path_exist File.join @gemhome, 'gems', 'a-2'
|
68
|
+
assert_path_exist 'gem.deps.rb.lock'
|
69
69
|
|
70
70
|
assert rs.remote
|
71
71
|
refute done_installing_ran
|
@@ -87,9 +87,10 @@ Gems to install:
|
|
87
87
|
a-2
|
88
88
|
EXPECTED
|
89
89
|
|
90
|
-
|
90
|
+
actual, _ = capture_output do
|
91
91
|
rs.install_from_gemdeps :gemdeps => io.path, :explain => true
|
92
92
|
end
|
93
|
+
assert_equal(expected, actual)
|
93
94
|
end
|
94
95
|
end
|
95
96
|
|
@@ -99,7 +100,7 @@ Gems to install:
|
|
99
100
|
end
|
100
101
|
|
101
102
|
util_clear_gems
|
102
|
-
|
103
|
+
assert_path_not_exist File.join Gem.dir, 'gems', 'a-2'
|
103
104
|
|
104
105
|
rs = Gem::RequestSet.new
|
105
106
|
installed = []
|
@@ -118,7 +119,7 @@ Gems to install:
|
|
118
119
|
end
|
119
120
|
|
120
121
|
assert_includes installed, 'a-2'
|
121
|
-
|
122
|
+
assert_path_not_exist File.join Gem.dir, 'gems', 'a-2'
|
122
123
|
end
|
123
124
|
|
124
125
|
def test_install_from_gemdeps_local
|
@@ -132,7 +133,7 @@ Gems to install:
|
|
132
133
|
io.puts 'gem "a"'
|
133
134
|
io.flush
|
134
135
|
|
135
|
-
|
136
|
+
assert_raise Gem::UnsatisfiableDependencyError do
|
136
137
|
rs.install_from_gemdeps :gemdeps => io.path, :domain => :local
|
137
138
|
end
|
138
139
|
end
|
@@ -178,8 +179,8 @@ DEPENDENCIES
|
|
178
179
|
assert_includes installed, 'b-1'
|
179
180
|
assert_includes installed, 'a-1'
|
180
181
|
|
181
|
-
|
182
|
-
|
182
|
+
assert_path_exist File.join @gemhome, 'specifications', 'a-1.gemspec'
|
183
|
+
assert_path_exist File.join @gemhome, 'specifications', 'b-1.gemspec'
|
183
184
|
end
|
184
185
|
|
185
186
|
def test_install_from_gemdeps_complex_dependencies
|
@@ -231,7 +232,7 @@ end
|
|
231
232
|
|
232
233
|
assert_includes installed, 'z-1.0.3'
|
233
234
|
|
234
|
-
|
235
|
+
assert_path_exist File.join @gemhome, 'specifications', 'z-1.0.3.gemspec'
|
235
236
|
end
|
236
237
|
|
237
238
|
def test_install_from_gemdeps_version_mismatch
|
@@ -443,7 +444,7 @@ ruby "0"
|
|
443
444
|
|
444
445
|
set = StaticSet.new [a1, a2]
|
445
446
|
|
446
|
-
|
447
|
+
assert_raise Gem::UnsatisfiableDependencyError do
|
447
448
|
rs.resolve set
|
448
449
|
end
|
449
450
|
end
|
@@ -524,8 +525,8 @@ ruby "0"
|
|
524
525
|
assert_equal %w[b-1 a-1],
|
525
526
|
installers.map {|installer| installer.spec.full_name }
|
526
527
|
|
527
|
-
|
528
|
-
|
528
|
+
assert_path_exist File.join @gemhome, 'specifications', 'a-1.gemspec'
|
529
|
+
assert_path_exist File.join @gemhome, 'specifications', 'b-1.gemspec'
|
529
530
|
|
530
531
|
assert_equal %w[b-1 a-1], installed.map {|s| s.full_name }
|
531
532
|
|
@@ -547,8 +548,8 @@ ruby "0"
|
|
547
548
|
assert_equal @tempdir, ENV['GEM_HOME']
|
548
549
|
end
|
549
550
|
|
550
|
-
|
551
|
-
|
551
|
+
assert_path_exist File.join @tempdir, 'specifications', 'a-1.gemspec'
|
552
|
+
assert_path_exist File.join @tempdir, 'specifications', 'b-1.gemspec'
|
552
553
|
|
553
554
|
assert_equal %w[b-1 a-1], installed.map {|s| s.full_name }
|
554
555
|
end
|
@@ -81,7 +81,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
81
81
|
def test_gem_duplicate
|
82
82
|
@gda.gem 'a'
|
83
83
|
|
84
|
-
_, err =
|
84
|
+
_, err = capture_output do
|
85
85
|
@gda.gem 'a'
|
86
86
|
end
|
87
87
|
|
@@ -129,7 +129,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
129
129
|
end
|
130
130
|
|
131
131
|
def test_gem_git_branch
|
132
|
-
_, err =
|
132
|
+
_, err = capture_output do
|
133
133
|
@gda.gem 'a', :git => 'git/a', :branch => 'other', :tag => 'v1'
|
134
134
|
end
|
135
135
|
expected = "Gem dependencies file gem.deps.rb includes git reference for both ref/branch and tag but only ref/branch is used."
|
@@ -150,7 +150,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
150
150
|
end
|
151
151
|
|
152
152
|
def test_gem_git_ref
|
153
|
-
_, err =
|
153
|
+
_, err = capture_output do
|
154
154
|
@gda.gem 'a', :git => 'git/a', :ref => 'abcd123', :branch => 'other'
|
155
155
|
end
|
156
156
|
expected = "Gem dependencies file gem.deps.rb includes git reference for both ref and branch but only ref is used."
|
@@ -388,7 +388,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
388
388
|
end
|
389
389
|
|
390
390
|
def test_gem_platforms_unknown
|
391
|
-
e =
|
391
|
+
e = assert_raise ArgumentError do
|
392
392
|
@gda.gem 'a', :platforms => :unknown
|
393
393
|
end
|
394
394
|
|
@@ -455,7 +455,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
455
455
|
gda = @GDA.new @set, nil
|
456
456
|
gda.gem name
|
457
457
|
|
458
|
-
e =
|
458
|
+
e = assert_raise ArgumentError do
|
459
459
|
gda.gem name, :path => directory
|
460
460
|
end
|
461
461
|
|
@@ -466,7 +466,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
466
466
|
gda.instance_variable_set :@vendor_set, @vendor_set
|
467
467
|
gda.gem name, :path => directory
|
468
468
|
|
469
|
-
e =
|
469
|
+
e = assert_raise ArgumentError do
|
470
470
|
gda.gem name
|
471
471
|
end
|
472
472
|
|
@@ -517,8 +517,8 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
517
517
|
def test_gemspec_bad
|
518
518
|
FileUtils.touch 'a.gemspec'
|
519
519
|
|
520
|
-
e =
|
521
|
-
|
520
|
+
e = assert_raise ArgumentError do
|
521
|
+
capture_output do
|
522
522
|
@gda.gemspec
|
523
523
|
end
|
524
524
|
end
|
@@ -550,7 +550,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
550
550
|
s.add_dependency 'c', 3
|
551
551
|
end
|
552
552
|
|
553
|
-
e =
|
553
|
+
e = assert_raise ArgumentError do
|
554
554
|
@gda.gemspec
|
555
555
|
end
|
556
556
|
|
@@ -582,7 +582,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|
582
582
|
end
|
583
583
|
|
584
584
|
def test_gemspec_none
|
585
|
-
e =
|
585
|
+
e = assert_raise ArgumentError do
|
586
586
|
@gda.gemspec
|
587
587
|
end
|
588
588
|
|
@@ -658,14 +658,14 @@ end
|
|
658
658
|
gda.send :pin_gem_source, 'a'
|
659
659
|
gda.send :pin_gem_source, 'a'
|
660
660
|
|
661
|
-
e =
|
661
|
+
e = assert_raise ArgumentError do
|
662
662
|
gda.send :pin_gem_source, 'a', :path, 'vendor/a'
|
663
663
|
end
|
664
664
|
|
665
665
|
assert_equal "duplicate source path: vendor/a for gem a",
|
666
666
|
e.message
|
667
667
|
|
668
|
-
e =
|
668
|
+
e = assert_raise ArgumentError do
|
669
669
|
gda.send :pin_gem_source, 'a', :git, 'git://example/repo.git'
|
670
670
|
end
|
671
671
|
|
@@ -770,7 +770,7 @@ end
|
|
770
770
|
|
771
771
|
def test_ruby_engine_mismatch_engine
|
772
772
|
with_engine_version 'ruby', '2.0.0' do
|
773
|
-
e =
|
773
|
+
e = assert_raise Gem::RubyVersionMismatch do
|
774
774
|
@gda.ruby RUBY_VERSION, :engine => 'jruby', :engine_version => '1.7.4'
|
775
775
|
end
|
776
776
|
|
@@ -781,7 +781,7 @@ end
|
|
781
781
|
|
782
782
|
def test_ruby_engine_mismatch_version
|
783
783
|
with_engine_version 'jruby', '1.7.6' do
|
784
|
-
e =
|
784
|
+
e = assert_raise Gem::RubyVersionMismatch do
|
785
785
|
@gda.ruby RUBY_VERSION, :engine => 'jruby', :engine_version => '1.7.4'
|
786
786
|
end
|
787
787
|
|
@@ -791,7 +791,7 @@ end
|
|
791
791
|
end
|
792
792
|
|
793
793
|
def test_ruby_engine_no_engine_version
|
794
|
-
e =
|
794
|
+
e = assert_raise ArgumentError do
|
795
795
|
@gda.ruby RUBY_VERSION, :engine => 'jruby'
|
796
796
|
end
|
797
797
|
|
@@ -800,7 +800,7 @@ end
|
|
800
800
|
end
|
801
801
|
|
802
802
|
def test_ruby_mismatch
|
803
|
-
e =
|
803
|
+
e = assert_raise Gem::RubyVersionMismatch do
|
804
804
|
@gda.ruby '1.8.0'
|
805
805
|
end
|
806
806
|
|
@@ -443,7 +443,7 @@ DEPENDENCIES
|
|
443
443
|
|
444
444
|
gem_deps_lock_file = "#{@gem_deps_file}.lock"
|
445
445
|
|
446
|
-
|
446
|
+
assert_path_exist gem_deps_lock_file
|
447
447
|
|
448
448
|
refute_empty File.read gem_deps_lock_file
|
449
449
|
end
|
@@ -457,11 +457,11 @@ DEPENDENCIES
|
|
457
457
|
io.write 'hello'
|
458
458
|
end
|
459
459
|
|
460
|
-
|
460
|
+
assert_raise Gem::UnsatisfiableDependencyError do
|
461
461
|
lockfile.write
|
462
462
|
end
|
463
463
|
|
464
|
-
|
464
|
+
assert_path_exist gem_deps_lock_file
|
465
465
|
|
466
466
|
assert_equal 'hello', File.read(gem_deps_lock_file)
|
467
467
|
end
|
@@ -25,7 +25,7 @@ class TestGemRequestSetLockfileParser < Gem::TestCase
|
|
25
25
|
tokenizer = Gem::RequestSet::Lockfile::Tokenizer.new "foo", filename, 1, 0
|
26
26
|
parser = tokenizer.make_parser nil, nil
|
27
27
|
|
28
|
-
e =
|
28
|
+
e = assert_raise Gem::RequestSet::Lockfile::ParseError do
|
29
29
|
parser.get :section
|
30
30
|
end
|
31
31
|
|
@@ -52,7 +52,7 @@ class TestGemRequestSetLockfileParser < Gem::TestCase
|
|
52
52
|
tokenizer = Gem::RequestSet::Lockfile::Tokenizer.new "x", filename, 1
|
53
53
|
parser = tokenizer.make_parser nil, nil
|
54
54
|
|
55
|
-
e =
|
55
|
+
e = assert_raise Gem::RequestSet::Lockfile::ParseError do
|
56
56
|
parser.get :text, 'y'
|
57
57
|
end
|
58
58
|
|
@@ -518,7 +518,7 @@ DEPENDENCIES
|
|
518
518
|
end
|
519
519
|
|
520
520
|
def test_parse_missing
|
521
|
-
|
521
|
+
assert_raise(Errno::ENOENT) do
|
522
522
|
parse_lockfile @set, []
|
523
523
|
end
|
524
524
|
|
@@ -193,7 +193,7 @@ DEPENDENCIES
|
|
193
193
|
def test_tokenize_conflict_markers
|
194
194
|
write_lockfile '<<<<<<<'
|
195
195
|
|
196
|
-
e =
|
196
|
+
e = assert_raise Gem::RequestSet::Lockfile::ParseError do
|
197
197
|
tokenize_lockfile
|
198
198
|
end
|
199
199
|
|
@@ -202,7 +202,7 @@ DEPENDENCIES
|
|
202
202
|
|
203
203
|
write_lockfile '|||||||'
|
204
204
|
|
205
|
-
e =
|
205
|
+
e = assert_raise Gem::RequestSet::Lockfile::ParseError do
|
206
206
|
tokenize_lockfile
|
207
207
|
end
|
208
208
|
|
@@ -211,7 +211,7 @@ DEPENDENCIES
|
|
211
211
|
|
212
212
|
write_lockfile '======='
|
213
213
|
|
214
|
-
e =
|
214
|
+
e = assert_raise Gem::RequestSet::Lockfile::ParseError do
|
215
215
|
tokenize_lockfile
|
216
216
|
end
|
217
217
|
|
@@ -220,7 +220,7 @@ DEPENDENCIES
|
|
220
220
|
|
221
221
|
write_lockfile '>>>>>>>'
|
222
222
|
|
223
|
-
e =
|
223
|
+
e = assert_raise Gem::RequestSet::Lockfile::ParseError do
|
224
224
|
tokenize_lockfile
|
225
225
|
end
|
226
226
|
|
@@ -97,7 +97,7 @@ class TestGemRequirement < Gem::TestCase
|
|
97
97
|
'= junk',
|
98
98
|
'1..2',
|
99
99
|
].each do |bad|
|
100
|
-
e =
|
100
|
+
e = assert_raise Gem::Requirement::BadRequirementError do
|
101
101
|
Gem::Requirement.parse bad
|
102
102
|
end
|
103
103
|
|
@@ -128,7 +128,7 @@ class TestGemRequirement < Gem::TestCase
|
|
128
128
|
refute_satisfied_by "1.2", r
|
129
129
|
assert_satisfied_by "1.3", r
|
130
130
|
|
131
|
-
|
131
|
+
assert_raise ArgumentError do
|
132
132
|
assert_satisfied_by nil, r
|
133
133
|
end
|
134
134
|
end
|
@@ -140,7 +140,7 @@ class TestGemRequirement < Gem::TestCase
|
|
140
140
|
assert_satisfied_by "1.2", r
|
141
141
|
refute_satisfied_by "1.3", r
|
142
142
|
|
143
|
-
|
143
|
+
assert_raise ArgumentError do
|
144
144
|
assert_satisfied_by nil, r
|
145
145
|
end
|
146
146
|
end
|
@@ -152,7 +152,7 @@ class TestGemRequirement < Gem::TestCase
|
|
152
152
|
assert_satisfied_by "1.2", r
|
153
153
|
refute_satisfied_by "1.3", r
|
154
154
|
|
155
|
-
|
155
|
+
assert_raise ArgumentError do
|
156
156
|
assert_satisfied_by nil, r
|
157
157
|
end
|
158
158
|
end
|
@@ -164,7 +164,7 @@ class TestGemRequirement < Gem::TestCase
|
|
164
164
|
refute_satisfied_by "1.2", r
|
165
165
|
assert_satisfied_by "1.3", r
|
166
166
|
|
167
|
-
|
167
|
+
assert_raise ArgumentError do
|
168
168
|
r.satisfied_by? nil
|
169
169
|
end
|
170
170
|
end
|
@@ -176,7 +176,7 @@ class TestGemRequirement < Gem::TestCase
|
|
176
176
|
assert_satisfied_by "1.2", r
|
177
177
|
assert_satisfied_by "1.3", r
|
178
178
|
|
179
|
-
|
179
|
+
assert_raise ArgumentError do
|
180
180
|
r.satisfied_by? nil
|
181
181
|
end
|
182
182
|
end
|
@@ -188,7 +188,7 @@ class TestGemRequirement < Gem::TestCase
|
|
188
188
|
assert_satisfied_by "1.2", r
|
189
189
|
refute_satisfied_by "1.3", r
|
190
190
|
|
191
|
-
|
191
|
+
assert_raise ArgumentError do
|
192
192
|
r.satisfied_by? nil
|
193
193
|
end
|
194
194
|
end
|
@@ -200,7 +200,7 @@ class TestGemRequirement < Gem::TestCase
|
|
200
200
|
refute_satisfied_by "1.2", r
|
201
201
|
refute_satisfied_by "1.3", r
|
202
202
|
|
203
|
-
|
203
|
+
assert_raise ArgumentError do
|
204
204
|
r.satisfied_by? nil
|
205
205
|
end
|
206
206
|
end
|
@@ -212,7 +212,7 @@ class TestGemRequirement < Gem::TestCase
|
|
212
212
|
assert_satisfied_by "1.2", r
|
213
213
|
refute_satisfied_by "1.3", r
|
214
214
|
|
215
|
-
|
215
|
+
assert_raise ArgumentError do
|
216
216
|
r.satisfied_by? nil
|
217
217
|
end
|
218
218
|
end
|
@@ -224,7 +224,7 @@ class TestGemRequirement < Gem::TestCase
|
|
224
224
|
assert_satisfied_by "1.2", r
|
225
225
|
assert_satisfied_by "1.3", r
|
226
226
|
|
227
|
-
|
227
|
+
assert_raise ArgumentError do
|
228
228
|
r.satisfied_by? nil
|
229
229
|
end
|
230
230
|
end
|
@@ -282,18 +282,18 @@ class TestGemRequirement < Gem::TestCase
|
|
282
282
|
|
283
283
|
def test_illformed_requirements
|
284
284
|
[ ">>> 1.3.5", "> blah" ].each do |rq|
|
285
|
-
|
285
|
+
assert_raise Gem::Requirement::BadRequirementError, "req [#{rq}] should fail" do
|
286
286
|
Gem::Requirement.new rq
|
287
287
|
end
|
288
288
|
end
|
289
289
|
end
|
290
290
|
|
291
291
|
def test_satisfied_by_eh_non_versions
|
292
|
-
|
292
|
+
assert_raise ArgumentError do
|
293
293
|
req(">= 0").satisfied_by? Object.new
|
294
294
|
end
|
295
295
|
|
296
|
-
|
296
|
+
assert_raise ArgumentError do
|
297
297
|
req(">= 0").satisfied_by? Gem::Requirement.default
|
298
298
|
end
|
299
299
|
end
|