rubygems-update 3.7.2 → 4.0.0.beta1
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 +1413 -1323
- data/CODE_OF_CONDUCT.md +7 -129
- data/Manifest.txt +5 -11
- data/README.md +2 -2
- data/bundler/CHANGELOG.md +990 -917
- data/bundler/README.md +4 -4
- data/bundler/bundler.gemspec +3 -3
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/capistrano.rb +1 -19
- data/bundler/lib/bundler/cli/cache.rb +1 -11
- data/bundler/lib/bundler/cli/common.rb +20 -3
- data/bundler/lib/bundler/cli/config.rb +1 -2
- data/bundler/lib/bundler/cli/console.rb +5 -0
- data/bundler/lib/bundler/cli/exec.rb +29 -4
- data/bundler/lib/bundler/cli/gem.rb +19 -33
- data/bundler/lib/bundler/cli/install.rb +7 -82
- data/bundler/lib/bundler/cli/issue.rb +2 -2
- data/bundler/lib/bundler/cli/list.rb +33 -2
- data/bundler/lib/bundler/cli/plugin.rb +5 -1
- data/bundler/lib/bundler/cli/show.rb +1 -1
- data/bundler/lib/bundler/cli/update.rb +3 -3
- data/bundler/lib/bundler/cli.rb +75 -83
- data/bundler/lib/bundler/compact_index_client.rb +0 -1
- data/bundler/lib/bundler/current_ruby.rb +3 -15
- data/bundler/lib/bundler/definition.rb +45 -35
- data/bundler/lib/bundler/deployment.rb +1 -64
- data/bundler/lib/bundler/digest.rb +1 -1
- data/bundler/lib/bundler/dsl.rb +13 -35
- data/bundler/lib/bundler/endpoint_specification.rb +0 -22
- data/bundler/lib/bundler/errors.rb +1 -5
- data/bundler/lib/bundler/feature_flag.rb +0 -33
- data/bundler/lib/bundler/fetcher/compact_index.rb +1 -1
- data/bundler/lib/bundler/friendly_errors.rb +2 -2
- data/bundler/lib/bundler/index.rb +0 -7
- data/bundler/lib/bundler/inline.rb +1 -1
- data/bundler/lib/bundler/installer/gem_installer.rb +0 -11
- data/bundler/lib/bundler/installer.rb +0 -6
- data/bundler/lib/bundler/lockfile_generator.rb +1 -1
- data/bundler/lib/bundler/lockfile_parser.rb +2 -12
- data/bundler/lib/bundler/man/bundle-add.1 +1 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +3 -6
- data/bundler/lib/bundler/man/bundle-binstubs.1.ronn +4 -6
- data/bundler/lib/bundler/man/bundle-cache.1 +2 -14
- data/bundler/lib/bundler/man/bundle-cache.1.ronn +1 -14
- data/bundler/lib/bundler/man/bundle-check.1 +2 -5
- data/bundler/lib/bundler/man/bundle-check.1.ronn +0 -5
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +6 -33
- data/bundler/lib/bundler/man/bundle-config.1.ronn +20 -55
- data/bundler/lib/bundler/man/bundle-console.1 +1 -1
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-env.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +2 -5
- data/bundler/lib/bundler/man/bundle-exec.1.ronn +1 -5
- data/bundler/lib/bundler/man/bundle-fund.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +3 -6
- data/bundler/lib/bundler/man/bundle-gem.1.ronn +2 -5
- data/bundler/lib/bundler/man/bundle-help.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-install.1 +8 -59
- data/bundler/lib/bundler/man/bundle-install.1.ronn +12 -107
- data/bundler/lib/bundler/man/bundle-issue.1 +1 -1
- data/bundler/lib/bundler/man/bundle-licenses.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1 +6 -1
- data/bundler/lib/bundler/man/bundle-list.1.ronn +5 -0
- 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-plugin.1 +2 -9
- data/bundler/lib/bundler/man/bundle-plugin.1.ronn +0 -8
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +2 -8
- data/bundler/lib/bundler/man/bundle-remove.1.ronn +1 -8
- data/bundler/lib/bundler/man/bundle-show.1 +2 -5
- data/bundler/lib/bundler/man/bundle-show.1.ronn +0 -4
- data/bundler/lib/bundler/man/bundle-update.1 +1 -1
- data/bundler/lib/bundler/man/bundle-version.1 +1 -1
- data/bundler/lib/bundler/man/bundle.1 +1 -10
- data/bundler/lib/bundler/man/bundle.1.ronn +0 -9
- data/bundler/lib/bundler/man/gemfile.5 +1 -1
- data/bundler/lib/bundler/man/index.txt +0 -2
- data/bundler/lib/bundler/materialization.rb +1 -1
- data/bundler/lib/bundler/plugin/installer.rb +0 -10
- data/bundler/lib/bundler/plugin/source_list.rb +1 -1
- data/bundler/lib/bundler/plugin.rb +1 -1
- data/bundler/lib/bundler/resolver.rb +1 -1
- data/bundler/lib/bundler/ruby_dsl.rb +2 -0
- data/bundler/lib/bundler/ruby_version.rb +1 -3
- data/bundler/lib/bundler/rubygems_ext.rb +1 -1
- data/bundler/lib/bundler/rubygems_gem_installer.rb +1 -1
- data/bundler/lib/bundler/rubygems_integration.rb +1 -5
- data/bundler/lib/bundler/self_manager.rb +1 -1
- data/bundler/lib/bundler/settings.rb +7 -26
- data/bundler/lib/bundler/shared_helpers.rb +8 -20
- data/bundler/lib/bundler/source/git/git_proxy.rb +3 -11
- data/bundler/lib/bundler/source/git.rb +2 -3
- data/bundler/lib/bundler/source/path.rb +3 -7
- data/bundler/lib/bundler/source/rubygems.rb +11 -17
- data/bundler/lib/bundler/source.rb +1 -1
- data/bundler/lib/bundler/source_list.rb +4 -45
- data/bundler/lib/bundler/source_map.rb +2 -5
- data/bundler/lib/bundler/spec_set.rb +6 -15
- data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +7 -129
- data/bundler/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +1 -1
- data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf-go.rb.tt +11 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/go.mod.tt +5 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem-go.c.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.go.tt +31 -0
- data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +6 -0
- data/bundler/lib/bundler/templates/newgem/gitlab-ci.yml.tt +9 -0
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -1
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +26 -23
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
- data/bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +50 -6
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +57 -52
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +5 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +57 -15
- data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +34 -21
- data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +12 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +9 -8
- data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +2 -2
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler/vlad.rb +1 -14
- data/bundler/lib/bundler.rb +6 -28
- data/doc/MAINTAINERS.txt +0 -7
- data/doc/bundler/UPGRADING.md +11 -5
- data/doc/rubygems/CONTRIBUTING.md +1 -1
- data/lib/rubygems/basic_specification.rb +3 -9
- data/lib/rubygems/bundler_version_finder.rb +1 -0
- data/lib/rubygems/command.rb +1 -1
- data/lib/rubygems/command_manager.rb +3 -4
- data/lib/rubygems/commands/build_command.rb +0 -7
- data/lib/rubygems/commands/cert_command.rb +1 -1
- data/lib/rubygems/commands/install_command.rb +1 -5
- data/lib/rubygems/commands/setup_command.rb +5 -3
- data/lib/rubygems/config_file.rb +1 -1
- data/lib/rubygems/dependency.rb +1 -1
- data/lib/rubygems/dependency_installer.rb +0 -77
- data/lib/rubygems/dependency_list.rb +1 -2
- data/lib/rubygems/deprecate.rb +74 -72
- data/lib/rubygems/doctor.rb +1 -1
- data/lib/rubygems/errors.rb +1 -1
- data/lib/rubygems/exceptions.rb +2 -3
- data/lib/rubygems/ext/builder.rb +6 -2
- data/lib/rubygems/ext/cargo_builder.rb +2 -2
- data/lib/rubygems/ext/cmake_builder.rb +97 -8
- data/lib/rubygems/ext/configure_builder.rb +2 -2
- data/lib/rubygems/ext/ext_conf_builder.rb +6 -2
- data/lib/rubygems/ext/rake_builder.rb +2 -2
- data/lib/rubygems/gem_runner.rb +0 -1
- data/lib/rubygems/install_update_options.rb +1 -2
- data/lib/rubygems/installer.rb +16 -54
- data/lib/rubygems/name_tuple.rb +7 -1
- data/lib/rubygems/package/tar_header.rb +4 -4
- data/lib/rubygems/package/tar_reader.rb +2 -0
- data/lib/rubygems/package/tar_writer.rb +1 -1
- data/lib/rubygems/package.rb +21 -12
- data/lib/rubygems/platform.rb +31 -11
- data/lib/rubygems/remote_fetcher.rb +8 -5
- data/lib/rubygems/resolver/conflict.rb +1 -1
- data/lib/rubygems/resolver.rb +1 -1
- data/lib/rubygems/security/signer.rb +1 -1
- data/lib/rubygems/source.rb +2 -2
- data/lib/rubygems/spec_fetcher.rb +4 -4
- data/lib/rubygems/specification.rb +5 -96
- data/lib/rubygems/specification_policy.rb +0 -36
- data/lib/rubygems/specification_record.rb +1 -1
- data/lib/rubygems/text.rb +1 -1
- data/lib/rubygems/uninstaller.rb +17 -6
- data/lib/rubygems/user_interaction.rb +6 -9
- data/lib/rubygems/util.rb +0 -22
- data/lib/rubygems/validator.rb +1 -1
- data/lib/rubygems/vendor/net-http/lib/net/http/generic_request.rb +25 -9
- data/lib/rubygems/vendor/net-http/lib/net/http/responses.rb +2 -2
- data/lib/rubygems/vendor/net-http/lib/net/http.rb +14 -14
- data/lib/rubygems/vendor/optparse/lib/optparse.rb +82 -41
- data/lib/rubygems/vendor/resolv/lib/resolv.rb +1 -1
- data/lib/rubygems/vendor/timeout/lib/timeout.rb +4 -1
- data/lib/rubygems/vendor/uri/lib/uri/common.rb +57 -15
- data/lib/rubygems/vendor/uri/lib/uri/file.rb +1 -1
- data/lib/rubygems/vendor/uri/lib/uri/generic.rb +34 -21
- data/lib/rubygems/vendor/uri/lib/uri/http.rb +12 -0
- data/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +9 -8
- data/lib/rubygems/vendor/uri/lib/uri/version.rb +2 -2
- data/lib/rubygems/version.rb +2 -17
- data/lib/rubygems/win_platform.rb +31 -0
- data/lib/rubygems.rb +10 -38
- data/rubygems-update.gemspec +4 -4
- metadata +10 -18
- data/bundler/lib/bundler/cli/inject.rb +0 -60
- data/bundler/lib/bundler/cli/viz.rb +0 -31
- data/bundler/lib/bundler/graph.rb +0 -152
- data/bundler/lib/bundler/man/bundle-inject.1 +0 -31
- data/bundler/lib/bundler/man/bundle-inject.1.ronn +0 -32
- data/bundler/lib/bundler/man/bundle-viz.1 +0 -30
- data/bundler/lib/bundler/man/bundle-viz.1.ronn +0 -36
- data/bundler/lib/bundler/similarity_detector.rb +0 -63
- data/lib/rubygems/commands/query_command.rb +0 -43
- data/lib/rubygems/compatibility.rb +0 -41
- data/lib/rubygems/install_default_message.rb +0 -13
|
@@ -7,7 +7,6 @@ module Bundler
|
|
|
7
7
|
autoload :Validator, File.expand_path("settings/validator", __dir__)
|
|
8
8
|
|
|
9
9
|
BOOL_KEYS = %w[
|
|
10
|
-
allow_offline_install
|
|
11
10
|
auto_install
|
|
12
11
|
cache_all
|
|
13
12
|
cache_all_platforms
|
|
@@ -20,7 +19,6 @@ module Bundler
|
|
|
20
19
|
disable_shared_gems
|
|
21
20
|
disable_version_check
|
|
22
21
|
force_ruby_platform
|
|
23
|
-
forget_cli_options
|
|
24
22
|
frozen
|
|
25
23
|
gem.changelog
|
|
26
24
|
gem.coc
|
|
@@ -43,20 +41,6 @@ module Bundler
|
|
|
43
41
|
verbose
|
|
44
42
|
].freeze
|
|
45
43
|
|
|
46
|
-
REMEMBERED_KEYS = %w[
|
|
47
|
-
bin
|
|
48
|
-
cache_all
|
|
49
|
-
clean
|
|
50
|
-
deployment
|
|
51
|
-
frozen
|
|
52
|
-
no_prune
|
|
53
|
-
path
|
|
54
|
-
shebang
|
|
55
|
-
path.system
|
|
56
|
-
without
|
|
57
|
-
with
|
|
58
|
-
].freeze
|
|
59
|
-
|
|
60
44
|
NUMBER_KEYS = %w[
|
|
61
45
|
jobs
|
|
62
46
|
redirect
|
|
@@ -97,6 +81,11 @@ module Bundler
|
|
|
97
81
|
"BUNDLE_RETRY" => 3,
|
|
98
82
|
"BUNDLE_TIMEOUT" => 10,
|
|
99
83
|
"BUNDLE_VERSION" => "lockfile",
|
|
84
|
+
"BUNDLE_LOCKFILE_CHECKSUMS" => true,
|
|
85
|
+
"BUNDLE_CACHE_ALL" => true,
|
|
86
|
+
"BUNDLE_PLUGINS" => true,
|
|
87
|
+
"BUNDLE_GLOBAL_GEM_CACHE" => false,
|
|
88
|
+
"BUNDLE_UPDATE_REQUIRES_ALL_FLAG" => false,
|
|
100
89
|
}.freeze
|
|
101
90
|
|
|
102
91
|
def initialize(root = nil)
|
|
@@ -128,12 +117,8 @@ module Bundler
|
|
|
128
117
|
end
|
|
129
118
|
|
|
130
119
|
def set_command_option(key, value)
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
value
|
|
134
|
-
else
|
|
135
|
-
set_local(key, value)
|
|
136
|
-
end
|
|
120
|
+
temporary(key => value)
|
|
121
|
+
value
|
|
137
122
|
end
|
|
138
123
|
|
|
139
124
|
def set_command_option_if_given(key, value)
|
|
@@ -387,10 +372,6 @@ module Bundler
|
|
|
387
372
|
ARRAY_KEYS.include?(self.class.key_to_s(key))
|
|
388
373
|
end
|
|
389
374
|
|
|
390
|
-
def is_remembered(key)
|
|
391
|
-
REMEMBERED_KEYS.include?(self.class.key_to_s(key))
|
|
392
|
-
end
|
|
393
|
-
|
|
394
375
|
def is_credential(key)
|
|
395
376
|
key == "gem.push_key"
|
|
396
377
|
end
|
|
@@ -4,8 +4,6 @@ require_relative "version"
|
|
|
4
4
|
require_relative "rubygems_integration"
|
|
5
5
|
require_relative "current_ruby"
|
|
6
6
|
|
|
7
|
-
autoload :Pathname, "pathname"
|
|
8
|
-
|
|
9
7
|
module Bundler
|
|
10
8
|
autoload :WINDOWS, File.expand_path("constants", __dir__)
|
|
11
9
|
autoload :FREEBSD, File.expand_path("constants", __dir__)
|
|
@@ -57,7 +55,7 @@ module Bundler
|
|
|
57
55
|
|
|
58
56
|
def pwd
|
|
59
57
|
Bundler.rubygems.ext_lock.synchronize do
|
|
60
|
-
|
|
58
|
+
Dir.pwd
|
|
61
59
|
end
|
|
62
60
|
end
|
|
63
61
|
|
|
@@ -125,27 +123,17 @@ module Bundler
|
|
|
125
123
|
raise GenericSystemCallError.new(e, "There was an error #{[:create, :write].include?(action) ? "creating" : "accessing"} `#{path}`.")
|
|
126
124
|
end
|
|
127
125
|
|
|
128
|
-
def
|
|
129
|
-
|
|
130
|
-
caller_location = caller_locations(2, 2).first
|
|
131
|
-
suffix = " (called at #{caller_location.path}:#{caller_location.lineno})"
|
|
132
|
-
message += suffix
|
|
133
|
-
removed_message += suffix if removed_message
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
require_relative "../bundler"
|
|
137
|
-
|
|
138
|
-
feature_flag = Bundler.feature_flag
|
|
126
|
+
def feature_deprecated!(message)
|
|
127
|
+
return unless prints_major_deprecations?
|
|
139
128
|
|
|
140
|
-
if feature_flag.removed_major?(major_version)
|
|
141
|
-
require_relative "errors"
|
|
142
|
-
raise DeprecatedError, "[REMOVED] #{removed_message || message}"
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
return unless feature_flag.deprecated_major?(major_version) && prints_major_deprecations?
|
|
146
129
|
Bundler.ui.warn("[DEPRECATED] #{message}")
|
|
147
130
|
end
|
|
148
131
|
|
|
132
|
+
def feature_removed!(message)
|
|
133
|
+
require_relative "errors"
|
|
134
|
+
raise RemovedError, "[REMOVED] #{message}"
|
|
135
|
+
end
|
|
136
|
+
|
|
149
137
|
def print_major_deprecations!
|
|
150
138
|
multiple_gemfiles = search_up(".") do |dir|
|
|
151
139
|
gemfiles = gemfile_names.select {|gf| File.file? File.expand_path(gf, dir) }
|
|
@@ -16,7 +16,7 @@ module Bundler
|
|
|
16
16
|
def initialize(command)
|
|
17
17
|
msg = String.new
|
|
18
18
|
msg << "Bundler is trying to run `#{command}` at runtime. You probably need to run `bundle install`. However, "
|
|
19
|
-
msg << "this error message could probably be more useful. Please submit a ticket at https://github.com/
|
|
19
|
+
msg << "this error message could probably be more useful. Please submit a ticket at https://github.com/ruby/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md "
|
|
20
20
|
msg << "with steps to reproduce as well as the following\n\nCALLER: #{caller.join("\n")}"
|
|
21
21
|
super msg
|
|
22
22
|
end
|
|
@@ -121,7 +121,7 @@ module Bundler
|
|
|
121
121
|
FileUtils.rm_rf(p)
|
|
122
122
|
end
|
|
123
123
|
git "clone", "--no-checkout", "--quiet", path.to_s, destination.to_s
|
|
124
|
-
File.chmod((
|
|
124
|
+
File.chmod((File.stat(destination).mode | 0o777) & ~File.umask, destination)
|
|
125
125
|
rescue Errno::EEXIST => e
|
|
126
126
|
file_path = e.message[%r{.*?((?:[a-zA-Z]:)?/.*)}, 1]
|
|
127
127
|
raise GitError, "Bundler could not install a gem because it needs to " \
|
|
@@ -408,11 +408,7 @@ module Bundler
|
|
|
408
408
|
def capture3_args_for(cmd, dir)
|
|
409
409
|
return ["git", *cmd] unless dir
|
|
410
410
|
|
|
411
|
-
|
|
412
|
-
["git", "-C", dir.to_s, *cmd]
|
|
413
|
-
else
|
|
414
|
-
["git", *cmd, { chdir: dir.to_s }]
|
|
415
|
-
end
|
|
411
|
+
["git", "-C", dir.to_s, *cmd]
|
|
416
412
|
end
|
|
417
413
|
|
|
418
414
|
def extra_clone_args
|
|
@@ -451,10 +447,6 @@ module Bundler
|
|
|
451
447
|
depth.nil?
|
|
452
448
|
end
|
|
453
449
|
|
|
454
|
-
def supports_minus_c?
|
|
455
|
-
@supports_minus_c ||= Gem::Version.new(version) >= Gem::Version.new("1.8.5")
|
|
456
|
-
end
|
|
457
|
-
|
|
458
450
|
def needs_allow_any_sha1_in_want?
|
|
459
451
|
@needs_allow_any_sha1_in_want ||= Gem::Version.new(version) <= Gem::Version.new("2.13.7")
|
|
460
452
|
end
|
|
@@ -238,7 +238,7 @@ module Bundler
|
|
|
238
238
|
# across different projects, this cache will be shared.
|
|
239
239
|
# When using local git repos, this is set to the local repo.
|
|
240
240
|
def cache_path
|
|
241
|
-
@cache_path ||= if Bundler.
|
|
241
|
+
@cache_path ||= if Bundler.settings[:global_gem_cache]
|
|
242
242
|
Bundler.user_cache
|
|
243
243
|
else
|
|
244
244
|
Bundler.bundle_path.join("cache", "bundler")
|
|
@@ -268,7 +268,7 @@ module Bundler
|
|
|
268
268
|
private
|
|
269
269
|
|
|
270
270
|
def cache_to(custom_path, try_migrate: false)
|
|
271
|
-
return unless Bundler.
|
|
271
|
+
return unless Bundler.settings[:cache_all]
|
|
272
272
|
|
|
273
273
|
app_cache_path = app_cache_path(custom_path)
|
|
274
274
|
|
|
@@ -416,7 +416,6 @@ module Bundler
|
|
|
416
416
|
def fetch
|
|
417
417
|
git_proxy.checkout
|
|
418
418
|
rescue GitError => e
|
|
419
|
-
raise unless Bundler.feature_flag.allow_offline_install?
|
|
420
419
|
Bundler.ui.warn "Using cached git data because of network errors:\n#{e}"
|
|
421
420
|
end
|
|
422
421
|
|
|
@@ -24,7 +24,7 @@ module Bundler
|
|
|
24
24
|
@path = Pathname.new(options["path"])
|
|
25
25
|
expanded_path = expand(@path)
|
|
26
26
|
@path = if @path.relative?
|
|
27
|
-
expanded_path.relative_path_from(
|
|
27
|
+
expanded_path.relative_path_from(File.expand_path(root_path))
|
|
28
28
|
else
|
|
29
29
|
expanded_path
|
|
30
30
|
end
|
|
@@ -83,7 +83,7 @@ module Bundler
|
|
|
83
83
|
|
|
84
84
|
def cache(spec, custom_path = nil)
|
|
85
85
|
app_cache_path = app_cache_path(custom_path)
|
|
86
|
-
return unless Bundler.
|
|
86
|
+
return unless Bundler.settings[:cache_all]
|
|
87
87
|
return if expand(@original_path).to_s.index(root_path.to_s + "/") == 0
|
|
88
88
|
|
|
89
89
|
unless @original_path.exist?
|
|
@@ -126,11 +126,7 @@ module Bundler
|
|
|
126
126
|
end
|
|
127
127
|
|
|
128
128
|
def expand(somepath)
|
|
129
|
-
|
|
130
|
-
somepath.expand_path(root_path).expand_path
|
|
131
|
-
else
|
|
132
|
-
somepath.expand_path(root_path)
|
|
133
|
-
end
|
|
129
|
+
somepath.expand_path(root_path)
|
|
134
130
|
rescue ArgumentError => e
|
|
135
131
|
Bundler.ui.debug(e)
|
|
136
132
|
raise PathError, "There was an error while trying to use the path " \
|
|
@@ -8,7 +8,7 @@ module Bundler
|
|
|
8
8
|
autoload :Remote, File.expand_path("rubygems/remote", __dir__)
|
|
9
9
|
|
|
10
10
|
# Ask for X gems per API request
|
|
11
|
-
API_REQUEST_SIZE =
|
|
11
|
+
API_REQUEST_SIZE = 100
|
|
12
12
|
|
|
13
13
|
attr_accessor :remotes
|
|
14
14
|
|
|
@@ -168,12 +168,6 @@ module Bundler
|
|
|
168
168
|
return nil # no post-install message
|
|
169
169
|
end
|
|
170
170
|
|
|
171
|
-
if spec.remote
|
|
172
|
-
# Check for this spec from other sources
|
|
173
|
-
uris = [spec.remote, *remotes_for_spec(spec)].map(&:anonymized_uri).uniq
|
|
174
|
-
Installer.ambiguous_gems << [spec.name, *uris] if uris.length > 1
|
|
175
|
-
end
|
|
176
|
-
|
|
177
171
|
path = fetch_gem_if_possible(spec, options[:previous_spec])
|
|
178
172
|
raise GemNotFound, "Could not find #{spec.file_name} for installation" unless path
|
|
179
173
|
|
|
@@ -217,7 +211,11 @@ module Bundler
|
|
|
217
211
|
message += " with native extensions" if spec.extensions.any?
|
|
218
212
|
Bundler.ui.confirm message
|
|
219
213
|
|
|
220
|
-
installed_spec =
|
|
214
|
+
installed_spec = nil
|
|
215
|
+
|
|
216
|
+
Gem.time("Installed #{spec.name} in", 0, true) do
|
|
217
|
+
installed_spec = installer.install
|
|
218
|
+
end
|
|
221
219
|
|
|
222
220
|
spec.full_gem_path = installed_spec.full_gem_path
|
|
223
221
|
spec.loaded_from = installed_spec.loaded_from
|
|
@@ -332,13 +330,6 @@ module Bundler
|
|
|
332
330
|
remotes.map(&method(:remove_auth))
|
|
333
331
|
end
|
|
334
332
|
|
|
335
|
-
def remotes_for_spec(spec)
|
|
336
|
-
specs.search_all(spec.name).inject([]) do |uris, s|
|
|
337
|
-
uris << s.remote if s.remote
|
|
338
|
-
uris
|
|
339
|
-
end
|
|
340
|
-
end
|
|
341
|
-
|
|
342
333
|
def cached_gem(spec)
|
|
343
334
|
global_cache_path = download_cache_path(spec)
|
|
344
335
|
caches << global_cache_path if global_cache_path
|
|
@@ -491,7 +482,10 @@ module Bundler
|
|
|
491
482
|
uri = spec.remote.uri
|
|
492
483
|
Bundler.ui.confirm("Fetching #{version_message(spec, previous_spec)}")
|
|
493
484
|
gem_remote_fetcher = remote_fetchers.fetch(spec.remote).gem_remote_fetcher
|
|
494
|
-
|
|
485
|
+
|
|
486
|
+
Gem.time("Downloaded #{spec.name} in", 0, true) do
|
|
487
|
+
Bundler.rubygems.download_gem(spec, uri, download_cache_path, gem_remote_fetcher)
|
|
488
|
+
end
|
|
495
489
|
end
|
|
496
490
|
|
|
497
491
|
# Returns the global cache path of the calling Rubygems::Source object.
|
|
@@ -506,7 +500,7 @@ module Bundler
|
|
|
506
500
|
# @return [Pathname] The global cache path.
|
|
507
501
|
#
|
|
508
502
|
def download_cache_path(spec)
|
|
509
|
-
return unless Bundler.
|
|
503
|
+
return unless Bundler.settings[:global_gem_cache]
|
|
510
504
|
return unless remote = spec.remote
|
|
511
505
|
return unless cache_slug = remote.cache_slug
|
|
512
506
|
|
|
@@ -79,7 +79,7 @@ module Bundler
|
|
|
79
79
|
end
|
|
80
80
|
|
|
81
81
|
def extension_cache_path(spec)
|
|
82
|
-
return unless Bundler.
|
|
82
|
+
return unless Bundler.settings[:global_gem_cache]
|
|
83
83
|
return unless source_slug = extension_cache_slug(spec)
|
|
84
84
|
Bundler.user_cache.join(
|
|
85
85
|
"extensions", Gem::Platform.local.to_s, Bundler.ruby_scope,
|
|
@@ -9,7 +9,7 @@ module Bundler
|
|
|
9
9
|
:metadata_source
|
|
10
10
|
|
|
11
11
|
def global_rubygems_source
|
|
12
|
-
@global_rubygems_source ||=
|
|
12
|
+
@global_rubygems_source ||= source_class.new("allow_local" => true)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def initialize
|
|
@@ -21,19 +21,9 @@ module Bundler
|
|
|
21
21
|
@rubygems_sources = []
|
|
22
22
|
@metadata_source = Source::Metadata.new
|
|
23
23
|
|
|
24
|
-
@merged_gem_lockfile_sections = false
|
|
25
24
|
@local_mode = true
|
|
26
25
|
end
|
|
27
26
|
|
|
28
|
-
def merged_gem_lockfile_sections?
|
|
29
|
-
@merged_gem_lockfile_sections
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def merged_gem_lockfile_sections!(replacement_source)
|
|
33
|
-
@merged_gem_lockfile_sections = true
|
|
34
|
-
@global_rubygems_source = replacement_source
|
|
35
|
-
end
|
|
36
|
-
|
|
37
27
|
def aggregate_global_source?
|
|
38
28
|
global_rubygems_source.multiple_remotes?
|
|
39
29
|
end
|
|
@@ -90,10 +80,6 @@ module Bundler
|
|
|
90
80
|
@rubygems_sources
|
|
91
81
|
end
|
|
92
82
|
|
|
93
|
-
def rubygems_remotes
|
|
94
|
-
rubygems_sources.flat_map(&:remotes).uniq
|
|
95
|
-
end
|
|
96
|
-
|
|
97
83
|
def all_sources
|
|
98
84
|
path_sources + git_sources + plugin_sources + rubygems_sources + [metadata_source]
|
|
99
85
|
end
|
|
@@ -115,11 +101,7 @@ module Bundler
|
|
|
115
101
|
end
|
|
116
102
|
|
|
117
103
|
def lock_rubygems_sources
|
|
118
|
-
|
|
119
|
-
[combine_rubygems_sources]
|
|
120
|
-
else
|
|
121
|
-
rubygems_sources.sort_by(&:identifier)
|
|
122
|
-
end
|
|
104
|
+
rubygems_sources.sort_by(&:identifier)
|
|
123
105
|
end
|
|
124
106
|
|
|
125
107
|
# Returns true if there are changes
|
|
@@ -129,16 +111,7 @@ module Bundler
|
|
|
129
111
|
@rubygems_sources, @path_sources, @git_sources, @plugin_sources = map_sources(replacement_sources)
|
|
130
112
|
@global_rubygems_source = global_replacement_source(replacement_sources)
|
|
131
113
|
|
|
132
|
-
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
# Returns true if there are changes
|
|
136
|
-
def expired_sources?(replacement_sources)
|
|
137
|
-
return false if replacement_sources.empty?
|
|
138
|
-
|
|
139
|
-
lock_sources = dup_with_replaced_sources(replacement_sources).lock_sources
|
|
140
|
-
|
|
141
|
-
different_sources?(lock_sources, replacement_sources)
|
|
114
|
+
!equivalent_sources?(lock_sources, replacement_sources)
|
|
142
115
|
end
|
|
143
116
|
|
|
144
117
|
def prefer_local!
|
|
@@ -165,12 +138,6 @@ module Bundler
|
|
|
165
138
|
|
|
166
139
|
private
|
|
167
140
|
|
|
168
|
-
def dup_with_replaced_sources(replacement_sources)
|
|
169
|
-
new_source_list = dup
|
|
170
|
-
new_source_list.replace_sources!(replacement_sources)
|
|
171
|
-
new_source_list
|
|
172
|
-
end
|
|
173
|
-
|
|
174
141
|
def map_sources(replacement_sources)
|
|
175
142
|
rubygems = @rubygems_sources.map do |source|
|
|
176
143
|
replace_rubygems_source(replacement_sources, source)
|
|
@@ -224,11 +191,7 @@ module Bundler
|
|
|
224
191
|
end
|
|
225
192
|
end
|
|
226
193
|
|
|
227
|
-
def
|
|
228
|
-
!equivalent_sources?(lock_sources, replacement_sources)
|
|
229
|
-
end
|
|
230
|
-
|
|
231
|
-
def rubygems_aggregate_class
|
|
194
|
+
def source_class
|
|
232
195
|
Source::Rubygems
|
|
233
196
|
end
|
|
234
197
|
|
|
@@ -247,10 +210,6 @@ module Bundler
|
|
|
247
210
|
end
|
|
248
211
|
end
|
|
249
212
|
|
|
250
|
-
def combine_rubygems_sources
|
|
251
|
-
Source::Rubygems.new("remotes" => rubygems_remotes)
|
|
252
|
-
end
|
|
253
|
-
|
|
254
213
|
def warn_on_git_protocol(source)
|
|
255
214
|
return if Bundler.settings["git.allow_insecure"]
|
|
256
215
|
|
|
@@ -23,15 +23,12 @@ module Bundler
|
|
|
23
23
|
if previous_source.nil?
|
|
24
24
|
requirements[indirect_dependency_name] = source
|
|
25
25
|
else
|
|
26
|
-
no_ambiguous_sources = Bundler.feature_flag.bundler_4_mode?
|
|
27
|
-
|
|
28
26
|
msg = ["The gem '#{indirect_dependency_name}' was found in multiple relevant sources."]
|
|
29
27
|
msg.concat [previous_source, source].map {|s| " * #{s}" }.sort
|
|
30
|
-
msg << "You
|
|
28
|
+
msg << "You must add this gem to the source block for the source you wish it to be installed from."
|
|
31
29
|
msg = msg.join("\n")
|
|
32
30
|
|
|
33
|
-
raise SecurityError, msg
|
|
34
|
-
Bundler.ui.warn "Warning: #{msg}"
|
|
31
|
+
raise SecurityError, msg
|
|
35
32
|
end
|
|
36
33
|
end
|
|
37
34
|
|
|
@@ -11,16 +11,11 @@ module Bundler
|
|
|
11
11
|
@specs = specs
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def for(dependencies,
|
|
15
|
-
|
|
16
|
-
Bundler::SharedHelpers.
|
|
14
|
+
def for(dependencies, platforms = [nil], legacy_platforms = [nil], skips: [])
|
|
15
|
+
if [true, false].include?(platforms)
|
|
16
|
+
Bundler::SharedHelpers.feature_removed! \
|
|
17
17
|
"SpecSet#for received a `check` parameter, but that's no longer used and deprecated. " \
|
|
18
|
-
"SpecSet#for always implicitly performs validation. Please remove this parameter"
|
|
19
|
-
print_caller_location: true
|
|
20
|
-
|
|
21
|
-
legacy_platforms
|
|
22
|
-
else
|
|
23
|
-
platforms_or_legacy_check
|
|
18
|
+
"SpecSet#for always implicitly performs validation. Please remove this parameter"
|
|
24
19
|
end
|
|
25
20
|
|
|
26
21
|
materialize_dependencies(dependencies, platforms, skips: skips)
|
|
@@ -179,9 +174,7 @@ module Bundler
|
|
|
179
174
|
end
|
|
180
175
|
|
|
181
176
|
def -(other)
|
|
182
|
-
SharedHelpers.
|
|
183
|
-
|
|
184
|
-
SpecSet.new(to_a - other.to_a)
|
|
177
|
+
SharedHelpers.feature_removed! "SpecSet#- has been removed with no replacement"
|
|
185
178
|
end
|
|
186
179
|
|
|
187
180
|
def find_by_name_and_platform(name, platform)
|
|
@@ -212,9 +205,7 @@ module Bundler
|
|
|
212
205
|
end
|
|
213
206
|
|
|
214
207
|
def <<(spec)
|
|
215
|
-
SharedHelpers.
|
|
216
|
-
|
|
217
|
-
@specs << spec
|
|
208
|
+
SharedHelpers.feature_removed! "SpecSet#<< has been removed with no replacement"
|
|
218
209
|
end
|
|
219
210
|
|
|
220
211
|
def length
|
|
@@ -1,132 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Code of Conduct
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<%= config[:name].inspect %> follows [The Ruby Community Conduct Guideline](https://www.ruby-lang.org/en/conduct) in all "collaborative space", which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.):
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
-
identity and orientation.
|
|
5
|
+
* Participants will be tolerant of opposing views.
|
|
6
|
+
* Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
|
|
7
|
+
* When interpreting the words and actions of others, participants should always assume good intentions.
|
|
8
|
+
* Behaviour which can be reasonably considered harassment will not be tolerated.
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
diverse, inclusive, and healthy community.
|
|
14
|
-
|
|
15
|
-
## Our Standards
|
|
16
|
-
|
|
17
|
-
Examples of behavior that contributes to a positive environment for our
|
|
18
|
-
community include:
|
|
19
|
-
|
|
20
|
-
* Demonstrating empathy and kindness toward other people
|
|
21
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
-
* Giving and gracefully accepting constructive feedback
|
|
23
|
-
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
-
and learning from the experience
|
|
25
|
-
* Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
-
community
|
|
27
|
-
|
|
28
|
-
Examples of unacceptable behavior include:
|
|
29
|
-
|
|
30
|
-
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
-
any kind
|
|
32
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
-
* Public or private harassment
|
|
34
|
-
* Publishing others' private information, such as a physical or email address,
|
|
35
|
-
without their explicit permission
|
|
36
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
-
professional setting
|
|
38
|
-
|
|
39
|
-
## Enforcement Responsibilities
|
|
40
|
-
|
|
41
|
-
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
-
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
-
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
-
or harmful.
|
|
45
|
-
|
|
46
|
-
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
-
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
-
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
-
decisions when appropriate.
|
|
50
|
-
|
|
51
|
-
## Scope
|
|
52
|
-
|
|
53
|
-
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
-
an individual is officially representing the community in public spaces.
|
|
55
|
-
Examples of representing our community include using an official email address,
|
|
56
|
-
posting via an official social media account, or acting as an appointed
|
|
57
|
-
representative at an online or offline event.
|
|
58
|
-
|
|
59
|
-
## Enforcement
|
|
60
|
-
|
|
61
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
-
reported to the community leaders responsible for enforcement at
|
|
63
|
-
[INSERT CONTACT METHOD].
|
|
64
|
-
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
-
|
|
66
|
-
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
-
reporter of any incident.
|
|
68
|
-
|
|
69
|
-
## Enforcement Guidelines
|
|
70
|
-
|
|
71
|
-
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
-
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
-
|
|
74
|
-
### 1. Correction
|
|
75
|
-
|
|
76
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
-
unprofessional or unwelcome in the community.
|
|
78
|
-
|
|
79
|
-
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
-
clarity around the nature of the violation and an explanation of why the
|
|
81
|
-
behavior was inappropriate. A public apology may be requested.
|
|
82
|
-
|
|
83
|
-
### 2. Warning
|
|
84
|
-
|
|
85
|
-
**Community Impact**: A violation through a single incident or series of
|
|
86
|
-
actions.
|
|
87
|
-
|
|
88
|
-
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
-
interaction with the people involved, including unsolicited interaction with
|
|
90
|
-
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
-
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
-
like social media. Violating these terms may lead to a temporary or permanent
|
|
93
|
-
ban.
|
|
94
|
-
|
|
95
|
-
### 3. Temporary Ban
|
|
96
|
-
|
|
97
|
-
**Community Impact**: A serious violation of community standards, including
|
|
98
|
-
sustained inappropriate behavior.
|
|
99
|
-
|
|
100
|
-
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
-
communication with the community for a specified period of time. No public or
|
|
102
|
-
private interaction with the people involved, including unsolicited interaction
|
|
103
|
-
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
-
Violating these terms may lead to a permanent ban.
|
|
105
|
-
|
|
106
|
-
### 4. Permanent Ban
|
|
107
|
-
|
|
108
|
-
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
-
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
-
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
-
|
|
112
|
-
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
113
|
-
community.
|
|
114
|
-
|
|
115
|
-
## Attribution
|
|
116
|
-
|
|
117
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
-
version 2.1, available at
|
|
119
|
-
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
120
|
-
|
|
121
|
-
Community Impact Guidelines were inspired by
|
|
122
|
-
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
123
|
-
|
|
124
|
-
For answers to common questions about this code of conduct, see the FAQ at
|
|
125
|
-
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
126
|
-
[https://www.contributor-covenant.org/translations][translations].
|
|
127
|
-
|
|
128
|
-
[homepage]: https://www.contributor-covenant.org
|
|
129
|
-
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
130
|
-
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
131
|
-
[FAQ]: https://www.contributor-covenant.org/faq
|
|
132
|
-
[translations]: https://www.contributor-covenant.org/translations
|
|
10
|
+
If you have any concerns about behaviour within this project, please contact us at [<%= config[:email].inspect %>](mailto:<%= config[:email].inspect %>).
|
|
@@ -6,6 +6,10 @@ jobs:
|
|
|
6
6
|
<%- if config[:ext] == 'rust' -%>
|
|
7
7
|
environment:
|
|
8
8
|
RB_SYS_FORCE_INSTALL_RUST_TOOLCHAIN: 'true'
|
|
9
|
+
<%- end -%>
|
|
10
|
+
<%- if config[:ext] == 'go' -%>
|
|
11
|
+
environment:
|
|
12
|
+
GO_VERSION: '1.23.0'
|
|
9
13
|
<%- end -%>
|
|
10
14
|
steps:
|
|
11
15
|
- checkout
|
|
@@ -16,6 +20,14 @@ jobs:
|
|
|
16
20
|
- run:
|
|
17
21
|
name: Install a RubyGems version that can compile rust extensions
|
|
18
22
|
command: gem update --system '<%= ::Gem.rubygems_version %>'
|
|
23
|
+
<%- end -%>
|
|
24
|
+
<%- if config[:ext] == 'go' -%>
|
|
25
|
+
- run:
|
|
26
|
+
name: Install Go
|
|
27
|
+
command: |
|
|
28
|
+
wget https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz -O /tmp/go.tar.gz
|
|
29
|
+
tar -C /usr/local -xzf /tmp/go.tar.gz
|
|
30
|
+
echo 'export PATH=/usr/local/go/bin:"$PATH"' >> "$BASH_ENV"
|
|
19
31
|
<%- end -%>
|
|
20
32
|
- run:
|
|
21
33
|
name: Run the default task
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "mkmf"
|
|
4
|
+
require "go_gem/mkmf"
|
|
5
|
+
|
|
6
|
+
# Makes all symbols private by default to avoid unintended conflict
|
|
7
|
+
# with other gems. To explicitly export symbols you can use RUBY_FUNC_EXPORTED
|
|
8
|
+
# selectively, or entirely remove this flag.
|
|
9
|
+
append_cflags("-fvisibility=hidden")
|
|
10
|
+
|
|
11
|
+
create_go_makefile(<%= config[:makefile_path].inspect %>)
|