bundler 2.2.31 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +77 -0
  3. data/exe/bundle +7 -8
  4. data/lib/bundler/build_metadata.rb +2 -2
  5. data/lib/bundler/cli/doctor.rb +3 -2
  6. data/lib/bundler/cli/gem.rb +2 -1
  7. data/lib/bundler/cli/info.rb +6 -1
  8. data/lib/bundler/cli/install.rb +2 -0
  9. data/lib/bundler/cli/update.rb +2 -2
  10. data/lib/bundler/cli.rb +7 -1
  11. data/lib/bundler/compact_index_client/updater.rb +0 -5
  12. data/lib/bundler/definition.rb +61 -116
  13. data/lib/bundler/dependency.rb +5 -7
  14. data/lib/bundler/dsl.rb +18 -30
  15. data/lib/bundler/endpoint_specification.rb +0 -8
  16. data/lib/bundler/environment_preserver.rb +4 -1
  17. data/lib/bundler/fetcher/compact_index.rb +9 -4
  18. data/lib/bundler/fetcher.rb +2 -5
  19. data/lib/bundler/gem_helper.rb +2 -2
  20. data/lib/bundler/injector.rb +10 -1
  21. data/lib/bundler/installer/gem_installer.rb +1 -6
  22. data/lib/bundler/installer.rb +1 -4
  23. data/lib/bundler/lazy_specification.rb +17 -1
  24. data/lib/bundler/lockfile_parser.rb +10 -13
  25. data/lib/bundler/man/bundle-add.1 +10 -2
  26. data/lib/bundler/man/bundle-add.1.ronn +7 -1
  27. data/lib/bundler/man/bundle-binstubs.1 +1 -1
  28. data/lib/bundler/man/bundle-cache.1 +1 -1
  29. data/lib/bundler/man/bundle-check.1 +1 -1
  30. data/lib/bundler/man/bundle-clean.1 +1 -1
  31. data/lib/bundler/man/bundle-config.1 +3 -3
  32. data/lib/bundler/man/bundle-config.1.ronn +3 -3
  33. data/lib/bundler/man/bundle-doctor.1 +1 -1
  34. data/lib/bundler/man/bundle-exec.1 +1 -1
  35. data/lib/bundler/man/bundle-gem.1 +1 -1
  36. data/lib/bundler/man/bundle-info.1 +1 -1
  37. data/lib/bundler/man/bundle-init.1 +1 -1
  38. data/lib/bundler/man/bundle-inject.1 +1 -1
  39. data/lib/bundler/man/bundle-install.1 +2 -2
  40. data/lib/bundler/man/bundle-install.1.ronn +2 -2
  41. data/lib/bundler/man/bundle-list.1 +1 -1
  42. data/lib/bundler/man/bundle-lock.1 +1 -1
  43. data/lib/bundler/man/bundle-open.1 +1 -1
  44. data/lib/bundler/man/bundle-outdated.1 +1 -1
  45. data/lib/bundler/man/bundle-platform.1 +1 -1
  46. data/lib/bundler/man/bundle-pristine.1 +1 -1
  47. data/lib/bundler/man/bundle-remove.1 +1 -1
  48. data/lib/bundler/man/bundle-show.1 +1 -1
  49. data/lib/bundler/man/bundle-update.1 +2 -2
  50. data/lib/bundler/man/bundle-update.1.ronn +2 -1
  51. data/lib/bundler/man/bundle-viz.1 +1 -1
  52. data/lib/bundler/man/bundle.1 +1 -1
  53. data/lib/bundler/man/gemfile.5 +28 -2
  54. data/lib/bundler/man/gemfile.5.ronn +9 -1
  55. data/lib/bundler/plugin/api/source.rb +1 -0
  56. data/lib/bundler/plugin/installer.rb +1 -1
  57. data/lib/bundler/process_lock.rb +1 -1
  58. data/lib/bundler/psyched_yaml.rb +1 -13
  59. data/lib/bundler/resolver.rb +34 -31
  60. data/lib/bundler/rubygems_ext.rb +2 -0
  61. data/lib/bundler/rubygems_gem_installer.rb +1 -1
  62. data/lib/bundler/rubygems_integration.rb +11 -48
  63. data/lib/bundler/self_manager.rb +76 -0
  64. data/lib/bundler/shared_helpers.rb +4 -12
  65. data/lib/bundler/source/git/git_proxy.rb +2 -2
  66. data/lib/bundler/source/metadata.rb +1 -1
  67. data/lib/bundler/source/rubygems.rb +16 -12
  68. data/lib/bundler/source/rubygems_aggregate.rb +1 -1
  69. data/lib/bundler/source.rb +1 -1
  70. data/lib/bundler/source_list.rb +7 -29
  71. data/lib/bundler/templates/Executable.bundler +1 -1
  72. data/lib/bundler/templates/Gemfile +0 -2
  73. data/lib/bundler/templates/gems.rb +0 -3
  74. data/lib/bundler/templates/newgem/Rakefile.tt +10 -1
  75. data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +2 -2
  76. data/lib/bundler/templates/newgem/newgem.gemspec.tt +1 -1
  77. data/lib/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
  78. data/lib/bundler/templates/newgem/standard.yml.tt +0 -2
  79. data/lib/bundler/templates/newgem/test/minitest/{newgem_test.rb.tt → test_newgem.rb.tt} +1 -1
  80. data/lib/bundler/ui/shell.rb +1 -1
  81. data/lib/bundler/vendor/.document +1 -0
  82. data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +6 -6
  83. data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +5 -3
  84. data/lib/bundler/vendor/thor/lib/thor/actions.rb +6 -2
  85. data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +6 -0
  86. data/lib/bundler/vendor/thor/lib/thor/error.rb +9 -4
  87. data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +19 -1
  88. data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +22 -4
  89. data/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
  90. data/lib/bundler/vendor/thor/lib/thor/util.rb +1 -1
  91. data/lib/bundler/vendor/uri/lib/uri/common.rb +17 -80
  92. data/lib/bundler/vendor/uri/lib/uri/ftp.rb +0 -1
  93. data/lib/bundler/vendor/uri/lib/uri/generic.rb +5 -6
  94. data/lib/bundler/vendor/uri/lib/uri/http.rb +0 -1
  95. data/lib/bundler/vendor/uri/lib/uri/https.rb +0 -1
  96. data/lib/bundler/vendor/uri/lib/uri/ldap.rb +1 -1
  97. data/lib/bundler/vendor/uri/lib/uri/mailto.rb +0 -1
  98. data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +1 -14
  99. data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +1 -12
  100. data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  101. data/lib/bundler/vendor/uri/lib/uri/ws.rb +84 -0
  102. data/lib/bundler/vendor/uri/lib/uri/wss.rb +22 -0
  103. data/lib/bundler/vendor/uri/lib/uri.rb +0 -1
  104. data/lib/bundler/version.rb +1 -1
  105. data/lib/bundler.rb +9 -3
  106. metadata +9 -5
  107. data/lib/bundler/gemdeps.rb +0 -29
