rubygems-update 3.5.21 → 3.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 +69 -0
- data/bundler/CHANGELOG.md +34 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/add.rb +2 -0
- data/bundler/lib/bundler/cli/check.rb +2 -2
- data/bundler/lib/bundler/cli.rb +1 -0
- data/bundler/lib/bundler/definition.rb +10 -16
- data/bundler/lib/bundler/dsl.rb +38 -22
- data/bundler/lib/bundler/inline.rb +12 -8
- data/bundler/lib/bundler/installer.rb +1 -1
- data/bundler/lib/bundler/lazy_specification.rb +9 -2
- data/bundler/lib/bundler/lockfile_generator.rb +1 -1
- data/bundler/lib/bundler/man/bundle-add.1 +5 -2
- data/bundler/lib/bundler/man/bundle-add.1.ronn +4 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
- data/bundler/lib/bundler/man/bundle-check.1 +1 -1
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +1 -5
- data/bundler/lib/bundler/man/bundle-config.1.ronn +0 -7
- data/bundler/lib/bundler/man/bundle-console.1 +1 -1
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
- data/bundler/lib/bundler/man/bundle-help.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +1 -1
- data/bundler/lib/bundler/man/bundle-init.1 +1 -1
- data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
- data/bundler/lib/bundler/man/bundle-install.1 +2 -2
- data/bundler/lib/bundler/man/bundle-install.1.ronn +1 -2
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
- data/bundler/lib/bundler/man/bundle-open.1 +1 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
- data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +1 -1
- data/bundler/lib/bundler/man/bundle-update.1 +1 -1
- data/bundler/lib/bundler/man/bundle-version.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
- data/bundler/lib/bundler/man/bundle.1 +1 -1
- data/bundler/lib/bundler/man/gemfile.5 +1 -1
- data/bundler/lib/bundler/plugin/api/source.rb +1 -1
- data/bundler/lib/bundler/plugin.rb +20 -1
- data/bundler/lib/bundler/process_lock.rb +10 -14
- data/bundler/lib/bundler/resolver/base.rb +4 -0
- data/bundler/lib/bundler/rubygems_ext.rb +35 -3
- data/bundler/lib/bundler/rubygems_gem_installer.rb +3 -1
- data/bundler/lib/bundler/rubygems_integration.rb +2 -51
- data/bundler/lib/bundler/settings.rb +5 -1
- data/bundler/lib/bundler/shared_helpers.rb +27 -15
- data/bundler/lib/bundler/source/git.rb +2 -2
- data/bundler/lib/bundler/source/metadata.rb +2 -3
- data/bundler/lib/bundler/source/path.rb +1 -1
- data/bundler/lib/bundler/source/rubygems.rb +1 -4
- data/bundler/lib/bundler/stub_specification.rb +11 -0
- data/bundler/lib/bundler/templates/newgem/Gemfile.tt +0 -3
- data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +15 -15
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -4
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +46 -8
- data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +2 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler.rb +1 -1
- data/lib/rubygems/basic_specification.rb +11 -6
- data/lib/rubygems/command_manager.rb +7 -2
- data/lib/rubygems/commands/contents_command.rb +15 -8
- data/lib/rubygems/commands/pristine_command.rb +16 -6
- data/lib/rubygems/commands/setup_command.rb +6 -0
- data/lib/rubygems/dependency.rb +1 -1
- data/lib/rubygems/gem_runner.rb +9 -0
- data/lib/rubygems/gemcutter_utilities.rb +8 -2
- data/lib/rubygems/installer.rb +6 -7
- data/lib/rubygems/package/tar_header.rb +11 -0
- data/lib/rubygems/package/tar_reader/entry.rb +1 -5
- data/lib/rubygems/spec_fetcher.rb +35 -7
- data/lib/rubygems/specification.rb +2 -2
- data/lib/rubygems/specification_record.rb +1 -1
- data/lib/rubygems/stub_specification.rb +11 -10
- data/lib/rubygems/vendor/net-http/lib/net/http.rb +1 -1
- data/lib/rubygems/vendor/uri/lib/uri/common.rb +2 -0
- data/lib/rubygems/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/rubygems.rb +4 -4
- data/rubygems-update.gemspec +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: 298dd7e433f12db32821aa839bedc93ef8b6fcce23dd3fd478657224173c98db
|
4
|
+
data.tar.gz: 4121f91098e2a14d645492fbc139ddbb1ddc8a8999445b577be746acc49e83c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e26b5111da52570e42a44f51ba3ef6a8abb679ff42f87cadd6019b90b9572136111a08cbb027877ed02f1592a84080cfaf3ff30700e7816e1d3403e44545b1e0
|
7
|
+
data.tar.gz: 152c98c1710f87df1034f727c8fea857c6a8e3d16c7d27c20763818d39879615f9004484b842874ded31aaa29771c1bc7635fe0dc07ecc4d554aa550f8e9bdee
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,72 @@
|
|
1
|
+
# 3.5.23 / 2024-11-05
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
* Validate user input encoding of `gem` CLI arguments. Pull request
|
6
|
+
[#6471](https://github.com/rubygems/rubygems/pull/6471) by
|
7
|
+
deivid-rodriguez
|
8
|
+
* Fix `gem update --system` leaving old default bundler executables
|
9
|
+
around. Pull request
|
10
|
+
[#8172](https://github.com/rubygems/rubygems/pull/8172) by
|
11
|
+
deivid-rodriguez
|
12
|
+
* Installs bundler 2.5.23 as a default gem.
|
13
|
+
|
14
|
+
## Bug fixes:
|
15
|
+
|
16
|
+
* Fix commands with 2 MFA requests when webauthn is enabled. Pull request
|
17
|
+
[#8174](https://github.com/rubygems/rubygems/pull/8174) by
|
18
|
+
deivid-rodriguez
|
19
|
+
* Make `--enable-load-relative` binstubs prolog work when Ruby is not
|
20
|
+
installed in the same directory as the binstub. Pull request
|
21
|
+
[#7872](https://github.com/rubygems/rubygems/pull/7872) by
|
22
|
+
deivid-rodriguez
|
23
|
+
|
24
|
+
## Performance:
|
25
|
+
|
26
|
+
* Speed up `gem install <nonexistent-gem>` by finding alternative name
|
27
|
+
suggestions faster. Pull request
|
28
|
+
[#8084](https://github.com/rubygems/rubygems/pull/8084) by duckinator
|
29
|
+
|
30
|
+
## Documentation:
|
31
|
+
|
32
|
+
* Add missing comma in documentation. Pull request
|
33
|
+
[#8152](https://github.com/rubygems/rubygems/pull/8152) by leoarnold
|
34
|
+
|
35
|
+
# 3.5.22 / 2024-10-16
|
36
|
+
|
37
|
+
## Enhancements:
|
38
|
+
|
39
|
+
* Prevent `._*` files in packages generated from macOS. Pull request
|
40
|
+
[#8150](https://github.com/rubygems/rubygems/pull/8150) by
|
41
|
+
deivid-rodriguez
|
42
|
+
* Fix `gem pristine etc` resetting gem twice sometimes. Pull request
|
43
|
+
[#8117](https://github.com/rubygems/rubygems/pull/8117) by
|
44
|
+
deivid-rodriguez
|
45
|
+
* Allow `gem pristine` to reset default gems too. Pull request
|
46
|
+
[#8118](https://github.com/rubygems/rubygems/pull/8118) by
|
47
|
+
deivid-rodriguez
|
48
|
+
* Update vendored `uri` and `net-http`. Pull request
|
49
|
+
[#8112](https://github.com/rubygems/rubygems/pull/8112) by segiddins
|
50
|
+
* Installs bundler 2.5.22 as a default gem.
|
51
|
+
|
52
|
+
## Bug fixes:
|
53
|
+
|
54
|
+
* Fix `gem contents` for default gems. Pull request
|
55
|
+
[#8132](https://github.com/rubygems/rubygems/pull/8132) by
|
56
|
+
deivid-rodriguez
|
57
|
+
* Fix duplicated specs when they have been previously activated. Pull
|
58
|
+
request [#8131](https://github.com/rubygems/rubygems/pull/8131) by
|
59
|
+
deivid-rodriguez
|
60
|
+
* Fix `gem install` on NFS shares. Pull request
|
61
|
+
[#8123](https://github.com/rubygems/rubygems/pull/8123) by
|
62
|
+
deivid-rodriguez
|
63
|
+
* Fix a `gem install` crash during "done installing" hooks. Pull request
|
64
|
+
[#8113](https://github.com/rubygems/rubygems/pull/8113) by
|
65
|
+
deivid-rodriguez
|
66
|
+
* Fix plugin command loading. Pull request
|
67
|
+
[#8121](https://github.com/rubygems/rubygems/pull/8121) by
|
68
|
+
deivid-rodriguez
|
69
|
+
|
1
70
|
# 3.5.21 / 2024-10-03
|
2
71
|
|
3
72
|
## Enhancements:
|
data/bundler/CHANGELOG.md
CHANGED
@@ -1,3 +1,37 @@
|
|
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
|
+
|
25
|
+
# 2.5.22 (October 16, 2024)
|
26
|
+
|
27
|
+
## Enhancements:
|
28
|
+
|
29
|
+
- Update vendored `uri` and `net-http` [#8112](https://github.com/rubygems/rubygems/pull/8112)
|
30
|
+
|
31
|
+
## Bug fixes:
|
32
|
+
|
33
|
+
- Fix bundler sometimes crashing because of trying to use a version of psych compiled for a different Ruby [#8104](https://github.com/rubygems/rubygems/pull/8104)
|
34
|
+
|
1
35
|
# 2.5.21 (October 3, 2024)
|
2
36
|
|
3
37
|
## Bug fixes:
|
@@ -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
|
|
@@ -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/bundler/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"
|
@@ -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/bundler/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
|
|
@@ -589,21 +605,21 @@ module Bundler
|
|
589
605
|
|
590
606
|
trace_line = backtrace.find {|l| l.include?(dsl_path) } || trace_line
|
591
607
|
return m unless trace_line
|
592
|
-
|
593
|
-
return m unless
|
608
|
+
line_number = trace_line.split(":")[1].to_i - 1
|
609
|
+
return m unless line_number
|
594
610
|
|
595
611
|
lines = contents.lines.to_a
|
596
612
|
indent = " # "
|
597
613
|
indicator = indent.tr("#", ">")
|
598
|
-
first_line =
|
599
|
-
last_line = (
|
614
|
+
first_line = line_number.zero?
|
615
|
+
last_line = (line_number == (lines.count - 1))
|
600
616
|
|
601
617
|
m << "\n"
|
602
618
|
m << "#{indent}from #{trace_line.gsub(/:in.*$/, "")}\n"
|
603
619
|
m << "#{indent}-------------------------------------------\n"
|
604
|
-
m << "#{indent}#{lines[
|
605
|
-
m << "#{indicator}#{lines[
|
606
|
-
m << "#{indent}#{lines[
|
620
|
+
m << "#{indent}#{lines[line_number - 1]}" unless first_line
|
621
|
+
m << "#{indicator}#{lines[line_number]}"
|
622
|
+
m << "#{indent}#{lines[line_number + 1]}" unless last_line
|
607
623
|
m << "\n" unless m.end_with?("\n")
|
608
624
|
m << "#{indent}-------------------------------------------\n"
|
609
625
|
end
|
@@ -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|
|
@@ -221,7 +221,7 @@ module Bundler
|
|
221
221
|
|
222
222
|
requested_path_gems = @definition.requested_specs.select {|s| s.source.is_a?(Source::Path) }
|
223
223
|
path_plugin_files = requested_path_gems.map do |spec|
|
224
|
-
|
224
|
+
spec.matches_for_glob("rubygems_plugin#{Bundler.rubygems.suffix_pattern}")
|
225
225
|
rescue TypeError
|
226
226
|
error_message = "#{spec.name} #{spec.version} has an invalid gemspec"
|
227
227
|
raise Gem::InvalidSpecificationException, error_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\.
|