bundler 2.5.16 → 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +194 -0
  3. data/bundler.gemspec +2 -2
  4. data/lib/bundler/build_metadata.rb +2 -2
  5. data/lib/bundler/cli/add.rb +3 -1
  6. data/lib/bundler/cli/check.rb +3 -3
  7. data/lib/bundler/cli/console.rb +0 -4
  8. data/lib/bundler/cli/doctor.rb +4 -4
  9. data/lib/bundler/cli/exec.rb +1 -0
  10. data/lib/bundler/cli/gem.rb +6 -3
  11. data/lib/bundler/cli/info.rb +2 -2
  12. data/lib/bundler/cli/inject.rb +1 -1
  13. data/lib/bundler/cli/install.rb +13 -4
  14. data/lib/bundler/cli/lock.rb +25 -6
  15. data/lib/bundler/cli/outdated.rb +16 -18
  16. data/lib/bundler/cli/pristine.rb +1 -1
  17. data/lib/bundler/cli/show.rb +2 -2
  18. data/lib/bundler/cli.rb +38 -68
  19. data/lib/bundler/compact_index_client/cache_file.rb +0 -5
  20. data/lib/bundler/compact_index_client/updater.rb +0 -11
  21. data/lib/bundler/definition.rb +186 -119
  22. data/lib/bundler/dependency.rb +1 -1
  23. data/lib/bundler/dsl.rb +67 -52
  24. data/lib/bundler/endpoint_specification.rb +10 -1
  25. data/lib/bundler/errors.rb +17 -5
  26. data/lib/bundler/feature_flag.rb +1 -0
  27. data/lib/bundler/fetcher/compact_index.rb +1 -1
  28. data/lib/bundler/fetcher.rb +12 -5
  29. data/lib/bundler/force_platform.rb +0 -2
  30. data/lib/bundler/gem_helpers.rb +21 -5
  31. data/lib/bundler/injector.rb +2 -2
  32. data/lib/bundler/inline.rb +42 -17
  33. data/lib/bundler/installer/gem_installer.rb +4 -2
  34. data/lib/bundler/installer/parallel_installer.rb +3 -2
  35. data/lib/bundler/installer/standalone.rb +2 -2
  36. data/lib/bundler/installer.rb +11 -47
  37. data/lib/bundler/lazy_specification.rb +74 -26
  38. data/lib/bundler/lockfile_generator.rb +1 -1
  39. data/lib/bundler/lockfile_parser.rb +10 -2
  40. data/lib/bundler/man/bundle-add.1 +42 -25
  41. data/lib/bundler/man/bundle-add.1.ronn +52 -23
  42. data/lib/bundler/man/bundle-binstubs.1 +7 -4
  43. data/lib/bundler/man/bundle-binstubs.1.ronn +6 -3
  44. data/lib/bundler/man/bundle-cache.1 +30 -2
  45. data/lib/bundler/man/bundle-cache.1.ronn +31 -2
  46. data/lib/bundler/man/bundle-check.1 +3 -3
  47. data/lib/bundler/man/bundle-check.1.ronn +4 -2
  48. data/lib/bundler/man/bundle-clean.1 +1 -1
  49. data/lib/bundler/man/bundle-config.1 +3 -5
  50. data/lib/bundler/man/bundle-config.1.ronn +2 -7
  51. data/lib/bundler/man/bundle-console.1 +2 -4
  52. data/lib/bundler/man/bundle-console.1.ronn +2 -7
  53. data/lib/bundler/man/bundle-doctor.1 +2 -2
  54. data/lib/bundler/man/bundle-doctor.1.ronn +1 -1
  55. data/lib/bundler/man/bundle-env.1 +9 -0
  56. data/lib/bundler/man/bundle-env.1.ronn +10 -0
  57. data/lib/bundler/man/bundle-exec.1 +5 -2
  58. data/lib/bundler/man/bundle-exec.1.ronn +4 -1
  59. data/lib/bundler/man/bundle-fund.1 +22 -0
  60. data/lib/bundler/man/bundle-fund.1.ronn +25 -0
  61. data/lib/bundler/man/bundle-gem.1 +17 -5
  62. data/lib/bundler/man/bundle-gem.1.ronn +27 -6
  63. data/lib/bundler/man/bundle-help.1 +1 -1
  64. data/lib/bundler/man/bundle-info.1 +5 -2
  65. data/lib/bundler/man/bundle-info.1.ronn +6 -2
  66. data/lib/bundler/man/bundle-init.1 +3 -3
  67. data/lib/bundler/man/bundle-init.1.ronn +3 -2
  68. data/lib/bundler/man/bundle-inject.1 +10 -2
  69. data/lib/bundler/man/bundle-inject.1.ronn +9 -1
  70. data/lib/bundler/man/bundle-install.1 +15 -12
  71. data/lib/bundler/man/bundle-install.1.ronn +22 -18
  72. data/lib/bundler/man/bundle-issue.1 +45 -0
  73. data/lib/bundler/man/bundle-issue.1.ronn +37 -0
  74. data/lib/bundler/man/bundle-licenses.1 +9 -0
  75. data/lib/bundler/man/bundle-licenses.1.ronn +10 -0
  76. data/lib/bundler/man/bundle-list.1 +1 -1
  77. data/lib/bundler/man/bundle-list.1.ronn +4 -1
  78. data/lib/bundler/man/bundle-lock.1 +21 -6
  79. data/lib/bundler/man/bundle-lock.1.ronn +25 -4
  80. data/lib/bundler/man/bundle-open.1 +2 -2
  81. data/lib/bundler/man/bundle-open.1.ronn +2 -1
  82. data/lib/bundler/man/bundle-outdated.1 +8 -5
  83. data/lib/bundler/man/bundle-outdated.1.ronn +8 -4
  84. data/lib/bundler/man/bundle-platform.1 +1 -1
  85. data/lib/bundler/man/bundle-plugin.1 +1 -1
  86. data/lib/bundler/man/bundle-pristine.1 +1 -1
  87. data/lib/bundler/man/bundle-pristine.1.ronn +1 -1
  88. data/lib/bundler/man/bundle-remove.1 +1 -1
  89. data/lib/bundler/man/bundle-remove.1.ronn +1 -1
  90. data/lib/bundler/man/bundle-show.1 +5 -2
  91. data/lib/bundler/man/bundle-show.1.ronn +4 -0
  92. data/lib/bundler/man/bundle-update.1 +13 -7
  93. data/lib/bundler/man/bundle-update.1.ronn +14 -6
  94. data/lib/bundler/man/bundle-version.1 +1 -1
  95. data/lib/bundler/man/bundle-viz.1 +4 -4
  96. data/lib/bundler/man/bundle-viz.1.ronn +7 -3
  97. data/lib/bundler/man/bundle.1 +1 -1
  98. data/lib/bundler/man/gemfile.5 +3 -1
  99. data/lib/bundler/man/gemfile.5.ronn +6 -0
  100. data/lib/bundler/man/index.txt +4 -0
  101. data/lib/bundler/materialization.rb +59 -0
  102. data/lib/bundler/plugin/api/source.rb +2 -1
  103. data/lib/bundler/plugin/events.rb +24 -0
  104. data/lib/bundler/plugin/installer.rb +1 -1
  105. data/lib/bundler/plugin.rb +20 -1
  106. data/lib/bundler/process_lock.rb +10 -14
  107. data/lib/bundler/remote_specification.rb +6 -1
  108. data/lib/bundler/resolver/base.rb +12 -6
  109. data/lib/bundler/resolver/candidate.rb +2 -2
  110. data/lib/bundler/resolver/package.rb +10 -1
  111. data/lib/bundler/resolver/spec_group.rb +4 -3
  112. data/lib/bundler/resolver.rb +36 -14
  113. data/lib/bundler/retry.rb +1 -1
  114. data/lib/bundler/ruby_version.rb +7 -1
  115. data/lib/bundler/rubygems_ext.rb +104 -51
  116. data/lib/bundler/rubygems_gem_installer.rb +7 -5
  117. data/lib/bundler/rubygems_integration.rb +23 -62
  118. data/lib/bundler/runtime.rb +22 -7
  119. data/lib/bundler/self_manager.rb +7 -7
  120. data/lib/bundler/settings.rb +6 -1
  121. data/lib/bundler/shared_helpers.rb +29 -17
  122. data/lib/bundler/source/git/git_proxy.rb +0 -2
  123. data/lib/bundler/source/git.rb +93 -40
  124. data/lib/bundler/source/metadata.rb +2 -3
  125. data/lib/bundler/source/path.rb +5 -3
  126. data/lib/bundler/source/rubygems.rb +6 -16
  127. data/lib/bundler/source_list.rb +1 -1
  128. data/lib/bundler/spec_set.rb +82 -57
  129. data/lib/bundler/stub_specification.rb +21 -2
  130. data/lib/bundler/templates/newgem/Gemfile.tt +0 -3
  131. data/lib/bundler/templates/newgem/README.md.tt +7 -3
  132. data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +15 -15
  133. data/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -4
  134. data/lib/bundler/ui/shell.rb +24 -2
  135. data/lib/bundler/ui/silent.rb +12 -1
  136. data/lib/bundler/uri_credentials_filter.rb +1 -1
  137. data/lib/bundler/vendor/fileutils/COPYING +56 -0
  138. data/lib/bundler/vendor/fileutils/lib/fileutils.rb +15 -13
  139. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +46 -8
  140. data/lib/bundler/vendor/securerandom/.document +1 -0
  141. data/lib/bundler/vendor/securerandom/COPYING +56 -0
  142. data/lib/bundler/vendor/securerandom/lib/securerandom.rb +102 -0
  143. data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +3 -5
  144. data/lib/bundler/vendor/thor/lib/thor/group.rb +11 -0
  145. data/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +1 -4
  146. data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +2 -2
  147. data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +2 -1
  148. data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +9 -9
  149. data/lib/bundler/vendor/thor/lib/thor/shell/html.rb +1 -1
  150. data/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +5 -21
  151. data/lib/bundler/vendor/thor/lib/thor/util.rb +1 -1
  152. data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  153. data/lib/bundler/vendor/thor/lib/thor.rb +11 -0
  154. data/lib/bundler/vendor/uri/COPYING +56 -0
  155. data/lib/bundler/vendor/uri/lib/uri/common.rb +37 -14
  156. data/lib/bundler/vendor/uri/lib/uri/file.rb +3 -3
  157. data/lib/bundler/vendor/uri/lib/uri/ftp.rb +1 -1
  158. data/lib/bundler/vendor/uri/lib/uri/generic.rb +16 -26
  159. data/lib/bundler/vendor/uri/lib/uri/http.rb +2 -2
  160. data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +10 -3
  161. data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +26 -3
  162. data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  163. data/lib/bundler/vendor/uri/lib/uri.rb +9 -9
  164. data/lib/bundler/vendored_securerandom.rb +12 -0
  165. data/lib/bundler/version.rb +1 -1
  166. data/lib/bundler/yaml_serializer.rb +1 -1
  167. data/lib/bundler.rb +68 -36
  168. metadata +20 -10
  169. data/lib/bundler/vendor/fileutils/LICENSE.txt +0 -22
  170. data/lib/bundler/vendor/uri/LICENSE.txt +0 -22
