bundler 2.4.20 → 2.4.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +55 -3
  3. data/README.md +1 -2
  4. data/lib/bundler/build_metadata.rb +3 -3
  5. data/lib/bundler/cli/check.rb +1 -1
  6. data/lib/bundler/cli/gem.rb +4 -3
  7. data/lib/bundler/cli/install.rb +2 -2
  8. data/lib/bundler/cli/lock.rb +26 -23
  9. data/lib/bundler/cli/open.rb +5 -7
  10. data/lib/bundler/definition.rb +43 -26
  11. data/lib/bundler/endpoint_specification.rb +1 -1
  12. data/lib/bundler/env.rb +2 -2
  13. data/lib/bundler/errors.rb +15 -0
  14. data/lib/bundler/gem_helpers.rb +7 -0
  15. data/lib/bundler/gem_version_promoter.rb +2 -2
  16. data/lib/bundler/injector.rb +1 -1
  17. data/lib/bundler/installer/gem_installer.rb +5 -5
  18. data/lib/bundler/installer/parallel_installer.rb +0 -26
  19. data/lib/bundler/installer/standalone.rb +13 -6
  20. data/lib/bundler/lazy_specification.rb +4 -0
  21. data/lib/bundler/lockfile_parser.rb +29 -24
  22. data/lib/bundler/man/bundle-add.1 +1 -1
  23. data/lib/bundler/man/bundle-binstubs.1 +1 -1
  24. data/lib/bundler/man/bundle-cache.1 +1 -1
  25. data/lib/bundler/man/bundle-check.1 +1 -1
  26. data/lib/bundler/man/bundle-clean.1 +1 -1
  27. data/lib/bundler/man/bundle-config.1 +1 -1
  28. data/lib/bundler/man/bundle-console.1 +1 -1
  29. data/lib/bundler/man/bundle-doctor.1 +1 -1
  30. data/lib/bundler/man/bundle-exec.1 +2 -2
  31. data/lib/bundler/man/bundle-exec.1.ronn +2 -3
  32. data/lib/bundler/man/bundle-gem.1 +1 -1
  33. data/lib/bundler/man/bundle-help.1 +1 -1
  34. data/lib/bundler/man/bundle-info.1 +1 -1
  35. data/lib/bundler/man/bundle-init.1 +1 -1
  36. data/lib/bundler/man/bundle-inject.1 +1 -1
  37. data/lib/bundler/man/bundle-install.1 +1 -1
  38. data/lib/bundler/man/bundle-list.1 +1 -1
  39. data/lib/bundler/man/bundle-lock.1 +1 -1
  40. data/lib/bundler/man/bundle-open.1 +1 -1
  41. data/lib/bundler/man/bundle-outdated.1 +1 -1
  42. data/lib/bundler/man/bundle-platform.1 +1 -1
  43. data/lib/bundler/man/bundle-plugin.1 +17 -17
  44. data/lib/bundler/man/bundle-plugin.1.ronn +5 -5
  45. data/lib/bundler/man/bundle-pristine.1 +1 -1
  46. data/lib/bundler/man/bundle-remove.1 +1 -1
  47. data/lib/bundler/man/bundle-show.1 +1 -1
  48. data/lib/bundler/man/bundle-update.1 +1 -1
  49. data/lib/bundler/man/bundle-version.1 +1 -1
  50. data/lib/bundler/man/bundle-viz.1 +1 -1
  51. data/lib/bundler/man/bundle.1 +1 -1
  52. data/lib/bundler/man/gemfile.5 +1 -1
  53. data/lib/bundler/plugin/index.rb +8 -0
  54. data/lib/bundler/plugin.rb +9 -2
  55. data/lib/bundler/resolver/package.rb +5 -0
  56. data/lib/bundler/resolver.rb +27 -7
  57. data/lib/bundler/ruby_version.rb +8 -1
  58. data/lib/bundler/rubygems_ext.rb +3 -4
  59. data/lib/bundler/rubygems_gem_installer.rb +23 -8
  60. data/lib/bundler/settings.rb +53 -16
  61. data/lib/bundler/shared_helpers.rb +16 -1
  62. data/lib/bundler/source/git/git_proxy.rb +21 -4
  63. data/lib/bundler/source/metadata.rb +1 -1
  64. data/lib/bundler/spec_set.rb +7 -4
  65. data/lib/bundler/stub_specification.rb +4 -2
  66. data/lib/bundler/templates/newgem/Rakefile.tt +6 -2
  67. data/lib/bundler/templates/newgem/newgem.gemspec.tt +1 -1
  68. data/lib/bundler/ui/shell.rb +1 -1
  69. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +1 -0
  70. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +21 -9
  71. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1 -1
  72. data/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +3 -2
  73. data/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +1 -1
  74. data/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +1 -1
  75. data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +8 -10
  76. data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +15 -4
  77. data/lib/bundler/vendor/thor/lib/thor/actions.rb +15 -15
  78. data/lib/bundler/vendor/thor/lib/thor/base.rb +140 -14
  79. data/lib/bundler/vendor/thor/lib/thor/command.rb +13 -4
  80. data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +4 -0
  81. data/lib/bundler/vendor/thor/lib/thor/error.rb +16 -25
  82. data/lib/bundler/vendor/thor/lib/thor/group.rb +1 -1
  83. data/lib/bundler/vendor/thor/lib/thor/invocation.rb +1 -1
  84. data/lib/bundler/vendor/thor/lib/thor/nested_context.rb +2 -2
  85. data/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +20 -1
  86. data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +33 -17
  87. data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +27 -8
  88. data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +44 -6
  89. data/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +2 -2
  90. data/lib/bundler/vendor/thor/lib/thor/runner.rb +40 -30
  91. data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +26 -150
  92. data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +4 -46
  93. data/lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb +29 -0
  94. data/lib/bundler/vendor/thor/lib/thor/shell/html.rb +3 -45
  95. data/lib/bundler/vendor/thor/lib/thor/shell/lcs_diff.rb +49 -0
  96. data/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +134 -0
  97. data/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb +42 -0
  98. data/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +38 -0
  99. data/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
  100. data/lib/bundler/vendor/thor/lib/thor/util.rb +8 -7
  101. data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  102. data/lib/bundler/vendor/thor/lib/thor.rb +155 -8
  103. data/lib/bundler/version.rb +1 -1
  104. data/lib/bundler/yaml_serializer.rb +12 -8
  105. data/lib/bundler.rb +0 -8
  106. metadata +8 -3