@@ -3,7 +3,6 @@
3
3
  #
4
4
  # Author:: Akira Yamada <akira@ruby-lang.org>
5
5
  # License:: You can redistribute it and/or modify it under the same term as Ruby.
6
- # Revision:: $Id$
7
6
  #
8
7
  # See Bundler::URI for general documentation
9
8
  #
@@ -3,7 +3,6 @@
3
3
  # = uri/common.rb
4
4
  #
5
5
  # Author:: Akira Yamada <akira@ruby-lang.org>
6
- # Revision:: $Id$
7
6
  # License::
8
7
  # You can redistribute it and/or modify it under the same term as Ruby.
9
8
  #
@@ -208,21 +207,9 @@ module Bundler::URI
208
207
  # #=> #<Bundler::URI::LDAP ldap://ldap.example.com/dc=example?user=john>
209
208
  #
210
209
  def parse(uri)
211
- scheme, userinfo, host, port,
212
- registry, path, opaque, query, fragment = self.split(uri)
213
-
214
- if scheme && Bundler::URI.scheme_list.include?(scheme.upcase)
215
- Bundler::URI.scheme_list[scheme.upcase].new(scheme, userinfo, host, port,
216
- registry, path, opaque, query,
217
- fragment, self)
218
- else
219
- Generic.new(scheme, userinfo, host, port,
220
- registry, path, opaque, query,
221
- fragment, self)
222
- end
210
+ Bundler::URI.for(*self.split(uri), self)
223
211
  end