@@ -77,12 +77,9 @@ module Bundler
77
77
  return
78
78
  end
79
79
 
80
- if resolve_if_needed(options)
80
+ if @definition.setup_domain!(options)
81
81
  ensure_specs_are_compatible!
82
- load_plugins
83
- options.delete(:jobs)
84
- else
85
- options[:jobs] = 1 # to avoid the overhead of Bundler::Worker
82
+ Bundler.load_plugins(@definition)
86
83
  end
87
84
  install(options)
88
85
 
@@ -194,16 +191,17 @@ module Bundler
194
191
  # that said, it's a rare situation (other than rake), and parallel
195
192
  # installation is SO MUCH FASTER. so we let people opt in.
196
193
  def install(options)
197
- force = options["force"]
198
- jobs = installation_parallelization(options)
199
- install_in_parallel jobs, options[:standalone], force
200
- end
201
-
202
- def installation_parallelization(options)
203
- if jobs = options.delete(:jobs)
204
- return jobs
194
+ standalone = options[:standalone]
195
+ force = options[:force]
196
+ local = options[:local]
197
+ jobs = installation_parallelization
198
+ spec_installations = ParallelInstaller.call(self, @definition.specs, jobs, standalone, force, local: local)
199
+ spec_installations.each do |installation|
200
+ post_install_messages[installation.name] = installation.post_install_message if installation.has_post_install_message?
205
201
  end
