bundler 2.2.13 → 2.2.18
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bundler might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +85 -5
- data/bundler.gemspec +2 -3
- data/lib/bundler.rb +1 -0
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/cli.rb +16 -35
- data/lib/bundler/cli/common.rb +15 -2
- data/lib/bundler/cli/gem.rb +9 -1
- data/lib/bundler/cli/outdated.rb +8 -11
- data/lib/bundler/compact_index_client/updater.rb +10 -6
- data/lib/bundler/current_ruby.rb +1 -0
- data/lib/bundler/definition.rb +40 -87
- data/lib/bundler/dsl.rb +3 -6
- data/lib/bundler/feature_flag.rb +0 -2
- data/lib/bundler/fetcher.rb +2 -1
- data/lib/bundler/fetcher/downloader.rb +8 -4
- data/lib/bundler/friendly_errors.rb +1 -1
- data/lib/bundler/gem_helper.rb +16 -0
- data/lib/bundler/index.rb +1 -2
- data/lib/bundler/injector.rb +2 -2
- data/lib/bundler/inline.rb +1 -1
- data/lib/bundler/installer/parallel_installer.rb +36 -15
- data/lib/bundler/lazy_specification.rb +6 -1
- data/lib/bundler/lockfile_parser.rb +2 -16
- data/lib/bundler/man/bundle-add.1 +1 -1
- data/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/lib/bundler/man/bundle-cache.1 +1 -1
- data/lib/bundler/man/bundle-check.1 +1 -1
- data/lib/bundler/man/bundle-clean.1 +1 -1
- data/lib/bundler/man/bundle-config.1 +21 -10
- data/lib/bundler/man/bundle-config.1.ronn +21 -11
- data/lib/bundler/man/bundle-doctor.1 +1 -1
- data/lib/bundler/man/bundle-exec.1 +1 -1
- data/lib/bundler/man/bundle-gem.1 +1 -1
- data/lib/bundler/man/bundle-info.1 +1 -1
- data/lib/bundler/man/bundle-init.1 +1 -1
- data/lib/bundler/man/bundle-inject.1 +1 -1
- data/lib/bundler/man/bundle-install.1 +1 -1
- data/lib/bundler/man/bundle-list.1 +1 -1
- data/lib/bundler/man/bundle-lock.1 +1 -1
- data/lib/bundler/man/bundle-open.1 +1 -1
- data/lib/bundler/man/bundle-outdated.1 +1 -1
- data/lib/bundler/man/bundle-platform.1 +1 -1
- data/lib/bundler/man/bundle-pristine.1 +1 -1
- data/lib/bundler/man/bundle-remove.1 +1 -1
- data/lib/bundler/man/bundle-show.1 +1 -1
- data/lib/bundler/man/bundle-update.1 +1 -1
- data/lib/bundler/man/bundle-viz.1 +1 -1
- data/lib/bundler/man/bundle.1 +1 -1
- data/lib/bundler/man/gemfile.5 +1 -1
- data/lib/bundler/plugin.rb +2 -2
- data/lib/bundler/plugin/api/source.rb +21 -0
- data/lib/bundler/resolver.rb +13 -96
- data/lib/bundler/resolver/spec_group.rb +0 -24
- data/lib/bundler/retry.rb +1 -1
- data/lib/bundler/rubygems_ext.rb +2 -2
- data/lib/bundler/settings.rb +60 -11
- data/lib/bundler/source.rb +15 -0
- data/lib/bundler/source/metadata.rb +0 -4
- data/lib/bundler/source/path.rb +3 -1
- data/lib/bundler/source/path/installer.rb +1 -1
- data/lib/bundler/source/rubygems.rb +37 -10
- data/lib/bundler/source/rubygems_aggregate.rb +64 -0
- data/lib/bundler/source_list.rb +37 -8
- data/lib/bundler/source_map.rb +58 -0
- data/lib/bundler/spec_set.rb +18 -5
- data/lib/bundler/templates/Gemfile +1 -1
- data/lib/bundler/templates/gems.rb +1 -1
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +2 -4
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +1 -1
- data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +1 -1
- data/lib/bundler/version.rb +1 -1
- metadata +9 -4
data/lib/bundler/dsl.rb
CHANGED
@@ -460,19 +460,16 @@ repo_name ||= user_name
|
|
460
460
|
@sources.add_rubygems_remote(source)
|
461
461
|
end
|
462
462
|
|
463
|
-
if Bundler.feature_flag.
|
463
|
+
if Bundler.feature_flag.bundler_3_mode?
|
464
464
|
msg = "This Gemfile contains multiple primary sources. " \
|
465
465
|
"Each source after the first must include a block to indicate which gems " \
|
466
|
-
"should come from that source
|
467
|
-
"`bundle config unset disable_multisource`"
|
466
|
+
"should come from that source"
|
468
467
|
raise GemfileEvalError, msg
|
469
468
|
else
|
470
469
|
Bundler::SharedHelpers.major_deprecation 2, "Your Gemfile contains multiple primary sources. " \
|
471
470
|
"Using `source` more than once without a block is a security risk, and " \
|
472
471
|
"may result in installing unexpected gems. To resolve this warning, use " \
|
473
|
-
"a block to indicate which gems should come from the secondary source.
|
474
|
-
"To upgrade this warning to an error, run `bundle config set --local " \
|
475
|
-
"disable_multisource true`."
|
472
|
+
"a block to indicate which gems should come from the secondary source."
|
476
473
|
end
|
477
474
|
end
|
478
475
|
|
data/lib/bundler/feature_flag.rb
CHANGED
@@ -32,10 +32,8 @@ module Bundler
|
|
32
32
|
settings_flag(:cache_all) { bundler_3_mode? }
|
33
33
|
settings_flag(:default_install_uses_path) { bundler_3_mode? }
|
34
34
|
settings_flag(:deployment_means_frozen) { bundler_3_mode? }
|
35
|
-
settings_flag(:disable_multisource) { bundler_3_mode? }
|
36
35
|
settings_flag(:forget_cli_options) { bundler_3_mode? }
|
37
36
|
settings_flag(:global_gem_cache) { bundler_3_mode? }
|
38
|
-
settings_flag(:only_update_to_newer_versions) { bundler_3_mode? }
|
39
37
|
settings_flag(:path_relative_to_cwd) { bundler_3_mode? }
|
40
38
|
settings_flag(:plugins) { @bundler_version >= Gem::Version.new("1.14") }
|
41
39
|
settings_flag(:print_only_version_number) { bundler_3_mode? }
|
data/lib/bundler/fetcher.rb
CHANGED
@@ -47,7 +47,8 @@ module Bundler
|
|
47
47
|
remote_uri = filter_uri(remote_uri)
|
48
48
|
super "Authentication is required for #{remote_uri}.\n" \
|
49
49
|
"Please supply credentials for this source. You can do this by running:\n" \
|
50
|
-
"
|
50
|
+
"`bundle config set --global #{remote_uri} username:password`\n" \
|
51
|
+
"or by storing the credentials in the `#{Settings.key_for(remote_uri)}` environment variable"
|
51
52
|
end
|
52
53
|
end
|
53
54
|
# This error is raised if HTTP authentication is provided, but incorrect.
|
@@ -14,8 +14,10 @@ module Bundler
|
|
14
14
|
def fetch(uri, headers = {}, counter = 0)
|
15
15
|
raise HTTPError, "Too many redirects" if counter >= redirect_limit
|
16
16
|
|
17
|
+
filtered_uri = URICredentialsFilter.credential_filtered_uri(uri)
|
18
|
+
|
17
19
|
response = request(uri, headers)
|
18
|
-
Bundler.ui.debug("HTTP #{response.code} #{response.message} #{
|
20
|
+
Bundler.ui.debug("HTTP #{response.code} #{response.message} #{filtered_uri}")
|
19
21
|
|
20
22
|
case response
|
21
23
|
when Net::HTTPSuccess, Net::HTTPNotModified
|
@@ -40,7 +42,7 @@ module Bundler
|
|
40
42
|
raise BadAuthenticationError, uri.host if uri.userinfo
|
41
43
|
raise AuthenticationRequiredError, uri.host
|
42
44
|
when Net::HTTPNotFound
|
43
|
-
raise FallbackError, "Net::HTTPNotFound: #{
|
45
|
+
raise FallbackError, "Net::HTTPNotFound: #{filtered_uri}"
|
44
46
|
else
|
45
47
|
raise HTTPError, "#{response.class}#{": #{response.body}" unless response.body.empty?}"
|
46
48
|
end
|
@@ -49,7 +51,9 @@ module Bundler
|
|
49
51
|
def request(uri, headers)
|
50
52
|
validate_uri_scheme!(uri)
|
51
53
|
|
52
|
-
|
54
|
+
filtered_uri = URICredentialsFilter.credential_filtered_uri(uri)
|
55
|
+
|
56
|
+
Bundler.ui.debug "HTTP GET #{filtered_uri}"
|
53
57
|
req = Net::HTTP::Get.new uri.request_uri, headers
|
54
58
|
if uri.user
|
55
59
|
user = CGI.unescape(uri.user)
|
@@ -69,7 +73,7 @@ module Bundler
|
|
69
73
|
raise NetworkDownError, "Could not reach host #{uri.host}. Check your network " \
|
70
74
|
"connection and try again."
|
71
75
|
else
|
72
|
-
raise HTTPError, "Network error while fetching #{
|
76
|
+
raise HTTPError, "Network error while fetching #{filtered_uri}" \
|
73
77
|
" (#{e})"
|
74
78
|
end
|
75
79
|
end
|
@@ -112,7 +112,7 @@ module Bundler
|
|
112
112
|
#{issues_url(e)}
|
113
113
|
|
114
114
|
If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
|
115
|
-
https://github.com/rubygems/rubygems/issues/new?labels=Bundler
|
115
|
+
https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md
|
116
116
|
EOS
|
117
117
|
end
|
118
118
|
|
data/lib/bundler/gem_helper.rb
CHANGED
@@ -47,6 +47,11 @@ module Bundler
|
|
47
47
|
built_gem_path = build_gem
|
48
48
|
end
|
49
49
|
|
50
|
+
desc "Generate SHA512 checksum if #{name}-#{version}.gem into the checksums directory."
|
51
|
+
task "build:checksum" => "build" do
|
52
|
+
build_checksum(built_gem_path)
|
53
|
+
end
|
54
|
+
|
50
55
|
desc "Build and install #{name}-#{version}.gem into system gems."
|
51
56
|
task "install" => "build" do
|
52
57
|
install_gem(built_gem_path)
|
@@ -100,6 +105,17 @@ module Bundler
|
|
100
105
|
Bundler.ui.confirm "#{name} (#{version}) installed."
|
101
106
|
end
|
102
107
|
|
108
|
+
def build_checksum(built_gem_path = nil)
|
109
|
+
built_gem_path ||= build_gem
|
110
|
+
SharedHelpers.filesystem_access(File.join(base, "checksums")) {|p| FileUtils.mkdir_p(p) }
|
111
|
+
file_name = "#{File.basename(built_gem_path)}.sha512"
|
112
|
+
require "digest/sha2"
|
113
|
+
checksum = Digest::SHA512.new.hexdigest(built_gem_path.to_s)
|
114
|
+
target = File.join(base, "checksums", file_name)
|
115
|
+
File.write(target, checksum)
|
116
|
+
Bundler.ui.confirm "#{name} #{version} checksum written to checksums/#{file_name}."
|
117
|
+
end
|
118
|
+
|
103
119
|
protected
|
104
120
|
|
105
121
|
def rubygem_push(path)
|
data/lib/bundler/index.rb
CHANGED
data/lib/bundler/injector.rb
CHANGED
@@ -128,7 +128,7 @@ module Bundler
|
|
128
128
|
# evaluates a gemfile to remove the specified gem
|
129
129
|
# from it.
|
130
130
|
def remove_deps(gemfile_path)
|
131
|
-
initial_gemfile =
|
131
|
+
initial_gemfile = File.readlines(gemfile_path)
|
132
132
|
|
133
133
|
Bundler.ui.info "Removing gems from #{gemfile_path}"
|
134
134
|
|
@@ -181,7 +181,7 @@ module Bundler
|
|
181
181
|
patterns = /gem\s+(['"])#{Regexp.union(gems)}\1|gem\s*\((['"])#{Regexp.union(gems)}\2\)/
|
182
182
|
new_gemfile = []
|
183
183
|
multiline_removal = false
|
184
|
-
|
184
|
+
File.readlines(gemfile_path).each do |line|
|
185
185
|
match_data = line.match(patterns)
|
186
186
|
if match_data && is_not_within_comment?(line, match_data)
|
187
187
|
multiline_removal = line.rstrip.end_with?(",")
|
data/lib/bundler/inline.rb
CHANGED
@@ -52,7 +52,7 @@ def gemfile(install = false, options = {}, &gemfile)
|
|
52
52
|
builder.instance_eval(&gemfile)
|
53
53
|
builder.check_primary_source_safety
|
54
54
|
|
55
|
-
Bundler.settings.temporary(:frozen => false) do
|
55
|
+
Bundler.settings.temporary(:deployment => false, :frozen => false) do
|
56
56
|
definition = builder.to_definition(nil, true)
|
57
57
|
def definition.lock(*); end
|
58
58
|
definition.validate_runtime!
|
@@ -6,10 +6,11 @@ require_relative "gem_installer"
|
|
6
6
|
module Bundler
|
7
7
|
class ParallelInstaller
|
8
8
|
class SpecInstallation
|
9
|
-
attr_accessor :spec, :name, :post_install_message, :state, :error
|
9
|
+
attr_accessor :spec, :name, :full_name, :post_install_message, :state, :error
|
10
10
|
def initialize(spec)
|
11
11
|
@spec = spec
|
12
12
|
@name = spec.name
|
13
|
+
@full_name = spec.full_name
|
13
14
|
@state = :none
|
14
15
|
@post_install_message = ""
|
15
16
|
@error = nil
|
@@ -27,13 +28,8 @@ module Bundler
|
|
27
28
|
state == :failed
|
28
29
|
end
|
29
30
|
|
30
|
-
def installation_attempted?
|
31
|
-
installed? || failed?
|
32
|
-
end
|
33
|
-
|
34
|
-
# Only true when spec in neither installed nor already enqueued
|
35
31
|
def ready_to_enqueue?
|
36
|
-
|
32
|
+
state == :none
|
37
33
|
end
|
38
34
|
|
39
35
|
def has_post_install_message?
|
@@ -54,14 +50,11 @@ module Bundler
|
|
54
50
|
# Represents only the non-development dependencies, the ones that are
|
55
51
|
# itself and are in the total list.
|
56
52
|
def dependencies
|
57
|
-
@dependencies ||=
|
58
|
-
all_dependencies.reject {|dep| ignorable_dependency? dep }
|
59
|
-
end
|
53
|
+
@dependencies ||= all_dependencies.reject {|dep| ignorable_dependency? dep }
|
60
54
|
end
|
61
55
|
|
62
56
|
def missing_lockfile_dependencies(all_spec_names)
|
63
|
-
|
64
|
-
deps.reject {|dep| all_spec_names.include? dep.name }
|
57
|
+
dependencies.reject {|dep| all_spec_names.include? dep.name }
|
65
58
|
end
|
66
59
|
|
67
60
|
# Represents all dependencies
|
@@ -70,7 +63,7 @@ module Bundler
|
|
70
63
|
end
|
71
64
|
|
72
65
|
def to_s
|
73
|
-
"#<#{self.class} #{
|
66
|
+
"#<#{self.class} #{full_name} (#{state})>"
|
74
67
|
end
|
75
68
|
end
|
76
69
|
|
@@ -93,18 +86,48 @@ module Bundler
|
|
93
86
|
def call
|
94
87
|
check_for_corrupt_lockfile
|
95
88
|
|
89
|
+
if @rake
|
90
|
+
do_install(@rake, 0)
|
91
|
+
Gem::Specification.reset
|
92
|
+
end
|
93
|
+
|
96
94
|
if @size > 1
|
97
95
|
install_with_worker
|
98
96
|
else
|
99
97
|
install_serially
|
100
98
|
end
|
101
99
|
|
100
|
+
check_for_unmet_dependencies
|
101
|
+
|
102
102
|
handle_error if failed_specs.any?
|
103
103
|
@specs
|
104
104
|
ensure
|
105
105
|
worker_pool && worker_pool.stop
|
106
106
|
end
|
107
107
|
|
108
|
+
def check_for_unmet_dependencies
|
109
|
+
unmet_dependencies = @specs.map do |s|
|
110
|
+
[
|
111
|
+
s,
|
112
|
+
s.dependencies.reject {|dep| @specs.any? {|spec| dep.matches_spec?(spec.spec) } },
|
113
|
+
]
|
114
|
+
end.reject {|a| a.last.empty? }
|
115
|
+
return if unmet_dependencies.empty?
|
116
|
+
|
117
|
+
warning = []
|
118
|
+
warning << "Your lockfile doesn't include a valid resolution."
|
119
|
+
warning << "You can fix this by regenerating your lockfile or trying to manually editing the bad locked gems to a version that satisfies all dependencies."
|
120
|
+
warning << "The unmet dependencies are:"
|
121
|
+
|
122
|
+
unmet_dependencies.each do |spec, unmet_spec_dependencies|
|
123
|
+
unmet_spec_dependencies.each do |unmet_spec_dependency|
|
124
|
+
warning << "* #{unmet_spec_dependency}, depended upon #{spec.full_name}, unsatisfied by #{@specs.find {|s| s.name == unmet_spec_dependency.name && !unmet_spec_dependency.matches_spec?(s.spec) }.full_name}"
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
Bundler.ui.warn(warning.join("\n"))
|
129
|
+
end
|
130
|
+
|
108
131
|
def check_for_corrupt_lockfile
|
109
132
|
missing_dependencies = @specs.map do |s|
|
110
133
|
[
|
@@ -217,8 +240,6 @@ module Bundler
|
|
217
240
|
# are installed.
|
218
241
|
def enqueue_specs
|
219
242
|
@specs.select(&:ready_to_enqueue?).each do |spec|
|
220
|
-
next if @rake && !@rake.installed? && spec.name != @rake.name
|
221
|
-
|
222
243
|
if spec.dependencies_installed? @specs
|
223
244
|
spec.state = :enqueued
|
224
245
|
worker_pool.enq spec
|
@@ -73,7 +73,12 @@ module Bundler
|
|
73
73
|
same_platform_candidates = candidates.select do |spec|
|
74
74
|
MatchPlatform.platforms_match?(spec.platform, platform_object)
|
75
75
|
end
|
76
|
-
|
76
|
+
installable_candidates = same_platform_candidates.select do |spec|
|
77
|
+
!spec.is_a?(EndpointSpecification) ||
|
78
|
+
(spec.required_ruby_version.satisfied_by?(Gem.ruby_version) &&
|
79
|
+
spec.required_rubygems_version.satisfied_by?(Gem.rubygems_version))
|
80
|
+
end
|
81
|
+
search = installable_candidates.last || same_platform_candidates.last
|
77
82
|
search.dependencies = dependencies if search && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))
|
78
83
|
search
|
79
84
|
end
|
@@ -131,18 +131,8 @@ module Bundler
|
|
131
131
|
@sources << @current_source
|
132
132
|
end
|
133
133
|
when GEM
|
134
|
-
|
135
|
-
|
136
|
-
if source_remotes.size == 1
|
137
|
-
@opts["remotes"] = @opts.delete("remote")
|
138
|
-
@current_source = TYPES[@type].from_lock(@opts)
|
139
|
-
else
|
140
|
-
source_remotes.each do |url|
|
141
|
-
rubygems_aggregate.add_remote(url)
|
142
|
-
end
|
143
|
-
@current_source = rubygems_aggregate
|
144
|
-
end
|
145
|
-
|
134
|
+
@opts["remotes"] = Array(@opts.delete("remote")).reverse
|
135
|
+
@current_source = TYPES[@type].from_lock(@opts)
|
146
136
|
@sources << @current_source
|
147
137
|
when PLUGIN
|
148
138
|
@current_source = Plugin.source_from_lock(@opts)
|
@@ -245,9 +235,5 @@ module Bundler
|
|
245
235
|
def parse_ruby(line)
|
246
236
|
@ruby_version = line.strip
|
247
237
|
end
|
248
|
-
|
249
|
-
def rubygems_aggregate
|
250
|
-
@rubygems_aggregate ||= Source::Rubygems.new
|
251
|
-
end
|
252
238
|
end
|
253
239
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-CACHE" "1" "
|
4
|
+
.TH "BUNDLE\-CACHE" "1" "May 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-CHECK" "1" "
|
4
|
+
.TH "BUNDLE\-CHECK" "1" "May 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-CONFIG" "1" "
|
4
|
+
.TH "BUNDLE\-CONFIG" "1" "May 2021" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-config\fR \- Set bundler configuration options
|
@@ -56,9 +56,6 @@ Executing \fBbundle config unset \-\-local <name> <value>\fR will delete the con
|
|
56
56
|
.P
|
57
57
|
Executing bundle with the \fBBUNDLE_IGNORE_CONFIG\fR environment variable set will cause it to ignore all configuration\.
|
58
58
|
.
|
59
|
-
.P
|
60
|
-
Executing \fBbundle config set \-\-local disable_multisource true\fR upgrades the warning about the Gemfile containing multiple primary sources to an error\. Executing \fBbundle config unset disable_multisource\fR downgrades this error to a warning\.
|
61
|
-
.
|
62
59
|
.SH "REMEMBERING OPTIONS"
|
63
60
|
Flags passed to \fBbundle install\fR or the Bundler runtime, such as \fB\-\-path foo\fR or \fB\-\-without production\fR, are remembered between commands and saved to your local application\'s configuration (normally, \fB\./\.bundle/config\fR)\.
|
64
61
|
.
|
@@ -184,9 +181,6 @@ The following is a list of all configuration keys and their purpose\. You can le
|
|
184
181
|
\fBdisable_local_revision_check\fR (\fBBUNDLE_DISABLE_LOCAL_REVISION_CHECK\fR): Allow Bundler to use a local git override without checking if the revision present in the lockfile is present in the repository\.
|
185
182
|
.
|
186
183
|
.IP "\(bu" 4
|
187
|
-
\fBdisable_multisource\fR (\fBBUNDLE_DISABLE_MULTISOURCE\fR): When set, Gemfiles containing multiple sources will produce errors instead of warnings\. Use \fBbundle config unset disable_multisource\fR to unset\.
|
188
|
-
.
|
189
|
-
.IP "\(bu" 4
|
190
184
|
\fBdisable_shared_gems\fR (\fBBUNDLE_DISABLE_SHARED_GEMS\fR): Stop Bundler from accessing gems installed to RubyGems\' normal location\.
|
191
185
|
.
|
192
186
|
.IP "\(bu" 4
|
@@ -199,6 +193,9 @@ The following is a list of all configuration keys and their purpose\. You can le
|
|
199
193
|
\fBfrozen\fR (\fBBUNDLE_FROZEN\fR): Disallow changes to the \fBGemfile\fR\. When the \fBGemfile\fR is changed and the lockfile has not been updated, running Bundler commands will be blocked\. Defaults to \fBtrue\fR when \fB\-\-deployment\fR is used\.
|
200
194
|
.
|
201
195
|
.IP "\(bu" 4
|
196
|
+
\fBgem\.github_username\fR (\fBBUNDLE_GEM__GITHUB_USERNAME\fR): Sets a GitHub username or organization to be used in \fBREADME\fR file when you create a new gem via \fBbundle gem\fR command\. It can be overridden by passing an explicit \fB\-\-github\-username\fR flag to \fBbundle gem\fR\.
|
197
|
+
.
|
198
|
+
.IP "\(bu" 4
|
202
199
|
\fBgem\.push_key\fR (\fBBUNDLE_GEM__PUSH_KEY\fR): Sets the \fB\-\-key\fR parameter for \fBgem push\fR when using the \fBrake release\fR command with a private gemstash server\.
|
203
200
|
.
|
204
201
|
.IP "\(bu" 4
|
@@ -223,9 +220,6 @@ The following is a list of all configuration keys and their purpose\. You can le
|
|
223
220
|
\fBno_prune\fR (\fBBUNDLE_NO_PRUNE\fR): Whether Bundler should leave outdated gems unpruned when caching\.
|
224
221
|
.
|
225
222
|
.IP "\(bu" 4
|
226
|
-
\fBonly_update_to_newer_versions\fR (\fBBUNDLE_ONLY_UPDATE_TO_NEWER_VERSIONS\fR): During \fBbundle update\fR, only resolve to newer versions of the gems in the lockfile\.
|
227
|
-
.
|
228
|
-
.IP "\(bu" 4
|
229
223
|
\fBpath\fR (\fBBUNDLE_PATH\fR): The location on disk where all gems in your bundle will be located regardless of \fB$GEM_HOME\fR or \fB$GEM_PATH\fR values\. Bundle gems not found in this location will be installed by \fBbundle install\fR\. Defaults to \fBGem\.dir\fR\. When \-\-deployment is used, defaults to vendor/bundle\.
|
230
224
|
.
|
231
225
|
.IP "\(bu" 4
|
@@ -470,6 +464,23 @@ export BUNDLE_GITHUB__COM=abcd0123generatedtoken:x\-oauth\-basic
|
|
470
464
|
.
|
471
465
|
.IP "" 0
|
472
466
|
.
|
467
|
+
.P
|
468
|
+
Note that any configured credentials will be redacted by informative commands such as \fBbundle config list\fR or \fBbundle config get\fR, unless you use the \fB\-\-parseable\fR flag\. This is to avoid unintentially leaking credentials when copy\-pasting bundler output\.
|
469
|
+
.
|
470
|
+
.P
|
471
|
+
Also note that to guarantee a sane mapping between valid environment variable names and valid host names, bundler makes the following transformations:
|
472
|
+
.
|
473
|
+
.IP "\(bu" 4
|
474
|
+
Any \fB\-\fR characters in a host name are mapped to a triple dash (\fB___\fR) in the corresponding enviroment variable\.
|
475
|
+
.
|
476
|
+
.IP "\(bu" 4
|
477
|
+
Any \fB\.\fR characters in a host name are mapped to a double dash (\fB__\fR) in the corresponding environment variable\.
|
478
|
+
.
|
479
|
+
.IP "" 0
|
480
|
+
.
|
481
|
+
.P
|
482
|
+
This means that if you have a gem server named \fBmy\.gem\-host\.com\fR, you\'ll need to use the \fBBUNDLE_MY__GEM___HOST__COM\fR variable to configure credentials for it through ENV\.
|
483
|
+
.
|
473
484
|
.SH "CONFIGURE BUNDLER DIRECTORIES"
|
474
485
|
Bundler\'s home, config, cache and plugin directories are able to be configured through environment variables\. The default location for Bundler\'s home directory is \fB~/\.bundle\fR, which all directories inherit from by default\. The following outlines the available environment variables and their default values
|
475
486
|
.
|