rubygems-update 3.2.24 → 3.2.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/Manifest.txt +4 -5
- data/bundler/CHANGELOG.md +22 -0
- data/bundler/lib/bundler.rb +0 -4
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli.rb +6 -0
- data/bundler/lib/bundler/cli/cache.rb +1 -1
- data/bundler/lib/bundler/cli/doctor.rb +1 -1
- data/bundler/lib/bundler/cli/install.rb +4 -17
- data/bundler/lib/bundler/cli/list.rb +7 -1
- data/bundler/lib/bundler/cli/open.rb +1 -2
- data/bundler/lib/bundler/cli/update.rb +1 -1
- data/bundler/lib/bundler/definition.rb +24 -28
- data/bundler/lib/bundler/dsl.rb +14 -1
- data/bundler/lib/bundler/installer/gem_installer.rb +3 -16
- data/bundler/lib/bundler/lockfile_parser.rb +1 -0
- data/bundler/lib/bundler/rubygems_gem_installer.rb +5 -1
- data/bundler/lib/bundler/runtime.rb +15 -6
- data/bundler/lib/bundler/settings.rb +2 -0
- data/bundler/lib/bundler/setup.rb +2 -2
- data/bundler/lib/bundler/shared_helpers.rb +0 -7
- data/bundler/lib/bundler/source/git/git_proxy.rb +1 -2
- data/bundler/lib/bundler/source/rubygems.rb +4 -0
- data/bundler/lib/bundler/source_list.rb +16 -3
- data/bundler/lib/bundler/spec_set.rb +12 -34
- data/bundler/lib/bundler/templates/Executable.bundler +6 -6
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler/worker.rb +17 -2
- data/lib/rubygems.rb +1 -11
- data/lib/rubygems/config_file.rb +4 -4
- data/lib/rubygems/ext/builder.rb +1 -0
- data/lib/rubygems/ext/ext_conf_builder.rb +1 -2
- data/lib/rubygems/ext/rake_builder.rb +1 -2
- data/lib/rubygems/remote_fetcher.rb +0 -1
- data/lib/rubygems/requirement.rb +2 -21
- data/lib/rubygems/s3_uri_signer.rb +0 -1
- data/lib/rubygems/safe_yaml.rb +0 -2
- data/lib/rubygems/specification.rb +0 -6
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/data/null-type.gemspec.rz +0 -0
- data/{lib/rubygems/test_case.rb → test/rubygems/helper.rb} +12 -19
- data/{lib → test}/rubygems/installer_test_case.rb +1 -1
- data/{lib → test}/rubygems/package/tar_test_case.rb +1 -1
- data/test/rubygems/test_bundled_ca.rb +1 -1
- data/test/rubygems/test_config.rb +1 -1
- data/test/rubygems/test_deprecate.rb +1 -1
- data/test/rubygems/test_gem.rb +1 -1
- data/test/rubygems/test_gem_available_set.rb +1 -1
- data/test/rubygems/test_gem_bundler_version_finder.rb +1 -1
- data/test/rubygems/test_gem_command.rb +1 -1
- data/test/rubygems/test_gem_command_manager.rb +1 -1
- data/test/rubygems/test_gem_commands_build_command.rb +1 -1
- data/test/rubygems/test_gem_commands_cert_command.rb +1 -1
- data/test/rubygems/test_gem_commands_check_command.rb +1 -1
- data/test/rubygems/test_gem_commands_cleanup_command.rb +1 -1
- data/test/rubygems/test_gem_commands_contents_command.rb +1 -1
- data/test/rubygems/test_gem_commands_dependency_command.rb +1 -1
- data/test/rubygems/test_gem_commands_environment_command.rb +1 -1
- data/test/rubygems/test_gem_commands_fetch_command.rb +1 -1
- data/test/rubygems/test_gem_commands_generate_index_command.rb +1 -1
- data/test/rubygems/test_gem_commands_help_command.rb +1 -1
- data/test/rubygems/test_gem_commands_info_command.rb +1 -1
- data/test/rubygems/test_gem_commands_install_command.rb +1 -1
- 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_mirror.rb +1 -1
- data/test/rubygems/test_gem_commands_open_command.rb +1 -1
- data/test/rubygems/test_gem_commands_outdated_command.rb +1 -1
- data/test/rubygems/test_gem_commands_owner_command.rb +1 -1
- data/test/rubygems/test_gem_commands_pristine_command.rb +1 -1
- data/test/rubygems/test_gem_commands_push_command.rb +1 -1
- data/test/rubygems/test_gem_commands_query_command.rb +1 -1
- data/test/rubygems/test_gem_commands_search_command.rb +1 -1
- data/test/rubygems/test_gem_commands_server_command.rb +1 -1
- data/test/rubygems/test_gem_commands_setup_command.rb +3 -3
- data/test/rubygems/test_gem_commands_signin_command.rb +1 -1
- data/test/rubygems/test_gem_commands_signout_command.rb +1 -1
- data/test/rubygems/test_gem_commands_sources_command.rb +1 -1
- data/test/rubygems/test_gem_commands_specification_command.rb +1 -1
- data/test/rubygems/test_gem_commands_stale_command.rb +1 -1
- data/test/rubygems/test_gem_commands_uninstall_command.rb +1 -1
- data/test/rubygems/test_gem_commands_unpack_command.rb +1 -1
- data/test/rubygems/test_gem_commands_update_command.rb +1 -1
- data/test/rubygems/test_gem_commands_which_command.rb +1 -1
- data/test/rubygems/test_gem_commands_yank_command.rb +1 -1
- data/test/rubygems/test_gem_config_file.rb +1 -1
- data/test/rubygems/test_gem_dependency.rb +1 -1
- data/test/rubygems/test_gem_dependency_installer.rb +1 -1
- data/test/rubygems/test_gem_dependency_list.rb +1 -1
- data/test/rubygems/test_gem_dependency_resolution_error.rb +1 -1
- data/test/rubygems/test_gem_doctor.rb +1 -1
- data/test/rubygems/test_gem_ext_builder.rb +4 -1
- data/test/rubygems/test_gem_ext_cmake_builder.rb +1 -1
- data/test/rubygems/test_gem_ext_configure_builder.rb +1 -1
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +1 -1
- data/test/rubygems/test_gem_ext_rake_builder.rb +1 -1
- data/test/rubygems/test_gem_gem_runner.rb +1 -1
- data/test/rubygems/test_gem_gemcutter_utilities.rb +1 -1
- data/test/rubygems/test_gem_impossible_dependencies_error.rb +1 -1
- data/test/rubygems/test_gem_indexer.rb +1 -1
- data/test/rubygems/test_gem_install_update_options.rb +1 -1
- data/test/rubygems/test_gem_installer.rb +2 -2
- data/test/rubygems/test_gem_local_remote_options.rb +1 -1
- data/test/rubygems/test_gem_name_tuple.rb +1 -1
- data/test/rubygems/test_gem_package.rb +1 -1
- data/test/rubygems/test_gem_package_old.rb +1 -1
- data/test/rubygems/test_gem_package_tar_header.rb +1 -1
- data/test/rubygems/test_gem_package_tar_reader.rb +1 -1
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +1 -1
- data/test/rubygems/test_gem_package_tar_writer.rb +1 -1
- data/test/rubygems/test_gem_package_task.rb +1 -1
- data/test/rubygems/test_gem_path_support.rb +1 -1
- data/test/rubygems/test_gem_platform.rb +1 -1
- data/test/rubygems/test_gem_rdoc.rb +1 -1
- data/test/rubygems/test_gem_remote_fetcher.rb +1 -1
- data/test/rubygems/test_gem_request.rb +1 -1
- data/test/rubygems/test_gem_request_connection_pools.rb +1 -1
- data/test/rubygems/test_gem_request_set.rb +1 -1
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +1 -1
- data/test/rubygems/test_gem_request_set_lockfile.rb +1 -1
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +1 -1
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +1 -1
- data/test/rubygems/test_gem_requirement.rb +35 -1
- data/test/rubygems/test_gem_resolver.rb +1 -1
- data/test/rubygems/test_gem_resolver_activation_request.rb +1 -1
- data/test/rubygems/test_gem_resolver_api_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_api_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_best_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_composed_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_conflict.rb +1 -1
- data/test/rubygems/test_gem_resolver_dependency_request.rb +1 -1
- data/test/rubygems/test_gem_resolver_git_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_git_specification.rb +2 -1
- data/test/rubygems/test_gem_resolver_index_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_index_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_installed_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_installer_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_local_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_lock_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_lock_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_requirement_list.rb +1 -1
- data/test/rubygems/test_gem_resolver_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_vendor_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_vendor_specification.rb +1 -1
- data/test/rubygems/test_gem_security.rb +1 -1
- data/test/rubygems/test_gem_security_policy.rb +1 -1
- data/test/rubygems/test_gem_security_signer.rb +1 -1
- data/test/rubygems/test_gem_security_trust_dir.rb +1 -1
- data/test/rubygems/test_gem_server.rb +1 -1
- data/test/rubygems/test_gem_silent_ui.rb +1 -1
- data/test/rubygems/test_gem_source.rb +1 -1
- data/test/rubygems/test_gem_source_fetch_problem.rb +1 -1
- data/test/rubygems/test_gem_source_git.rb +1 -1
- data/test/rubygems/test_gem_source_installed.rb +1 -1
- data/test/rubygems/test_gem_source_list.rb +1 -1
- data/test/rubygems/test_gem_source_local.rb +1 -1
- data/test/rubygems/test_gem_source_lock.rb +1 -1
- data/test/rubygems/test_gem_source_specific_file.rb +1 -1
- data/test/rubygems/test_gem_source_subpath_problem.rb +1 -1
- data/test/rubygems/test_gem_source_vendor.rb +1 -1
- data/test/rubygems/test_gem_spec_fetcher.rb +1 -1
- data/test/rubygems/test_gem_specification.rb +1 -165
- data/test/rubygems/test_gem_stream_ui.rb +1 -1
- data/test/rubygems/test_gem_stub_specification.rb +1 -1
- data/test/rubygems/test_gem_text.rb +1 -1
- data/test/rubygems/test_gem_uninstaller.rb +1 -1
- data/test/rubygems/test_gem_unsatisfiable_dependency_error.rb +1 -1
- data/test/rubygems/test_gem_uri_formatter.rb +1 -1
- data/test/rubygems/test_gem_util.rb +1 -1
- data/test/rubygems/test_gem_validator.rb +1 -1
- data/test/rubygems/test_gem_version.rb +1 -1
- data/test/rubygems/test_gem_version_option.rb +1 -1
- data/test/rubygems/test_kernel.rb +1 -1
- 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 +1 -1
- data/{lib/rubygems/test_utilities.rb → test/rubygems/utilities.rb} +0 -2
- metadata +7 -8
- data/lib/rubygems/syck_hack.rb +0 -77
@@ -61,7 +61,10 @@ module Bundler
|
|
61
61
|
|
62
62
|
def build_extensions
|
63
63
|
extension_cache_path = options[:bundler_extension_cache_path]
|
64
|
-
|
64
|
+
unless extension_cache_path && extension_dir = spec.extension_dir
|
65
|
+
require "shellwords" # compensate missing require in rubygems before version 3.2.25
|
66
|
+
return super
|
67
|
+
end
|
65
68
|
|
66
69
|
extension_dir = Pathname.new(extension_dir)
|
67
70
|
build_complete = SharedHelpers.filesystem_access(extension_cache_path.join("gem.build_complete"), :read, &:file?)
|
@@ -71,6 +74,7 @@ module Bundler
|
|
71
74
|
FileUtils.cp_r extension_cache_path, spec.extension_dir
|
72
75
|
end
|
73
76
|
else
|
77
|
+
require "shellwords" # compensate missing require in rubygems before version 3.2.25
|
74
78
|
super
|
75
79
|
if extension_dir.directory? # not made for gems without extensions
|
76
80
|
SharedHelpers.filesystem_access(extension_cache_path.parent, &:mkpath)
|
@@ -22,10 +22,6 @@ module Bundler
|
|
22
22
|
|
23
23
|
# Activate the specs
|
24
24
|
load_paths = specs.map do |spec|
|
25
|
-
unless spec.loaded_from
|
26
|
-
raise GemNotFound, "#{spec.full_name} is missing. Run `bundle install` to get it."
|
27
|
-
end
|
28
|
-
|
29
25
|
check_for_activated_spec!(spec)
|
30
26
|
|
31
27
|
Bundler.rubygems.mark_loaded(spec)
|
@@ -104,7 +100,7 @@ module Bundler
|
|
104
100
|
|
105
101
|
alias_method :gems, :specs
|
106
102
|
|
107
|
-
def cache(custom_path = nil)
|
103
|
+
def cache(custom_path = nil, local = false)
|
108
104
|
cache_path = Bundler.app_cache(custom_path)
|
109
105
|
SharedHelpers.filesystem_access(cache_path) do |p|
|
110
106
|
FileUtils.mkdir_p(p)
|
@@ -112,7 +108,20 @@ module Bundler
|
|
112
108
|
|
113
109
|
Bundler.ui.info "Updating files in #{Bundler.settings.app_cache_path}"
|
114
110
|
|
115
|
-
specs_to_cache = Bundler.settings[:cache_all_platforms]
|
111
|
+
specs_to_cache = if Bundler.settings[:cache_all_platforms]
|
112
|
+
@definition.resolve.materialized_for_all_platforms
|
113
|
+
else
|
114
|
+
begin
|
115
|
+
specs
|
116
|
+
rescue GemNotFound
|
117
|
+
if local
|
118
|
+
Bundler.ui.warn "Some gems seem to be missing from your #{Bundler.settings.app_cache_path} directory."
|
119
|
+
end
|
120
|
+
|
121
|
+
raise
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
116
125
|
specs_to_cache.each do |spec|
|
117
126
|
next if spec.name == "bundler"
|
118
127
|
next if spec.source.is_a?(Source::Gemspec)
|
@@ -428,6 +428,8 @@ module Bundler
|
|
428
428
|
def global_config_file
|
429
429
|
if ENV["BUNDLE_CONFIG"] && !ENV["BUNDLE_CONFIG"].empty?
|
430
430
|
Pathname.new(ENV["BUNDLE_CONFIG"])
|
431
|
+
elsif ENV["BUNDLE_USER_CONFIG"] && !ENV["BUNDLE_USER_CONFIG"].empty?
|
432
|
+
Pathname.new(ENV["BUNDLE_USER_CONFIG"])
|
431
433
|
elsif Bundler.rubygems.user_home && !Bundler.rubygems.user_home.empty?
|
432
434
|
Pathname.new(Bundler.rubygems.user_home).join(".bundle/config")
|
433
435
|
end
|
@@ -9,10 +9,10 @@ if Bundler::SharedHelpers.in_bundle?
|
|
9
9
|
begin
|
10
10
|
Bundler.ui.silence { Bundler.setup }
|
11
11
|
rescue Bundler::BundlerError => e
|
12
|
-
Bundler.ui.
|
12
|
+
Bundler.ui.error e.message
|
13
13
|
Bundler.ui.warn e.backtrace.join("\n") if ENV["DEBUG"]
|
14
14
|
if e.is_a?(Bundler::GemNotFound)
|
15
|
-
Bundler.ui.warn "
|
15
|
+
Bundler.ui.warn "Run `bundle install` to install missing gems."
|
16
16
|
end
|
17
17
|
exit e.status_code
|
18
18
|
end
|
@@ -152,13 +152,6 @@ module Bundler
|
|
152
152
|
Bundler.ui.warn message
|
153
153
|
end
|
154
154
|
|
155
|
-
def trap(signal, override = false, &block)
|
156
|
-
prior = Signal.trap(signal) do
|
157
|
-
block.call
|
158
|
-
prior.call unless override
|
159
|
-
end
|
160
|
-
end
|
161
|
-
|
162
155
|
def ensure_same_dependencies(spec, old_deps, new_deps)
|
163
156
|
new_deps = new_deps.reject {|d| d.type == :development }
|
164
157
|
old_deps = old_deps.reject {|d| d.type == :development }
|
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "shellwords"
|
4
|
-
|
5
3
|
module Bundler
|
6
4
|
class Source
|
7
5
|
class Git
|
@@ -224,6 +222,7 @@ module Bundler
|
|
224
222
|
end
|
225
223
|
|
226
224
|
def check_allowed(command)
|
225
|
+
require "shellwords"
|
227
226
|
command_with_no_credentials = URICredentialsFilter.credential_filtered_string("git #{command.shelljoin}", uri)
|
228
227
|
raise GitNotAllowedError.new(command_with_no_credentials) unless allow?
|
229
228
|
command_with_no_credentials
|
@@ -37,6 +37,10 @@ module Bundler
|
|
37
37
|
global_rubygems_source.multiple_remotes?
|
38
38
|
end
|
39
39
|
|
40
|
+
def implicit_global_source?
|
41
|
+
global_rubygems_source.no_remotes?
|
42
|
+
end
|
43
|
+
|
40
44
|
def add_path_source(options = {})
|
41
45
|
if options["gemspec"]
|
42
46
|
add_source_to_list Source::Gemspec.new(options), path_sources
|
@@ -117,7 +121,8 @@ module Bundler
|
|
117
121
|
def replace_sources!(replacement_sources)
|
118
122
|
return false if replacement_sources.empty?
|
119
123
|
|
120
|
-
@path_sources, @git_sources, @plugin_sources = map_sources(replacement_sources)
|
124
|
+
@rubygems_sources, @path_sources, @git_sources, @plugin_sources = map_sources(replacement_sources)
|
125
|
+
@global_rubygems_source = global_replacement_source(replacement_sources)
|
121
126
|
|
122
127
|
different_sources?(lock_sources, replacement_sources)
|
123
128
|
end
|
@@ -152,13 +157,21 @@ module Bundler
|
|
152
157
|
end
|
153
158
|
|
154
159
|
def map_sources(replacement_sources)
|
155
|
-
[path_sources, git_sources, plugin_sources].map do |sources|
|
160
|
+
[@rubygems_sources, @path_sources, @git_sources, @plugin_sources].map do |sources|
|
156
161
|
sources.map do |source|
|
157
162
|
replacement_sources.find {|s| s == source } || source
|
158
163
|
end
|
159
164
|
end
|
160
165
|
end
|
161
166
|
|
167
|
+
def global_replacement_source(replacement_sources)
|
168
|
+
replacement_source = replacement_sources.find {|s| s == global_rubygems_source }
|
169
|
+
return global_rubygems_source unless replacement_source
|
170
|
+
|
171
|
+
replacement_source.local!
|
172
|
+
replacement_source
|
173
|
+
end
|
174
|
+
|
162
175
|
def different_sources?(lock_sources, replacement_sources)
|
163
176
|
!equal_sources?(lock_sources, replacement_sources) && !equivalent_sources?(lock_sources, replacement_sources)
|
164
177
|
end
|
@@ -202,7 +215,7 @@ module Bundler
|
|
202
215
|
end
|
203
216
|
|
204
217
|
def equal_source?(source, other_source)
|
205
|
-
return source.include?(other_source) if source.is_a?(Source::Rubygems) && other_source.is_a?(Source::Rubygems)
|
218
|
+
return source.include?(other_source) if source.is_a?(Source::Rubygems) && other_source.is_a?(Source::Rubygems)
|
206
219
|
|
207
220
|
source == other_source
|
208
221
|
end
|
@@ -11,7 +11,7 @@ module Bundler
|
|
11
11
|
@specs = specs
|
12
12
|
end
|
13
13
|
|
14
|
-
def for(dependencies, check = false, match_current_platform = false
|
14
|
+
def for(dependencies, check = false, match_current_platform = false)
|
15
15
|
handled = []
|
16
16
|
deps = dependencies.dup
|
17
17
|
specs = []
|
@@ -33,11 +33,6 @@ module Bundler
|
|
33
33
|
end
|
34
34
|
elsif check
|
35
35
|
return false
|
36
|
-
elsif raise_on_missing
|
37
|
-
others = lookup[dep.name] if match_current_platform
|
38
|
-
message = "Unable to find a spec satisfying #{dep} in the set. Perhaps the lockfile is corrupted?"
|
39
|
-
message += " Found #{others.join(", ")} that did not match the current platform." if others && !others.empty?
|
40
|
-
raise GemNotFound, message
|
41
36
|
end
|
42
37
|
end
|
43
38
|
|
@@ -71,52 +66,35 @@ module Bundler
|
|
71
66
|
lookup.dup
|
72
67
|
end
|
73
68
|
|
74
|
-
def materialize(deps
|
75
|
-
materialized = self.for(deps, false, true
|
76
|
-
|
77
|
-
materialized.group_by(&:source).each do |source, specs|
|
78
|
-
next unless specs.any?{|s| s.is_a?(LazySpecification) }
|
79
|
-
|
80
|
-
source.local!
|
81
|
-
names = -> { specs.map(&:name).uniq }
|
82
|
-
source.double_check_for(names)
|
83
|
-
end
|
69
|
+
def materialize(deps)
|
70
|
+
materialized = self.for(deps, false, true)
|
84
71
|
|
85
72
|
materialized.map! do |s|
|
86
73
|
next s unless s.is_a?(LazySpecification)
|
87
|
-
|
88
|
-
|
89
|
-
unless missing_specs
|
90
|
-
raise GemNotFound, "Could not find #{s.full_name} in any of the sources"
|
91
|
-
end
|
92
|
-
missing_specs << s
|
93
|
-
end
|
94
|
-
spec
|
74
|
+
s.source.local!
|
75
|
+
s.__materialize__ || s
|
95
76
|
end
|
96
|
-
SpecSet.new(
|
77
|
+
SpecSet.new(materialized)
|
97
78
|
end
|
98
79
|
|
99
80
|
# Materialize for all the specs in the spec set, regardless of what platform they're for
|
100
81
|
# This is in contrast to how for does platform filtering (and specifically different from how `materialize` calls `for` only for the current platform)
|
101
82
|
# @return [Array<Gem::Specification>]
|
102
83
|
def materialized_for_all_platforms
|
103
|
-
@specs.group_by(&:source).each do |source, specs|
|
104
|
-
next unless specs.any?{|s| s.is_a?(LazySpecification) }
|
105
|
-
|
106
|
-
source.local!
|
107
|
-
source.remote!
|
108
|
-
names = -> { specs.map(&:name).uniq }
|
109
|
-
source.double_check_for(names)
|
110
|
-
end
|
111
|
-
|
112
84
|
@specs.map do |s|
|
113
85
|
next s unless s.is_a?(LazySpecification)
|
86
|
+
s.source.local!
|
87
|
+
s.source.remote!
|
114
88
|
spec = s.__materialize__
|
115
89
|
raise GemNotFound, "Could not find #{s.full_name} in any of the sources" unless spec
|
116
90
|
spec
|
117
91
|
end
|
118
92
|
end
|
119
93
|
|
94
|
+
def missing_specs
|
95
|
+
@specs.select {|s| s.is_a?(LazySpecification) }
|
96
|
+
end
|
97
|
+
|
120
98
|
def merge(set)
|
121
99
|
arr = sorted.dup
|
122
100
|
set.each do |set_spec|
|
@@ -60,16 +60,16 @@ m = Module.new do
|
|
60
60
|
Regexp.last_match(1)
|
61
61
|
end
|
62
62
|
|
63
|
-
def
|
64
|
-
@
|
63
|
+
def bundler_requirement
|
64
|
+
@bundler_requirement ||=
|
65
65
|
env_var_version || cli_arg_version ||
|
66
|
-
lockfile_version
|
66
|
+
bundler_requirement_for(lockfile_version)
|
67
67
|
end
|
68
68
|
|
69
|
-
def
|
70
|
-
return "#{Gem::Requirement.default}.a" unless
|
69
|
+
def bundler_requirement_for(version)
|
70
|
+
return "#{Gem::Requirement.default}.a" unless version
|
71
71
|
|
72
|
-
bundler_gem_version = Gem::Version.new(
|
72
|
+
bundler_gem_version = Gem::Version.new(version)
|
73
73
|
|
74
74
|
requirement = bundler_gem_version.approximate_recommendation
|
75
75
|
|
@@ -26,7 +26,7 @@ module Bundler
|
|
26
26
|
@func = func
|
27
27
|
@size = size
|
28
28
|
@threads = nil
|
29
|
-
|
29
|
+
@previous_interrupt_handler = nil
|
30
30
|
end
|
31
31
|
|
32
32
|
# Enqueue a request to be executed in the worker pool
|
@@ -68,13 +68,16 @@ module Bundler
|
|
68
68
|
# so as worker threads after retrieving it, shut themselves down
|
69
69
|
def stop_threads
|
70
70
|
return unless @threads
|
71
|
+
|
71
72
|
@threads.each { @request_queue.enq POISON }
|
72
73
|
@threads.each(&:join)
|
74
|
+
|
75
|
+
remove_interrupt_handler
|
76
|
+
|
73
77
|
@threads = nil
|
74
78
|
end
|
75
79
|
|
76
80
|
def abort_threads
|
77
|
-
return unless @threads
|
78
81
|
Bundler.ui.debug("\n#{caller.join("\n")}")
|
79
82
|
@threads.each(&:exit)
|
80
83
|
exit 1
|
@@ -94,11 +97,23 @@ module Bundler
|
|
94
97
|
end
|
95
98
|
end.compact
|
96
99
|
|
100
|
+
add_interrupt_handler unless @threads.empty?
|
101
|
+
|
97
102
|
return if creation_errors.empty?
|
98
103
|
|
99
104
|
message = "Failed to create threads for the #{name} worker: #{creation_errors.map(&:to_s).uniq.join(", ")}"
|
100
105
|
raise ThreadCreationError, message if @threads.empty?
|
101
106
|
Bundler.ui.info message
|
102
107
|
end
|
108
|
+
|
109
|
+
def add_interrupt_handler
|
110
|
+
@previous_interrupt_handler = trap("INT") { abort_threads }
|
111
|
+
end
|
112
|
+
|
113
|
+
def remove_interrupt_handler
|
114
|
+
return unless @previous_interrupt_handler
|
115
|
+
|
116
|
+
trap "INT", @previous_interrupt_handler
|
117
|
+
end
|
103
118
|
end
|
104
119
|
end
|
data/lib/rubygems.rb
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
require 'rbconfig'
|
9
9
|
|
10
10
|
module Gem
|
11
|
-
VERSION = "3.2.
|
11
|
+
VERSION = "3.2.25".freeze
|
12
12
|
end
|
13
13
|
|
14
14
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -628,12 +628,6 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
628
628
|
rescue ::LoadError
|
629
629
|
# If we can't load psych, that's fine, go on.
|
630
630
|
else
|
631
|
-
# If 'yaml' has already been required, then we have to
|
632
|
-
# be sure to switch it over to the newly loaded psych.
|
633
|
-
if defined?(YAML::ENGINE) && YAML::ENGINE.yamler != "psych"
|
634
|
-
YAML::ENGINE.yamler = "psych"
|
635
|
-
end
|
636
|
-
|
637
631
|
require 'rubygems/psych_additions'
|
638
632
|
require 'rubygems/psych_tree'
|
639
633
|
end
|
@@ -641,10 +635,6 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
641
635
|
require 'yaml'
|
642
636
|
require 'rubygems/safe_yaml'
|
643
637
|
|
644
|
-
# Now that we're sure some kind of yaml library is loaded, pull
|
645
|
-
# in our hack to deal with Syck's DefaultKey ugliness.
|
646
|
-
require 'rubygems/syck_hack'
|
647
|
-
|
648
638
|
@yaml_loaded = true
|
649
639
|
end
|
650
640
|
|
data/lib/rubygems/config_file.rb
CHANGED
@@ -320,7 +320,8 @@ if you believe they were disclosed to a third party.
|
|
320
320
|
config = load_file(credentials_path).merge(host => api_key)
|
321
321
|
|
322
322
|
dirname = File.dirname credentials_path
|
323
|
-
|
323
|
+
require 'fileutils'
|
324
|
+
FileUtils.mkdir_p(dirname)
|
324
325
|
|
325
326
|
Gem.load_yaml
|
326
327
|
|
@@ -457,9 +458,8 @@ if you believe they were disclosed to a third party.
|
|
457
458
|
|
458
459
|
# Writes out this config file, replacing its source.
|
459
460
|
def write
|
460
|
-
|
461
|
-
|
462
|
-
end
|
461
|
+
require 'fileutils'
|
462
|
+
FileUtils.mkdir_p File.dirname(config_file_name)
|
463
463
|
|
464
464
|
File.open config_file_name, 'w' do |io|
|
465
465
|
io.write to_yaml
|
data/lib/rubygems/ext/builder.rb
CHANGED
@@ -5,8 +5,6 @@
|
|
5
5
|
# See LICENSE.txt for permissions.
|
6
6
|
#++
|
7
7
|
|
8
|
-
require 'shellwords'
|
9
|
-
|
10
8
|
class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
|
11
9
|
def self.build(extension, dest_path, results, args=[], lib_dir=nil, extension_dir=Dir.pwd)
|
12
10
|
require 'fileutils'
|
@@ -40,6 +38,7 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
|
|
40
38
|
begin
|
41
39
|
# workaround for https://github.com/oracle/truffleruby/issues/2115
|
42
40
|
siteconf_path = RUBY_ENGINE == "truffleruby" ? siteconf.path.dup : siteconf.path
|
41
|
+
require "shellwords"
|
43
42
|
cmd = Gem.ruby.shellsplit << "-I" << File.expand_path("../../..", __FILE__) <<
|
44
43
|
"-r" << get_relative_path(siteconf_path, extension_dir) << File.basename(extension)
|
45
44
|
cmd.push(*args)
|
@@ -5,8 +5,6 @@
|
|
5
5
|
# See LICENSE.txt for permissions.
|
6
6
|
#++
|
7
7
|
|
8
|
-
require "shellwords"
|
9
|
-
|
10
8
|
class Gem::Ext::RakeBuilder < Gem::Ext::Builder
|
11
9
|
def self.build(extension, dest_path, results, args=[], lib_dir=nil, extension_dir=Dir.pwd)
|
12
10
|
if File.basename(extension) =~ /mkrf_conf/i
|
@@ -16,6 +14,7 @@ class Gem::Ext::RakeBuilder < Gem::Ext::Builder
|
|
16
14
|
rake = ENV['rake']
|
17
15
|
|
18
16
|
if rake
|
17
|
+
require "shellwords"
|
19
18
|
rake = rake.shellsplit
|
20
19
|
else
|
21
20
|
begin
|