202
+ end
206
203
 
204
+ def installation_parallelization
207
205
  if jobs = Bundler.settings[:jobs]
208
206
  return jobs
209
207
  end
@@ -211,20 +209,6 @@ module Bundler
211
209
  Bundler.settings.processor_count
212
210
  end
213
211
 
214
- def load_plugins
215
- Gem.load_plugins
216
-
217
- requested_path_gems = @definition.requested_specs.select {|s| s.source.is_a?(Source::Path) }
218
- path_plugin_files = requested_path_gems.map do |spec|
219
- Bundler.rubygems.spec_matches_for_glob(spec, "rubygems_plugin#{Bundler.rubygems.suffix_pattern}")
220
- rescue TypeError
221
- error_message = "#{spec.name} #{spec.version} has an invalid gemspec"
222
- raise Gem::InvalidSpecificationException, error_message
223
- end.flatten
224
- Gem.load_plugin_files(path_plugin_files)
225
- Gem.load_env_plugins
226
- end
227
-
228
212
  def ensure_specs_are_compatible!
229
213
  @definition.specs.each do |spec|
230
214
  unless spec.matches_current_ruby?
@@ -238,26 +222,6 @@ module Bundler
238
222
  end
239
223
  end
240
224
 
241
- def install_in_parallel(size, standalone, force = false)
242
- spec_installations = ParallelInstaller.call(self, @definition.specs, size, standalone, force)
243
- spec_installations.each do |installation|
244
- post_install_messages[installation.name] = installation.post_install_message if installation.has_post_install_message?
245
- end
246
- end
247
-
248
- # returns whether or not a re-resolve was needed
249
- def resolve_if_needed(options)
250
- @definition.prefer_local! if options["prefer-local"]
251
-
252
- if options["local"] || (@definition.no_resolve_needed? && !@definition.missing_specs?)
253
- @definition.resolve_with_cache!
254
- false
255
- else
256
- @definition.resolve_remotely!
257
- true
258
- end
259
- end
260
-
261
225
  def lock
262
226
  @definition.lock
263
227
  end
@@ -8,14 +8,26 @@ module Bundler
8
8
  include MatchPlatform
9
9
  include ForcePlatform
10
10
 
11
- attr_reader :name, :version, :platform
11
+ attr_reader :name, :version, :platform, :materialization
12
12
  attr_accessor :source, :remote, :force_ruby_platform, :dependencies, :required_ruby_version, :required_rubygems_version
13
13
 
14
+ #
15
+ # For backwards compatibility with existing lockfiles, if the most specific
16
+ # locked platform is not a specific platform like x86_64-linux or
17
+ # universal-java-11, then we keep the previous behaviour of resolving the
18
+ # best platform variant at materiliazation time. For previous bundler
19
+ # versions (before 2.2.0) this was always the case (except when the lockfile
20
+ # only included non-ruby platforms), but we're also keeping this behaviour
21
+ # on newer bundlers unless users generate the lockfile from scratch or
22
+ # explicitly add a more specific platform.
23
+ #
24
+ attr_accessor :most_specific_locked_platform
25
+
14
26
  alias_method :runtime_dependencies, :dependencies