224
212
 
225
-
226
213
  #
227
214
  # == Args
228
215
  #
@@ -69,18 +69,7 @@ module Bundler::URI
69
69
  end
70
70
 
71
71
  def parse(uri) # :nodoc:
72
- scheme, userinfo, host, port,
73
- registry, path, opaque, query, fragment = self.split(uri)
74
- scheme_list = Bundler::URI.scheme_list
75
- if scheme && scheme_list.include?(uc = scheme.upcase)
76
- scheme_list[uc].new(scheme, userinfo, host, port,
77
- registry, path, opaque, query,
78
- fragment, self)
79
- else
80
- Generic.new(scheme, userinfo, host, port,
81
- registry, path, opaque, query,
82
- fragment, self)
83
- end
72
+ Bundler::URI.for(*self.split(uri), self)
84
73
  end
85
74
 
86
75
 
@@ -1,6 +1,6 @@
1
1
  module Bundler::URI
2
2
  # :stopdoc:
3
- VERSION_CODE = '001000'.freeze
3
+ VERSION_CODE = '001001'.freeze
4
4
  VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
5
5
  # :startdoc:
6
6
  end
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: false
2
+ # = uri/ws.rb
3
+ #
4
+ # Author:: Matt Muller <mamuller@amazon.com>
5
+ # License:: You can redistribute it and/or modify it under the same term as Ruby.
6
+ #
7
+ # See Bundler::URI for general documentation
8
+ #
9
+
10
+ require_relative 'generic'
11
+
12
+ module Bundler::URI
13
+
14
+ #
15
+ # The syntax of WS URIs is defined in RFC6455 section 3.
16
+ #
17
+ # Note that the Ruby Bundler::URI library allows WS URLs containing usernames and
18
+ # passwords. This is not legal as per the RFC, but used to be
19
+ # supported in Internet Explorer 5 and 6, before the MS04-004 security
20
+ # update. See <URL:http://support.microsoft.com/kb/834489>.
21
+ #
22
+ class WS < Generic
23
+ # A Default port of 80 for Bundler::URI::WS.
24
+ DEFAULT_PORT = 80
25
+
26
+ # An Array of the available components for Bundler::URI::WS.
27
+ COMPONENT = %i[
28
+ scheme
29
+ userinfo host port
30
+ path
31
+ query
32
+ ].freeze
33
+
34
+ #
35
+ # == Description
36
+ #
37
+ # Creates a new Bundler::URI::WS object from components, with syntax checking.
38
+ #
39
+ # The components accepted are userinfo, host, port, path, and query.
40
+ #
41
+ # The components should be provided either as an Array, or as a Hash
42
+ # with keys formed by preceding the component names with a colon.
43
+ #
44
+ # If an Array is used, the components must be passed in the
45
+ # order <code>[userinfo, host, port, path, query]</code>.
46
+ #
47
+ # Example:
48
+ #
49
+ # uri = Bundler::URI::WS.build(host: 'www.example.com', path: '/foo/bar')
50
+ #
51
+ # uri = Bundler::URI::WS.build([nil, "www.example.com", nil, "/path", "query"])
52
+ #
53
+ # Currently, if passed userinfo components this method generates
54
+ # invalid WS URIs as per RFC 1738.
55
+ #
56
+ def self.build(args)
57
+ tmp = Util.make_components_hash(self, args)
58
+ super(tmp)
59
+ end
60
+
61
+ #
62
+ # == Description
63
+ #
64
+ # Returns the full path for a WS Bundler::URI, as required by Net::HTTP::Get.
65
+ #
66
+ # If the Bundler::URI contains a query, the full path is Bundler::URI#path + '?' + Bundler::URI#query.
67
+ # Otherwise, the path is simply Bundler::URI#path.
68
+ #
69
+ # Example:
70
+ #
71
+ # uri = Bundler::URI::WS.build(path: '/foo/bar', query: 'test=true')
72
+ # uri.request_uri # => "/foo/bar?test=true"
73
+ #
74
+ def request_uri
75
+ return unless @path
76
+
77
+ url = @query ? "#@path?#@query" : @path.dup
78
+ url.start_with?(?/.freeze) ? url : ?/ + url
79
+ end
80
+ end
81
+
82
+ @@schemes['WS'] = WS
83
+
84
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: false
2
+ # = uri/wss.rb
3
+ #
4
+ # Author:: Matt Muller <mamuller@amazon.com>
5
+ # License:: You can redistribute it and/or modify it under the same term as Ruby.
6
+ #
7
+ # See Bundler::URI for general documentation
8
+ #
9
+
10
+ require_relative 'ws'
11
+
12
+ module Bundler::URI
13
+
14
+ # The default port for WSS URIs is 443, and the scheme is 'wss:' rather
15
+ # than 'ws:'. Other than that, WSS URIs are identical to WS URIs;
16
+ # see Bundler::URI::WS.
17
+ class WSS < WS
18
+ # A Default port of 443 for Bundler::URI::WSS
19
+ DEFAULT_PORT = 443
20
+ end
21
+ @@schemes['WSS'] = WSS
22
+ end
@@ -86,7 +86,6 @@
86
86
  # License::
