bundler 2.5.22 → 2.5.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/cli/add.rb +2 -0
- data/lib/bundler/cli/check.rb +2 -2
- data/lib/bundler/cli.rb +1 -0
- data/lib/bundler/definition.rb +10 -16
- data/lib/bundler/dsl.rb +31 -15
- data/lib/bundler/inline.rb +12 -8
- data/lib/bundler/lazy_specification.rb +9 -2
- data/lib/bundler/lockfile_generator.rb +1 -1
- data/lib/bundler/man/bundle-add.1 +5 -2
- data/lib/bundler/man/bundle-add.1.ronn +4 -1
- data/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/lib/bundler/man/bundle-cache.1 +1 -1
- data/lib/bundler/man/bundle-check.1 +1 -1
- data/lib/bundler/man/bundle-clean.1 +1 -1
- data/lib/bundler/man/bundle-config.1 +1 -5
- data/lib/bundler/man/bundle-config.1.ronn +0 -7
- data/lib/bundler/man/bundle-console.1 +1 -1
- data/lib/bundler/man/bundle-doctor.1 +1 -1
- data/lib/bundler/man/bundle-exec.1 +1 -1
- data/lib/bundler/man/bundle-gem.1 +1 -1
- data/lib/bundler/man/bundle-help.1 +1 -1
- data/lib/bundler/man/bundle-info.1 +1 -1
- data/lib/bundler/man/bundle-init.1 +1 -1
- data/lib/bundler/man/bundle-inject.1 +1 -1
- data/lib/bundler/man/bundle-install.1 +2 -2
- data/lib/bundler/man/bundle-install.1.ronn +1 -2
- data/lib/bundler/man/bundle-list.1 +1 -1
- data/lib/bundler/man/bundle-lock.1 +1 -1
- data/lib/bundler/man/bundle-open.1 +1 -1
- data/lib/bundler/man/bundle-outdated.1 +1 -1
- data/lib/bundler/man/bundle-platform.1 +1 -1
- data/lib/bundler/man/bundle-plugin.1 +1 -1
- data/lib/bundler/man/bundle-pristine.1 +1 -1
- data/lib/bundler/man/bundle-remove.1 +1 -1
- data/lib/bundler/man/bundle-show.1 +1 -1
- data/lib/bundler/man/bundle-update.1 +1 -1
- data/lib/bundler/man/bundle-version.1 +1 -1
- data/lib/bundler/man/bundle-viz.1 +1 -1
- data/lib/bundler/man/bundle.1 +1 -1
- data/lib/bundler/man/gemfile.5 +1 -1
- data/lib/bundler/plugin.rb +20 -1
- data/lib/bundler/process_lock.rb +10 -14
- data/lib/bundler/resolver/base.rb +4 -0
- data/lib/bundler/rubygems_ext.rb +14 -0
- data/lib/bundler/rubygems_gem_installer.rb +3 -1
- data/lib/bundler/rubygems_integration.rb +2 -29
- data/lib/bundler/settings.rb +5 -1
- data/lib/bundler/shared_helpers.rb +27 -15
- data/lib/bundler/source/metadata.rb +2 -3
- data/lib/bundler/templates/newgem/Gemfile.tt +0 -3
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +15 -15
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -4
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f964a6e36c3a9919c4326fd76e7646a5b81723f054d36348dca84d40f70272d
|
4
|
+
data.tar.gz: 6d5cb44abe0e95f451ac4950e044a303bfc1fb44893e1f198f800225b313129f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e541245d67f58bd6f30bce064e02564c475c281b89b0f60083699998e5e2cf4450685f69bfdc02df1fe4900f67cf778dc6a30e1e38db858000dedd72a79384e2
|
7
|
+
data.tar.gz: 0af9592802c805e17e3bf35eb58d2a10b78ccf25b9fa59cdf637a8c4c8ab7bdad5ecbc1f0c9489eabf4e0b348c937831e7335283703e21209dccbf53b36727e9
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,27 @@
|
|
1
|
+
# 2.5.23 (November 5, 2024)
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
- Add useful error message for plugin load [#7639](https://github.com/rubygems/rubygems/pull/7639)
|
6
|
+
- Indent github workflow steps for generated gems [#8193](https://github.com/rubygems/rubygems/pull/8193)
|
7
|
+
- Improve several permission errors [#8168](https://github.com/rubygems/rubygems/pull/8168)
|
8
|
+
- Add `bundle add` `--quiet` option [#8157](https://github.com/rubygems/rubygems/pull/8157)
|
9
|
+
|
10
|
+
## Bug fixes:
|
11
|
+
|
12
|
+
- Fix incompatible encodings error when paths with UTF-8 characters are involved [#8196](https://github.com/rubygems/rubygems/pull/8196)
|
13
|
+
- Update `--ext=rust` to support compiling the native extension from source [#7610](https://github.com/rubygems/rubygems/pull/7610)
|
14
|
+
- Print a proper error when there's a previous empty installation path with bad permissions [#8169](https://github.com/rubygems/rubygems/pull/8169)
|
15
|
+
- Fix running `bundler` (with a final `r`) in a `bundle exec` context [#8165](https://github.com/rubygems/rubygems/pull/8165)
|
16
|
+
- Handle two `gemspec` usages in same Gemfile with same dep and compatible requirements [#7999](https://github.com/rubygems/rubygems/pull/7999)
|
17
|
+
- Fix `bundle check` sometimes locking gems under the wrong source [#8148](https://github.com/rubygems/rubygems/pull/8148)
|
18
|
+
|
19
|
+
## Documentation:
|
20
|
+
|
21
|
+
- Remove confusing `bundle config` documentation [#8177](https://github.com/rubygems/rubygems/pull/8177)
|
22
|
+
- Rename bundler inline's `install` parameter and clarify docs [#8170](https://github.com/rubygems/rubygems/pull/8170)
|
23
|
+
- Clarify `bundle install --quiet` documentation [#8163](https://github.com/rubygems/rubygems/pull/8163)
|
24
|
+
|
1
25
|
# 2.5.22 (October 16, 2024)
|
2
26
|
|
3
27
|
## Enhancements:
|
@@ -4,8 +4,8 @@ module Bundler
|
|
4
4
|
# Represents metadata from when the Bundler gem was built.
|
5
5
|
module BuildMetadata
|
6
6
|
# begin ivars
|
7
|
-
@built_at = "2024-
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2024-11-05".freeze
|
8
|
+
@git_commit_sha = "35f4611265e".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
data/lib/bundler/cli/add.rb
CHANGED
data/lib/bundler/cli/check.rb
CHANGED
@@ -15,7 +15,7 @@ module Bundler
|
|
15
15
|
definition.validate_runtime!
|
16
16
|
|
17
17
|
begin
|
18
|
-
definition.
|
18
|
+
definition.check!
|
19
19
|
not_installed = definition.missing_specs
|
20
20
|
rescue GemNotFound, GitError, SolveFailure
|
21
21
|
Bundler.ui.error "Bundler can't satisfy your Gemfile's dependencies."
|
@@ -32,7 +32,7 @@ module Bundler
|
|
32
32
|
Bundler.ui.error "This bundle has been frozen, but there is no #{SharedHelpers.relative_lockfile_path} present"
|
33
33
|
exit 1
|
34
34
|
else
|
35
|
-
|
35
|
+
definition.lock(true) unless options[:"dry-run"]
|
36
36
|
Bundler.ui.info "The Gemfile's dependencies are satisfied"
|
37
37
|
end
|
38
38
|
end
|
data/lib/bundler/cli.rb
CHANGED
@@ -351,6 +351,7 @@ module Bundler
|
|
351
351
|
method_option "branch", type: :string
|
352
352
|
method_option "ref", type: :string
|
353
353
|
method_option "glob", type: :string, banner: "The location of a dependency's .gemspec, expanded within Ruby (single quotes recommended)"
|
354
|
+
method_option "quiet", type: :boolean, banner: "Only output warnings and errors."
|
354
355
|
method_option "skip-install", type: :boolean, banner: "Adds gem to the Gemfile but does not install it"
|
355
356
|
method_option "optimistic", type: :boolean, banner: "Adds optimistic declaration of version to gem"
|
356
357
|
method_option "strict", type: :boolean, banner: "Adds strict declaration of version to gem"
|
data/lib/bundler/definition.rb
CHANGED
@@ -19,7 +19,8 @@ module Bundler
|
|
19
19
|
:ruby_version,
|
20
20
|
:lockfile,
|
21
21
|
:gemfiles,
|
22
|
-
:locked_checksums
|
22
|
+
:locked_checksums,
|
23
|
+
:sources
|
23
24
|
)
|
24
25
|
|
25
26
|
# Given a gemfile and lockfile creates a Bundler definition
|
@@ -162,7 +163,14 @@ module Bundler
|
|
162
163
|
@gem_version_promoter ||= GemVersionPromoter.new
|
163
164
|
end
|
164
165
|
|
165
|
-
def
|
166
|
+
def check!
|
167
|
+
# If dependencies have changed, we need to resolve remotely. Otherwise,
|
168
|
+
# since we'll be resolving with a single local source, we may end up
|
169
|
+
# locking gems under the wrong source in the lockfile, and missing lockfile
|
170
|
+
# checksums
|
171
|
+
resolve_remotely! if @dependency_changes
|
172
|
+
|
173
|
+
# Now do a local only resolve, to verify if any gems are missing locally
|
166
174
|
sources.local_only!
|
167
175
|
resolve
|
168
176
|
end
|
@@ -504,8 +512,6 @@ module Bundler
|
|
504
512
|
|
505
513
|
private
|
506
514
|
|
507
|
-
attr_reader :sources
|
508
|
-
|
509
515
|
def should_add_extra_platforms?
|
510
516
|
!lockfile_exists? && generic_local_platform_is_ruby? && !Bundler.settings[:force_ruby_platform]
|
511
517
|
end
|
@@ -892,8 +898,6 @@ module Bundler
|
|
892
898
|
converged = []
|
893
899
|
deps = []
|
894
900
|
|
895
|
-
@specs_that_changed_sources = []
|
896
|
-
|
897
901
|
specs.each do |s|
|
898
902
|
name = s.name
|
899
903
|
dep = @dependencies.find {|d| s.satisfies?(d) }
|
@@ -902,7 +906,6 @@ module Bundler
|
|
902
906
|
if dep
|
903
907
|
gemfile_source = dep.source || default_source
|
904
908
|
|
905
|
-
@specs_that_changed_sources << s if gemfile_source != lockfile_source
|
906
909
|
deps << dep if !dep.source || lockfile_source.include?(dep.source)
|
907
910
|
@gems_to_unlock << name if lockfile_source.include?(dep.source) && lockfile_source != gemfile_source
|
908
911
|
|
@@ -984,7 +987,6 @@ module Bundler
|
|
984
987
|
source_requirements["bundler"] = sources.metadata_source # needs to come last to override
|
985
988
|
end
|
986
989
|
|
987
|
-
verify_changed_sources!
|
988
990
|
source_requirements
|
989
991
|
end
|
990
992
|
|
@@ -992,14 +994,6 @@ module Bundler
|
|
992
994
|
sources.default_source
|
993
995
|
end
|
994
996
|
|
995
|
-
def verify_changed_sources!
|
996
|
-
@specs_that_changed_sources.each do |s|
|
997
|
-
if s.source.specs.search(s.name).empty?
|
998
|
-
raise GemNotFound, "Could not find gem '#{s.name}' in #{s.source}"
|
999
|
-
end
|
1000
|
-
end
|
1001
|
-
end
|
1002
|
-
|
1003
997
|
def requested_groups
|
1004
998
|
values = groups - Bundler.settings[:without] - @optional_groups + Bundler.settings[:with]
|
1005
999
|
values &= Bundler.settings[:only] unless Bundler.settings[:only].empty?
|
data/lib/bundler/dsl.rb
CHANGED
@@ -110,9 +110,23 @@ module Bundler
|
|
110
110
|
if gemspec_dep
|
111
111
|
gemfile_dep = [dep, current].find(&:runtime?)
|
112
112
|
|
113
|
-
|
113
|
+
if gemfile_dep && !current_requirement_open
|
114
114
|
Bundler.ui.warn "A gemspec development dependency (#{gemspec_dep.name}, #{gemspec_dep.requirement}) is being overridden by a Gemfile dependency (#{gemfile_dep.name}, #{gemfile_dep.requirement}).\n" \
|
115
115
|
"This behaviour may change in the future. Please remove either of them, or make sure they both have the same requirement\n"
|
116
|
+
elsif gemfile_dep.nil?
|
117
|
+
require_relative "vendor/pub_grub/lib/pub_grub/version_range"
|
118
|
+
require_relative "vendor/pub_grub/lib/pub_grub/version_constraint"
|
119
|
+
require_relative "vendor/pub_grub/lib/pub_grub/version_union"
|
120
|
+
require_relative "vendor/pub_grub/lib/pub_grub/rubygems"
|
121
|
+
|
122
|
+
current_gemspec_range = PubGrub::RubyGems.requirement_to_range(current.requirement)
|
123
|
+
next_gemspec_range = PubGrub::RubyGems.requirement_to_range(dep.requirement)
|
124
|
+
|
125
|
+
if current_gemspec_range.intersects?(next_gemspec_range)
|
126
|
+
dep = Dependency.new(name, current.requirement.as_list + dep.requirement.as_list, options)
|
127
|
+
else
|
128
|
+
raise GemfileError, "Two gemspecs have conflicting requirements on the same gem: #{dep} and #{current}"
|
129
|
+
end
|
116
130
|
end
|
117
131
|
else
|
118
132
|
update_prompt = ""
|
@@ -133,20 +147,22 @@ module Bundler
|
|
133
147
|
end
|
134
148
|
end
|
135
149
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
+
unless current.gemspec_dev_dep? && dep.gemspec_dev_dep?
|
151
|
+
# Always prefer the dependency from the Gemfile
|
152
|
+
if current.gemspec_dev_dep?
|
153
|
+
@dependencies.delete(current)
|
154
|
+
elsif dep.gemspec_dev_dep?
|
155
|
+
return
|
156
|
+
elsif current.source != dep.source
|
157
|
+
raise GemfileError, "You cannot specify the same gem twice coming from different sources.\n" \
|
158
|
+
"You specified that #{dep.name} (#{dep.requirement}) should come from " \
|
159
|
+
"#{current.source || "an unspecified source"} and #{dep.source}\n"
|
160
|
+
else
|
161
|
+
Bundler.ui.warn "Your Gemfile lists the gem #{current.name} (#{current.requirement}) more than once.\n" \
|
162
|
+
"You should probably keep only one of them.\n" \
|
163
|
+
"Remove any duplicate entries and specify the gem only once.\n" \
|
164
|
+
"While it's not a problem now, it could cause errors if you change the version of one of them later."
|
165
|
+
end
|
150
166
|
end
|
151
167
|
end
|
152
168
|
|
data/lib/bundler/inline.rb
CHANGED
@@ -1,16 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Allows for declaring a Gemfile inline in a ruby script,
|
4
|
-
#
|
3
|
+
# Allows for declaring a Gemfile inline in a ruby script, installing any gems
|
4
|
+
# that aren't already installed on the user's system.
|
5
5
|
#
|
6
6
|
# @note Every gem that is specified in this 'Gemfile' will be `require`d, as if
|
7
7
|
# the user had manually called `Bundler.require`. To avoid a requested gem
|
8
8
|
# being automatically required, add the `:require => false` option to the
|
9
9
|
# `gem` dependency declaration.
|
10
10
|
#
|
11
|
-
# @param
|
12
|
-
#
|
13
|
-
#
|
11
|
+
# @param force_latest_compatible [Boolean] Force installing the *latest*
|
12
|
+
# compatible versions of the gems,
|
13
|
+
# even if compatible versions are
|
14
|
+
# already installed locally.
|
15
|
+
# This also logs output if the
|
16
|
+
# `:quiet` option is not set.
|
17
|
+
# Defaults to `false`.
|
14
18
|
#
|
15
19
|
# @param gemfile [Proc] a block that is evaluated as a `Gemfile`.
|
16
20
|
#
|
@@ -29,13 +33,13 @@
|
|
29
33
|
#
|
30
34
|
# puts Pod::VERSION # => "0.34.4"
|
31
35
|
#
|
32
|
-
def gemfile(
|
36
|
+
def gemfile(force_latest_compatible = false, options = {}, &gemfile)
|
33
37
|
require_relative "../bundler"
|
34
38
|
Bundler.reset!
|
35
39
|
|
36
40
|
opts = options.dup
|
37
41
|
ui = opts.delete(:ui) { Bundler::UI::Shell.new }
|
38
|
-
ui.level = "silent" if opts.delete(:quiet) || !
|
42
|
+
ui.level = "silent" if opts.delete(:quiet) || !force_latest_compatible
|
39
43
|
Bundler.ui = ui
|
40
44
|
raise ArgumentError, "Unknown options: #{opts.keys.join(", ")}" unless opts.empty?
|
41
45
|
|
@@ -55,7 +59,7 @@ def gemfile(install = false, options = {}, &gemfile)
|
|
55
59
|
definition = builder.to_definition(nil, true)
|
56
60
|
definition.validate_runtime!
|
57
61
|
|
58
|
-
if
|
62
|
+
if force_latest_compatible || definition.missing_specs?
|
59
63
|
Bundler.settings.temporary(inline: true, no_install: false) do
|
60
64
|
installer = Bundler::Installer.install(Bundler.root, definition, system: true)
|
61
65
|
installer.post_install_messages.each do |name, message|
|
@@ -27,11 +27,18 @@ module Bundler
|
|
27
27
|
@dependencies = []
|
28
28
|
@required_ruby_version = Gem::Requirement.default
|
29
29
|
@required_rubygems_version = Gem::Requirement.default
|
30
|
-
@platform
|
31
|
-
|
30
|
+
@platform = platform || Gem::Platform::RUBY
|
31
|
+
|
32
|
+
@original_source = source
|
33
|
+
@source = source
|
34
|
+
|
32
35
|
@force_ruby_platform = default_force_ruby_platform
|
33
36
|
end
|
34
37
|
|
38
|
+
def source_changed?
|
39
|
+
@original_source != source
|
40
|
+
end
|
41
|
+
|
35
42
|
def full_name
|
36
43
|
@full_name ||= if platform == Gem::Platform::RUBY
|
37
44
|
"#{@name}-#{@version}"
|
@@ -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\-ADD" "1" "
|
3
|
+
.TH "BUNDLE\-ADD" "1" "October 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
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\.
|
10
10
|
.SH "OPTIONS"
|
@@ -36,6 +36,9 @@ Specify the git branch for the added gem\.
|
|
36
36
|
\fB\-\-ref\fR
|
37
37
|
Specify the git ref for the added gem\.
|
38
38
|
.TP
|
39
|
+
\fB\-\-quiet\fR
|
40
|
+
Do not print progress information to the standard output\.
|
41
|
+
.TP
|
39
42
|
\fB\-\-skip\-install\fR
|
40
43
|
Adds the gem to the Gemfile but does not install it\.
|
41
44
|
.TP
|
@@ -5,7 +5,7 @@ bundle-add(1) -- Add gem to the Gemfile and run bundle install
|
|
5
5
|
|
6
6
|
`bundle add` <GEM_NAME> [--group=GROUP] [--version=VERSION] [--source=SOURCE]
|
7
7
|
[--path=PATH] [--git=GIT|--github=GITHUB] [--branch=BRANCH] [--ref=REF]
|
8
|
-
[--skip-install] [--strict|--optimistic]
|
8
|
+
[--quiet] [--skip-install] [--strict|--optimistic]
|
9
9
|
|
10
10
|
## DESCRIPTION
|
11
11
|
|
@@ -41,6 +41,9 @@ Adds the named gem to the [`Gemfile(5)`][Gemfile(5)] and run `bundle install`.
|
|
41
41
|
* `--ref`:
|
42
42
|
Specify the git ref for the added gem.
|
43
43
|
|
44
|
+
* `--quiet`:
|
45
|
+
Do not print progress information to the standard output.
|
46
|
+
|
44
47
|
* `--skip-install`:
|
45
48
|
Adds the gem to the Gemfile but does not install it.
|
46
49
|
|
@@ -1,6 +1,6 @@
|
|
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" "
|
3
|
+
.TH "BUNDLE\-BINSTUBS" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
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" "
|
3
|
+
.TH "BUNDLE\-CACHE" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-CHECK" "1" "
|
3
|
+
.TH "BUNDLE\-CHECK" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-CLEAN" "1" "
|
3
|
+
.TH "BUNDLE\-CLEAN" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-CONFIG" "1" "
|
3
|
+
.TH "BUNDLE\-CONFIG" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-config\fR \- Set bundler configuration options
|
6
6
|
.SH "SYNOPSIS"
|
@@ -199,10 +199,6 @@ The following is a list of all configuration keys and their purpose\. You can le
|
|
199
199
|
.IP "\(bu" 4
|
200
200
|
\fBwithout\fR (\fBBUNDLE_WITHOUT\fR): A \fB:\fR\-separated list of groups whose gems bundler should not install\.
|
201
201
|
.IP "" 0
|
202
|
-
.P
|
203
|
-
In general, you should set these settings per\-application by using the applicable flag to the bundle install(1) \fIbundle\-install\.1\.html\fR or bundle cache(1) \fIbundle\-cache\.1\.html\fR command\.
|
204
|
-
.P
|
205
|
-
You can set them globally either via environment variables or \fBbundle config\fR, whichever is preferable for your setup\. If you use both, environment variables will take preference over global settings\.
|
206
202
|
.SH "LOCAL GIT REPOS"
|
207
203
|
Bundler also allows you to work against a git repository locally instead of using the remote version\. This can be achieved by setting up a local override:
|
208
204
|
.IP "" 4
|
@@ -282,13 +282,6 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
|
|
282
282
|
* `without` (`BUNDLE_WITHOUT`):
|
283
283
|
A `:`-separated list of groups whose gems bundler should not install.
|
284
284
|
|
285
|
-
In general, you should set these settings per-application by using the applicable
|
286
|
-
flag to the [bundle install(1)](bundle-install.1.html) or [bundle cache(1)](bundle-cache.1.html) command.
|
287
|
-
|
288
|
-
You can set them globally either via environment variables or `bundle config`,
|
289
|
-
whichever is preferable for your setup. If you use both, environment variables
|
290
|
-
will take preference over global settings.
|
291
|
-
|
292
285
|
## LOCAL GIT REPOS
|
293
286
|
|
294
287
|
Bundler also allows you to work against a git repository locally
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-CONSOLE" "1" "
|
3
|
+
.TH "BUNDLE\-CONSOLE" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-console\fR \- Deprecated way to open an IRB session with the bundle pre\-loaded
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-DOCTOR" "1" "
|
3
|
+
.TH "BUNDLE\-DOCTOR" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-doctor\fR \- Checks the bundle for common problems
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-EXEC" "1" "
|
3
|
+
.TH "BUNDLE\-EXEC" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-exec\fR \- Execute a command in the context of the bundle
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-GEM" "1" "
|
3
|
+
.TH "BUNDLE\-GEM" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-INFO" "1" "
|
3
|
+
.TH "BUNDLE\-INFO" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-info\fR \- Show information for the given gem in your bundle
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-INIT" "1" "
|
3
|
+
.TH "BUNDLE\-INIT" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-init\fR \- Generates a Gemfile into the current working directory
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-INJECT" "1" "
|
3
|
+
.TH "BUNDLE\-INJECT" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-INSTALL" "1" "
|
3
|
+
.TH "BUNDLE\-INSTALL" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
|
6
6
|
.SH "SYNOPSIS"
|
@@ -66,7 +66,7 @@ The location to install the specified gems to\. This defaults to Rubygems' setti
|
|
66
66
|
This option is deprecated in favor of the \fBpath\fR setting\.
|
67
67
|
.TP
|
68
68
|
\fB\-\-quiet\fR
|
69
|
-
Do not print progress information to the standard output\.
|
69
|
+
Do not print progress information to the standard output\.
|
70
70
|
.TP
|
71
71
|
\fB\-\-retry=[<number>]\fR
|
72
72
|
Retry failed network or git requests for \fInumber\fR times\.
|
@@ -136,8 +136,7 @@ automatically and that requires `bundler` to silently remember them. Since
|
|
136
136
|
This option is deprecated in favor of the `path` setting.
|
137
137
|
|
138
138
|
* `--quiet`:
|
139
|
-
Do not print progress information to the standard output.
|
140
|
-
will exit using a status code (`$?`).
|
139
|
+
Do not print progress information to the standard output.
|
141
140
|
|
142
141
|
* `--retry=[<number>]`:
|
143
142
|
Retry failed network or git requests for <number> times.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-LOCK" "1" "
|
3
|
+
.TH "BUNDLE\-LOCK" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-OPEN" "1" "
|
3
|
+
.TH "BUNDLE\-OPEN" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-OUTDATED" "1" "
|
3
|
+
.TH "BUNDLE\-OUTDATED" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-outdated\fR \- List installed gems with newer versions available
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-PLATFORM" "1" "
|
3
|
+
.TH "BUNDLE\-PLATFORM" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-platform\fR \- Displays platform compatibility information
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-PRISTINE" "1" "
|
3
|
+
.TH "BUNDLE\-PRISTINE" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-SHOW" "1" "
|
3
|
+
.TH "BUNDLE\-SHOW" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-UPDATE" "1" "
|
3
|
+
.TH "BUNDLE\-UPDATE" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-update\fR \- Update your gems to the latest available versions
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-VERSION" "1" "
|
3
|
+
.TH "BUNDLE\-VERSION" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-version\fR \- Prints Bundler version information
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-VIZ" "1" "
|
3
|
+
.TH "BUNDLE\-VIZ" "1" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
|
6
6
|
.SH "SYNOPSIS"
|
data/lib/bundler/man/bundle.1
CHANGED
data/lib/bundler/man/gemfile.5
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "GEMFILE" "5" "
|
3
|
+
.TH "GEMFILE" "5" "October 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
|
6
6
|
.SH "SYNOPSIS"
|
data/lib/bundler/plugin.rb
CHANGED
@@ -342,7 +342,26 @@ module Bundler
|
|
342
342
|
# done to avoid conflicts
|
343
343
|
path = index.plugin_path(name)
|
344
344
|
|
345
|
-
|
345
|
+
paths = index.load_paths(name)
|
346
|
+
invalid_paths = paths.reject {|p| File.directory?(p) }
|
347
|
+
|
348
|
+
if invalid_paths.any?
|
349
|
+
Bundler.ui.warn <<~MESSAGE
|
350
|
+
The following plugin paths don't exist: #{invalid_paths.join(", ")}.
|
351
|
+
|
352
|
+
This can happen if the plugin was installed with a different version of Ruby that has since been uninstalled.
|
353
|
+
|
354
|
+
If you would like to reinstall the plugin, run:
|
355
|
+
|
356
|
+
bundler plugin uninstall #{name} && bundler plugin install #{name}
|
357
|
+
|
358
|
+
Continuing without installing plugin #{name}.
|
359
|
+
MESSAGE
|
360
|
+
|
361
|
+
return
|
362
|
+
end
|
363
|
+
|
364
|
+
Gem.add_to_load_path(*paths)
|
346
365
|
|
347
366
|
load path.join(PLUGIN_FILE_NAME)
|
348
367
|
|
data/lib/bundler/process_lock.rb
CHANGED
@@ -2,23 +2,19 @@
|
|
2
2
|
|
3
3
|
module Bundler
|
4
4
|
class ProcessLock
|
5
|
-
def self.lock(bundle_path = Bundler.bundle_path)
|
5
|
+
def self.lock(bundle_path = Bundler.bundle_path, &block)
|
6
6
|
lock_file_path = File.join(bundle_path, "bundler.lock")
|
7
|
-
|
7
|
+
base_lock_file_path = lock_file_path.delete_suffix(".lock")
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
require "fileutils" if Bundler.rubygems.provides?("< 3.5.23")
|
10
|
+
|
11
|
+
begin
|
12
|
+
SharedHelpers.filesystem_access(lock_file_path, :write) do
|
13
|
+
Gem.open_file_with_lock(base_lock_file_path, &block)
|
14
|
+
end
|
15
|
+
rescue PermissionError
|
16
|
+
block.call
|
14
17
|
end
|
15
|
-
rescue Errno::EACCES, Errno::ENOLCK, Errno::ENOTSUP, Errno::EPERM, Errno::EROFS
|
16
|
-
# In the case the user does not have access to
|
17
|
-
# create the lock file or is using NFS where
|
18
|
-
# locks are not available we skip locking.
|
19
|
-
yield
|
20
|
-
ensure
|
21
|
-
FileUtils.rm_f(lock_file_path) if has_lock
|
22
18
|
end
|
23
19
|
end
|
24
20
|
end
|
@@ -107,6 +107,10 @@ module Bundler
|
|
107
107
|
def build_base_requirements
|
108
108
|
base_requirements = {}
|
109
109
|
@base.each do |ls|
|
110
|
+
if ls.source_changed? && ls.source.specs.search(ls.name).empty?
|
111
|
+
raise GemNotFound, "Could not find gem '#{ls.name}' in #{ls.source}"
|
112
|
+
end
|
113
|
+
|
110
114
|
req = Gem::Requirement.new(ls.version)
|
111
115
|
base_requirements[ls.name] = req
|
112
116
|
end
|
data/lib/bundler/rubygems_ext.rb
CHANGED
@@ -452,4 +452,18 @@ module Gem
|
|
452
452
|
end
|
453
453
|
end
|
454
454
|
end
|
455
|
+
|
456
|
+
unless Gem.rubygems_version >= Gem::Version.new("3.5.23")
|
457
|
+
class Package; end
|
458
|
+
require "rubygems/package/tar_reader"
|
459
|
+
require "rubygems/package/tar_reader/entry"
|
460
|
+
|
461
|
+
module FixFullNameEncoding
|
462
|
+
def full_name
|
463
|
+
super.force_encoding(Encoding::UTF_8)
|
464
|
+
end
|
465
|
+
end
|
466
|
+
|
467
|
+
Package::TarReader::Entry.prepend(FixFullNameEncoding)
|
468
|
+
end
|
455
469
|
end
|
@@ -220,9 +220,7 @@ module Bundler
|
|
220
220
|
end
|
221
221
|
end
|
222
222
|
|
223
|
-
# Used to
|
224
|
-
# under bundler. The new Gem.bin_path only considers gems in
|
225
|
-
# +specs+
|
223
|
+
# Used to give better error messages when activating specs outside of the current bundle
|
226
224
|
def replace_bin_path(specs_by_name)
|
227
225
|
gem_class = (class << Gem; self; end)
|
228
226
|
|
@@ -261,31 +259,6 @@ module Bundler
|
|
261
259
|
|
262
260
|
spec
|
263
261
|
end
|
264
|
-
|
265
|
-
redefine_method(gem_class, :activate_bin_path) do |name, *args|
|
266
|
-
exec_name = args.first
|
267
|
-
return ENV["BUNDLE_BIN_PATH"] if exec_name == "bundle"
|
268
|
-
|
269
|
-
# Copy of Rubygems activate_bin_path impl
|
270
|
-
requirement = args.last
|
271
|
-
spec = find_spec_for_exe name, exec_name, [requirement]
|
272
|
-
|
273
|
-
gem_bin = File.join(spec.full_gem_path, spec.bindir, exec_name)
|
274
|
-
gem_from_path_bin = File.join(File.dirname(spec.loaded_from), spec.bindir, exec_name)
|
275
|
-
File.exist?(gem_bin) ? gem_bin : gem_from_path_bin
|
276
|
-
end
|
277
|
-
|
278
|
-
redefine_method(gem_class, :bin_path) do |name, *args|
|
279
|
-
exec_name = args.first
|
280
|
-
return ENV["BUNDLE_BIN_PATH"] if exec_name == "bundle"
|
281
|
-
|
282
|
-
spec = find_spec_for_exe(name, *args)
|
283
|
-
exec_name ||= spec.default_executable
|
284
|
-
|
285
|
-
gem_bin = File.join(spec.full_gem_path, spec.bindir, exec_name)
|
286
|
-
gem_from_path_bin = File.join(File.dirname(spec.loaded_from), spec.bindir, exec_name)
|
287
|
-
File.exist?(gem_bin) ? gem_bin : gem_from_path_bin
|
288
|
-
end
|
289
262
|
end
|
290
263
|
|
291
264
|
# Replace or hook into RubyGems to provide a bundlerized view
|
@@ -302,7 +275,7 @@ module Bundler
|
|
302
275
|
Gem::BUNDLED_GEMS.replace_require(specs) if Gem::BUNDLED_GEMS.respond_to?(:replace_require)
|
303
276
|
end
|
304
277
|
replace_gem(specs, specs_by_name)
|
305
|
-
stub_rubygems(
|
278
|
+
stub_rubygems(specs_by_name.values)
|
306
279
|
replace_bin_path(specs_by_name)
|
307
280
|
|
308
281
|
Gem.clear_paths
|
data/lib/bundler/settings.rb
CHANGED
@@ -425,8 +425,12 @@ module Bundler
|
|
425
425
|
Validator.validate!(raw_key, converted_value(value, raw_key), hash)
|
426
426
|
|
427
427
|
return unless file
|
428
|
+
|
429
|
+
SharedHelpers.filesystem_access(file.dirname, :create) do |p|
|
430
|
+
FileUtils.mkdir_p(p)
|
431
|
+
end
|
432
|
+
|
428
433
|
SharedHelpers.filesystem_access(file) do |p|
|
429
|
-
FileUtils.mkdir_p(p.dirname)
|
430
434
|
p.open("w") {|f| f.write(serializer_class.dump(hash)) }
|
431
435
|
end
|
432
436
|
end
|
@@ -96,14 +96,16 @@ module Bundler
|
|
96
96
|
# given block
|
97
97
|
#
|
98
98
|
# @example
|
99
|
-
# filesystem_access("vendor/cache", :
|
99
|
+
# filesystem_access("vendor/cache", :create) do
|
100
100
|
# FileUtils.mkdir_p("vendor/cache")
|
101
101
|
# end
|
102
102
|
#
|
103
103
|
# @see {Bundler::PermissionError}
|
104
104
|
def filesystem_access(path, action = :write, &block)
|
105
105
|
yield(path.dup)
|
106
|
-
rescue Errno::EACCES
|
106
|
+
rescue Errno::EACCES => e
|
107
|
+
raise unless e.message.include?(path.to_s) || action == :create
|
108
|
+
|
107
109
|
raise PermissionError.new(path, action)
|
108
110
|
rescue Errno::EAGAIN
|
109
111
|
raise TemporaryResourceError.new(path, action)
|
@@ -116,7 +118,7 @@ module Bundler
|
|
116
118
|
rescue Errno::EEXIST, Errno::ENOENT
|
117
119
|
raise
|
118
120
|
rescue SystemCallError => e
|
119
|
-
raise GenericSystemCallError.new(e, "There was an error accessing `#{path}`.")
|
121
|
+
raise GenericSystemCallError.new(e, "There was an error #{[:create, :write].include?(action) ? "creating" : "accessing"} `#{path}`.")
|
120
122
|
end
|
121
123
|
|
122
124
|
def major_deprecation(major_version, message, removed_message: nil, print_caller_location: false)
|
@@ -274,15 +276,7 @@ module Bundler
|
|
274
276
|
until !File.directory?(current) || current == previous
|
275
277
|
if ENV["BUNDLER_SPEC_RUN"]
|
276
278
|
# avoid stepping above the tmp directory when testing
|
277
|
-
|
278
|
-
# for Ruby Core
|
279
|
-
"lib/bundler/bundler.gemspec"
|
280
|
-
else
|
281
|
-
"bundler.gemspec"
|
282
|
-
end
|
283
|
-
|
284
|
-
# avoid stepping above the tmp directory when testing
|
285
|
-
return nil if File.file?(File.join(current, gemspec))
|
279
|
+
return nil if File.directory?(File.join(current, "tmp"))
|
286
280
|
end
|
287
281
|
|
288
282
|
names.each do |name|
|
@@ -314,18 +308,36 @@ module Bundler
|
|
314
308
|
|
315
309
|
def bundle_bin_path
|
316
310
|
# bundler exe & lib folders have same root folder, typical gem installation
|
317
|
-
exe_file = File.
|
311
|
+
exe_file = File.join(source_root, "exe/bundle")
|
318
312
|
|
319
313
|
# for Ruby core repository testing
|
320
|
-
exe_file = File.
|
314
|
+
exe_file = File.join(source_root, "libexec/bundle") unless File.exist?(exe_file)
|
321
315
|
|
322
316
|
# bundler is a default gem, exe path is separate
|
323
|
-
exe_file =
|
317
|
+
exe_file = Gem.bin_path("bundler", "bundle", VERSION) unless File.exist?(exe_file)
|
324
318
|
|
325
319
|
exe_file
|
326
320
|
end
|
327
321
|
public :bundle_bin_path
|
328
322
|
|
323
|
+
def gemspec_path
|
324
|
+
# inside a gem repository, typical gem installation
|
325
|
+
gemspec_file = File.join(source_root, "../../specifications/bundler-#{VERSION}.gemspec")
|
326
|
+
|
327
|
+
# for Ruby core repository testing
|
328
|
+
gemspec_file = File.expand_path("bundler.gemspec", __dir__) unless File.exist?(gemspec_file)
|
329
|
+
|
330
|
+
# bundler is a default gem
|
331
|
+
gemspec_file = File.join(Gem.default_specifications_dir, "bundler-#{VERSION}.gemspec") unless File.exist?(gemspec_file)
|
332
|
+
|
333
|
+
gemspec_file
|
334
|
+
end
|
335
|
+
public :gemspec_path
|
336
|
+
|
337
|
+
def source_root
|
338
|
+
File.expand_path("../..", __dir__)
|
339
|
+
end
|
340
|
+
|
329
341
|
def set_path
|
330
342
|
validate_bundle_path
|
331
343
|
paths = (ENV["PATH"] || "").split(File::PATH_SEPARATOR)
|
@@ -24,9 +24,8 @@ module Bundler
|
|
24
24
|
s.bindir = "exe"
|
25
25
|
s.homepage = "https://bundler.io"
|
26
26
|
s.summary = "The best way to manage your application's dependencies"
|
27
|
-
s.executables = %w[bundle]
|
28
|
-
|
29
|
-
s.loaded_from = __dir__
|
27
|
+
s.executables = %w[bundle bundler]
|
28
|
+
s.loaded_from = SharedHelpers.gemspec_path
|
30
29
|
end
|
31
30
|
end
|
32
31
|
|
@@ -17,21 +17,21 @@ jobs:
|
|
17
17
|
- '<%= RUBY_VERSION %>'
|
18
18
|
|
19
19
|
steps:
|
20
|
-
|
20
|
+
- uses: actions/checkout@v4
|
21
21
|
<%- if config[:ext] == 'rust' -%>
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
22
|
+
- name: Set up Ruby & Rust
|
23
|
+
uses: oxidize-rb/actions/setup-ruby-and-rust@v1
|
24
|
+
with:
|
25
|
+
ruby-version: ${{ matrix.ruby }}
|
26
|
+
bundler-cache: true
|
27
|
+
cargo-cache: true
|
28
|
+
rubygems: '<%= ::Gem.rubygems_version %>'
|
29
29
|
<%- else -%>
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
- name: Set up Ruby
|
31
|
+
uses: ruby/setup-ruby@v1
|
32
|
+
with:
|
33
|
+
ruby-version: ${{ matrix.ruby }}
|
34
|
+
bundler-cache: true
|
35
35
|
<%- end -%>
|
36
|
-
|
37
|
-
|
36
|
+
- name: Run the default task
|
37
|
+
run: bundle exec rake
|
@@ -37,15 +37,15 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.bindir = "exe"
|
38
38
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
39
39
|
spec.require_paths = ["lib"]
|
40
|
-
<%- if config[:ext] == 'c' -%>
|
40
|
+
<%- if config[:ext] == 'c' || config[:ext] == 'rust' -%>
|
41
41
|
spec.extensions = ["ext/<%= config[:underscored_name] %>/extconf.rb"]
|
42
42
|
<%- end -%>
|
43
|
-
<%- if config[:ext] == 'rust' -%>
|
44
|
-
spec.extensions = ["ext/<%= config[:underscored_name] %>/Cargo.toml"]
|
45
|
-
<%- end -%>
|
46
43
|
|
47
44
|
# Uncomment to register a new dependency of your gem
|
48
45
|
# spec.add_dependency "example-gem", "~> 1.0"
|
46
|
+
<%- if config[:ext] == 'rust' -%>
|
47
|
+
spec.add_dependency "rb_sys", "~> 0.9.91"
|
48
|
+
<%- end -%>
|
49
49
|
|
50
50
|
# For more information and examples about making a new gem, check out our
|
51
51
|
# guide at: https://bundler.io/guides/creating_gem.html
|
data/lib/bundler/version.rb
CHANGED
data/lib/bundler.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.5.
|
4
|
+
version: 2.5.23
|
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: 2024-
|
25
|
+
date: 2024-11-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
|
@@ -405,7 +405,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
405
405
|
- !ruby/object:Gem::Version
|
406
406
|
version: 3.2.3
|
407
407
|
requirements: []
|
408
|
-
rubygems_version: 3.5.
|
408
|
+
rubygems_version: 3.5.23
|
409
409
|
signing_key:
|
410
410
|
specification_version: 4
|
411
411
|
summary: The best way to manage your application's dependencies
|