15
27
 
16
28
  def self.from_spec(s)
17
29
  lazy_spec = new(s.name, s.version, s.platform, s.source)
18
- lazy_spec.dependencies = s.dependencies
30
+ lazy_spec.dependencies = s.runtime_dependencies
19
31
  lazy_spec.required_ruby_version = s.required_ruby_version
20
32
  lazy_spec.required_rubygems_version = s.required_rubygems_version
21
33
  lazy_spec
@@ -27,9 +39,26 @@ module Bundler
27
39
  @dependencies = []
28
40
  @required_ruby_version = Gem::Requirement.default
29
41
  @required_rubygems_version = Gem::Requirement.default
30
- @platform = platform || Gem::Platform::RUBY
31
- @source = source
42
+ @platform = platform || Gem::Platform::RUBY
43
+
44
+ @original_source = source
45
+ @source = source
46
+
32
47
  @force_ruby_platform = default_force_ruby_platform
48
+ @most_specific_locked_platform = nil
49
+ @materialization = nil
50
+ end
51
+
52
+ def missing?
53
+ @materialization == self
54
+ end
55
+
56
+ def incomplete?
57
+ @materialization.nil?
58
+ end
59
+
60
+ def source_changed?
61
+ @original_source != source
33
62
  end
34
63
 
35
64
  def full_name
@@ -92,16 +121,31 @@ module Bundler
92
121
  out
93
122
  end
94
123
 
95
- def materialize_for_installation
124
+ def materialize_strictly
96
125
  source.local!
97
126
 
98
- matching_specs = source.specs.search(use_exact_resolved_specifications? ? self : [name, version])
127
+ matching_specs = source.specs.search(self)
99
128
  return self if matching_specs.empty?
100
129
 
101
- candidates = if use_exact_resolved_specifications?
102
- matching_specs
130
+ __materialize__(matching_specs)
131
+ end
132
+
133
+ def materialized_for_installation
134
+ @materialization = materialize_for_installation
135
+
136
+ self unless incomplete?
137
+ end
138
+
139
+ def materialize_for_installation
140
+ source.local!
141
+
142
+ if use_exact_resolved_specifications?
143
+ materialize_strictly
103
144
  else
104
- target_platform = ruby_platform_materializes_to_ruby_platform? ? platform : local_platform
145
+ matching_specs = source.specs.search([name, version])
146
+ return self if matching_specs.empty?
147
+
148
+ target_platform = source.is_a?(Source::Path) ? platform : local_platform
105
149
 
106
150
  installable_candidates = GemHelpers.select_best_platform_match(matching_specs, target_platform)
107
151
 
@@ -112,10 +156,8 @@ module Bundler
112
156
  installable_candidates = GemHelpers.select_best_platform_match(matching_specs, platform)
113
157
  end
114
158
 
115
- installable_candidates
159
+ __materialize__(installable_candidates)
116
160
  end
117
-
118
- __materialize__(candidates)
119
161
  end
120
162
 
121
163
  # If in frozen mode, we fallback to a non-installable candidate because by
@@ -129,12 +171,28 @@ module Bundler
129
171
  end
130
172
  if search.nil? && fallback_to_non_installable
131
173
  search = candidates.last
132
- else
133
- search.dependencies = dependencies if search && search.full_name == full_name && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))
174
+ elsif search && search.full_name == full_name
175
+ # We don't validate locally installed dependencies but accept what's in
176
+ # the lockfile instead for performance, since loading locally installed
177
+ # dependencies would mean evaluating all gemspecs, which would affect
178
+ # `bundler/setup` performance
179
+ if search.is_a?(StubSpecification)
180
+ search.dependencies = dependencies
181
+ else
182
+ if !source.is_a?(Source::Path) && search.runtime_dependencies.sort != dependencies.sort
183
+ raise IncorrectLockfileDependencies.new(self)
184
+ end
185
+
186
+ search.locked_platform = platform if search.instance_of?(RemoteSpecification) || search.instance_of?(EndpointSpecification)
187
+ end
134
188
  end
135
189
  search
136
190
  end
137
191
 
192
+ def inspect
193
+ "#<#{self.class} @name=\"#{name}\" (#{full_name.delete_prefix("#{name}-")})>"
194
+ end
195
+
138
196
  def to_s
139
197
  lock_name
140
198
  end
@@ -151,23 +209,13 @@ module Bundler
151
209
  private
152
210
 
153
211
  def use_exact_resolved_specifications?
154
- @use_exact_resolved_specifications ||= !source.is_a?(Source::Path) && ruby_platform_materializes_to_ruby_platform?
212
+ !source.is_a?(Source::Path) && ruby_platform_materializes_to_ruby_platform?
155
213
  end
156
214
 
