rubygems-update 3.2.6 → 3.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +43 -0
- data/Manifest.txt +3 -0
- data/Rakefile +10 -14
- data/bundler/CHANGELOG.md +65 -0
- data/bundler/lib/bundler.rb +1 -1
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli.rb +1 -0
- data/bundler/lib/bundler/cli/cache.rb +1 -0
- data/bundler/lib/bundler/cli/gem.rb +12 -0
- data/bundler/lib/bundler/definition.rb +16 -25
- data/bundler/lib/bundler/feature_flag.rb +0 -1
- data/bundler/lib/bundler/fetcher.rb +0 -1
- data/bundler/lib/bundler/gem_helper.rb +8 -6
- data/bundler/lib/bundler/index.rb +6 -5
- data/bundler/lib/bundler/installer.rb +0 -17
- data/bundler/lib/bundler/installer/standalone.rb +15 -0
- data/bundler/lib/bundler/lazy_specification.rb +9 -18
- data/bundler/lib/bundler/man/bundle-add.1 +1 -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 +8 -8
- data/bundler/lib/bundler/man/bundle-config.1.ronn +11 -10
- 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-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 +1 -1
- 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-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-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/resolver.rb +79 -45
- data/bundler/lib/bundler/resolver/spec_group.rb +54 -42
- data/bundler/lib/bundler/settings.rb +1 -1
- data/bundler/lib/bundler/shared_helpers.rb +2 -2
- data/bundler/lib/bundler/source/git.rb +1 -1
- data/bundler/lib/bundler/source/rubygems.rb +0 -1
- data/bundler/lib/bundler/source_list.rb +2 -4
- data/bundler/lib/bundler/spec_set.rb +4 -3
- data/bundler/lib/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +7 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +11 -5
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +2 -2
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +11 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +5 -6
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +4 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +5 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +9 -8
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +5 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +5 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems.rb +2 -2
- data/lib/rubygems/command.rb +1 -0
- data/lib/rubygems/config_file.rb +9 -0
- data/lib/rubygems/core_ext/tcpsocket_init.rb +49 -0
- data/lib/rubygems/dependency.rb +5 -1
- data/lib/rubygems/installer_uninstaller_utils.rb +6 -1
- data/lib/rubygems/remote_fetcher.rb +1 -0
- data/lib/rubygems/resolver/index_specification.rb +4 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb +7 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +0 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb +11 -5
- data/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +2 -2
- data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb +11 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb +11 -7
- data/lib/rubygems/specification.rb +13 -11
- data/lib/rubygems/test_case.rb +5 -6
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/data/null-required-ruby-version.gemspec.rz +0 -0
- data/test/rubygems/test_gem.rb +78 -0
- data/test/rubygems/test_gem_commands_outdated_command.rb +18 -0
- data/test/rubygems/test_gem_config_file.rb +10 -0
- data/test/rubygems/test_gem_dependency_installer.rb +27 -18
- data/test/rubygems/test_gem_installer.rb +2 -0
- data/test/rubygems/test_gem_remote_fetcher.rb +6 -0
- data/test/rubygems/test_gem_requirement.rb +1 -1
- data/test/rubygems/test_gem_specification.rb +10 -15
- data/test/rubygems/test_gem_stream_ui.rb +1 -1
- data/test/rubygems/test_gem_util.rb +4 -4
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 027ee31fe24ec2094fdc8bcfecae4261c36ce412a813b2d0c68376679de49d26
|
4
|
+
data.tar.gz: deb4ea6deab65dc34df00c5836443743ed0ae367fc191dc2050ecc598fc76fc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f876e2acbd22963c1a5cd0e799bd34c801c6751293030c715d1eb4d0faddc010fe6c9b353e9d0ce1540f601773b4e295d3b16ee3d597dcbe36867509f977e5d
|
7
|
+
data.tar.gz: 21e3b99cc9733a4ce41e0aac1c5f97dac2053b87f58388dfabf8658c5bdd506484c4576e96137fa968f89aea368a81ff4f4ca9e5a141b6de72e4cadbc7129efb
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,46 @@
|
|
1
|
+
# 3.2.11 / 2021-02-17
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
* Optionally fallback to IPv4 when IPv6 is unreachable. Pull request #2662
|
6
|
+
by sonalkr132
|
7
|
+
|
8
|
+
# 3.2.10 / 2021-02-15
|
9
|
+
|
10
|
+
## Documentation:
|
11
|
+
|
12
|
+
* Add a `gem push` example to `gem help`. Pull request #4373 by
|
13
|
+
deivid-rodriguez
|
14
|
+
* Improve documentation for `required_ruby_version`. Pull request #4343 by
|
15
|
+
AlexWayfer
|
16
|
+
|
17
|
+
# 3.2.9 / 2021-02-08
|
18
|
+
|
19
|
+
## Bug fixes:
|
20
|
+
|
21
|
+
* Fix error message when underscore selection can't find bundler. Pull
|
22
|
+
request #4363 by deivid-rodriguez
|
23
|
+
* Fix `Gem::Specification.stubs_for` returning wrong named specs. Pull
|
24
|
+
request #4356 by tompng
|
25
|
+
* Don't error out when activating a binstub unless necessary. Pull request
|
26
|
+
#4351 by deivid-rodriguez
|
27
|
+
* Fix `gem outdated` incorrectly handling platform specific gems. Pull
|
28
|
+
request #4248 by deivid-rodriguez
|
29
|
+
|
30
|
+
# 3.2.8 / 2021-02-02
|
31
|
+
|
32
|
+
## Bug fixes:
|
33
|
+
|
34
|
+
* Fix `gem install` crashing on gemspec with nil required_ruby_version.
|
35
|
+
Pull request #4334 by pbernays
|
36
|
+
|
37
|
+
# 3.2.7 / 2021-01-26
|
38
|
+
|
39
|
+
## Bug fixes:
|
40
|
+
|
41
|
+
* Generate plugin wrappers with relative requires. Pull request #4317 by
|
42
|
+
deivid-rodriguez
|
43
|
+
|
1
44
|
# 3.2.6 / 2021-01-18
|
2
45
|
|
3
46
|
## Enhancements:
|
data/Manifest.txt
CHANGED
@@ -189,6 +189,7 @@ bundler/lib/bundler/templates/Executable.bundler
|
|
189
189
|
bundler/lib/bundler/templates/Executable.standalone
|
190
190
|
bundler/lib/bundler/templates/Gemfile
|
191
191
|
bundler/lib/bundler/templates/gems.rb
|
192
|
+
bundler/lib/bundler/templates/newgem/CHANGELOG.md.tt
|
192
193
|
bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt
|
193
194
|
bundler/lib/bundler/templates/newgem/Gemfile.tt
|
194
195
|
bundler/lib/bundler/templates/newgem/LICENSE.txt.tt
|
@@ -353,6 +354,7 @@ lib/rubygems/config_file.rb
|
|
353
354
|
lib/rubygems/core_ext/kernel_gem.rb
|
354
355
|
lib/rubygems/core_ext/kernel_require.rb
|
355
356
|
lib/rubygems/core_ext/kernel_warn.rb
|
357
|
+
lib/rubygems/core_ext/tcpsocket_init.rb
|
356
358
|
lib/rubygems/defaults.rb
|
357
359
|
lib/rubygems/dependency.rb
|
358
360
|
lib/rubygems/dependency_installer.rb
|
@@ -511,6 +513,7 @@ test/rubygems/child_key.pem
|
|
511
513
|
test/rubygems/client.pem
|
512
514
|
test/rubygems/data/gem-private_key.pem
|
513
515
|
test/rubygems/data/gem-public_cert.pem
|
516
|
+
test/rubygems/data/null-required-ruby-version.gemspec.rz
|
514
517
|
test/rubygems/data/null-required-rubygems-version.gemspec.rz
|
515
518
|
test/rubygems/data/null-type.gemspec.rz
|
516
519
|
test/rubygems/encrypted_private_key.pem
|
data/Rakefile
CHANGED
@@ -52,20 +52,16 @@ RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc|
|
|
52
52
|
doc.rdoc_dir = 'doc'
|
53
53
|
end
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
rescue LoadError
|
66
|
-
namespace :vendor do
|
67
|
-
task(:molinillo) { abort "Install the automatiek gem to be able to vendor gems." }
|
68
|
-
end
|
55
|
+
load "util/automatiek.rake"
|
56
|
+
|
57
|
+
# We currently ship Molinillo master branch as of
|
58
|
+
# https://github.com/CocoaPods/Molinillo/commit/7cc27a355e861bdf593e2cde7bf1bca3daae4303
|
59
|
+
Automatiek::RakeTask.new("molinillo") do |lib|
|
60
|
+
lib.version = "master"
|
61
|
+
lib.download = { :github => "https://github.com/CocoaPods/Molinillo" }
|
62
|
+
lib.namespace = "Molinillo"
|
63
|
+
lib.prefix = "Gem::Resolver"
|
64
|
+
lib.vendor_lib = "lib/rubygems/resolver/molinillo"
|
69
65
|
end
|
70
66
|
|
71
67
|
namespace :rubocop do
|
data/bundler/CHANGELOG.md
CHANGED
@@ -1,3 +1,68 @@
|
|
1
|
+
# 2.2.11 (February 17, 2021)
|
2
|
+
|
3
|
+
## Bug fixes:
|
4
|
+
|
5
|
+
- Revert disable_multisource changes [#4385](https://github.com/rubygems/rubygems/pull/4385)
|
6
|
+
|
7
|
+
# 2.2.10 (February 15, 2021)
|
8
|
+
|
9
|
+
## Security fixes:
|
10
|
+
|
11
|
+
- Fix source priority for transitive dependencies and split lockfile rubygems source sections [#3655](https://github.com/rubygems/rubygems/pull/3655)
|
12
|
+
|
13
|
+
## Bug fixes:
|
14
|
+
|
15
|
+
- Fix adding platforms to lockfile sometimes conflicting on ruby requirements [#4371](https://github.com/rubygems/rubygems/pull/4371)
|
16
|
+
- Fix bundler sometimes choosing ruby variants over java ones [#4367](https://github.com/rubygems/rubygems/pull/4367)
|
17
|
+
|
18
|
+
## Documentation:
|
19
|
+
|
20
|
+
- Update man pages to reflect to new default for bundle install jobs [#4188](https://github.com/rubygems/rubygems/pull/4188)
|
21
|
+
|
22
|
+
# 2.2.9 (February 8, 2021)
|
23
|
+
|
24
|
+
## Enhancements:
|
25
|
+
|
26
|
+
- Stop removing existing platforms when force_ruby_platform is true [#4336](https://github.com/rubygems/rubygems/pull/4336)
|
27
|
+
|
28
|
+
## Bug fixes:
|
29
|
+
|
30
|
+
- Don't install platform specific gems on truffleruby [#4333](https://github.com/rubygems/rubygems/pull/4333)
|
31
|
+
|
32
|
+
# 2.2.8 (February 2, 2021)
|
33
|
+
|
34
|
+
## Enhancements:
|
35
|
+
|
36
|
+
- Add a CHANGELOG.md file to gems generated by `bundle gem` [#4093](https://github.com/rubygems/rubygems/pull/4093)
|
37
|
+
- Support gemified `set` [#4297](https://github.com/rubygems/rubygems/pull/4297)
|
38
|
+
|
39
|
+
## Bug fixes:
|
40
|
+
|
41
|
+
- Fix standalone Kernel.require visibility [#4337](https://github.com/rubygems/rubygems/pull/4337)
|
42
|
+
|
43
|
+
## Performance:
|
44
|
+
|
45
|
+
- Fix resolver edge cases and speed up bundler [#4277](https://github.com/rubygems/rubygems/pull/4277)
|
46
|
+
|
47
|
+
# 2.2.7 (January 26, 2021)
|
48
|
+
|
49
|
+
## Enhancements:
|
50
|
+
|
51
|
+
- Improve error messages when dependency on bundler conflicts with running version [#4308](https://github.com/rubygems/rubygems/pull/4308)
|
52
|
+
- Avoid showing platforms with requirements in error messages [#4310](https://github.com/rubygems/rubygems/pull/4310)
|
53
|
+
- Introduce disable_local_revision_check config [#4237](https://github.com/rubygems/rubygems/pull/4237)
|
54
|
+
- Reverse rubygems require mixin with bundler standalone [#4299](https://github.com/rubygems/rubygems/pull/4299)
|
55
|
+
|
56
|
+
## Bug fixes:
|
57
|
+
|
58
|
+
- Fix releasing from a not yet pushed branch [#4309](https://github.com/rubygems/rubygems/pull/4309)
|
59
|
+
- Install cache only once if it already exists [#4304](https://github.com/rubygems/rubygems/pull/4304)
|
60
|
+
- Fix `force_ruby_platform` no longer being respected [#4302](https://github.com/rubygems/rubygems/pull/4302)
|
61
|
+
|
62
|
+
## Performance:
|
63
|
+
|
64
|
+
- Fix resolver dependency comparison [#4289](https://github.com/rubygems/rubygems/pull/4289)
|
65
|
+
|
1
66
|
# 2.2.6 (January 18, 2021)
|
2
67
|
|
3
68
|
## Enhancements:
|
data/bundler/lib/bundler.rb
CHANGED
@@ -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 = "2021-
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2021-02-17".freeze
|
8
|
+
@git_commit_sha = "6ca677a0eb".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
data/bundler/lib/bundler/cli.rb
CHANGED
@@ -586,6 +586,7 @@ module Bundler
|
|
586
586
|
method_option :git, :type => :boolean, :default => true, :desc => "Initialize a git repo inside your library."
|
587
587
|
method_option :mit, :type => :boolean, :desc => "Generate an MIT license file. Set a default with `bundle config set --global gem.mit true`."
|
588
588
|
method_option :rubocop, :type => :boolean, :desc => "Add rubocop to the generated Rakefile and gemspec. Set a default with `bundle config set --global gem.rubocop true`."
|
589
|
+
method_option :changelog, :type => :boolean, :desc => "Generate changelog file. Set a default with `bundle config set --global gem.changelog true`."
|
589
590
|
method_option :test, :type => :string, :lazy_default => Bundler.settings["gem.test"] || "", :aliases => "-t", :banner => "Use the specified test framework for your library",
|
590
591
|
:desc => "Generate a test directory for your library, either rspec, minitest or test-unit. Set a default with `bundle config set --global gem.test (rspec|minitest|test-unit)`."
|
591
592
|
method_option :ci, :type => :string, :lazy_default => Bundler.settings["gem.ci"] || "",
|
@@ -142,6 +142,18 @@ module Bundler
|
|
142
142
|
templates.merge!("CODE_OF_CONDUCT.md.tt" => "CODE_OF_CONDUCT.md")
|
143
143
|
end
|
144
144
|
|
145
|
+
if ask_and_set(:changelog, "Do you want to include a changelog?",
|
146
|
+
"A changelog is a file which contains a curated, chronologically ordered list of notable " \
|
147
|
+
"changes for each version of a project. To make it easier for users and contributors to" \
|
148
|
+
" see precisely what notable changes have been made between each release (or version) of" \
|
149
|
+
" the project. Whether consumers or developers, the end users of software are" \
|
150
|
+
" human beings who care about what's in the software. When the software changes, people " \
|
151
|
+
"want to know why and how. see https://keepachangelog.com")
|
152
|
+
config[:changelog] = true
|
153
|
+
Bundler.ui.info "Changelog enabled in config"
|
154
|
+
templates.merge!("CHANGELOG.md.tt" => "CHANGELOG.md")
|
155
|
+
end
|
156
|
+
|
145
157
|
if ask_and_set(:rubocop, "Do you want to add rubocop as a dependency for gems you generate?",
|
146
158
|
"RuboCop is a static code analyzer that has out-of-the-box rules for many " \
|
147
159
|
"of the guidelines in the community style guide. " \
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "lockfile_parser"
|
4
|
-
require "set"
|
5
4
|
|
6
5
|
module Bundler
|
7
6
|
class Definition
|
@@ -83,11 +82,7 @@ module Bundler
|
|
83
82
|
@lockfile_contents = Bundler.read_file(lockfile)
|
84
83
|
@locked_gems = LockfileParser.new(@lockfile_contents)
|
85
84
|
@locked_platforms = @locked_gems.platforms
|
86
|
-
|
87
|
-
@platforms = [Gem::Platform::RUBY]
|
88
|
-
else
|
89
|
-
@platforms = @locked_platforms.dup
|
90
|
-
end
|
85
|
+
@platforms = @locked_platforms.dup
|
91
86
|
@locked_bundler_version = @locked_gems.bundler_version
|
92
87
|
@locked_ruby_version = @locked_gems.ruby_version
|
93
88
|
|
@@ -259,23 +254,18 @@ module Bundler
|
|
259
254
|
def resolve
|
260
255
|
@resolve ||= begin
|
261
256
|
last_resolve = converge_locked_specs
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
end
|
275
|
-
|
276
|
-
# filter out gems that _can_ be installed on multiple platforms, but don't need
|
277
|
-
# to be
|
278
|
-
resolve.for(expand_dependencies(dependencies, true), [], false, false, false)
|
257
|
+
if Bundler.frozen_bundle?
|
258
|
+
Bundler.ui.debug "Frozen, using resolution from the lockfile"
|
259
|
+
last_resolve
|
260
|
+
elsif !unlocking? && nothing_changed?
|
261
|
+
Bundler.ui.debug("Found no changes, using resolution from the lockfile")
|
262
|
+
last_resolve
|
263
|
+
else
|
264
|
+
# Run a resolve against the locally available gems
|
265
|
+
Bundler.ui.debug("Found changes from the lockfile, re-resolving dependencies because #{change_reason}")
|
266
|
+
expanded_dependencies = expand_dependencies(dependencies + metadata_dependencies, @remote)
|
267
|
+
Resolver.resolve(expanded_dependencies, index, source_requirements, last_resolve, gem_version_promoter, additional_base_requirements_for_resolve, platforms)
|
268
|
+
end
|
279
269
|
end
|
280
270
|
end
|
281
271
|
|
@@ -604,7 +594,7 @@ module Bundler
|
|
604
594
|
deps_for_source = @dependencies.select {|s| s.source == source }
|
605
595
|
locked_deps_for_source = @locked_deps.values.select {|dep| dep.source == locked_source }
|
606
596
|
|
607
|
-
|
597
|
+
deps_for_source.sort != locked_deps_for_source.sort
|
608
598
|
end
|
609
599
|
|
610
600
|
def specs_for_source_changed?(source)
|
@@ -884,7 +874,7 @@ module Bundler
|
|
884
874
|
dependencies.each do |dep|
|
885
875
|
dep = Dependency.new(dep, ">= 0") unless dep.respond_to?(:name)
|
886
876
|
next unless remote || dep.current_platform?
|
887
|
-
target_platforms = dep.gem_platforms(remote ?
|
877
|
+
target_platforms = dep.gem_platforms(remote ? @platforms : [generic_local_platform])
|
888
878
|
deps += expand_dependency_with_platforms(dep, target_platforms)
|
889
879
|
end
|
890
880
|
deps
|
@@ -913,6 +903,7 @@ module Bundler
|
|
913
903
|
metadata_dependencies.each do |dep|
|
914
904
|
source_requirements[dep.name] = sources.metadata_source
|
915
905
|
end
|
906
|
+
source_requirements[:default_bundler] = source_requirements["bundler"] || source_requirements[:default]
|
916
907
|
source_requirements["bundler"] = sources.metadata_source # needs to come last to override
|
917
908
|
source_requirements
|
918
909
|
end
|
@@ -27,7 +27,6 @@ module Bundler
|
|
27
27
|
|
28
28
|
(1..10).each {|v| define_method("bundler_#{v}_mode?") { major_version >= v } }
|
29
29
|
|
30
|
-
settings_flag(:allow_bundler_dependency_conflicts) { bundler_3_mode? }
|
31
30
|
settings_flag(:allow_offline_install) { bundler_3_mode? }
|
32
31
|
settings_flag(:auto_clean_without_path) { bundler_3_mode? }
|
33
32
|
settings_flag(:cache_all) { bundler_3_mode? }
|
@@ -116,19 +116,21 @@ module Bundler
|
|
116
116
|
|
117
117
|
def git_push(remote = nil)
|
118
118
|
remote ||= default_remote
|
119
|
-
perform_git_push remote
|
119
|
+
perform_git_push "#{remote} refs/heads/#{current_branch}"
|
120
120
|
perform_git_push "#{remote} refs/tags/#{version_tag}"
|
121
121
|
Bundler.ui.confirm "Pushed git commits and release tag."
|
122
122
|
end
|
123
123
|
|
124
124
|
def default_remote
|
125
|
-
|
126
|
-
|
125
|
+
remote_for_branch, status = sh_with_status(%W[git config --get branch.#{current_branch}.remote])
|
126
|
+
return "origin" unless status.success?
|
127
127
|
|
128
|
-
remote_for_branch
|
129
|
-
|
128
|
+
remote_for_branch.strip
|
129
|
+
end
|
130
130
|
|
131
|
-
|
131
|
+
def current_branch
|
132
|
+
# We can replace this with `git branch --show-current` once we drop support for git < 2.22.0
|
133
|
+
sh(%w[git rev-parse --abbrev-ref HEAD]).gsub(%r{\Aheads/}, "").strip
|
132
134
|
end
|
133
135
|
|
134
136
|
def allowed_push_host
|
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "set"
|
4
|
-
|
5
3
|
module Bundler
|
6
4
|
class Index
|
7
5
|
include Enumerable
|
@@ -65,11 +63,14 @@ module Bundler
|
|
65
63
|
def unsorted_search(query, base)
|
66
64
|
results = local_search(query, base)
|
67
65
|
|
68
|
-
seen = results.map(&:full_name).
|
66
|
+
seen = results.map(&:full_name).uniq unless @sources.empty?
|
69
67
|
|
70
68
|
@sources.each do |source|
|
71
69
|
source.unsorted_search(query, base).each do |spec|
|
72
|
-
|
70
|
+
next if seen.include?(spec.full_name)
|
71
|
+
|
72
|
+
seen << spec.full_name
|
73
|
+
results << spec
|
73
74
|
end
|
74
75
|
end
|
75
76
|
|
@@ -170,7 +171,7 @@ module Bundler
|
|
170
171
|
def dependencies_eql?(spec, other_spec)
|
171
172
|
deps = spec.dependencies.select {|d| d.type != :development }
|
172
173
|
other_deps = other_spec.dependencies.select {|d| d.type != :development }
|
173
|
-
|
174
|
+
deps.sort == other_deps.sort
|
174
175
|
end
|
175
176
|
|
176
177
|
def add_source(index)
|
@@ -82,7 +82,6 @@ module Bundler
|
|
82
82
|
|
83
83
|
if resolve_if_needed(options)
|
84
84
|
ensure_specs_are_compatible!
|
85
|
-
warn_on_incompatible_bundler_deps
|
86
85
|
load_plugins
|
87
86
|
options.delete(:jobs)
|
88
87
|
else
|
@@ -265,22 +264,6 @@ module Bundler
|
|
265
264
|
end
|
266
265
|
end
|
267
266
|
|
268
|
-
def warn_on_incompatible_bundler_deps
|
269
|
-
bundler_version = Gem::Version.create(Bundler::VERSION)
|
270
|
-
@definition.specs.each do |spec|
|
271
|
-
spec.dependencies.each do |dep|
|
272
|
-
next if dep.type == :development
|
273
|
-
next unless dep.name == "bundler".freeze
|
274
|
-
next if dep.requirement.satisfied_by?(bundler_version)
|
275
|
-
|
276
|
-
Bundler.ui.warn "#{spec.name} (#{spec.version}) has dependency" \
|
277
|
-
" #{SharedHelpers.pretty_dependency(dep)}" \
|
278
|
-
", which is unsatisfied by the current bundler version #{VERSION}" \
|
279
|
-
", so the dependency is being ignored"
|
280
|
-
end
|
281
|
-
end
|
282
|
-
end
|
283
|
-
|
284
267
|
def install_in_parallel(size, standalone, force = false)
|
285
268
|
spec_installations = ParallelInstaller.call(self, @definition.specs, size, standalone, force)
|
286
269
|
spec_installations.each do |installation|
|
@@ -15,6 +15,7 @@ module Bundler
|
|
15
15
|
file.puts "ruby_engine = RUBY_ENGINE"
|
16
16
|
file.puts "ruby_version = RbConfig::CONFIG[\"ruby_version\"]"
|
17
17
|
file.puts "path = File.expand_path('..', __FILE__)"
|
18
|
+
file.puts reverse_rubygems_kernel_mixin
|
18
19
|
paths.each do |path|
|
19
20
|
file.puts %($:.unshift File.expand_path("\#{path}/#{path}"))
|
20
21
|
end
|
@@ -48,5 +49,19 @@ module Bundler
|
|
48
49
|
error_message = "#{spec.name} #{spec.version} has an invalid gemspec"
|
49
50
|
raise Gem::InvalidSpecificationException.new(error_message)
|
50
51
|
end
|
52
|
+
|
53
|
+
def reverse_rubygems_kernel_mixin
|
54
|
+
<<~END
|
55
|
+
kernel = (class << ::Kernel; self; end)
|
56
|
+
[kernel, ::Kernel].each do |k|
|
57
|
+
if k.private_method_defined?(:gem_original_require)
|
58
|
+
private_require = k.private_method_defined?(:require)
|
59
|
+
k.send(:remove_method, :require)
|
60
|
+
k.send(:define_method, :require, k.instance_method(:gem_original_require))
|
61
|
+
k.send(:private, :require) if private_require
|
62
|
+
end
|
63
|
+
end
|
64
|
+
END
|
65
|
+
end
|
51
66
|
end
|
52
67
|
end
|