bundler 2.2.0.rc.1 → 2.2.3
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 +786 -690
- data/lib/bundler.rb +17 -3
- data/lib/bundler/build_metadata.rb +3 -11
- data/lib/bundler/cli.rb +31 -15
- data/lib/bundler/cli/add.rb +1 -1
- data/lib/bundler/cli/binstubs.rb +6 -2
- data/lib/bundler/cli/cache.rb +1 -7
- data/lib/bundler/cli/clean.rb +1 -1
- data/lib/bundler/cli/common.rb +14 -0
- data/lib/bundler/cli/doctor.rb +1 -1
- data/lib/bundler/cli/exec.rb +4 -4
- data/lib/bundler/cli/fund.rb +36 -0
- data/lib/bundler/cli/gem.rb +1 -1
- data/lib/bundler/cli/info.rb +2 -1
- data/lib/bundler/cli/init.rb +1 -1
- data/lib/bundler/cli/inject.rb +1 -1
- data/lib/bundler/cli/install.rb +18 -7
- data/lib/bundler/cli/list.rb +1 -1
- data/lib/bundler/cli/outdated.rb +1 -3
- data/lib/bundler/cli/pristine.rb +1 -1
- data/lib/bundler/cli/show.rb +1 -1
- data/lib/bundler/cli/update.rb +3 -1
- data/lib/bundler/compact_index_client.rb +1 -1
- data/lib/bundler/compact_index_client/cache.rb +6 -14
- data/lib/bundler/compact_index_client/gem_parser.rb +28 -0
- data/lib/bundler/compact_index_client/updater.rb +5 -5
- data/lib/bundler/definition.rb +49 -60
- data/lib/bundler/dep_proxy.rb +1 -1
- data/lib/bundler/dependency.rb +3 -1
- data/lib/bundler/dsl.rb +4 -4
- data/lib/bundler/endpoint_specification.rb +1 -1
- data/lib/bundler/env.rb +1 -1
- data/lib/bundler/feature_flag.rb +0 -1
- data/lib/bundler/fetcher.rb +3 -3
- data/lib/bundler/fetcher/base.rb +1 -1
- data/lib/bundler/fetcher/compact_index.rb +1 -1
- data/lib/bundler/fetcher/downloader.rb +1 -1
- data/lib/bundler/fetcher/index.rb +3 -4
- data/lib/bundler/friendly_errors.rb +18 -3
- data/lib/bundler/gem_helper.rb +17 -9
- data/lib/bundler/gem_helpers.rb +36 -25
- data/lib/bundler/gem_version_promoter.rb +1 -1
- data/lib/bundler/graph.rb +1 -1
- data/lib/bundler/index.rb +6 -2
- data/lib/bundler/injector.rb +10 -3
- data/lib/bundler/installer.rb +8 -6
- data/lib/bundler/installer/gem_installer.rb +1 -1
- data/lib/bundler/installer/parallel_installer.rb +1 -1
- data/lib/bundler/installer/standalone.rb +2 -2
- data/lib/bundler/lazy_specification.rb +22 -11
- data/lib/bundler/lockfile_generator.rb +1 -1
- data/lib/bundler/lockfile_parser.rb +1 -1
- data/lib/bundler/man/.document +1 -0
- data/{man/bundle-add.ronn → lib/bundler/man/bundle-add.1.ronn} +0 -0
- data/{man/bundle-binstubs.ronn → lib/bundler/man/bundle-binstubs.1.ronn} +2 -4
- data/{man/bundle-cache.ronn → lib/bundler/man/bundle-cache.1.ronn} +0 -0
- data/{man/bundle-check.ronn → lib/bundler/man/bundle-check.1.ronn} +0 -0
- data/{man/bundle-clean.ronn → lib/bundler/man/bundle-clean.1.ronn} +0 -0
- data/{man/bundle-config.ronn → lib/bundler/man/bundle-config.1.ronn} +14 -21
- data/{man/bundle-doctor.ronn → lib/bundler/man/bundle-doctor.1.ronn} +0 -0
- data/{man/bundle-exec.ronn → lib/bundler/man/bundle-exec.1.ronn} +0 -0
- data/{man/bundle-gem.ronn → lib/bundler/man/bundle-gem.1.ronn} +0 -0
- data/{man/bundle-info.ronn → lib/bundler/man/bundle-info.1.ronn} +0 -0
- data/{man/bundle-init.ronn → lib/bundler/man/bundle-init.1.ronn} +0 -0
- data/{man/bundle-inject.ronn → lib/bundler/man/bundle-inject.1.ronn} +0 -0
- data/{man/bundle-install.ronn → lib/bundler/man/bundle-install.1.ronn} +25 -3
- data/{man/bundle-list.ronn → lib/bundler/man/bundle-list.1.ronn} +0 -0
- data/{man/bundle-lock.ronn → lib/bundler/man/bundle-lock.1.ronn} +0 -0
- data/{man/bundle-open.ronn → lib/bundler/man/bundle-open.1.ronn} +0 -0
- data/{man/bundle-outdated.ronn → lib/bundler/man/bundle-outdated.1.ronn} +0 -0
- data/{man/bundle-platform.ronn → lib/bundler/man/bundle-platform.1.ronn} +0 -0
- data/{man/bundle-pristine.ronn → lib/bundler/man/bundle-pristine.1.ronn} +0 -0
- data/{man/bundle-remove.ronn → lib/bundler/man/bundle-remove.1.ronn} +0 -0
- data/{man/bundle-show.ronn → lib/bundler/man/bundle-show.1.ronn} +0 -0
- data/{man/bundle-update.ronn → lib/bundler/man/bundle-update.1.ronn} +0 -0
- data/{man/bundle-viz.ronn → lib/bundler/man/bundle-viz.1.ronn} +0 -0
- data/{man/bundle.ronn → lib/bundler/man/bundle.1.ronn} +0 -0
- data/{man → lib/bundler/man}/gemfile.5.ronn +4 -4
- data/lib/bundler/mirror.rb +2 -2
- data/lib/bundler/plugin.rb +5 -6
- data/lib/bundler/plugin/api/source.rb +1 -1
- data/lib/bundler/plugin/dsl.rb +1 -1
- data/lib/bundler/plugin/index.rb +1 -1
- data/lib/bundler/plugin/installer.rb +1 -1
- data/lib/bundler/plugin/installer/rubygems.rb +1 -1
- data/lib/bundler/plugin/source_list.rb +1 -1
- data/lib/bundler/remote_specification.rb +1 -1
- data/lib/bundler/resolver.rb +26 -30
- data/lib/bundler/resolver/spec_group.rb +21 -27
- data/lib/bundler/retry.rb +1 -1
- data/lib/bundler/ruby_version.rb +1 -1
- data/lib/bundler/rubygems_ext.rb +46 -1
- data/lib/bundler/rubygems_gem_installer.rb +2 -2
- data/lib/bundler/rubygems_integration.rb +22 -12
- data/lib/bundler/runtime.rb +2 -2
- data/lib/bundler/settings.rb +49 -43
- data/lib/bundler/shared_helpers.rb +1 -1
- data/lib/bundler/similarity_detector.rb +1 -1
- data/lib/bundler/source.rb +1 -1
- data/lib/bundler/source/git.rb +1 -1
- data/lib/bundler/source/git/git_proxy.rb +5 -3
- data/lib/bundler/source/path.rb +2 -2
- data/lib/bundler/source/path/installer.rb +1 -1
- data/lib/bundler/source/rubygems.rb +2 -2
- data/lib/bundler/source/rubygems/remote.rb +1 -1
- data/lib/bundler/source_list.rb +2 -2
- data/lib/bundler/spec_set.rb +7 -9
- data/lib/bundler/stub_specification.rb +1 -3
- data/lib/bundler/templates/newgem/README.md.tt +1 -2
- data/lib/bundler/templates/newgem/bin/console.tt +1 -2
- data/lib/bundler/templates/newgem/lib/newgem.rb.tt +2 -2
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +8 -2
- data/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +0 -1
- data/lib/bundler/ui/shell.rb +5 -5
- data/lib/bundler/uri_credentials_filter.rb +3 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo.rb +0 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +34 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +2 -2
- data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +38 -40
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +8 -1
- data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +154 -0
- data/lib/bundler/vendored_persistent.rb +0 -7
- data/lib/bundler/vendored_tmpdir.rb +4 -0
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler/worker.rb +1 -1
- data/lib/bundler/yaml_serializer.rb +1 -1
- data/man/bundle-add.1 +1 -1
- data/man/bundle-binstubs.1 +5 -3
- data/man/bundle-cache.1 +1 -1
- data/man/bundle-check.1 +1 -1
- data/man/bundle-clean.1 +1 -1
- data/man/bundle-config.1 +14 -17
- data/man/bundle-doctor.1 +1 -1
- data/man/bundle-exec.1 +1 -1
- data/man/bundle-gem.1 +1 -1
- data/man/bundle-info.1 +1 -1
- data/man/bundle-init.1 +1 -1
- data/man/bundle-inject.1 +1 -1
- data/man/bundle-install.1 +30 -3
- data/man/bundle-list.1 +1 -1
- data/man/bundle-lock.1 +1 -1
- data/man/bundle-open.1 +1 -1
- data/man/bundle-outdated.1 +1 -1
- data/man/bundle-platform.1 +1 -1
- data/man/bundle-pristine.1 +1 -1
- data/man/bundle-remove.1 +1 -1
- data/man/bundle-show.1 +1 -1
- data/man/bundle-update.1 +1 -1
- data/man/bundle-viz.1 +1 -1
- data/man/bundle.1 +1 -1
- data/man/gemfile.5 +4 -4
- metadata +33 -54
- data/lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb +0 -26
- data/man/bundle-add.1.txt +0 -58
- data/man/bundle-binstubs.1.txt +0 -48
- data/man/bundle-cache.1.txt +0 -78
- data/man/bundle-check.1.txt +0 -33
- data/man/bundle-clean.1.txt +0 -26
- data/man/bundle-config.1.txt +0 -527
- data/man/bundle-doctor.1.txt +0 -44
- data/man/bundle-exec.1.txt +0 -181
- data/man/bundle-gem.1.txt +0 -117
- data/man/bundle-info.1.txt +0 -21
- data/man/bundle-init.1.txt +0 -34
- data/man/bundle-inject.1.txt +0 -32
- data/man/bundle-install.1.txt +0 -401
- data/man/bundle-list.1.txt +0 -44
- data/man/bundle-lock.1.txt +0 -93
- data/man/bundle-open.1.txt +0 -29
- data/man/bundle-outdated.1.txt +0 -131
- data/man/bundle-platform.1.txt +0 -57
- data/man/bundle-pristine.1.txt +0 -44
- data/man/bundle-remove.1.txt +0 -34
- data/man/bundle-show.1.txt +0 -27
- data/man/bundle-update.1.txt +0 -391
- data/man/bundle-viz.1.txt +0 -39
- data/man/bundle.1.txt +0 -116
- data/man/gemfile.5.txt +0 -651
data/lib/bundler/runtime.rb
CHANGED
@@ -155,7 +155,7 @@ module Bundler
|
|
155
155
|
spec_cache_paths = []
|
156
156
|
spec_gemspec_paths = []
|
157
157
|
spec_extension_paths = []
|
158
|
-
specs.each do |spec|
|
158
|
+
Bundler.rubygems.add_default_gems_to(specs).values.each do |spec|
|
159
159
|
spec_gem_paths << spec.full_gem_path
|
160
160
|
# need to check here in case gems are nested like for the rails git repo
|
161
161
|
md = %r{(.+bundler/gems/.+-[a-f0-9]{7,12})}.match(spec.full_gem_path)
|
@@ -203,7 +203,7 @@ module Bundler
|
|
203
203
|
output
|
204
204
|
end
|
205
205
|
|
206
|
-
|
206
|
+
private
|
207
207
|
|
208
208
|
def prune_gem_cache(resolve, cache_path)
|
209
209
|
cached = Dir["#{cache_path}/*.gem"]
|
data/lib/bundler/settings.rb
CHANGED
@@ -42,7 +42,6 @@ module Bundler
|
|
42
42
|
setup_makes_kernel_gem_public
|
43
43
|
silence_deprecations
|
44
44
|
silence_root_warning
|
45
|
-
specific_platform
|
46
45
|
suppress_install_using_messages
|
47
46
|
unlock_source_unlocks_spec
|
48
47
|
update_requires_all_flag
|
@@ -63,30 +62,25 @@ module Bundler
|
|
63
62
|
].freeze
|
64
63
|
|
65
64
|
DEFAULT_CONFIG = {
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
65
|
+
"BUNDLE_SILENCE_DEPRECATIONS" => false,
|
66
|
+
"BUNDLE_DISABLE_VERSION_CHECK" => true,
|
67
|
+
"BUNDLE_PREFER_PATCH" => false,
|
68
|
+
"BUNDLE_REDIRECT" => 5,
|
69
|
+
"BUNDLE_RETRY" => 3,
|
70
|
+
"BUNDLE_TIMEOUT" => 10,
|
72
71
|
}.freeze
|
73
72
|
|
74
73
|
def initialize(root = nil)
|
75
74
|
@root = root
|
76
75
|
@local_config = load_config(local_config_file)
|
76
|
+
@env_config = ENV.to_h.select {|key, _value| key =~ /\ABUNDLE_.+/ }
|
77
77
|
@global_config = load_config(global_config_file)
|
78
78
|
@temporary = {}
|
79
79
|
end
|
80
80
|
|
81
81
|
def [](name)
|
82
82
|
key = key_for(name)
|
83
|
-
value =
|
84
|
-
@local_config.fetch(key) do
|
85
|
-
ENV.fetch(key) do
|
86
|
-
@global_config.fetch(key) do
|
87
|
-
DEFAULT_CONFIG.fetch(name) do
|
88
|
-
nil
|
89
|
-
end end end end end
|
83
|
+
value = configs.values.map {|config| config[key] }.compact.first
|
90
84
|
|
91
85
|
converted_value(value, name)
|
92
86
|
end
|
@@ -129,9 +123,7 @@ module Bundler
|
|
129
123
|
end
|
130
124
|
|
131
125
|
def all
|
132
|
-
|
133
|
-
|
134
|
-
keys = @temporary.keys | @global_config.keys | @local_config.keys | env_keys
|
126
|
+
keys = @temporary.keys | @global_config.keys | @local_config.keys | @env_config.keys
|
135
127
|
|
136
128
|
keys.map do |key|
|
137
129
|
key.sub(/^BUNDLE_/, "").gsub(/__/, ".").downcase
|
@@ -168,13 +160,11 @@ module Bundler
|
|
168
160
|
|
169
161
|
def locations(key)
|
170
162
|
key = key_for(key)
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
locations[:default] = DEFAULT_CONFIG[key] if DEFAULT_CONFIG.key?(key)
|
177
|
-
locations
|
163
|
+
configs.keys.inject({}) do |partial_locations, level|
|
164
|
+
value_on_level = configs[level][key]
|
165
|
+
partial_locations[level] = value_on_level unless value_on_level.nil?
|
166
|
+
partial_locations
|
167
|
+
end
|
178
168
|
end
|
179
169
|
|
180
170
|
def pretty_values_for(exposed_key)
|
@@ -182,20 +172,20 @@ module Bundler
|
|
182
172
|
|
183
173
|
locations = []
|
184
174
|
|
185
|
-
if @temporary
|
186
|
-
locations << "Set for the current command: #{converted_value(
|
175
|
+
if value = @temporary[key]
|
176
|
+
locations << "Set for the current command: #{converted_value(value, exposed_key).inspect}"
|
187
177
|
end
|
188
178
|
|
189
|
-
if @local_config
|
190
|
-
locations << "Set for your local app (#{local_config_file}): #{converted_value(
|
179
|
+
if value = @local_config[key]
|
180
|
+
locations << "Set for your local app (#{local_config_file}): #{converted_value(value, exposed_key).inspect}"
|
191
181
|
end
|
192
182
|
|
193
|
-
if value =
|
183
|
+
if value = @env_config[key]
|
194
184
|
locations << "Set via #{key}: #{converted_value(value, exposed_key).inspect}"
|
195
185
|
end
|
196
186
|
|
197
|
-
if @global_config
|
198
|
-
locations << "Set for the current user (#{global_config_file}): #{converted_value(
|
187
|
+
if value = @global_config[key]
|
188
|
+
locations << "Set for the current user (#{global_config_file}): #{converted_value(value, exposed_key).inspect}"
|
199
189
|
end
|
200
190
|
|
201
191
|
return ["You have not configured a value for `#{exposed_key}`"] if locations.empty?
|
@@ -204,17 +194,19 @@ module Bundler
|
|
204
194
|
|
205
195
|
# for legacy reasons, in Bundler 2, we do not respect :disable_shared_gems
|
206
196
|
def path
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
197
|
+
configs.each do |_level, settings|
|
198
|
+
path = value_for("path", settings)
|
199
|
+
path_system = value_for("path.system", settings)
|
200
|
+
disabled_shared_gems = value_for("disable_shared_gems", settings)
|
201
|
+
next if path.nil? && path_system.nil? && disabled_shared_gems.nil?
|
202
|
+
system_path = path_system || (disabled_shared_gems == false)
|
203
|
+
return Path.new(path, system_path)
|
211
204
|
end
|
212
205
|
|
213
|
-
|
214
|
-
Path.new(self[:path], system_path, Bundler.feature_flag.default_install_uses_path?)
|
206
|
+
Path.new(nil, false)
|
215
207
|
end
|
216
208
|
|
217
|
-
Path = Struct.new(:explicit_path, :system_path
|
209
|
+
Path = Struct.new(:explicit_path, :system_path) do
|
218
210
|
def path
|
219
211
|
path = base_path
|
220
212
|
path = File.join(path, Bundler.ruby_scope) unless use_system_gems?
|
@@ -224,7 +216,7 @@ module Bundler
|
|
224
216
|
def use_system_gems?
|
225
217
|
return true if system_path
|
226
218
|
return false if explicit_path
|
227
|
-
!default_install_uses_path
|
219
|
+
!Bundler.feature_flag.default_install_uses_path?
|
228
220
|
end
|
229
221
|
|
230
222
|
def base_path
|
@@ -277,9 +269,9 @@ module Bundler
|
|
277
269
|
|
278
270
|
def validate!
|
279
271
|
all.each do |raw_key|
|
280
|
-
[@local_config,
|
281
|
-
value =
|
282
|
-
Validator.validate!(raw_key, value, settings.
|
272
|
+
[@local_config, @env_config, @global_config].each do |settings|
|
273
|
+
value = value_for(raw_key, settings)
|
274
|
+
Validator.validate!(raw_key, value, settings.dup)
|
283
275
|
end
|
284
276
|
end
|
285
277
|
end
|
@@ -290,7 +282,21 @@ module Bundler
|
|
290
282
|
"BUNDLE_#{key}"
|
291
283
|
end
|
292
284
|
|
293
|
-
|
285
|
+
private
|
286
|
+
|
287
|
+
def configs
|
288
|
+
{
|
289
|
+
:temporary => @temporary,
|
290
|
+
:local => @local_config,
|
291
|
+
:env => @env_config,
|
292
|
+
:global => @global_config,
|
293
|
+
:default => DEFAULT_CONFIG,
|
294
|
+
}
|
295
|
+
end
|
296
|
+
|
297
|
+
def value_for(name, config)
|
298
|
+
converted_value(config[key_for(name)], name)
|
299
|
+
end
|
294
300
|
|
295
301
|
def parent_setting_for(name)
|
296
302
|
split_specific_setting_for(name)[0]
|
data/lib/bundler/source.rb
CHANGED
data/lib/bundler/source/git.rb
CHANGED
@@ -118,7 +118,7 @@ module Bundler
|
|
118
118
|
git_retry %(clone --no-checkout --quiet "#{path}" "#{destination}")
|
119
119
|
File.chmod(((File.stat(destination).mode | 0o777) & ~File.umask), destination)
|
120
120
|
rescue Errno::EEXIST => e
|
121
|
-
file_path = e.message[%r{.*?(
|
121
|
+
file_path = e.message[%r{.*?((?:[a-zA-Z]:)?/.*)}, 1]
|
122
122
|
raise GitError, "Bundler could not install a gem because it needs to " \
|
123
123
|
"create a directory, but a file exists - #{file_path}. Please delete " \
|
124
124
|
"this file and try again."
|
@@ -136,11 +136,13 @@ module Bundler
|
|
136
136
|
if submodules
|
137
137
|
git_retry "submodule update --init --recursive", :dir => destination
|
138
138
|
elsif Gem::Version.create(version) >= Gem::Version.create("2.9.0")
|
139
|
-
|
139
|
+
inner_command = "git -C $toplevel submodule deinit --force $sm_path"
|
140
|
+
inner_command = inner_command.gsub("$") { '\$' } unless Bundler::WINDOWS
|
141
|
+
git_retry "submodule foreach --quiet \"#{inner_command}\"", :dir => destination
|
140
142
|
end
|
141
143
|
end
|
142
144
|
|
143
|
-
|
145
|
+
private
|
144
146
|
|
145
147
|
def git_null(command, dir: SharedHelpers.pwd)
|
146
148
|
check_allowed(command)
|
data/lib/bundler/source/path.rb
CHANGED
@@ -125,7 +125,7 @@ module Bundler
|
|
125
125
|
@expanded_original_path ||= expand(original_path)
|
126
126
|
end
|
127
127
|
|
128
|
-
|
128
|
+
private
|
129
129
|
|
130
130
|
def expanded_path
|
131
131
|
@expanded_path ||= expand(path)
|
@@ -171,7 +171,7 @@ module Bundler
|
|
171
171
|
|
172
172
|
if File.directory?(expanded_path)
|
173
173
|
# We sort depth-first since `<<` will override the earlier-found specs
|
174
|
-
|
174
|
+
Gem::Util.glob_files_in_dir(@glob, expanded_path).sort_by {|p| -p.split(File::SEPARATOR).size }.each do |file|
|
175
175
|
next unless spec = load_gemspec(file)
|
176
176
|
spec.source = self
|
177
177
|
|
@@ -291,7 +291,7 @@ module Bundler
|
|
291
291
|
names
|
292
292
|
end
|
293
293
|
|
294
|
-
|
294
|
+
protected
|
295
295
|
|
296
296
|
def credless_remotes
|
297
297
|
remotes.map(&method(:suppress_configured_credentials))
|
@@ -465,7 +465,7 @@ module Bundler
|
|
465
465
|
Bundler.app_cache
|
466
466
|
end
|
467
467
|
|
468
|
-
|
468
|
+
private
|
469
469
|
|
470
470
|
# Checks if the requested spec exists in the global cache. If it does,
|
471
471
|
# we copy it to the download path, and if it does not, we download it.
|
data/lib/bundler/source_list.rb
CHANGED
@@ -116,7 +116,7 @@ module Bundler
|
|
116
116
|
@rubygems_aggregate.remotes
|
117
117
|
end
|
118
118
|
|
119
|
-
|
119
|
+
private
|
120
120
|
|
121
121
|
def rubygems_aggregate_class
|
122
122
|
Source::Rubygems
|
@@ -147,7 +147,7 @@ module Bundler
|
|
147
147
|
if source.uri =~ /^git\:/
|
148
148
|
Bundler.ui.warn "The git source `#{source.uri}` uses the `git` protocol, " \
|
149
149
|
"which transmits data without encryption. Disable this warning with " \
|
150
|
-
"`bundle config set git.allow_insecure true`, or switch to the `https` " \
|
150
|
+
"`bundle config set --local git.allow_insecure true`, or switch to the `https` " \
|
151
151
|
"protocol to keep your data secure."
|
152
152
|
end
|
153
153
|
end
|
data/lib/bundler/spec_set.rb
CHANGED
@@ -22,10 +22,11 @@ module Bundler
|
|
22
22
|
break unless dep = deps.shift
|
23
23
|
next if !handled.add?(dep) || skip.include?(dep.name)
|
24
24
|
|
25
|
-
|
26
|
-
|
25
|
+
specs_for_dep = spec_for_dependency(dep, match_current_platform)
|
26
|
+
if specs_for_dep.any?
|
27
|
+
specs += specs_for_dep
|
27
28
|
|
28
|
-
|
29
|
+
specs_for_dep.first.dependencies.each do |d|
|
29
30
|
next if d.type == :development
|
30
31
|
d = DepProxy.new(d, dep.__platform) unless match_current_platform
|
31
32
|
deps << d
|
@@ -100,6 +101,7 @@ module Bundler
|
|
100
101
|
@specs.map do |s|
|
101
102
|
next s unless s.is_a?(LazySpecification)
|
102
103
|
s.source.dependency_names = names if s.source.respond_to?(:dependency_names=)
|
104
|
+
s.source.remote!
|
103
105
|
spec = s.__materialize__
|
104
106
|
raise GemNotFound, "Could not find #{s.full_name} in any of the sources" unless spec
|
105
107
|
spec
|
@@ -147,7 +149,7 @@ module Bundler
|
|
147
149
|
sorted.each(&b)
|
148
150
|
end
|
149
151
|
|
150
|
-
|
152
|
+
private
|
151
153
|
|
152
154
|
def sorted
|
153
155
|
rake = @specs.find {|s| s.name == "rake" }
|
@@ -183,11 +185,7 @@ module Bundler
|
|
183
185
|
def spec_for_dependency(dep, match_current_platform)
|
184
186
|
specs_for_platforms = lookup[dep.name]
|
185
187
|
if match_current_platform
|
186
|
-
Bundler.
|
187
|
-
match = GemHelpers.select_best_platform_match(specs_for_platforms, pl)
|
188
|
-
return match if match
|
189
|
-
end
|
190
|
-
nil
|
188
|
+
GemHelpers.select_best_platform_match(specs_for_platforms, Bundler.local_platform)
|
191
189
|
else
|
192
190
|
GemHelpers.select_best_platform_match(specs_for_platforms, dep.__platform)
|
193
191
|
end
|
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "remote_specification"
|
4
|
-
|
5
3
|
module Bundler
|
6
4
|
class StubSpecification < RemoteSpecification
|
7
5
|
def self.from_stub(stub)
|
@@ -83,7 +81,7 @@ module Bundler
|
|
83
81
|
stub.raw_require_paths
|
84
82
|
end
|
85
83
|
|
86
|
-
|
84
|
+
private
|
87
85
|
|
88
86
|
def _remote_specification
|
89
87
|
@_remote_specification ||= begin
|
@@ -28,12 +28,11 @@ TODO: Write usage instructions here
|
|
28
28
|
|
29
29
|
After checking out the repo, run `bin/setup` to install dependencies.<% if config[:test] %> Then, run `rake <%= config[:test].sub('mini', '').sub('rspec', 'spec') %>` to run the tests.<% end %> You can also run `bin/console` for an interactive prompt that will allow you to experiment.<% if config[:bin] %> Run `bundle exec <%= config[:name] %>` to use the gem in this directory, ignoring other installed copies of this gem.<% end %>
|
30
30
|
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
32
|
|
33
33
|
## Contributing
|
34
34
|
|
35
35
|
Bug reports and pull requests are welcome on GitHub at https://github.com/<%= config[:github_username] %>/<%= config[:name] %>.<% if config[:coc] %> This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/<%= config[:github_username] %>/<%= config[:name] %>/blob/master/CODE_OF_CONDUCT.md).<% end %>
|
36
|
-
|
37
36
|
<% if config[:mit] -%>
|
38
37
|
|
39
38
|
## License
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require_relative "<%= File.basename(config[:namespaced_path]) %>/version"
|
4
4
|
<%- if config[:ext] -%>
|
5
|
-
|
5
|
+
require_relative "<%= File.basename(config[:namespaced_path]) %>/<%= config[:underscored_name] %>"
|
6
6
|
<%- end -%>
|
7
7
|
|
8
8
|
<%- config[:constant_array].each_with_index do |c, i| -%>
|
@@ -25,12 +25,18 @@ Gem::Specification.new do |spec|
|
|
25
25
|
# Specify which files should be added to the gem when it is released.
|
26
26
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
27
27
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
28
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{
|
28
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
29
29
|
end
|
30
30
|
spec.bindir = "exe"
|
31
|
-
spec.executables = spec.files.grep(%r{
|
31
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
32
32
|
spec.require_paths = ["lib"]
|
33
33
|
<%- if config[:ext] -%>
|
34
34
|
spec.extensions = ["ext/<%= config[:underscored_name] %>/extconf.rb"]
|
35
35
|
<%- end -%>
|
36
|
+
|
37
|
+
# Uncomment to register a new dependency of your gem
|
38
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
39
|
+
|
40
|
+
# For more information and examples about making a new gem, checkout our
|
41
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
36
42
|
end
|