157
- #
158
- # For backwards compatibility with existing lockfiles, if the most specific
159
- # locked platform is not a specific platform like x86_64-linux or
160
- # universal-java-11, then we keep the previous behaviour of resolving the
161
- # best platform variant at materiliazation time. For previous bundler
162
- # versions (before 2.2.0) this was always the case (except when the lockfile
163
- # only included non-ruby platforms), but we're also keeping this behaviour
164
- # on newer bundlers unless users generate the lockfile from scratch or
165
- # explicitly add a more specific platform.
166
- #
167
215
  def ruby_platform_materializes_to_ruby_platform?
168
216
  generic_platform = generic_local_platform == Gem::Platform::JAVA ? Gem::Platform::JAVA : Gem::Platform::RUBY
169
217
 
170
- !Bundler.most_specific_locked_platform?(generic_platform) || force_ruby_platform || Bundler.settings[:force_ruby_platform]
218
+ (most_specific_locked_platform != generic_platform) || force_ruby_platform || Bundler.settings[:force_ruby_platform]
171
219
  end
172
220
  end
173
221
  end
@@ -29,7 +29,7 @@ module Bundler
29
29
  private
30
30
 
31
31
  def add_sources
32
- definition.send(:sources).lock_sources.each_with_index do |source, idx|
32
+ definition.sources.lock_sources.each_with_index do |source, idx|
33
33
  out << "\n" unless idx.zero?
34
34
 
35
35
  # Add the source header
@@ -2,6 +2,8 @@
2
2
 
3
3
  module Bundler
4
4
  class LockfileParser
5
+ include GemHelpers
6
+
5
7
  class Position
6
8
  attr_reader :line, :column
7
9
  def initialize(line, column)
@@ -29,6 +31,7 @@ module Bundler
29
31
  :dependencies,
30
32
  :specs,
31
33
  :platforms,
34
+ :most_specific_locked_platform,
32
35
  :bundler_version,
33
36
  :ruby_version,
34
37
  :checksums,
@@ -136,7 +139,12 @@ module Bundler
136
139
  end
137
140
  @pos.advance!(line)
138
141
  end
139
- @specs = @specs.values.sort_by!(&:full_name)
142
+ @most_specific_locked_platform = @platforms.min_by do |bundle_platform|
143
+ platform_specificity_match(bundle_platform, local_platform)
144
+ end
145
+ @specs = @specs.values.sort_by!(&:full_name).each do |spec|
146
+ spec.most_specific_locked_platform = @most_specific_locked_platform
147
+ end
140
148
  rescue ArgumentError => e
141
149
  Bundler.ui.debug(e)
142
150
  raise LockfileError, "Your lockfile is unreadable. Run `rm #{@lockfile_path}` " \
@@ -272,7 +280,7 @@ module Bundler
272
280
  end
273
281
 
274
282
  def parse_platform(line)
275
- @platforms << Gem::Platform.new($1) if line =~ /^ (.*)$/
283
+ @platforms << Gem::Platform.new($1.strip) if line =~ /^ (.*)$/
276
284
  end
277
285
 
278
286
  def parse_bundled_with(line)
@@ -1,53 +1,47 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-ADD" "1" "June 2024" ""
3
+ .TH "BUNDLE\-ADD" "1" "December 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
6
6
  .SH "SYNOPSIS"
7
- \fBbundle add\fR \fIGEM_NAME\fR [\-\-group=GROUP] [\-\-version=VERSION] [\-\-source=SOURCE] [\-\-path=PATH] [\-\-git=GIT] [\-\-github=GITHUB] [\-\-branch=BRANCH] [\-\-ref=REF] [\-\-skip\-install] [\-\-strict] [\-\-optimistic]
7
+ \fBbundle add\fR \fIGEM_NAME\fR [\-\-group=GROUP] [\-\-version=VERSION] [\-\-source=SOURCE] [\-\-path=PATH] [\-\-git=GIT|\-\-github=GITHUB] [\-\-branch=BRANCH] [\-\-ref=REF] [\-\-quiet] [\-\-skip\-install] [\-\-strict|\-\-optimistic]
8
8
  .SH "DESCRIPTION"
9
- Adds the named gem to the Gemfile and run \fBbundle install\fR\. \fBbundle install\fR can be avoided by using the flag \fB\-\-skip\-install\fR\.
10
- .P
11
- Example:
12
- .P
13
- bundle add rails
14
- .P
15
- bundle add rails \-\-version "< 3\.0, > 1\.1"
16
- .P
17
- bundle add rails \-\-version "~> 5\.0\.0" \-\-source "https://gems\.example\.com" \-\-group "development"
18
- .P
19
- bundle add rails \-\-skip\-install
20
- .P
21
- bundle add rails \-\-group "development, test"
9
+ Adds the named gem to the [\fBGemfile(5)\fR][Gemfile(5)] and run \fBbundle install\fR\. \fBbundle install\fR can be avoided by using the flag \fB\-\-skip\-install\fR\.
22
10
  .SH "OPTIONS"
23
11
  .TP
24
- \fB\-\-version\fR, \fB\-v\fR
12
+ \fB\-\-version=VERSION\fR, \fB\-v=VERSION\fR
25
13
  Specify version requirements(s) for the added gem\.
26
14
  .TP
