bundler 2.1.4 → 2.2.17
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 +1774 -1430
- data/README.md +6 -8
- data/bundler.gemspec +4 -4
- data/exe/bundle +3 -0
- data/lib/bundler.rb +33 -9
- data/lib/bundler/build_metadata.rb +3 -11
- data/lib/bundler/cli.rb +59 -23
- data/lib/bundler/cli/add.rb +1 -1
- data/lib/bundler/cli/binstubs.rb +6 -2
- data/lib/bundler/cli/cache.rb +2 -7
- data/lib/bundler/cli/clean.rb +1 -1
- data/lib/bundler/cli/common.rb +29 -2
- data/lib/bundler/cli/console.rb +1 -1
- 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 +129 -28
- data/lib/bundler/cli/info.rb +15 -4
- data/lib/bundler/cli/init.rb +2 -2
- data/lib/bundler/cli/inject.rb +1 -1
- data/lib/bundler/cli/install.rb +13 -11
- data/lib/bundler/cli/issue.rb +2 -2
- data/lib/bundler/cli/list.rb +12 -10
- data/lib/bundler/cli/outdated.rb +88 -67
- data/lib/bundler/cli/plugin.rb +10 -0
- data/lib/bundler/cli/pristine.rb +5 -0
- 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 +13 -17
- data/lib/bundler/current_ruby.rb +1 -0
- data/lib/bundler/definition.rb +121 -131
- data/lib/bundler/dep_proxy.rb +16 -9
- data/lib/bundler/dependency.rb +3 -10
- data/lib/bundler/dsl.rb +40 -33
- data/lib/bundler/endpoint_specification.rb +1 -1
- data/lib/bundler/env.rb +1 -1
- data/lib/bundler/environment_preserver.rb +26 -2
- data/lib/bundler/errors.rb +1 -0
- data/lib/bundler/feature_flag.rb +0 -5
- data/lib/bundler/fetcher.rb +5 -4
- data/lib/bundler/fetcher/base.rb +1 -1
- data/lib/bundler/fetcher/compact_index.rb +1 -1
- data/lib/bundler/fetcher/downloader.rb +9 -5
- data/lib/bundler/fetcher/index.rb +3 -4
- data/lib/bundler/friendly_errors.rb +22 -13
- data/lib/bundler/gem_helper.rb +51 -18
- data/lib/bundler/gem_helpers.rb +36 -25
- data/lib/bundler/gem_version_promoter.rb +4 -4
- data/lib/bundler/graph.rb +1 -1
- data/lib/bundler/index.rb +12 -7
- data/lib/bundler/injector.rb +23 -5
- data/lib/bundler/inline.rb +3 -2
- data/lib/bundler/installer.rb +37 -49
- data/lib/bundler/installer/gem_installer.rb +3 -3
- data/lib/bundler/installer/parallel_installer.rb +46 -25
- data/lib/bundler/installer/standalone.rb +17 -2
- data/lib/bundler/lazy_specification.rb +45 -25
- data/lib/bundler/lockfile_generator.rb +1 -1
- data/lib/bundler/lockfile_parser.rb +4 -14
- data/lib/bundler/man/.document +1 -0
- data/{man → lib/bundler/man}/bundle-add.1 +1 -1
- data/{man/bundle-add.ronn → lib/bundler/man/bundle-add.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-binstubs.1 +5 -3
- data/{man/bundle-binstubs.ronn → lib/bundler/man/bundle-binstubs.1.ronn} +2 -4
- data/{man → lib/bundler/man}/bundle-cache.1 +1 -1
- data/{man/bundle-cache.ronn → lib/bundler/man/bundle-cache.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-check.1 +1 -1
- data/{man/bundle-check.ronn → lib/bundler/man/bundle-check.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-clean.1 +1 -1
- data/{man/bundle-clean.ronn → lib/bundler/man/bundle-clean.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-config.1 +42 -34
- data/{man/bundle-config.ronn → lib/bundler/man/bundle-config.1.ronn} +51 -43
- data/{man → lib/bundler/man}/bundle-doctor.1 +1 -1
- data/{man/bundle-doctor.ronn → lib/bundler/man/bundle-doctor.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-exec.1 +1 -1
- data/{man/bundle-exec.ronn → lib/bundler/man/bundle-exec.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-gem.1 +25 -3
- data/{man/bundle-gem.ronn → lib/bundler/man/bundle-gem.1.ronn} +30 -7
- data/{man → lib/bundler/man}/bundle-info.1 +1 -1
- data/{man/bundle-info.ronn → lib/bundler/man/bundle-info.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-init.1 +1 -1
- data/{man/bundle-init.ronn → lib/bundler/man/bundle-init.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-inject.1 +1 -1
- data/{man/bundle-inject.ronn → lib/bundler/man/bundle-inject.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-install.1 +30 -3
- data/{man/bundle-install.ronn → lib/bundler/man/bundle-install.1.ronn} +25 -3
- data/{man → lib/bundler/man}/bundle-list.1 +7 -7
- data/{man/bundle-list.ronn → lib/bundler/man/bundle-list.1.ronn} +6 -6
- data/{man → lib/bundler/man}/bundle-lock.1 +1 -1
- data/{man/bundle-lock.ronn → lib/bundler/man/bundle-lock.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-open.1 +1 -1
- data/{man/bundle-open.ronn → lib/bundler/man/bundle-open.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-outdated.1 +1 -1
- data/{man/bundle-outdated.ronn → lib/bundler/man/bundle-outdated.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-platform.1 +1 -1
- data/{man/bundle-platform.ronn → lib/bundler/man/bundle-platform.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-pristine.1 +1 -1
- data/{man/bundle-pristine.ronn → lib/bundler/man/bundle-pristine.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-remove.1 +1 -1
- data/{man/bundle-remove.ronn → lib/bundler/man/bundle-remove.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-show.1 +1 -1
- data/{man/bundle-show.ronn → lib/bundler/man/bundle-show.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-update.1 +1 -1
- data/{man/bundle-update.ronn → lib/bundler/man/bundle-update.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-viz.1 +1 -1
- data/{man/bundle-viz.ronn → lib/bundler/man/bundle-viz.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle.1 +1 -1
- data/{man/bundle.ronn → lib/bundler/man/bundle.1.ronn} +0 -0
- data/{man → lib/bundler/man}/gemfile.5 +4 -4
- data/{man → lib/bundler/man}/gemfile.5.ronn +4 -4
- data/{man → lib/bundler/man}/index.txt +0 -0
- data/lib/bundler/mirror.rb +2 -2
- data/lib/bundler/plugin.rb +33 -7
- data/lib/bundler/plugin/api/source.rb +8 -1
- data/lib/bundler/plugin/dsl.rb +1 -1
- data/lib/bundler/plugin/index.rb +10 -1
- data/lib/bundler/plugin/installer.rb +9 -11
- data/lib/bundler/plugin/installer/rubygems.rb +1 -1
- data/lib/bundler/plugin/source_list.rb +5 -1
- data/lib/bundler/psyched_yaml.rb +0 -15
- data/lib/bundler/remote_specification.rb +5 -2
- data/lib/bundler/resolver.rb +133 -77
- data/lib/bundler/resolver/spec_group.rb +75 -48
- data/lib/bundler/retry.rb +2 -2
- data/lib/bundler/ruby_version.rb +1 -1
- data/lib/bundler/rubygems_ext.rb +69 -9
- data/lib/bundler/rubygems_gem_installer.rb +50 -9
- data/lib/bundler/rubygems_integration.rb +25 -60
- data/lib/bundler/runtime.rb +4 -14
- data/lib/bundler/settings.rb +107 -54
- data/lib/bundler/shared_helpers.rb +3 -3
- data/lib/bundler/similarity_detector.rb +1 -1
- data/lib/bundler/source.rb +7 -1
- data/lib/bundler/source/git.rb +24 -22
- data/lib/bundler/source/git/git_proxy.rb +82 -80
- data/lib/bundler/source/metadata.rb +0 -4
- data/lib/bundler/source/path.rb +10 -4
- data/lib/bundler/source/path/installer.rb +10 -10
- data/lib/bundler/source/rubygems.rb +45 -24
- data/lib/bundler/source/rubygems/remote.rb +1 -1
- data/lib/bundler/source_list.rb +31 -26
- data/lib/bundler/spec_set.rb +29 -17
- data/lib/bundler/stub_specification.rb +25 -7
- data/lib/bundler/templates/Gemfile +1 -1
- data/lib/bundler/templates/gems.rb +1 -1
- data/lib/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
- data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +57 -47
- data/lib/bundler/templates/newgem/Gemfile.tt +9 -1
- data/lib/bundler/templates/newgem/README.md.tt +6 -5
- data/lib/bundler/templates/newgem/Rakefile.tt +19 -5
- data/lib/bundler/templates/newgem/bin/console.tt +1 -0
- data/lib/bundler/templates/newgem/circleci/config.yml.tt +13 -0
- data/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +2 -0
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +16 -0
- data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +9 -0
- data/lib/bundler/templates/newgem/lib/newgem.rb.tt +4 -2
- data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +2 -0
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +15 -7
- data/lib/bundler/templates/newgem/rubocop.yml.tt +13 -0
- data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +2 -0
- data/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +2 -1
- data/lib/bundler/templates/newgem/test/{newgem_test.rb.tt → minitest/newgem_test.rb.tt} +2 -0
- data/lib/bundler/templates/newgem/test/{test_helper.rb.tt → minitest/test_helper.rb.tt} +2 -0
- data/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt +15 -0
- data/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt +6 -0
- 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/delegates/specification_provider.rb +7 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +34 -2
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +2 -2
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +11 -5
- data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +3 -3
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +12 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +49 -47
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +82 -189
- data/lib/bundler/vendor/thor/lib/thor.rb +5 -13
- data/lib/bundler/vendor/thor/lib/thor/actions.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +2 -1
- data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +4 -2
- data/lib/bundler/vendor/thor/lib/thor/base.rb +9 -0
- data/lib/bundler/vendor/thor/lib/thor/error.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +5 -1
- data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +9 -8
- data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +5 -2
- data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +5 -1
- data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -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
- metadata +71 -85
- 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 -528
- data/man/bundle-doctor.1.txt +0 -44
- data/man/bundle-exec.1.txt +0 -178
- data/man/bundle-gem.1.txt +0 -91
- 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 -43
- 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 -390
- data/man/bundle-viz.1.txt +0 -39
- data/man/bundle.1.txt +0 -116
- data/man/gemfile.5.txt +0 -649
@@ -1,7 +1,7 @@
|
|
1
|
-
require "set"
|
2
1
|
require_relative "thor/base"
|
3
2
|
|
4
3
|
class Bundler::Thor
|
4
|
+
$thor_runner ||= false
|
5
5
|
class << self
|
6
6
|
# Allows for custom "Command" package naming.
|
7
7
|
#
|
@@ -323,7 +323,7 @@ class Bundler::Thor
|
|
323
323
|
# ==== Parameters
|
324
324
|
# Symbol ...:: A list of commands that should be affected.
|
325
325
|
def stop_on_unknown_option!(*command_names)
|
326
|
-
stop_on_unknown_option
|
326
|
+
@stop_on_unknown_option = stop_on_unknown_option | command_names
|
327
327
|
end
|
328
328
|
|
329
329
|
def stop_on_unknown_option?(command) #:nodoc:
|
@@ -337,29 +337,22 @@ class Bundler::Thor
|
|
337
337
|
# ==== Parameters
|
338
338
|
# Symbol ...:: A list of commands that should be affected.
|
339
339
|
def disable_required_check!(*command_names)
|
340
|
-
disable_required_check
|
340
|
+
@disable_required_check = disable_required_check | command_names
|
341
341
|
end
|
342
342
|
|
343
343
|
def disable_required_check?(command) #:nodoc:
|
344
344
|
command && disable_required_check.include?(command.name.to_sym)
|
345
345
|
end
|
346
346
|
|
347
|
-
def deprecation_warning(message) #:nodoc:
|
348
|
-
unless ENV['THOR_SILENCE_DEPRECATION']
|
349
|
-
warn "Deprecation warning: #{message}\n" +
|
350
|
-
'You can silence deprecations warning by setting the environment variable THOR_SILENCE_DEPRECATION.'
|
351
|
-
end
|
352
|
-
end
|
353
|
-
|
354
347
|
protected
|
355
348
|
|
356
349
|
def stop_on_unknown_option #:nodoc:
|
357
|
-
@stop_on_unknown_option ||=
|
350
|
+
@stop_on_unknown_option ||= []
|
358
351
|
end
|
359
352
|
|
360
353
|
# help command has the required check disabled by default.
|
361
354
|
def disable_required_check #:nodoc:
|
362
|
-
@disable_required_check ||=
|
355
|
+
@disable_required_check ||= [:help]
|
363
356
|
end
|
364
357
|
|
365
358
|
# The method responsible for dispatching given the args.
|
@@ -405,7 +398,6 @@ class Bundler::Thor
|
|
405
398
|
# the namespace should be displayed as arguments.
|
406
399
|
#
|
407
400
|
def banner(command, namespace = nil, subcommand = false)
|
408
|
-
$thor_runner ||= false
|
409
401
|
command.formatted_usage(self, $thor_runner, subcommand).split("\n").map do |formatted_usage|
|
410
402
|
"#{basename} #{formatted_usage}"
|
411
403
|
end.join("\n")
|
@@ -33,7 +33,8 @@ class Bundler::Thor
|
|
33
33
|
# Boolean:: true if it is identical, false otherwise.
|
34
34
|
#
|
35
35
|
def identical?
|
36
|
-
|
36
|
+
source = File.expand_path(render, File.dirname(destination))
|
37
|
+
exists? && File.identical?(source, destination)
|
37
38
|
end
|
38
39
|
|
39
40
|
def invoke!
|
@@ -251,7 +251,8 @@ class Bundler::Thor
|
|
251
251
|
# path<String>:: path of the file to be changed
|
252
252
|
# flag<Regexp|String>:: the regexp or string to be replaced
|
253
253
|
# replacement<String>:: the replacement, can be also given as a block
|
254
|
-
# config<Hash>:: give :verbose => false to not log the status
|
254
|
+
# config<Hash>:: give :verbose => false to not log the status, and
|
255
|
+
# :force => true, to force the replacement regardless of runner behavior.
|
255
256
|
#
|
256
257
|
# ==== Example
|
257
258
|
#
|
@@ -262,9 +263,10 @@ class Bundler::Thor
|
|
262
263
|
# end
|
263
264
|
#
|
264
265
|
def gsub_file(path, flag, *args, &block)
|
265
|
-
return unless behavior == :invoke
|
266
266
|
config = args.last.is_a?(Hash) ? args.pop : {}
|
267
267
|
|
268
|
+
return unless behavior == :invoke || config.fetch(:force, false)
|
269
|
+
|
268
270
|
path = File.expand_path(path, destination_root)
|
269
271
|
say_status :gsub, relative_to_original_destination_root(path), config.fetch(:verbose, true)
|
270
272
|
|
@@ -22,6 +22,15 @@ class Bundler::Thor
|
|
22
22
|
|
23
23
|
TEMPLATE_EXTNAME = ".tt"
|
24
24
|
|
25
|
+
class << self
|
26
|
+
def deprecation_warning(message) #:nodoc:
|
27
|
+
unless ENV['THOR_SILENCE_DEPRECATION']
|
28
|
+
warn "Deprecation warning: #{message}\n" +
|
29
|
+
'You can silence deprecations warning by setting the environment variable THOR_SILENCE_DEPRECATION.'
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
25
34
|
module Base
|
26
35
|
attr_accessor :options, :parent_options, :args
|
27
36
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class Bundler::Thor
|
2
|
-
Correctable = if defined?(DidYouMean::SpellChecker) && defined?(DidYouMean::Correctable)
|
2
|
+
Correctable = if defined?(DidYouMean::SpellChecker) && defined?(DidYouMean::Correctable) # rubocop:disable Naming/ConstantName
|
3
3
|
# In order to support versions of Ruby that don't have keyword
|
4
4
|
# arguments, we need our own spell checker class that doesn't take key
|
5
5
|
# words. Even though this code wouldn't be hit because of the check
|
@@ -30,7 +30,11 @@ class Bundler::Thor
|
|
30
30
|
|
31
31
|
arguments.each do |argument|
|
32
32
|
if !argument.default.nil?
|
33
|
-
|
33
|
+
begin
|
34
|
+
@assigns[argument.human_name] = argument.default.dup
|
35
|
+
rescue TypeError # Compatibility shim for un-dup-able Fixnum in Ruby < 2.4
|
36
|
+
@assigns[argument.human_name] = argument.default
|
37
|
+
end
|
34
38
|
elsif argument.required?
|
35
39
|
@non_assigned_required << argument
|
36
40
|
end
|
@@ -133,15 +133,16 @@ class Bundler::Thor
|
|
133
133
|
|
134
134
|
protected
|
135
135
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
136
|
+
def assign_result!(option, result)
|
137
|
+
if option.repeatable && option.type == :hash
|
138
|
+
(@assigns[option.human_name] ||= {}).merge!(result)
|
139
|
+
elsif option.repeatable
|
140
|
+
(@assigns[option.human_name] ||= []) << result
|
141
|
+
else
|
142
|
+
@assigns[option.human_name] = result
|
143
|
+
end
|
143
144
|
end
|
144
|
-
|
145
|
+
|
145
146
|
# Check if the current value in peek is a registered switch.
|
146
147
|
#
|
147
148
|
# Two booleans are returned. The first is true if the current value
|
@@ -94,6 +94,8 @@ class Bundler::Thor
|
|
94
94
|
# say("I know you knew that.")
|
95
95
|
#
|
96
96
|
def say(message = "", color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/))
|
97
|
+
return if quiet?
|
98
|
+
|
97
99
|
buffer = prepare_message(message, *color)
|
98
100
|
buffer << "\n" if force_new_line && !message.to_s.end_with?("\n")
|
99
101
|
|
@@ -230,8 +232,9 @@ class Bundler::Thor
|
|
230
232
|
paras = message.split("\n\n")
|
231
233
|
|
232
234
|
paras.map! do |unwrapped|
|
233
|
-
|
234
|
-
|
235
|
+
words = unwrapped.split(" ")
|
236
|
+
counter = words.first.length
|
237
|
+
words.inject do |memo, word|
|
235
238
|
word = word.gsub(/\n\005/, "\n").gsub(/\005/, "\n")
|
236
239
|
counter = 0 if word.include? "\n"
|
237
240
|
if (counter + word.length + 1) < width
|
@@ -97,7 +97,11 @@ class Bundler::Thor
|
|
97
97
|
protected
|
98
98
|
|
99
99
|
def can_display_colors?
|
100
|
-
|
100
|
+
are_colors_supported? && !are_colors_disabled?
|
101
|
+
end
|
102
|
+
|
103
|
+
def are_colors_supported?
|
104
|
+
stdout.tty? && ENV["TERM"] != "dumb"
|
101
105
|
end
|
102
106
|
|
103
107
|
def are_colors_disabled?
|
@@ -0,0 +1,154 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
#
|
3
|
+
# tmpdir - retrieve temporary directory path
|
4
|
+
#
|
5
|
+
# $Id$
|
6
|
+
#
|
7
|
+
|
8
|
+
require_relative '../../fileutils/lib/fileutils'
|
9
|
+
begin
|
10
|
+
require 'etc.so'
|
11
|
+
rescue LoadError # rescue LoadError for miniruby
|
12
|
+
end
|
13
|
+
|
14
|
+
class Bundler::Dir < Dir
|
15
|
+
|
16
|
+
@systmpdir ||= defined?(Etc.systmpdir) ? Etc.systmpdir : '/tmp'
|
17
|
+
|
18
|
+
##
|
19
|
+
# Returns the operating system's temporary file path.
|
20
|
+
|
21
|
+
def self.tmpdir
|
22
|
+
tmp = nil
|
23
|
+
['TMPDIR', 'TMP', 'TEMP', ['system temporary path', @systmpdir], ['/tmp']*2, ['.']*2].each do |name, dir = ENV[name]|
|
24
|
+
next if !dir
|
25
|
+
dir = File.expand_path(dir)
|
26
|
+
stat = File.stat(dir) rescue next
|
27
|
+
case
|
28
|
+
when !stat.directory?
|
29
|
+
warn "#{name} is not a directory: #{dir}"
|
30
|
+
when !stat.writable?
|
31
|
+
warn "#{name} is not writable: #{dir}"
|
32
|
+
when stat.world_writable? && !stat.sticky?
|
33
|
+
warn "#{name} is world-writable: #{dir}"
|
34
|
+
else
|
35
|
+
tmp = dir
|
36
|
+
break
|
37
|
+
end
|
38
|
+
end
|
39
|
+
raise ArgumentError, "could not find a temporary directory" unless tmp
|
40
|
+
tmp
|
41
|
+
end
|
42
|
+
|
43
|
+
# Bundler::Dir.mktmpdir creates a temporary directory.
|
44
|
+
#
|
45
|
+
# The directory is created with 0700 permission.
|
46
|
+
# Application should not change the permission to make the temporary directory accessible from other users.
|
47
|
+
#
|
48
|
+
# The prefix and suffix of the name of the directory is specified by
|
49
|
+
# the optional first argument, <i>prefix_suffix</i>.
|
50
|
+
# - If it is not specified or nil, "d" is used as the prefix and no suffix is used.
|
51
|
+
# - If it is a string, it is used as the prefix and no suffix is used.
|
52
|
+
# - If it is an array, first element is used as the prefix and second element is used as a suffix.
|
53
|
+
#
|
54
|
+
# Bundler::Dir.mktmpdir {|dir| dir is ".../d..." }
|
55
|
+
# Bundler::Dir.mktmpdir("foo") {|dir| dir is ".../foo..." }
|
56
|
+
# Bundler::Dir.mktmpdir(["foo", "bar"]) {|dir| dir is ".../foo...bar" }
|
57
|
+
#
|
58
|
+
# The directory is created under Bundler::Dir.tmpdir or
|
59
|
+
# the optional second argument <i>tmpdir</i> if non-nil value is given.
|
60
|
+
#
|
61
|
+
# Bundler::Dir.mktmpdir {|dir| dir is "#{Bundler::Dir.tmpdir}/d..." }
|
62
|
+
# Bundler::Dir.mktmpdir(nil, "/var/tmp") {|dir| dir is "/var/tmp/d..." }
|
63
|
+
#
|
64
|
+
# If a block is given,
|
65
|
+
# it is yielded with the path of the directory.
|
66
|
+
# The directory and its contents are removed
|
67
|
+
# using Bundler::FileUtils.remove_entry before Bundler::Dir.mktmpdir returns.
|
68
|
+
# The value of the block is returned.
|
69
|
+
#
|
70
|
+
# Bundler::Dir.mktmpdir {|dir|
|
71
|
+
# # use the directory...
|
72
|
+
# open("#{dir}/foo", "w") { ... }
|
73
|
+
# }
|
74
|
+
#
|
75
|
+
# If a block is not given,
|
76
|
+
# The path of the directory is returned.
|
77
|
+
# In this case, Bundler::Dir.mktmpdir doesn't remove the directory.
|
78
|
+
#
|
79
|
+
# dir = Bundler::Dir.mktmpdir
|
80
|
+
# begin
|
81
|
+
# # use the directory...
|
82
|
+
# open("#{dir}/foo", "w") { ... }
|
83
|
+
# ensure
|
84
|
+
# # remove the directory.
|
85
|
+
# Bundler::FileUtils.remove_entry dir
|
86
|
+
# end
|
87
|
+
#
|
88
|
+
def self.mktmpdir(prefix_suffix=nil, *rest, **options)
|
89
|
+
base = nil
|
90
|
+
path = Tmpname.create(prefix_suffix || "d", *rest, **options) {|p, _, _, d|
|
91
|
+
base = d
|
92
|
+
mkdir(p, 0700)
|
93
|
+
}
|
94
|
+
if block_given?
|
95
|
+
begin
|
96
|
+
yield path.dup
|
97
|
+
ensure
|
98
|
+
unless base
|
99
|
+
stat = File.stat(File.dirname(path))
|
100
|
+
if stat.world_writable? and !stat.sticky?
|
101
|
+
raise ArgumentError, "parent directory is world writable but not sticky"
|
102
|
+
end
|
103
|
+
end
|
104
|
+
Bundler::FileUtils.remove_entry path
|
105
|
+
end
|
106
|
+
else
|
107
|
+
path
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
module Tmpname # :nodoc:
|
112
|
+
module_function
|
113
|
+
|
114
|
+
def tmpdir
|
115
|
+
Bundler::Dir.tmpdir
|
116
|
+
end
|
117
|
+
|
118
|
+
UNUSABLE_CHARS = "^,-.0-9A-Z_a-z~"
|
119
|
+
|
120
|
+
class << (RANDOM = Random.new)
|
121
|
+
MAX = 36**6 # < 0x100000000
|
122
|
+
def next
|
123
|
+
rand(MAX).to_s(36)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
private_constant :RANDOM
|
127
|
+
|
128
|
+
def create(basename, tmpdir=nil, max_try: nil, **opts)
|
129
|
+
origdir = tmpdir
|
130
|
+
tmpdir ||= tmpdir()
|
131
|
+
n = nil
|
132
|
+
prefix, suffix = basename
|
133
|
+
prefix = (String.try_convert(prefix) or
|
134
|
+
raise ArgumentError, "unexpected prefix: #{prefix.inspect}")
|
135
|
+
prefix = prefix.delete(UNUSABLE_CHARS)
|
136
|
+
suffix &&= (String.try_convert(suffix) or
|
137
|
+
raise ArgumentError, "unexpected suffix: #{suffix.inspect}")
|
138
|
+
suffix &&= suffix.delete(UNUSABLE_CHARS)
|
139
|
+
begin
|
140
|
+
t = Time.now.strftime("%Y%m%d")
|
141
|
+
path = "#{prefix}#{t}-#{$$}-#{RANDOM.next}"\
|
142
|
+
"#{n ? %[-#{n}] : ''}#{suffix||''}"
|
143
|
+
path = File.join(tmpdir, path)
|
144
|
+
yield(path, n, opts, origdir)
|
145
|
+
rescue Errno::EEXIST
|
146
|
+
n ||= 0
|
147
|
+
n += 1
|
148
|
+
retry if !max_try or n < max_try
|
149
|
+
raise "cannot generate temporary name using `#{basename}' under `#{tmpdir}'"
|
150
|
+
end
|
151
|
+
path
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
@@ -1,12 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# We forcibly require OpenSSL, because net/http/persistent will only autoload
|
4
|
-
# it. On some Rubies, autoload fails but explicit require succeeds.
|
5
|
-
begin
|
6
|
-
require "openssl"
|
7
|
-
rescue LoadError
|
8
|
-
# some Ruby builds don't have OpenSSL
|
9
|
-
end
|
10
3
|
module Bundler
|
11
4
|
module Persistent
|
12
5
|
module Net
|
data/lib/bundler/version.rb
CHANGED
data/lib/bundler/worker.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- André Arko
|
@@ -22,7 +22,7 @@ authors:
|
|
22
22
|
autorequire:
|
23
23
|
bindir: exe
|
24
24
|
cert_chain: []
|
25
|
-
date:
|
25
|
+
date: 2021-05-05 00:00:00.000000000 Z
|
26
26
|
dependencies: []
|
27
27
|
description: Bundler manages an application's dependencies through its entire life,
|
28
28
|
across many machines, systematically and repeatably
|
@@ -54,6 +54,7 @@ files:
|
|
54
54
|
- lib/bundler/cli/console.rb
|
55
55
|
- lib/bundler/cli/doctor.rb
|
56
56
|
- lib/bundler/cli/exec.rb
|
57
|
+
- lib/bundler/cli/fund.rb
|
57
58
|
- lib/bundler/cli/gem.rb
|
58
59
|
- lib/bundler/cli/info.rb
|
59
60
|
- lib/bundler/cli/init.rb
|
@@ -73,6 +74,7 @@ files:
|
|
73
74
|
- lib/bundler/cli/viz.rb
|
74
75
|
- lib/bundler/compact_index_client.rb
|
75
76
|
- lib/bundler/compact_index_client/cache.rb
|
77
|
+
- lib/bundler/compact_index_client/gem_parser.rb
|
76
78
|
- lib/bundler/compact_index_client/updater.rb
|
77
79
|
- lib/bundler/constants.rb
|
78
80
|
- lib/bundler/current_ruby.rb
|
@@ -110,6 +112,58 @@ files:
|
|
110
112
|
- lib/bundler/lazy_specification.rb
|
111
113
|
- lib/bundler/lockfile_generator.rb
|
112
114
|
- lib/bundler/lockfile_parser.rb
|
115
|
+
- lib/bundler/man/.document
|
116
|
+
- lib/bundler/man/bundle-add.1
|
117
|
+
- lib/bundler/man/bundle-add.1.ronn
|
118
|
+
- lib/bundler/man/bundle-binstubs.1
|
119
|
+
- lib/bundler/man/bundle-binstubs.1.ronn
|
120
|
+
- lib/bundler/man/bundle-cache.1
|
121
|
+
- lib/bundler/man/bundle-cache.1.ronn
|
122
|
+
- lib/bundler/man/bundle-check.1
|
123
|
+
- lib/bundler/man/bundle-check.1.ronn
|
124
|
+
- lib/bundler/man/bundle-clean.1
|
125
|
+
- lib/bundler/man/bundle-clean.1.ronn
|
126
|
+
- lib/bundler/man/bundle-config.1
|
127
|
+
- lib/bundler/man/bundle-config.1.ronn
|
128
|
+
- lib/bundler/man/bundle-doctor.1
|
129
|
+
- lib/bundler/man/bundle-doctor.1.ronn
|
130
|
+
- lib/bundler/man/bundle-exec.1
|
131
|
+
- lib/bundler/man/bundle-exec.1.ronn
|
132
|
+
- lib/bundler/man/bundle-gem.1
|
133
|
+
- lib/bundler/man/bundle-gem.1.ronn
|
134
|
+
- lib/bundler/man/bundle-info.1
|
135
|
+
- lib/bundler/man/bundle-info.1.ronn
|
136
|
+
- lib/bundler/man/bundle-init.1
|
137
|
+
- lib/bundler/man/bundle-init.1.ronn
|
138
|
+
- lib/bundler/man/bundle-inject.1
|
139
|
+
- lib/bundler/man/bundle-inject.1.ronn
|
140
|
+
- lib/bundler/man/bundle-install.1
|
141
|
+
- lib/bundler/man/bundle-install.1.ronn
|
142
|
+
- lib/bundler/man/bundle-list.1
|
143
|
+
- lib/bundler/man/bundle-list.1.ronn
|
144
|
+
- lib/bundler/man/bundle-lock.1
|
145
|
+
- lib/bundler/man/bundle-lock.1.ronn
|
146
|
+
- lib/bundler/man/bundle-open.1
|
147
|
+
- lib/bundler/man/bundle-open.1.ronn
|
148
|
+
- lib/bundler/man/bundle-outdated.1
|
149
|
+
- lib/bundler/man/bundle-outdated.1.ronn
|
150
|
+
- lib/bundler/man/bundle-platform.1
|
151
|
+
- lib/bundler/man/bundle-platform.1.ronn
|
152
|
+
- lib/bundler/man/bundle-pristine.1
|
153
|
+
- lib/bundler/man/bundle-pristine.1.ronn
|
154
|
+
- lib/bundler/man/bundle-remove.1
|
155
|
+
- lib/bundler/man/bundle-remove.1.ronn
|
156
|
+
- lib/bundler/man/bundle-show.1
|
157
|
+
- lib/bundler/man/bundle-show.1.ronn
|
158
|
+
- lib/bundler/man/bundle-update.1
|
159
|
+
- lib/bundler/man/bundle-update.1.ronn
|
160
|
+
- lib/bundler/man/bundle-viz.1
|
161
|
+
- lib/bundler/man/bundle-viz.1.ronn
|
162
|
+
- lib/bundler/man/bundle.1
|
163
|
+
- lib/bundler/man/bundle.1.ronn
|
164
|
+
- lib/bundler/man/gemfile.5
|
165
|
+
- lib/bundler/man/gemfile.5.ronn
|
166
|
+
- lib/bundler/man/index.txt
|
113
167
|
- lib/bundler/match_platform.rb
|
114
168
|
- lib/bundler/mirror.rb
|
115
169
|
- lib/bundler/plugin.rb
|
@@ -157,6 +211,7 @@ files:
|
|
157
211
|
- lib/bundler/templates/Executable.standalone
|
158
212
|
- lib/bundler/templates/Gemfile
|
159
213
|
- lib/bundler/templates/gems.rb
|
214
|
+
- lib/bundler/templates/newgem/CHANGELOG.md.tt
|
160
215
|
- lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt
|
161
216
|
- lib/bundler/templates/newgem/Gemfile.tt
|
162
217
|
- lib/bundler/templates/newgem/LICENSE.txt.tt
|
@@ -164,19 +219,25 @@ files:
|
|
164
219
|
- lib/bundler/templates/newgem/Rakefile.tt
|
165
220
|
- lib/bundler/templates/newgem/bin/console.tt
|
166
221
|
- lib/bundler/templates/newgem/bin/setup.tt
|
222
|
+
- lib/bundler/templates/newgem/circleci/config.yml.tt
|
167
223
|
- lib/bundler/templates/newgem/exe/newgem.tt
|
168
224
|
- lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt
|
169
225
|
- lib/bundler/templates/newgem/ext/newgem/newgem.c.tt
|
170
226
|
- lib/bundler/templates/newgem/ext/newgem/newgem.h.tt
|
227
|
+
- lib/bundler/templates/newgem/github/workflows/main.yml.tt
|
171
228
|
- lib/bundler/templates/newgem/gitignore.tt
|
229
|
+
- lib/bundler/templates/newgem/gitlab-ci.yml.tt
|
172
230
|
- lib/bundler/templates/newgem/lib/newgem.rb.tt
|
173
231
|
- lib/bundler/templates/newgem/lib/newgem/version.rb.tt
|
174
232
|
- lib/bundler/templates/newgem/newgem.gemspec.tt
|
175
233
|
- lib/bundler/templates/newgem/rspec.tt
|
234
|
+
- lib/bundler/templates/newgem/rubocop.yml.tt
|
176
235
|
- lib/bundler/templates/newgem/spec/newgem_spec.rb.tt
|
177
236
|
- lib/bundler/templates/newgem/spec/spec_helper.rb.tt
|
178
|
-
- lib/bundler/templates/newgem/test/newgem_test.rb.tt
|
179
|
-
- lib/bundler/templates/newgem/test/test_helper.rb.tt
|
237
|
+
- lib/bundler/templates/newgem/test/minitest/newgem_test.rb.tt
|
238
|
+
- lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt
|
239
|
+
- lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt
|
240
|
+
- lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt
|
180
241
|
- lib/bundler/templates/newgem/travis.yml.tt
|
181
242
|
- lib/bundler/ui.rb
|
182
243
|
- lib/bundler/ui/rg_proxy.rb
|
@@ -189,7 +250,6 @@ files:
|
|
189
250
|
- lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb
|
190
251
|
- lib/bundler/vendor/fileutils/lib/fileutils.rb
|
191
252
|
- lib/bundler/vendor/molinillo/lib/molinillo.rb
|
192
|
-
- lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb
|
193
253
|
- lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb
|
194
254
|
- lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb
|
195
255
|
- lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb
|
@@ -244,6 +304,7 @@ files:
|
|
244
304
|
- lib/bundler/vendor/thor/lib/thor/shell/html.rb
|
245
305
|
- lib/bundler/vendor/thor/lib/thor/util.rb
|
246
306
|
- lib/bundler/vendor/thor/lib/thor/version.rb
|
307
|
+
- lib/bundler/vendor/tmpdir/lib/tmpdir.rb
|
247
308
|
- lib/bundler/vendor/uri/lib/uri.rb
|
248
309
|
- lib/bundler/vendor/uri/lib/uri/common.rb
|
249
310
|
- lib/bundler/vendor/uri/lib/uri/file.rb
|
@@ -261,96 +322,21 @@ files:
|
|
261
322
|
- lib/bundler/vendored_molinillo.rb
|
262
323
|
- lib/bundler/vendored_persistent.rb
|
263
324
|
- lib/bundler/vendored_thor.rb
|
325
|
+
- lib/bundler/vendored_tmpdir.rb
|
264
326
|
- lib/bundler/vendored_uri.rb
|
265
327
|
- lib/bundler/version.rb
|
266
328
|
- lib/bundler/version_ranges.rb
|
267
329
|
- lib/bundler/vlad.rb
|
268
330
|
- lib/bundler/worker.rb
|
269
331
|
- lib/bundler/yaml_serializer.rb
|
270
|
-
- man/bundle-add.1
|
271
|
-
- man/bundle-add.1.txt
|
272
|
-
- man/bundle-add.ronn
|
273
|
-
- man/bundle-binstubs.1
|
274
|
-
- man/bundle-binstubs.1.txt
|
275
|
-
- man/bundle-binstubs.ronn
|
276
|
-
- man/bundle-cache.1
|
277
|
-
- man/bundle-cache.1.txt
|
278
|
-
- man/bundle-cache.ronn
|
279
|
-
- man/bundle-check.1
|
280
|
-
- man/bundle-check.1.txt
|
281
|
-
- man/bundle-check.ronn
|
282
|
-
- man/bundle-clean.1
|
283
|
-
- man/bundle-clean.1.txt
|
284
|
-
- man/bundle-clean.ronn
|
285
|
-
- man/bundle-config.1
|
286
|
-
- man/bundle-config.1.txt
|
287
|
-
- man/bundle-config.ronn
|
288
|
-
- man/bundle-doctor.1
|
289
|
-
- man/bundle-doctor.1.txt
|
290
|
-
- man/bundle-doctor.ronn
|
291
|
-
- man/bundle-exec.1
|
292
|
-
- man/bundle-exec.1.txt
|
293
|
-
- man/bundle-exec.ronn
|
294
|
-
- man/bundle-gem.1
|
295
|
-
- man/bundle-gem.1.txt
|
296
|
-
- man/bundle-gem.ronn
|
297
|
-
- man/bundle-info.1
|
298
|
-
- man/bundle-info.1.txt
|
299
|
-
- man/bundle-info.ronn
|
300
|
-
- man/bundle-init.1
|
301
|
-
- man/bundle-init.1.txt
|
302
|
-
- man/bundle-init.ronn
|
303
|
-
- man/bundle-inject.1
|
304
|
-
- man/bundle-inject.1.txt
|
305
|
-
- man/bundle-inject.ronn
|
306
|
-
- man/bundle-install.1
|
307
|
-
- man/bundle-install.1.txt
|
308
|
-
- man/bundle-install.ronn
|
309
|
-
- man/bundle-list.1
|
310
|
-
- man/bundle-list.1.txt
|
311
|
-
- man/bundle-list.ronn
|
312
|
-
- man/bundle-lock.1
|
313
|
-
- man/bundle-lock.1.txt
|
314
|
-
- man/bundle-lock.ronn
|
315
|
-
- man/bundle-open.1
|
316
|
-
- man/bundle-open.1.txt
|
317
|
-
- man/bundle-open.ronn
|
318
|
-
- man/bundle-outdated.1
|
319
|
-
- man/bundle-outdated.1.txt
|
320
|
-
- man/bundle-outdated.ronn
|
321
|
-
- man/bundle-platform.1
|
322
|
-
- man/bundle-platform.1.txt
|
323
|
-
- man/bundle-platform.ronn
|
324
|
-
- man/bundle-pristine.1
|
325
|
-
- man/bundle-pristine.1.txt
|
326
|
-
- man/bundle-pristine.ronn
|
327
|
-
- man/bundle-remove.1
|
328
|
-
- man/bundle-remove.1.txt
|
329
|
-
- man/bundle-remove.ronn
|
330
|
-
- man/bundle-show.1
|
331
|
-
- man/bundle-show.1.txt
|
332
|
-
- man/bundle-show.ronn
|
333
|
-
- man/bundle-update.1
|
334
|
-
- man/bundle-update.1.txt
|
335
|
-
- man/bundle-update.ronn
|
336
|
-
- man/bundle-viz.1
|
337
|
-
- man/bundle-viz.1.txt
|
338
|
-
- man/bundle-viz.ronn
|
339
|
-
- man/bundle.1
|
340
|
-
- man/bundle.1.txt
|
341
|
-
- man/bundle.ronn
|
342
|
-
- man/gemfile.5
|
343
|
-
- man/gemfile.5.ronn
|
344
|
-
- man/gemfile.5.txt
|
345
|
-
- man/index.txt
|
346
332
|
homepage: https://bundler.io
|
347
333
|
licenses:
|
348
334
|
- MIT
|
349
335
|
metadata:
|
350
|
-
bug_tracker_uri: https://github.com/
|
351
|
-
changelog_uri: https://github.com/
|
336
|
+
bug_tracker_uri: https://github.com/rubygems/rubygems/issues?q=is%3Aopen+is%3Aissue+label%3ABundler
|
337
|
+
changelog_uri: https://github.com/rubygems/rubygems/blob/master/bundler/CHANGELOG.md
|
352
338
|
homepage_uri: https://bundler.io/
|
353
|
-
source_code_uri: https://github.com/
|
339
|
+
source_code_uri: https://github.com/rubygems/rubygems/
|
354
340
|
post_install_message:
|
355
341
|
rdoc_options: []
|
356
342
|
require_paths:
|
@@ -366,7 +352,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
366
352
|
- !ruby/object:Gem::Version
|
367
353
|
version: 2.5.2
|
368
354
|
requirements: []
|
369
|
-
rubygems_version: 3.
|
355
|
+
rubygems_version: 3.2.17
|
370
356
|
signing_key:
|
371
357
|
specification_version: 4
|
372
358
|
summary: The best way to manage your application's dependencies
|