@@ -17,7 +17,11 @@ module Bundler
17
17
  if v.is_a?(Hash)
18
18
  yaml << dump_hash(v).gsub(/^(?!$)/, " ") # indent all non-empty lines
19
19
  elsif v.is_a?(Array) # Expected to be array of strings
20
- yaml << "\n- " << v.map {|s| s.to_s.gsub(/\s+/, " ").inspect }.join("\n- ") << "\n"
20
+ if v.empty?
21
+ yaml << " []\n"
22
+ else
23
+ yaml << "\n- " << v.map {|s| s.to_s.gsub(/\s+/, " ").inspect }.join("\n- ") << "\n"
24
+ end
21
25
  else
22
26
  yaml << " " << v.to_s.gsub(/\s+/, " ").inspect << "\n"
23
27
  end
@@ -54,8 +58,8 @@ module Bundler
54
58
  str.split(/\r?\n/).each do |line|
55
59
  if match = HASH_REGEX.match(line)
56
60
  indent, key, quote, val = match.captures
57
- key = convert_to_backward_compatible_key(key)
58
- depth = indent.scan(/ /).length
61
+ convert_to_backward_compatible_key!(key)
62
+ depth = indent.size / 2
59
63
  if quote.empty? && val.empty?
60
64
  new_hash = {}
61
65
  stack[depth][key] = new_hash
@@ -63,6 +67,7 @@ module Bundler
63
67
  last_empty_key = key
64
68
  last_hash = stack[depth]
65
69
  else
70
+ val = [] if val == "[]" # empty array
66
71
  stack[depth][key] = val
67
72
  end
68
73
  elsif match = ARRAY_REGEX.match(line)
@@ -76,14 +81,13 @@ module Bundler
76
81
  end
77
82
 
78
83
  # for settings' keys
79
- def convert_to_backward_compatible_key(key)
80
- key = "#{key}/" if key =~ /https?:/i && key !~ %r{/\Z}
81
- key = key.gsub(".", "__") if key.include?(".")
82
- key
84
+ def convert_to_backward_compatible_key!(key)
85
+ key << "/" if /https?:/i.match?(key) && !%r{/\Z}.match?(key)
86
+ key.gsub!(".", "__")
83
87
  end
84
88
 
85
89
  class << self
86
- private :dump_hash, :convert_to_backward_compatible_key
90
+ private :dump_hash, :convert_to_backward_compatible_key!
87
91
  end
88
92
  end
89
93
  end
data/lib/bundler.rb CHANGED
@@ -330,14 +330,6 @@ module Bundler
330
330
 
331
331
  def rm_rf(path)
332
332
  FileUtils.remove_entry_secure(path) if path && File.exist?(path)
333
- rescue ArgumentError
334
- message = <<EOF
335
- It is a security vulnerability to allow your home directory to be world-writable, and bundler cannot continue.
336
- You should probably consider fixing this issue by running `chmod o-w ~` on *nix.
337
- Please refer to https://ruby-doc.org/stdlib-3.1.2/libdoc/fileutils/rdoc/FileUtils.html#method-c-remove_entry_secure for details.
338
- EOF
339
- File.world_writable?(path) ? Bundler.ui.warn(message) : raise
340
- raise PathError, "Please fix the world-writable issue with your #{path} directory"
341
333
  end
342
334
 
343
335
  def settings
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.20
4
+ version: 2.4.22
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: 2023-09-27 00:00:00.000000000 Z
25
+ date: 2023-11-09 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
@@ -327,7 +327,12 @@ files:
327
327
  - lib/bundler/vendor/thor/lib/thor/shell.rb
328
328
  - lib/bundler/vendor/thor/lib/thor/shell/basic.rb
329
329
  - lib/bundler/vendor/thor/lib/thor/shell/color.rb
330
+ - lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb
330
331
  - lib/bundler/vendor/thor/lib/thor/shell/html.rb
332
+ - lib/bundler/vendor/thor/lib/thor/shell/lcs_diff.rb
333
+ - lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb
334
+ - lib/bundler/vendor/thor/lib/thor/shell/terminal.rb
335
+ - lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb
331
336
  - lib/bundler/vendor/thor/lib/thor/util.rb
332
337
  - lib/bundler/vendor/thor/lib/thor/version.rb
333
338
  - lib/bundler/vendor/tsort/LICENSE.txt
@@ -381,7 +386,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
381
386
  - !ruby/object:Gem::Version
382
387
  version: 3.0.1
383
388
  requirements: []
384
- rubygems_version: 3.4.20
389
+ rubygems_version: 3.4.22
385
390
  signing_key:
386
391
  specification_version: 4
387
392
  summary: The best way to manage your application's dependencies