27
- \fB\-\-group\fR, \fB\-g\fR
15
+ \fB\-\-group=GROUP\fR, \fB\-g=GROUP\fR
28
16
  Specify the group(s) for the added gem\. Multiple groups should be separated by commas\.
29
17
  .TP
30
- \fB\-\-source\fR, \fB\-s\fR
18
+ \fB\-\-source=SOURCE\fR, \fB\-s=SOURCE\fR
31
19
  Specify the source for the added gem\.
32
20
  .TP
33
- \fB\-\-require\fR, \fB\-r\fR
21
+ \fB\-\-require=REQUIRE\fR, \fB\-r=REQUIRE\fR
34
22
  Adds require path to gem\. Provide false, or a path as a string\.
35
23
  .TP
36
- \fB\-\-path\fR
24
+ \fB\-\-path=PATH\fR
37
25
  Specify the file system path for the added gem\.
38
26
  .TP
39
- \fB\-\-git\fR
27
+ \fB\-\-git=GIT\fR
40
28
  Specify the git source for the added gem\.
41
29
  .TP
42
- \fB\-\-github\fR
30
+ \fB\-\-github=GITHUB\fR
43
31
  Specify the github source for the added gem\.
44
32
  .TP
45
- \fB\-\-branch\fR
33
+ \fB\-\-branch=BRANCH\fR
46
34
  Specify the git branch for the added gem\.
47
35
  .TP
48
- \fB\-\-ref\fR
36
+ \fB\-\-ref=REF\fR
49
37
  Specify the git ref for the added gem\.
50
38
  .TP
39
+ \fB\-\-glob=GLOB\fR
40
+ Specify the location of a dependency's \.gemspec, expanded within Ruby (single quotes recommended)\.
41
+ .TP
42
+ \fB\-\-quiet\fR
43
+ Do not print progress information to the standard output\.
44
+ .TP
51
45
  \fB\-\-skip\-install\fR
52
46
  Adds the gem to the Gemfile but does not install it\.
53
47
  .TP
@@ -56,4 +50,27 @@ Adds optimistic declaration of version\.
56
50
  .TP
57
51
  \fB\-\-strict\fR
58
52
  Adds strict declaration of version\.
59
-
53
+ .SH "EXAMPLES"
54
+ .IP "1." 4
55
+ You can add the \fBrails\fR gem to the Gemfile without any version restriction\. The source of the gem will be the global source\.
56
+ .IP
57
+ \fBbundle add rails\fR
58
+ .IP "2." 4
59
+ You can add the \fBrails\fR gem with version greater than 1\.1 (not including 1\.1) and less than 3\.0\.
60
+ .IP
61
+ \fBbundle add rails \-\-version "> 1\.1, < 3\.0"\fR
62
+ .IP "3." 4
63
+ You can use the \fBhttps://gems\.example\.com\fR custom source and assign the gem to a group\.
64
+ .IP
65
+ \fBbundle add rails \-\-version "~> 5\.0\.0" \-\-source "https://gems\.example\.com" \-\-group "development"\fR
66
+ .IP "4." 4
67
+ The following adds the \fBgem\fR entry to the Gemfile without installing the gem\. You can install gems later via \fBbundle install\fR\.
68
+ .IP
69
+ \fBbundle add rails \-\-skip\-install\fR
70
+ .IP "5." 4
71
+ You can assign the gem to more than one group\.
72
+ .IP
73
+ \fBbundle add rails \-\-group "development, test"\fR
74
+ .IP "" 0
75
+ .SH "SEE ALSO"
76
+ Gemfile(5) \fIhttps://bundler\.io/man/gemfile\.5\.html\fR, bundle\-remove(1) \fIbundle\-remove\.1\.html\fR
@@ -1,53 +1,52 @@
1
1
  bundle-add(1) -- Add gem to the Gemfile and run bundle install
2
- ================================================================
2
+ ==============================================================
3
3
 
4
4
  ## SYNOPSIS
5
5
 
6
- `bundle add` <GEM_NAME> [--group=GROUP] [--version=VERSION] [--source=SOURCE] [--path=PATH] [--git=GIT] [--github=GITHUB] [--branch=BRANCH] [--ref=REF] [--skip-install] [--strict] [--optimistic]
6
+ `bundle add` <GEM_NAME> [--group=GROUP] [--version=VERSION] [--source=SOURCE]
7
+ [--path=PATH] [--git=GIT|--github=GITHUB] [--branch=BRANCH] [--ref=REF]
8
+ [--quiet] [--skip-install] [--strict|--optimistic]
7
9
 
8
10
  ## DESCRIPTION
9
- Adds the named gem to the Gemfile and run `bundle install`. `bundle install` can be avoided by using the flag `--skip-install`.
10
11
 
11
- Example:
12
-
13
- bundle add rails
14
-
15
- bundle add rails --version "< 3.0, > 1.1"
16
-
17
- bundle add rails --version "~> 5.0.0" --source "https://gems.example.com" --group "development"
18
-
19
- bundle add rails --skip-install
20
-
21
- bundle add rails --group "development, test"
12
+ Adds the named gem to the [`Gemfile(5)`][Gemfile(5)] and run `bundle install`.
13
+ `bundle install` can be avoided by using the flag `--skip-install`.
22
14
 
23
15
  ## OPTIONS