87
87
  # Copyright (c) 2001 akira yamada <akira@ruby-lang.org>
88
88
  # You can redistribute it and/or modify it under the same term as Ruby.
89
- # Revision:: $Id$
90
89
  #
91
90
 
92
91
  module Bundler::URI
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.2.31".freeze
4
+ VERSION = "2.3.1".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
data/lib/bundler.rb CHANGED
@@ -66,6 +66,7 @@ module Bundler
66
66
  autoload :RubyDsl, File.expand_path("bundler/ruby_dsl", __dir__)
67
67
  autoload :RubyVersion, File.expand_path("bundler/ruby_version", __dir__)
68
68
  autoload :Runtime, File.expand_path("bundler/runtime", __dir__)
69
+ autoload :SelfManager, File.expand_path("bundler/self_manager", __dir__)
69
70
  autoload :Settings, File.expand_path("bundler/settings", __dir__)
70
71
  autoload :SharedHelpers, File.expand_path("bundler/shared_helpers", __dir__)
71
72
  autoload :Source, File.expand_path("bundler/source", __dir__)
@@ -643,15 +644,20 @@ EOF
643
644
  Bundler.rubygems.clear_paths
644
645
  end
645
646
 
647
+ def self_manager
648
+ @self_manager ||= begin
649
+ require_relative "bundler/self_manager"
650
+ Bundler::SelfManager.new
651
+ end
652
+ end
653
+
646
654
  private
647
655
 
648
656
  def eval_yaml_gemspec(path, contents)
649
657
  require_relative "bundler/psyched_yaml"
650
658
 
651
- # If the YAML is invalid, Syck raises an ArgumentError, and Psych
652
- # raises a Psych::SyntaxError. See psyched_yaml.rb for more info.
653
659
  Gem::Specification.from_yaml(contents)
