bundler 2.2.11 → 2.3.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +721 -5
- data/README.md +1 -1
- data/bundler.gemspec +8 -11
- data/exe/bundle +7 -8
- data/exe/bundler +1 -1
- data/lib/bundler/.document +1 -0
- data/lib/bundler/build_metadata.rb +3 -3
- data/lib/bundler/cli/cache.rb +1 -1
- data/lib/bundler/cli/check.rb +4 -2
- data/lib/bundler/cli/common.rb +17 -3
- data/lib/bundler/cli/config.rb +10 -1
- data/lib/bundler/cli/doctor.rb +24 -5
- data/lib/bundler/cli/exec.rb +1 -6
- data/lib/bundler/cli/gem.rb +130 -26
- data/lib/bundler/cli/info.rb +27 -6
- data/lib/bundler/cli/init.rb +5 -1
- data/lib/bundler/cli/install.rb +23 -54
- data/lib/bundler/cli/issue.rb +4 -3
- data/lib/bundler/cli/list.rb +7 -1
- data/lib/bundler/cli/lock.rb +5 -1
- data/lib/bundler/cli/open.rb +1 -2
- data/lib/bundler/cli/outdated.rb +22 -14
- data/lib/bundler/cli/platform.rb +2 -2
- data/lib/bundler/cli/remove.rb +1 -2
- data/lib/bundler/cli/show.rb +1 -1
- data/lib/bundler/cli/update.rb +17 -8
- data/lib/bundler/cli.rb +51 -63
- data/lib/bundler/compact_index_client/cache.rb +0 -9
- data/lib/bundler/compact_index_client/updater.rb +26 -14
- data/lib/bundler/compact_index_client.rb +2 -8
- data/lib/bundler/current_ruby.rb +17 -6
- data/lib/bundler/definition.rb +260 -362
- data/lib/bundler/dependency.rb +23 -71
- data/lib/bundler/digest.rb +71 -0
- data/lib/bundler/dsl.rb +72 -76
- data/lib/bundler/endpoint_specification.rb +19 -13
- data/lib/bundler/env.rb +1 -1
- data/lib/bundler/environment_preserver.rb +4 -1
- data/lib/bundler/errors.rb +29 -3
- data/lib/bundler/feature_flag.rb +0 -5
- data/lib/bundler/fetcher/base.rb +6 -8
- data/lib/bundler/fetcher/compact_index.rb +10 -15
- data/lib/bundler/fetcher/downloader.rb +9 -6
- data/lib/bundler/fetcher/index.rb +0 -27
- data/lib/bundler/fetcher.rb +22 -23
- data/lib/bundler/friendly_errors.rb +26 -36
- data/lib/bundler/gem_helper.rb +21 -16
- data/lib/bundler/gem_helpers.rb +9 -2
- data/lib/bundler/gem_version_promoter.rb +14 -25
- data/lib/bundler/index.rb +11 -46
- data/lib/bundler/injector.rb +18 -4
- data/lib/bundler/inline.rb +4 -13
- data/lib/bundler/installer/gem_installer.rb +16 -21
- data/lib/bundler/installer/parallel_installer.rb +36 -15
- data/lib/bundler/installer/standalone.rb +42 -10
- data/lib/bundler/installer.rb +25 -41
- data/lib/bundler/lazy_specification.rb +52 -30
- data/lib/bundler/lockfile_generator.rb +2 -2
- data/lib/bundler/lockfile_parser.rb +18 -43
- data/lib/bundler/man/bundle-add.1 +21 -5
- data/lib/bundler/man/bundle-add.1.ronn +16 -4
- data/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/lib/bundler/man/bundle-cache.1 +7 -1
- data/lib/bundler/man/bundle-cache.1.ronn +7 -0
- data/lib/bundler/man/bundle-check.1 +1 -1
- data/lib/bundler/man/bundle-clean.1 +2 -2
- data/lib/bundler/man/bundle-clean.1.ronn +1 -1
- data/lib/bundler/man/bundle-config.1 +49 -22
- data/lib/bundler/man/bundle-config.1.ronn +49 -30
- data/lib/bundler/man/bundle-console.1 +53 -0
- data/lib/bundler/man/bundle-console.1.ronn +44 -0
- data/lib/bundler/man/bundle-doctor.1 +1 -1
- data/lib/bundler/man/bundle-exec.1 +2 -2
- data/lib/bundler/man/bundle-exec.1.ronn +1 -1
- data/lib/bundler/man/bundle-gem.1 +14 -1
- data/lib/bundler/man/bundle-gem.1.ronn +16 -0
- data/lib/bundler/man/bundle-help.1 +13 -0
- data/lib/bundler/man/bundle-help.1.ronn +12 -0
- 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 +5 -2
- data/lib/bundler/man/bundle-inject.1.ronn +3 -1
- data/lib/bundler/man/bundle-install.1 +6 -2
- data/lib/bundler/man/bundle-install.1.ronn +8 -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 +3 -10
- data/lib/bundler/man/bundle-outdated.1.ronn +1 -10
- data/lib/bundler/man/bundle-platform.1 +16 -6
- data/lib/bundler/man/bundle-platform.1.ronn +14 -7
- data/lib/bundler/man/bundle-plugin.1 +81 -0
- data/lib/bundler/man/bundle-plugin.1.ronn +59 -0
- 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 +5 -5
- data/lib/bundler/man/bundle-update.1.ronn +5 -4
- data/lib/bundler/man/bundle-version.1 +35 -0
- data/lib/bundler/man/bundle-version.1.ronn +24 -0
- data/lib/bundler/man/bundle-viz.1 +4 -1
- data/lib/bundler/man/bundle-viz.1.ronn +2 -0
- data/lib/bundler/man/bundle.1 +15 -10
- data/lib/bundler/man/bundle.1.ronn +12 -7
- data/lib/bundler/man/gemfile.5 +117 -80
- data/lib/bundler/man/gemfile.5.ronn +105 -84
- data/lib/bundler/man/index.txt +4 -0
- data/lib/bundler/match_metadata.rb +13 -0
- data/lib/bundler/match_platform.rb +0 -1
- data/lib/bundler/match_remote_metadata.rb +29 -0
- data/lib/bundler/plugin/api/source.rb +24 -8
- data/lib/bundler/plugin/index.rb +4 -1
- data/lib/bundler/plugin/installer/git.rb +0 -4
- data/lib/bundler/plugin/installer/rubygems.rb +0 -4
- data/lib/bundler/plugin/installer.rb +10 -10
- data/lib/bundler/plugin/source_list.rb +4 -0
- data/lib/bundler/plugin.rb +30 -8
- data/lib/bundler/process_lock.rb +1 -1
- data/lib/bundler/remote_specification.rb +10 -4
- data/lib/bundler/resolver/base.rb +50 -0
- data/lib/bundler/resolver/spec_group.rb +31 -73
- data/lib/bundler/resolver.rb +193 -292
- data/lib/bundler/retry.rb +1 -1
- data/lib/bundler/ruby_dsl.rb +1 -1
- data/lib/bundler/ruby_version.rb +5 -18
- data/lib/bundler/rubygems_ext.rb +160 -26
- data/lib/bundler/rubygems_gem_installer.rb +86 -9
- data/lib/bundler/rubygems_integration.rb +46 -93
- data/lib/bundler/runtime.rb +18 -12
- data/lib/bundler/self_manager.rb +168 -0
- data/lib/bundler/settings.rb +98 -22
- data/lib/bundler/setup.rb +2 -2
- data/lib/bundler/shared_helpers.rb +15 -31
- data/lib/bundler/source/git/git_proxy.rb +8 -6
- data/lib/bundler/source/git.rb +29 -13
- data/lib/bundler/source/metadata.rb +3 -7
- data/lib/bundler/source/path/installer.rb +1 -1
- data/lib/bundler/source/path.rb +3 -1
- data/lib/bundler/source/rubygems.rb +199 -182
- data/lib/bundler/source/rubygems_aggregate.rb +68 -0
- data/lib/bundler/source.rb +24 -4
- data/lib/bundler/source_list.rb +104 -60
- data/lib/bundler/source_map.rb +71 -0
- data/lib/bundler/spec_set.rb +58 -52
- data/lib/bundler/stub_specification.rb +13 -3
- data/lib/bundler/templates/Executable +2 -4
- data/lib/bundler/templates/Executable.bundler +8 -8
- data/lib/bundler/templates/Executable.standalone +2 -4
- data/lib/bundler/templates/Gemfile +0 -2
- data/lib/bundler/templates/gems.rb +0 -3
- data/lib/bundler/templates/newgem/Gemfile.tt +5 -2
- data/lib/bundler/templates/newgem/README.md.tt +8 -12
- data/lib/bundler/templates/newgem/Rakefile.tt +15 -2
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +16 -7
- data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +5 -4
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +19 -17
- data/lib/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
- data/lib/bundler/templates/newgem/standard.yml.tt +3 -0
- data/lib/bundler/templates/newgem/test/minitest/{newgem_test.rb.tt → test_newgem.rb.tt} +1 -1
- data/lib/bundler/ui/shell.rb +1 -1
- data/lib/bundler/vendor/.document +1 -0
- data/lib/bundler/vendor/connection_pool/LICENSE +20 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +19 -21
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +57 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +39 -74
- data/lib/bundler/vendor/fileutils/LICENSE.txt +22 -0
- data/lib/bundler/vendor/molinillo/LICENSE +9 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +3 -3
- data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +32 -26
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +1 -1
- data/lib/bundler/vendor/net-http-persistent/README.rdoc +82 -0
- data/lib/bundler/vendor/thor/LICENSE.md +20 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +5 -5
- data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +1 -2
- data/lib/bundler/vendor/thor/lib/thor/actions.rb +6 -2
- data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +6 -0
- data/lib/bundler/vendor/thor/lib/thor/error.rb +9 -4
- data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +19 -1
- data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +22 -4
- data/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/util.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +1 -1
- data/lib/bundler/vendor/tsort/LICENSE.txt +22 -0
- data/lib/bundler/vendor/tsort/lib/tsort.rb +452 -0
- data/lib/bundler/vendor/uri/LICENSE.txt +22 -0
- data/lib/bundler/vendor/uri/lib/uri/common.rb +17 -80
- data/lib/bundler/vendor/uri/lib/uri/ftp.rb +0 -1
- data/lib/bundler/vendor/uri/lib/uri/generic.rb +5 -6
- data/lib/bundler/vendor/uri/lib/uri/http.rb +0 -1
- data/lib/bundler/vendor/uri/lib/uri/https.rb +0 -1
- data/lib/bundler/vendor/uri/lib/uri/ldap.rb +1 -1
- data/lib/bundler/vendor/uri/lib/uri/mailto.rb +0 -1
- data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +1 -14
- data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +1 -12
- data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/bundler/vendor/uri/lib/uri/ws.rb +84 -0
- data/lib/bundler/vendor/uri/lib/uri/wss.rb +22 -0
- data/lib/bundler/vendor/uri/lib/uri.rb +0 -1
- data/lib/bundler/vendored_tsort.rb +4 -0
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler/worker.rb +19 -4
- data/lib/bundler.rb +46 -39
- metadata +39 -12
- data/lib/bundler/dep_proxy.rb +0 -55
- data/lib/bundler/gemdeps.rb +0 -29
- data/lib/bundler/psyched_yaml.rb +0 -22
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb +0 -66
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require_relative "match_platform"
|
|
4
|
-
|
|
5
3
|
module Bundler
|
|
6
4
|
class LazySpecification
|
|
7
5
|
include MatchPlatform
|
|
8
6
|
|
|
9
7
|
attr_reader :name, :version, :dependencies, :platform
|
|
10
|
-
attr_accessor :source, :remote
|
|
8
|
+
attr_accessor :source, :remote, :force_ruby_platform
|
|
11
9
|
|
|
12
10
|
def initialize(name, version, platform, source = nil)
|
|
13
11
|
@name = name
|
|
@@ -19,7 +17,7 @@ module Bundler
|
|
|
19
17
|
end
|
|
20
18
|
|
|
21
19
|
def full_name
|
|
22
|
-
if platform == Gem::Platform::RUBY
|
|
20
|
+
if platform == Gem::Platform::RUBY
|
|
23
21
|
"#{@name}-#{@version}"
|
|
24
22
|
else
|
|
25
23
|
"#{@name}-#{@version}-#{platform}"
|
|
@@ -38,14 +36,30 @@ module Bundler
|
|
|
38
36
|
identifier.hash
|
|
39
37
|
end
|
|
40
38
|
|
|
39
|
+
##
|
|
40
|
+
# Does this locked specification satisfy +dependency+?
|
|
41
|
+
#
|
|
42
|
+
# NOTE: Rubygems default requirement is ">= 0", which doesn't match
|
|
43
|
+
# prereleases of 0 versions, like "0.0.0.dev" or "0.0.0.SNAPSHOT". However,
|
|
44
|
+
# bundler users expect those to work. We need to make sure that Gemfile
|
|
45
|
+
# dependencies without explicit requirements (which use ">= 0" under the
|
|
46
|
+
# hood by default) are still valid for locked specs using this kind of
|
|
47
|
+
# versions. The method implements an ad-hoc fix for that. A better solution
|
|
48
|
+
# might be to change default rubygems requirement of dependencies to be ">=
|
|
49
|
+
# 0.A" but that's a major refactoring likely to break things. Hopefully we
|
|
50
|
+
# can attempt it in the future.
|
|
51
|
+
#
|
|
52
|
+
|
|
41
53
|
def satisfies?(dependency)
|
|
42
|
-
|
|
54
|
+
effective_requirement = dependency.requirement == Gem::Requirement.default ? Gem::Requirement.new(">= 0.A") : dependency.requirement
|
|
55
|
+
|
|
56
|
+
@name == dependency.name && effective_requirement.satisfied_by?(Gem::Version.new(@version))
|
|
43
57
|
end
|
|
44
58
|
|
|
45
59
|
def to_lock
|
|
46
60
|
out = String.new
|
|
47
61
|
|
|
48
|
-
if platform == Gem::Platform::RUBY
|
|
62
|
+
if platform == Gem::Platform::RUBY
|
|
49
63
|
out << " #{name} (#{version})\n"
|
|
50
64
|
else
|
|
51
65
|
out << " #{name} (#{version}-#{platform})\n"
|
|
@@ -59,22 +73,34 @@ module Bundler
|
|
|
59
73
|
out
|
|
60
74
|
end
|
|
61
75
|
|
|
62
|
-
def
|
|
63
|
-
|
|
64
|
-
|
|
76
|
+
def materialize_for_installation
|
|
77
|
+
source.local!
|
|
78
|
+
|
|
79
|
+
candidates = if source.is_a?(Source::Path) || !ruby_platform_materializes_to_ruby_platform?
|
|
80
|
+
target_platform = ruby_platform_materializes_to_ruby_platform? ? platform : local_platform
|
|
81
|
+
|
|
82
|
+
GemHelpers.select_best_platform_match(source.specs.search(Dependency.new(name, version)), target_platform)
|
|
65
83
|
else
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
84
|
+
source.specs.search(self)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
return self if candidates.empty?
|
|
88
|
+
|
|
89
|
+
__materialize__(candidates)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def __materialize__(candidates)
|
|
93
|
+
@specification = begin
|
|
94
|
+
search = candidates.reverse.find do |spec|
|
|
95
|
+
spec.is_a?(StubSpecification) ||
|
|
96
|
+
(spec.matches_current_ruby? &&
|
|
97
|
+
spec.matches_current_rubygems?)
|
|
70
98
|
end
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
99
|
+
if search.nil? && Bundler.frozen_bundle?
|
|
100
|
+
search = candidates.last
|
|
101
|
+
else
|
|
102
|
+
search.dependencies = dependencies if search && search.full_name == full_name && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))
|
|
75
103
|
end
|
|
76
|
-
search = same_platform_candidates.last || candidates.last
|
|
77
|
-
search.dependencies = dependencies if search && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))
|
|
78
104
|
search
|
|
79
105
|
end
|
|
80
106
|
end
|
|
@@ -84,7 +110,7 @@ module Bundler
|
|
|
84
110
|
end
|
|
85
111
|
|
|
86
112
|
def to_s
|
|
87
|
-
@__to_s ||= if platform == Gem::Platform::RUBY
|
|
113
|
+
@__to_s ||= if platform == Gem::Platform::RUBY
|
|
88
114
|
"#{name} (#{version})"
|
|
89
115
|
else
|
|
90
116
|
"#{name} (#{version}-#{platform})"
|
|
@@ -92,7 +118,7 @@ module Bundler
|
|
|
92
118
|
end
|
|
93
119
|
|
|
94
120
|
def identifier
|
|
95
|
-
@__identifier ||= [name, version,
|
|
121
|
+
@__identifier ||= [name, version, platform.to_s]
|
|
96
122
|
end
|
|
97
123
|
|
|
98
124
|
def git_version
|
|
@@ -100,13 +126,6 @@ module Bundler
|
|
|
100
126
|
" #{source.revision[0..6]}"
|
|
101
127
|
end
|
|
102
128
|
|
|
103
|
-
protected
|
|
104
|
-
|
|
105
|
-
def platform_string
|
|
106
|
-
platform_string = platform.to_s
|
|
107
|
-
platform_string == Index::RUBY ? Index::NULL : platform_string
|
|
108
|
-
end
|
|
109
|
-
|
|
110
129
|
private
|
|
111
130
|
|
|
112
131
|
def to_ary
|
|
@@ -123,7 +142,8 @@ module Bundler
|
|
|
123
142
|
|
|
124
143
|
#
|
|
125
144
|
# For backwards compatibility with existing lockfiles, if the most specific
|
|
126
|
-
# locked platform is
|
|
145
|
+
# locked platform is not a specific platform like x86_64-linux or
|
|
146
|
+
# universal-java-11, then we keep the previous behaviour of resolving the
|
|
127
147
|
# best platform variant at materiliazation time. For previous bundler
|
|
128
148
|
# versions (before 2.2.0) this was always the case (except when the lockfile
|
|
129
149
|
# only included non-ruby platforms), but we're also keeping this behaviour
|
|
@@ -131,7 +151,9 @@ module Bundler
|
|
|
131
151
|
# explicitly add a more specific platform.
|
|
132
152
|
#
|
|
133
153
|
def ruby_platform_materializes_to_ruby_platform?
|
|
134
|
-
|
|
154
|
+
generic_platform = generic_local_platform == Gem::Platform::JAVA ? Gem::Platform::JAVA : Gem::Platform::RUBY
|
|
155
|
+
|
|
156
|
+
!Bundler.most_specific_locked_platform?(generic_platform) || force_ruby_platform || Bundler.settings[:force_ruby_platform]
|
|
135
157
|
end
|
|
136
158
|
end
|
|
137
159
|
end
|
|
@@ -60,7 +60,7 @@ module Bundler
|
|
|
60
60
|
handled = []
|
|
61
61
|
definition.dependencies.sort_by(&:to_s).each do |dep|
|
|
62
62
|
next if handled.include?(dep.name)
|
|
63
|
-
out << dep.to_lock
|
|
63
|
+
out << dep.to_lock << "\n"
|
|
64
64
|
handled << dep.name
|
|
65
65
|
end
|
|
66
66
|
end
|
|
@@ -71,7 +71,7 @@ module Bundler
|
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
def add_bundled_with
|
|
74
|
-
add_section("BUNDLED WITH",
|
|
74
|
+
add_section("BUNDLED WITH", Bundler::VERSION)
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
def add_section(name, value)
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
#--
|
|
4
|
-
# Some versions of the Bundler 1.1 RC series introduced corrupted
|
|
5
|
-
# lockfiles. There were two major problems:
|
|
6
|
-
#
|
|
7
|
-
# * multiple copies of the same GIT section appeared in the lockfile
|
|
8
|
-
# * when this happened, those sections got multiple copies of gems
|
|
9
|
-
# in those sections.
|
|
10
|
-
#
|
|
11
|
-
# As a result, Bundler 1.1 contains code that fixes the earlier
|
|
12
|
-
# corruption. We will remove this fix-up code in Bundler 1.2.
|
|
13
|
-
|
|
14
3
|
module Bundler
|
|
15
4
|
class LockfileParser
|
|
16
5
|
attr_reader :sources, :dependencies, :specs, :platforms, :bundler_version, :ruby_version
|
|
@@ -57,6 +46,16 @@ module Bundler
|
|
|
57
46
|
attributes
|
|
58
47
|
end
|
|
59
48
|
|
|
49
|
+
def self.bundled_with
|
|
50
|
+
lockfile = Bundler.default_lockfile
|
|
51
|
+
return unless lockfile.file?
|
|
52
|
+
|
|
53
|
+
lockfile_contents = Bundler.read_file(lockfile)
|
|
54
|
+
return unless lockfile_contents.include?(BUNDLED)
|
|
55
|
+
|
|
56
|
+
lockfile_contents.split(BUNDLED).last.strip
|
|
57
|
+
end
|
|
58
|
+
|
|
60
59
|
def initialize(lockfile)
|
|
61
60
|
@platforms = []
|
|
62
61
|
@sources = []
|
|
@@ -64,8 +63,6 @@ module Bundler
|
|
|
64
63
|
@state = nil
|
|
65
64
|
@specs = {}
|
|
66
65
|
|
|
67
|
-
@rubygems_aggregate = Source::Rubygems.new
|
|
68
|
-
|
|
69
66
|
if lockfile.match(/<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|/)
|
|
70
67
|
raise LockfileError, "Your #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} contains merge conflicts.\n" \
|
|
71
68
|
"Run `git checkout HEAD -- #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}` first to get a clean lock."
|
|
@@ -89,24 +86,15 @@ module Bundler
|
|
|
89
86
|
send("parse_#{@state}", line)
|
|
90
87
|
end
|
|
91
88
|
end
|
|
92
|
-
@sources << @rubygems_aggregate unless Bundler.feature_flag.disable_multisource?
|
|
93
89
|
@specs = @specs.values.sort_by(&:identifier)
|
|
94
|
-
warn_for_outdated_bundler_version
|
|
95
90
|
rescue ArgumentError => e
|
|
96
91
|
Bundler.ui.debug(e)
|
|
97
92
|
raise LockfileError, "Your lockfile is unreadable. Run `rm #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}` " \
|
|
98
93
|
"and then `bundle install` to generate a new lockfile."
|
|
99
94
|
end
|
|
100
95
|
|
|
101
|
-
def
|
|
102
|
-
|
|
103
|
-
prerelease_text = bundler_version.prerelease? ? " --pre" : ""
|
|
104
|
-
current_version = Gem::Version.create(Bundler::VERSION)
|
|
105
|
-
return unless current_version < bundler_version
|
|
106
|
-
Bundler.ui.warn "Warning: the running version of Bundler (#{current_version}) is older " \
|
|
107
|
-
"than the version that created the lockfile (#{bundler_version}). We suggest you to " \
|
|
108
|
-
"upgrade to the version that created the lockfile by running `gem install " \
|
|
109
|
-
"bundler:#{bundler_version}#{prerelease_text}`.\n"
|
|
96
|
+
def may_include_redundant_platform_specific_gems?
|
|
97
|
+
bundler_version.nil? || bundler_version < Gem::Version.new("1.16.2")
|
|
110
98
|
end
|
|
111
99
|
|
|
112
100
|
private
|
|
@@ -127,23 +115,11 @@ module Bundler
|
|
|
127
115
|
@sources << @current_source
|
|
128
116
|
when GIT
|
|
129
117
|
@current_source = TYPES[@type].from_lock(@opts)
|
|
130
|
-
|
|
131
|
-
if @sources.include?(@current_source)
|
|
132
|
-
@current_source = @sources.find {|s| s == @current_source }
|
|
133
|
-
else
|
|
134
|
-
@sources << @current_source
|
|
135
|
-
end
|
|
118
|
+
@sources << @current_source
|
|
136
119
|
when GEM
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
@sources << @current_source
|
|
141
|
-
else
|
|
142
|
-
Array(@opts["remote"]).each do |url|
|
|
143
|
-
@rubygems_aggregate.add_remote(url)
|
|
144
|
-
end
|
|
145
|
-
@current_source = @rubygems_aggregate
|
|
146
|
-
end
|
|
120
|
+
@opts["remotes"] = Array(@opts.delete("remote")).reverse
|
|
121
|
+
@current_source = TYPES[@type].from_lock(@opts)
|
|
122
|
+
@sources << @current_source
|
|
147
123
|
when PLUGIN
|
|
148
124
|
@current_source = Plugin.source_from_lock(@opts)
|
|
149
125
|
@sources << @current_source
|
|
@@ -221,10 +197,9 @@ module Bundler
|
|
|
221
197
|
platform = platform ? Gem::Platform.new(platform) : Gem::Platform::RUBY
|
|
222
198
|
@current_spec = LazySpecification.new(name, version, platform)
|
|
223
199
|
@current_spec.source = @current_source
|
|
200
|
+
@current_source.add_dependency_names(name)
|
|
224
201
|
|
|
225
|
-
|
|
226
|
-
# duplicate GIT sections)
|
|
227
|
-
@specs[@current_spec.identifier] ||= @current_spec
|
|
202
|
+
@specs[@current_spec.identifier] = @current_spec
|
|
228
203
|
elsif spaces.size == 6
|
|
229
204
|
version = version.split(",").map(&:strip) if version
|
|
230
205
|
dep = Gem::Dependency.new(name, version)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
3
|
.
|
|
4
|
-
.TH "BUNDLE\-ADD" "1" "
|
|
4
|
+
.TH "BUNDLE\-ADD" "1" "October 2022" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
|
|
8
8
|
.
|
|
9
9
|
.SH "SYNOPSIS"
|
|
10
|
-
\fBbundle add\fR \fIGEM_NAME\fR [\-\-group=GROUP] [\-\-version=VERSION] [\-\-source=SOURCE] [\-\-git=GIT] [\-\-branch=BRANCH] [\-\-skip\-install] [\-\-strict] [\-\-optimistic]
|
|
10
|
+
\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]
|
|
11
11
|
.
|
|
12
12
|
.SH "DESCRIPTION"
|
|
13
13
|
Adds the named gem to the Gemfile and run \fBbundle install\fR\. \fBbundle install\fR can be avoided by using the flag \fB\-\-skip\-install\fR\.
|
|
@@ -41,26 +41,42 @@ Specify version requirements(s) for the added gem\.
|
|
|
41
41
|
Specify the group(s) for the added gem\. Multiple groups should be separated by commas\.
|
|
42
42
|
.
|
|
43
43
|
.TP
|
|
44
|
-
\fB\-\-source\fR,
|
|
44
|
+
\fB\-\-source\fR, \fB\-s\fR
|
|
45
45
|
Specify the source for the added gem\.
|
|
46
46
|
.
|
|
47
47
|
.TP
|
|
48
|
+
\fB\-\-require\fR, \fB\-r\fR
|
|
49
|
+
Adds require path to gem\. Provide false, or a path as a string\.
|
|
50
|
+
.
|
|
51
|
+
.TP
|
|
52
|
+
\fB\-\-path\fR
|
|
53
|
+
Specify the file system path for the added gem\.
|
|
54
|
+
.
|
|
55
|
+
.TP
|
|
48
56
|
\fB\-\-git\fR
|
|
49
57
|
Specify the git source for the added gem\.
|
|
50
58
|
.
|
|
51
59
|
.TP
|
|
60
|
+
\fB\-\-github\fR
|
|
61
|
+
Specify the github source for the added gem\.
|
|
62
|
+
.
|
|
63
|
+
.TP
|
|
52
64
|
\fB\-\-branch\fR
|
|
53
65
|
Specify the git branch for the added gem\.
|
|
54
66
|
.
|
|
55
67
|
.TP
|
|
68
|
+
\fB\-\-ref\fR
|
|
69
|
+
Specify the git ref for the added gem\.
|
|
70
|
+
.
|
|
71
|
+
.TP
|
|
56
72
|
\fB\-\-skip\-install\fR
|
|
57
73
|
Adds the gem to the Gemfile but does not install it\.
|
|
58
74
|
.
|
|
59
75
|
.TP
|
|
60
76
|
\fB\-\-optimistic\fR
|
|
61
|
-
Adds optimistic declaration of version
|
|
77
|
+
Adds optimistic declaration of version\.
|
|
62
78
|
.
|
|
63
79
|
.TP
|
|
64
80
|
\fB\-\-strict\fR
|
|
65
|
-
Adds strict declaration of version
|
|
81
|
+
Adds strict declaration of version\.
|
|
66
82
|
|
|
@@ -3,7 +3,7 @@ bundle-add(1) -- Add gem to the Gemfile and run bundle install
|
|
|
3
3
|
|
|
4
4
|
## SYNOPSIS
|
|
5
5
|
|
|
6
|
-
`bundle add` <GEM_NAME> [--group=GROUP] [--version=VERSION] [--source=SOURCE] [--git=GIT] [--branch=BRANCH] [--skip-install] [--strict] [--optimistic]
|
|
6
|
+
`bundle add` <GEM_NAME> [--group=GROUP] [--version=VERSION] [--source=SOURCE] [--path=PATH] [--git=GIT] [--github=GITHUB] [--branch=BRANCH] [--ref=REF] [--skip-install] [--strict] [--optimistic]
|
|
7
7
|
|
|
8
8
|
## DESCRIPTION
|
|
9
9
|
Adds the named gem to the Gemfile and run `bundle install`. `bundle install` can be avoided by using the flag `--skip-install`.
|
|
@@ -27,20 +27,32 @@ bundle add rails --group "development, test"
|
|
|
27
27
|
* `--group`, `-g`:
|
|
28
28
|
Specify the group(s) for the added gem. Multiple groups should be separated by commas.
|
|
29
29
|
|
|
30
|
-
* `--source`,
|
|
30
|
+
* `--source`, `-s`:
|
|
31
31
|
Specify the source for the added gem.
|
|
32
32
|
|
|
33
|
+
* `--require`, `-r`:
|
|
34
|
+
Adds require path to gem. Provide false, or a path as a string.
|
|
35
|
+
|
|
36
|
+
* `--path`:
|
|
37
|
+
Specify the file system path for the added gem.
|
|
38
|
+
|
|
33
39
|
* `--git`:
|
|
34
40
|
Specify the git source for the added gem.
|
|
35
41
|
|
|
42
|
+
* `--github`:
|
|
43
|
+
Specify the github source for the added gem.
|
|
44
|
+
|
|
36
45
|
* `--branch`:
|
|
37
46
|
Specify the git branch for the added gem.
|
|
38
47
|
|
|
48
|
+
* `--ref`:
|
|
49
|
+
Specify the git ref for the added gem.
|
|
50
|
+
|
|
39
51
|
* `--skip-install`:
|
|
40
52
|
Adds the gem to the Gemfile but does not install it.
|
|
41
53
|
|
|
42
54
|
* `--optimistic`:
|
|
43
|
-
Adds optimistic declaration of version
|
|
55
|
+
Adds optimistic declaration of version.
|
|
44
56
|
|
|
45
57
|
* `--strict`:
|
|
46
|
-
Adds strict declaration of version
|
|
58
|
+
Adds strict declaration of version.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
3
|
.
|
|
4
|
-
.TH "BUNDLE\-BINSTUBS" "1" "
|
|
4
|
+
.TH "BUNDLE\-BINSTUBS" "1" "October 2022" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
3
|
.
|
|
4
|
-
.TH "BUNDLE\-CACHE" "1" "
|
|
4
|
+
.TH "BUNDLE\-CACHE" "1" "October 2022" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
.SH "SYNOPSIS"
|
|
10
10
|
\fBbundle cache\fR
|
|
11
11
|
.
|
|
12
|
+
.P
|
|
13
|
+
alias: \fBpackage\fR, \fBpack\fR
|
|
14
|
+
.
|
|
12
15
|
.SH "DESCRIPTION"
|
|
13
16
|
Copy all of the \fB\.gem\fR files needed to run the application into the \fBvendor/cache\fR directory\. In the future, when running [bundle install(1)][bundle\-install], use the gems in the cache in preference to the ones on \fBrubygems\.org\fR\.
|
|
14
17
|
.
|
|
@@ -53,3 +56,6 @@ One way to be sure that you have the right platformed versions of all your gems
|
|
|
53
56
|
.
|
|
54
57
|
.P
|
|
55
58
|
By default, bundle cache(1) \fIbundle\-cache\.1\.html\fR fetches and also installs the gems to the default location\. To package the dependencies to \fBvendor/cache\fR without installing them to the local install location, you can run \fBbundle cache \-\-no\-install\fR\.
|
|
59
|
+
.
|
|
60
|
+
.SH "HISTORY"
|
|
61
|
+
In Bundler 2\.1, \fBcache\fR took in the functionalities of \fBpackage\fR and now \fBpackage\fR and \fBpack\fR are aliases of \fBcache\fR\.
|
|
@@ -5,6 +5,8 @@ bundle-cache(1) -- Package your needed `.gem` files into your application
|
|
|
5
5
|
|
|
6
6
|
`bundle cache`
|
|
7
7
|
|
|
8
|
+
alias: `package`, `pack`
|
|
9
|
+
|
|
8
10
|
## DESCRIPTION
|
|
9
11
|
|
|
10
12
|
Copy all of the `.gem` files needed to run the application into the
|
|
@@ -70,3 +72,8 @@ By default, [bundle cache(1)](bundle-cache.1.html) fetches and also
|
|
|
70
72
|
installs the gems to the default location. To package the
|
|
71
73
|
dependencies to `vendor/cache` without installing them to the
|
|
72
74
|
local install location, you can run `bundle cache --no-install`.
|
|
75
|
+
|
|
76
|
+
## HISTORY
|
|
77
|
+
|
|
78
|
+
In Bundler 2.1, `cache` took in the functionalities of `package` and now
|
|
79
|
+
`package` and `pack` are aliases of `cache`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
3
|
.
|
|
4
|
-
.TH "BUNDLE\-CHECK" "1" "
|
|
4
|
+
.TH "BUNDLE\-CHECK" "1" "October 2022" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
3
|
.
|
|
4
|
-
.TH "BUNDLE\-CLEAN" "1" "
|
|
4
|
+
.TH "BUNDLE\-CLEAN" "1" "October 2022" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
|
|
@@ -20,5 +20,5 @@ Print the changes, but do not clean the unused gems\.
|
|
|
20
20
|
.
|
|
21
21
|
.TP
|
|
22
22
|
\fB\-\-force\fR
|
|
23
|
-
|
|
23
|
+
Forces cleaning up unused gems even if Bundler is configured to use globally installed gems\. As a consequence, removes all system gems except for the ones in the current application\.
|
|
24
24
|
|
|
@@ -15,4 +15,4 @@ useful when you have made many changes to your gem dependencies.
|
|
|
15
15
|
* `--dry-run`:
|
|
16
16
|
Print the changes, but do not clean the unused gems.
|
|
17
17
|
* `--force`:
|
|
18
|
-
|
|
18
|
+
Forces cleaning up unused gems even if Bundler is configured to use globally installed gems. As a consequence, removes all system gems except for the ones in the current application.
|