24
- * `--version`, `-v`:
16
+
17
+ * `--version=VERSION`, `-v=VERSION`:
25
18
  Specify version requirements(s) for the added gem.
26
19
 
27
- * `--group`, `-g`:
20
+ * `--group=GROUP`, `-g=GROUP`:
28
21
  Specify the group(s) for the added gem. Multiple groups should be separated by commas.
29
22
 
30
- * `--source`, `-s`:
23
+ * `--source=SOURCE`, `-s=SOURCE`:
31
24
  Specify the source for the added gem.
32
25
 
33
- * `--require`, `-r`:
26
+ * `--require=REQUIRE`, `-r=REQUIRE`:
34
27
  Adds require path to gem. Provide false, or a path as a string.
35
28
 
36
- * `--path`:
29
+ * `--path=PATH`:
37
30
  Specify the file system path for the added gem.
38
31
 
39
- * `--git`:
32
+ * `--git=GIT`:
40
33
  Specify the git source for the added gem.
41
34
 
42
- * `--github`:
35
+ * `--github=GITHUB`:
43
36
  Specify the github source for the added gem.
44
37
 
45
- * `--branch`:
38
+ * `--branch=BRANCH`:
46
39
  Specify the git branch for the added gem.
47
40
 
48
- * `--ref`:
41
+ * `--ref=REF`:
49
42
  Specify the git ref for the added gem.
50
43
 
44
+ * `--glob=GLOB`:
45
+ Specify the location of a dependency's .gemspec, expanded within Ruby (single quotes recommended).
46
+
47
+ * `--quiet`:
48
+ Do not print progress information to the standard output.
49
+
51
50
  * `--skip-install`:
52
51
  Adds the gem to the Gemfile but does not install it.
53
52
 
@@ -56,3 +55,33 @@ bundle add rails --group "development, test"
56
55
 
57
56
  * `--strict`:
58
57
  Adds strict declaration of version.
58
+
59
+ ## EXAMPLES
60
+
61
+ 1. You can add the `rails` gem to the Gemfile without any version restriction.
62
+ The source of the gem will be the global source.
63
+
64
+ `bundle add rails`
65
+
66
+ 2. You can add the `rails` gem with version greater than 1.1 (not including 1.1) and less than 3.0.
67
+
68
+ `bundle add rails --version "> 1.1, < 3.0"`
69
+
70
+ 3. You can use the `https://gems.example.com` custom source and assign the gem
71
+ to a group.
72
+
73
+ `bundle add rails --version "~> 5.0.0" --source "https://gems.example.com" --group "development"`
74
+
75
+ 4. The following adds the `gem` entry to the Gemfile without installing the
76
+ gem. You can install gems later via `bundle install`.
77
+
78
+ `bundle add rails --skip-install`
79
+
80
+ 5. You can assign the gem to more than one group.
81
+
82
+ `bundle add rails --group "development, test"`
83
+
84
+ ## SEE ALSO
85
+
86
+ [Gemfile(5)](https://bundler.io/man/gemfile.5.html),
87
+ [bundle-remove(1)](bundle-remove.1.html)
@@ -1,10 +1,10 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-BINSTUBS" "1" "June 2024" ""
3
+ .TH "BUNDLE\-BINSTUBS" "1" "December 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
6
6
  .SH "SYNOPSIS"
7
- \fBbundle binstubs\fR \fIGEM_NAME\fR [\-\-force] [\-\-path PATH] [\-\-standalone]
7
+ \fBbundle binstubs\fR \fIGEM_NAME\fR [\-\-force] [\-\-path PATH] [\-\-standalone] [\-\-all\-platforms]
8
8
  .SH "DESCRIPTION"
9
9
  Binstubs are scripts that wrap around executables\. Bundler creates a small Ruby file (a binstub) that loads Bundler, runs the command, and puts it into \fBbin/\fR\. Binstubs are a shortcut\-or alternative\- to always using \fBbundle exec\fR\. This gives you a file that can be run directly, and one that will always run the correct gem version used by the application\.
10
10
  .P
@@ -16,15 +16,18 @@ This command generates binstubs for executables in \fBGEM_NAME\fR\. Binstubs are
16
16
  \fB\-\-force\fR
17
17
  Overwrite existing binstubs if they exist\.
18
18
  .TP
19
- \fB\-\-path\fR
19
+ \fB\-\-path[=PATH]\fR
20
20
  The location to install the specified binstubs to\. This defaults to \fBbin\fR\.
21
21
  .TP
22
22
  \fB\-\-standalone\fR
23
23
  Makes binstubs that can work without depending on Rubygems or Bundler at runtime\.
24
24
  .TP
25
- \fB\-\-shebang\fR
25
+ \fB\-\-shebang=SHEBANG\fR
26
26
  Specify a different shebang executable name than the default (default 'ruby')
27
27
  .TP
28
28
  \fB\-\-all\fR
29
29
  Create binstubs for all gems in the bundle\.
30
+ .TP
31
+ \fB\-\-all\-platforms\fR
32
+ Install binstubs for all platforms\.
30
33
 
@@ -3,7 +3,7 @@ bundle-binstubs(1) -- Install the binstubs of the listed gems
3
3
 
4
4
  ## SYNOPSIS
5
5
 
6
- `bundle binstubs` <GEM_NAME> [--force] [--path PATH] [--standalone]
6
+ `bundle binstubs` <GEM_NAME> [--force] [--path PATH] [--standalone] [--all-platforms]
7
7
 
8
8
  ## DESCRIPTION
9
9
 
@@ -27,15 +27,18 @@ Calling binstubs with [GEM [GEM]] will create binstubs for all given gems.
27
27
  * `--force`:
28
28
  Overwrite existing binstubs if they exist.
29
29
 
30
- * `--path`:
30
+ * `--path[=PATH]`:
31
31
  The location to install the specified binstubs to. This defaults to `bin`.
32
32
 
33
33
  * `--standalone`:
34
34
  Makes binstubs that can work without depending on Rubygems or Bundler at
35
35
  runtime.
36
36
 
37
- * `--shebang`:
37
+ * `--shebang=SHEBANG`:
38
38
  Specify a different shebang executable name than the default (default 'ruby')
39
39
 
40
40
  * `--all`:
41
41
  Create binstubs for all gems in the bundle.
42
+
43
+ * `--all-platforms`:
44
+ Install binstubs for all platforms.
@@ -1,14 +1,42 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CACHE" "1" "June 2024" ""
3
+ .TH "BUNDLE\-CACHE" "1" "December 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
6
6
  .SH "SYNOPSIS"
7
- \fBbundle cache\fR
7
+ \fBbundle cache\fR [\fIOPTIONS\fR]
8
8
  .P
9
9
  alias: \fBpackage\fR, \fBpack\fR
10
10
  .SH "DESCRIPTION"
11
11
  Copy all of the \fB\.gem\fR files needed to run the application into the \fBvendor/cache\fR directory\. In the future, when running \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR, use the gems in the cache in preference to the ones on \fBrubygems\.org\fR\.
12
+ .SH "OPTIONS"
13
+ .TP
14
+ \fB\-\-all\fR
15
+ Include all sources (including path and git)\.
16
+ .TP
17
+ \fB\-\-all\-platforms\fR
18
+ Include gems for all platforms present in the lockfile, not only the current one\.
19
+ .TP
20
+ \fB\-\-cache\-path=CACHE\-PATH\fR
21
+ Specify a different cache path than the default (vendor/cache)\.
22
+ .TP
23
+ \fB\-\-gemfile=GEMFILE\fR
24
+ Use the specified gemfile instead of Gemfile\.
25
+ .TP
26
+ \fB\-\-no\-install\fR
27
+ Don't install the gems, only update the cache\.
28
+ .TP
29
+ \fB\-\-no\-prune\fR
30
+ Don't remove stale gems from the cache\.
31
+ .TP
32
+ \fB\-\-path=PATH\fR
33
+ Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME)\.
34
+ .TP
35
+ \fB\-\-quiet\fR
36
+ Only output warnings and errors\.
37
+ .TP
38
+ \fB\-\-frozen\fR
39
+ Do not allow the Gemfile\.lock to be updated after this bundle cache operation's install\.
12
40
  .SH "GIT AND PATH GEMS"