654
- rescue YamlLibrarySyntaxError, ArgumentError, Gem::EndOfYAMLException, Gem::Exception
660
+ rescue ::Psych::SyntaxError, ArgumentError, Gem::EndOfYAMLException, Gem::Exception
655
661
  eval_gemspec(path, contents)
656
662
  end
657
663
 
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.2.31
4
+ version: 2.3.1
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: 2021-11-08 00:00:00.000000000 Z
25
+ date: 2021-12-22 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
@@ -101,7 +101,6 @@ files:
101
101
  - lib/bundler/gem_helpers.rb
102
102
  - lib/bundler/gem_tasks.rb
103
103
  - lib/bundler/gem_version_promoter.rb
104
- - lib/bundler/gemdeps.rb
105
104
  - lib/bundler/graph.rb
106
105
  - lib/bundler/index.rb
107
106
  - lib/bundler/injector.rb
@@ -189,6 +188,7 @@ files:
189
188
  - lib/bundler/rubygems_gem_installer.rb
190
189
  - lib/bundler/rubygems_integration.rb
191
190
  - lib/bundler/runtime.rb
191
+ - lib/bundler/self_manager.rb
192
192
  - lib/bundler/settings.rb
193
193
  - lib/bundler/settings/validator.rb
194
194
  - lib/bundler/setup.rb
@@ -235,11 +235,12 @@ files:
235
235
  - lib/bundler/templates/newgem/newgem.gemspec.tt
236
236
  - lib/bundler/templates/newgem/rspec.tt
237
237
  - lib/bundler/templates/newgem/rubocop.yml.tt
238
+ - lib/bundler/templates/newgem/sig/newgem.rbs.tt
238
239
  - lib/bundler/templates/newgem/spec/newgem_spec.rb.tt
239
240
  - lib/bundler/templates/newgem/spec/spec_helper.rb.tt
240
241
  - lib/bundler/templates/newgem/standard.yml.tt
241
- - lib/bundler/templates/newgem/test/minitest/newgem_test.rb.tt
242
242
  - lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt
243
+ - lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt
243
244
  - lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt
244
245
  - lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt
245
246
  - lib/bundler/templates/newgem/travis.yml.tt
@@ -248,6 +249,7 @@ files:
248
249
  - lib/bundler/ui/shell.rb
249
250
  - lib/bundler/ui/silent.rb
250
251
  - lib/bundler/uri_credentials_filter.rb
252
+ - lib/bundler/vendor/.document
251
253
  - lib/bundler/vendor/connection_pool/LICENSE
252
254
  - lib/bundler/vendor/connection_pool/lib/connection_pool.rb
253
255
  - lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb
@@ -330,6 +332,8 @@ files:
330
332
  - lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb
331
333
  - lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb
332
334
  - lib/bundler/vendor/uri/lib/uri/version.rb
335
+ - lib/bundler/vendor/uri/lib/uri/ws.rb
336
+ - lib/bundler/vendor/uri/lib/uri/wss.rb
333
337
  - lib/bundler/vendored_fileutils.rb
334
338
  - lib/bundler/vendored_molinillo.rb
335
339
  - lib/bundler/vendored_persistent.rb
@@ -365,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
365
369
  - !ruby/object:Gem::Version
366
370
  version: 2.5.2
367
371
  requirements: []
368
- rubygems_version: 3.2.31
372
+ rubygems_version: 3.3.1
369
373
  signing_key:
370
374
  specification_version: 4
371
375
  summary: The best way to manage your application's dependencies
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Bundler
4
- class Gemdeps
5
- def initialize(runtime)
6
- @runtime = runtime
7
- end
8
-
9
- def requested_specs
10
- @runtime.requested_specs
11
- end
12
-
13
- def specs
14
- @runtime.specs
15
- end
16
-
17
- def dependencies
18
- @runtime.dependencies
19
- end
20
-
21
- def current_dependencies
22
- @runtime.current_dependencies
23
- end
24
-
25
- def requires
26
- @runtime.requires
27
- end
28
- end
29
- end