13
41
  The \fBbundle cache\fR command can also package \fB:git\fR and \fB:path\fR dependencies besides \.gem files\. This needs to be explicitly enabled via the \fB\-\-all\fR option\. Once used, the \fB\-\-all\fR option will be remembered\.
14
42
  .SH "SUPPORT FOR MULTIPLE PLATFORMS"
@@ -1,9 +1,9 @@
1
1
  bundle-cache(1) -- Package your needed `.gem` files into your application
2
- ===========================================================================
2
+ =========================================================================
3
3
 
4
4
  ## SYNOPSIS
5
5
 
6
- `bundle cache`
6
+ `bundle cache` [*OPTIONS*]
7
7
 
8
8
  alias: `package`, `pack`
9
9
 
@@ -13,6 +13,35 @@ Copy all of the `.gem` files needed to run the application into the
13
13
  `vendor/cache` directory. In the future, when running [`bundle install(1)`](bundle-install.1.html),
14
14
  use the gems in the cache in preference to the ones on `rubygems.org`.
15
15
 
16
+ ## OPTIONS
17
+
18
+ * `--all`:
19
+ Include all sources (including path and git).
20
+
21
+ * `--all-platforms`:
22
+ Include gems for all platforms present in the lockfile, not only the current one.
23
+
24
+ * `--cache-path=CACHE-PATH`:
25
+ Specify a different cache path than the default (vendor/cache).
26
+
27
+ * `--gemfile=GEMFILE`:
28
+ Use the specified gemfile instead of Gemfile.
29
+
30
+ * `--no-install`:
31
+ Don't install the gems, only update the cache.
32
+
33
+ * `--no-prune`:
34
+ Don't remove stale gems from the cache.
35
+
36
+ * `--path=PATH`:
37
+ Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME).
38
+
39
+ * `--quiet`:
40
+ Only output warnings and errors.
41
+
42
+ * `--frozen`:
43
+ Do not allow the Gemfile.lock to be updated after this bundle cache operation's install.
44
+
16
45
  ## GIT AND PATH GEMS
17
46
 
18
47
  The `bundle cache` command can also package `:git` and `:path` dependencies