bundler 2.4.22 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +53 -0
- data/bundler.gemspec +4 -2
- data/exe/bundle +1 -10
- data/lib/bundler/build_metadata.rb +3 -3
- data/lib/bundler/capistrano.rb +1 -1
- data/lib/bundler/checksum.rb +245 -0
- data/lib/bundler/ci_detector.rb +75 -0
- data/lib/bundler/cli/add.rb +3 -3
- data/lib/bundler/cli/binstubs.rb +4 -4
- data/lib/bundler/cli/cache.rb +1 -1
- data/lib/bundler/cli/check.rb +1 -1
- data/lib/bundler/cli/common.rb +9 -1
- data/lib/bundler/cli/config.rb +8 -7
- data/lib/bundler/cli/console.rb +3 -2
- data/lib/bundler/cli/doctor.rb +2 -2
- data/lib/bundler/cli/exec.rb +1 -1
- data/lib/bundler/cli/gem.rb +28 -23
- data/lib/bundler/cli/info.rb +2 -13
- data/lib/bundler/cli/install.rb +5 -4
- data/lib/bundler/cli/issue.rb +1 -1
- data/lib/bundler/cli/lock.rb +4 -4
- data/lib/bundler/cli/open.rb +1 -1
- data/lib/bundler/cli/outdated.rb +6 -6
- data/lib/bundler/cli/plugin.rb +7 -14
- data/lib/bundler/cli/pristine.rb +38 -30
- data/lib/bundler/cli/show.rb +2 -2
- data/lib/bundler/cli/update.rb +5 -5
- data/lib/bundler/cli.rb +215 -263
- data/lib/bundler/compact_index_client/cache.rb +29 -9
- data/lib/bundler/compact_index_client/cache_file.rb +153 -0
- data/lib/bundler/compact_index_client/gem_parser.rb +7 -3
- data/lib/bundler/compact_index_client/updater.rb +79 -81
- data/lib/bundler/compact_index_client.rb +14 -7
- data/lib/bundler/constants.rb +1 -1
- data/lib/bundler/current_ruby.rb +5 -21
- data/lib/bundler/definition.rb +42 -15
- data/lib/bundler/dependency.rb +16 -12
- data/lib/bundler/digest.rb +2 -2
- data/lib/bundler/dsl.rb +43 -25
- data/lib/bundler/endpoint_specification.rb +5 -1
- data/lib/bundler/env.rb +1 -3
- data/lib/bundler/errors.rb +43 -0
- data/lib/bundler/fetcher/base.rb +3 -1
- data/lib/bundler/fetcher/compact_index.rb +4 -4
- data/lib/bundler/fetcher/downloader.rb +13 -11
- data/lib/bundler/fetcher/gem_remote_fetcher.rb +16 -0
- data/lib/bundler/fetcher/index.rb +1 -1
- data/lib/bundler/fetcher.rb +28 -25
- data/lib/bundler/friendly_errors.rb +5 -5
- data/lib/bundler/gem_helper.rb +1 -1
- data/lib/bundler/gem_helpers.rb +5 -2
- data/lib/bundler/graph.rb +9 -9
- data/lib/bundler/index.rb +1 -2
- data/lib/bundler/injector.rb +1 -1
- data/lib/bundler/inline.rb +3 -3
- data/lib/bundler/installer/gem_installer.rb +5 -5
- data/lib/bundler/installer/parallel_installer.rb +16 -8
- data/lib/bundler/installer/standalone.rb +2 -3
- data/lib/bundler/installer.rb +9 -9
- data/lib/bundler/lazy_specification.rb +24 -17
- data/lib/bundler/lockfile_generator.rb +9 -0
- data/lib/bundler/lockfile_parser.rb +81 -10
- data/lib/bundler/man/bundle-add.1 +3 -26
- data/lib/bundler/man/bundle-binstubs.1 +4 -16
- data/lib/bundler/man/bundle-cache.1 +3 -24
- data/lib/bundler/man/bundle-check.1 +3 -12
- data/lib/bundler/man/bundle-clean.1 +3 -10
- data/lib/bundler/man/bundle-config.1 +20 -211
- data/lib/bundler/man/bundle-config.1.ronn +6 -0
- data/lib/bundler/man/bundle-console.1 +4 -22
- data/lib/bundler/man/bundle-doctor.1 +4 -18
- data/lib/bundler/man/bundle-exec.1 +12 -73
- data/lib/bundler/man/bundle-gem.1 +13 -49
- data/lib/bundler/man/bundle-help.1 +3 -7
- data/lib/bundler/man/bundle-info.1 +3 -9
- data/lib/bundler/man/bundle-init.1 +3 -12
- data/lib/bundler/man/bundle-inject.1 +6 -19
- data/lib/bundler/man/bundle-install.1 +27 -125
- data/lib/bundler/man/bundle-install.1.ronn +1 -0
- data/lib/bundler/man/bundle-list.1 +4 -19
- data/lib/bundler/man/bundle-lock.1 +5 -29
- data/lib/bundler/man/bundle-open.1 +7 -27
- data/lib/bundler/man/bundle-outdated.1 +3 -55
- data/lib/bundler/man/bundle-outdated.1.ronn +1 -0
- data/lib/bundler/man/bundle-platform.1 +5 -27
- data/lib/bundler/man/bundle-plugin.1 +3 -29
- data/lib/bundler/man/bundle-pristine.1 +5 -16
- data/lib/bundler/man/bundle-remove.1 +4 -14
- data/lib/bundler/man/bundle-show.1 +3 -10
- data/lib/bundler/man/bundle-update.1 +18 -137
- data/lib/bundler/man/bundle-version.1 +3 -16
- data/lib/bundler/man/bundle-viz.1 +4 -16
- data/lib/bundler/man/bundle.1 +5 -44
- data/lib/bundler/man/gemfile.5 +24 -301
- data/lib/bundler/man/gemfile.5.ronn +4 -0
- data/lib/bundler/match_metadata.rb +4 -0
- data/lib/bundler/match_platform.rb +1 -1
- data/lib/bundler/plugin/api/source.rb +3 -2
- data/lib/bundler/plugin/installer.rb +1 -1
- data/lib/bundler/plugin.rb +3 -3
- data/lib/bundler/resolver/base.rb +1 -1
- data/lib/bundler/resolver/incompatibility.rb +1 -1
- data/lib/bundler/resolver/spec_group.rb +1 -4
- data/lib/bundler/resolver.rb +16 -16
- data/lib/bundler/ruby_dsl.rb +20 -12
- data/lib/bundler/ruby_version.rb +1 -1
- data/lib/bundler/rubygems_ext.rb +24 -50
- data/lib/bundler/rubygems_gem_installer.rb +6 -56
- data/lib/bundler/rubygems_integration.rb +25 -94
- data/lib/bundler/runtime.rb +2 -2
- data/lib/bundler/self_manager.rb +23 -7
- data/lib/bundler/settings.rb +27 -7
- data/lib/bundler/setup.rb +4 -1
- data/lib/bundler/shared_helpers.rb +35 -13
- data/lib/bundler/source/git/git_proxy.rb +15 -15
- data/lib/bundler/source/git.rb +4 -3
- data/lib/bundler/source/metadata.rb +15 -15
- data/lib/bundler/source/path.rb +7 -6
- data/lib/bundler/source/rubygems.rb +21 -14
- data/lib/bundler/source.rb +2 -0
- data/lib/bundler/spec_set.rb +38 -10
- data/lib/bundler/stub_specification.rb +1 -0
- data/lib/bundler/templates/Executable.bundler +1 -1
- data/lib/bundler/templates/newgem/README.md.tt +3 -3
- data/lib/bundler/templates/newgem/Rakefile.tt +2 -6
- data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +1 -1
- data/lib/bundler/templates/newgem/standard.yml.tt +1 -1
- data/lib/bundler/ui/shell.rb +1 -1
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
- data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +53 -6
- data/lib/bundler/vendor/fileutils/lib/fileutils.rb +8 -20
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +3 -3
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +2 -2
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +1 -1
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +35 -35
- data/lib/bundler/vendor/tsort/lib/tsort.rb +3 -0
- data/lib/bundler/vendor/uri/lib/uri/common.rb +256 -132
- data/lib/bundler/vendor/uri/lib/uri/generic.rb +1 -0
- data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +95 -31
- data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/bundler/vendored_net_http.rb +8 -0
- data/lib/bundler/vendored_persistent.rb +0 -4
- data/lib/bundler/vendored_timeout.rb +8 -0
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler/vlad.rb +1 -1
- data/lib/bundler/yaml_serializer.rb +3 -3
- data/lib/bundler.rb +38 -27
- metadata +11 -5
@@ -2,10 +2,41 @@
|
|
2
2
|
|
3
3
|
module Bundler
|
4
4
|
class LockfileParser
|
5
|
-
|
5
|
+
class Position
|
6
|
+
attr_reader :line, :column
|
7
|
+
def initialize(line, column)
|
8
|
+
@line = line
|
9
|
+
@column = column
|
10
|
+
end
|
11
|
+
|
12
|
+
def advance!(string)
|
13
|
+
lines = string.count("\n")
|
14
|
+
if lines > 0
|
15
|
+
@line += lines
|
16
|
+
@column = string.length - string.rindex("\n")
|
17
|
+
else
|
18
|
+
@column += string.length
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def to_s
|
23
|
+
"#{line}:#{column}"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
attr_reader(
|
28
|
+
:sources,
|
29
|
+
:dependencies,
|
30
|
+
:specs,
|
31
|
+
:platforms,
|
32
|
+
:bundler_version,
|
33
|
+
:ruby_version,
|
34
|
+
:checksums,
|
35
|
+
)
|
6
36
|
|
7
37
|
BUNDLED = "BUNDLED WITH"
|
8
38
|
DEPENDENCIES = "DEPENDENCIES"
|
39
|
+
CHECKSUMS = "CHECKSUMS"
|
9
40
|
PLATFORMS = "PLATFORMS"
|
10
41
|
RUBY = "RUBY VERSION"
|
11
42
|
GIT = "GIT"
|
@@ -13,7 +44,7 @@ module Bundler
|
|
13
44
|
PATH = "PATH"
|
14
45
|
PLUGIN = "PLUGIN SOURCE"
|
15
46
|
SPECS = " specs:"
|
16
|
-
OPTIONS = /^ ([a-z]+): (.*)$/i
|
47
|
+
OPTIONS = /^ ([a-z]+): (.*)$/i
|
17
48
|
SOURCE = [GIT, GEM, PATH, PLUGIN].freeze
|
18
49
|
|
19
50
|
SECTIONS_BY_VERSION_INTRODUCED = {
|
@@ -21,6 +52,7 @@ module Bundler
|
|
21
52
|
Gem::Version.create("1.10") => [BUNDLED].freeze,
|
22
53
|
Gem::Version.create("1.12") => [RUBY].freeze,
|
23
54
|
Gem::Version.create("1.13") => [PLUGIN].freeze,
|
55
|
+
Gem::Version.create("2.5.0") => [CHECKSUMS].freeze,
|
24
56
|
}.freeze
|
25
57
|
|
26
58
|
KNOWN_SECTIONS = SECTIONS_BY_VERSION_INTRODUCED.values.flatten!.freeze
|
@@ -65,18 +97,32 @@ module Bundler
|
|
65
97
|
@dependencies = {}
|
66
98
|
@parse_method = nil
|
67
99
|
@specs = {}
|
100
|
+
@lockfile_path = begin
|
101
|
+
SharedHelpers.relative_lockfile_path
|
102
|
+
rescue GemfileNotFound
|
103
|
+
"Gemfile.lock"
|
104
|
+
end
|
105
|
+
@pos = Position.new(1, 1)
|
68
106
|
|
69
107
|
if lockfile.match?(/<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|/)
|
70
|
-
raise LockfileError, "Your
|
71
|
-
"Run `git checkout HEAD -- #{
|
108
|
+
raise LockfileError, "Your #{@lockfile_path} contains merge conflicts.\n" \
|
109
|
+
"Run `git checkout HEAD -- #{@lockfile_path}` first to get a clean lock."
|
72
110
|
end
|
73
111
|
|
74
|
-
lockfile.split(/(?:\r?\n)
|
112
|
+
lockfile.split(/((?:\r?\n)+)/) do |line|
|
113
|
+
# split alternates between the line and the following whitespace
|
114
|
+
next @pos.advance!(line) if line.match?(/^\s*$/)
|
115
|
+
|
75
116
|
if SOURCE.include?(line)
|
76
117
|
@parse_method = :parse_source
|
77
118
|
parse_source(line)
|
78
119
|
elsif line == DEPENDENCIES
|
79
120
|
@parse_method = :parse_dependency
|
121
|
+
elsif line == CHECKSUMS
|
122
|
+
# This is a temporary solution to make this feature disabled by default
|
123
|
+
# for all gemfiles that don't already explicitly include the feature.
|
124
|
+
@checksums = true
|
125
|
+
@parse_method = :parse_checksum
|
80
126
|
elsif line == PLATFORMS
|
81
127
|
@parse_method = :parse_platform
|
82
128
|
elsif line == RUBY
|
@@ -88,12 +134,14 @@ module Bundler
|
|
88
134
|
elsif @parse_method
|
89
135
|
send(@parse_method, line)
|
90
136
|
end
|
137
|
+
@pos.advance!(line)
|
91
138
|
end
|
92
139
|
@specs = @specs.values.sort_by!(&:full_name)
|
93
140
|
rescue ArgumentError => e
|
94
141
|
Bundler.ui.debug(e)
|
95
|
-
raise LockfileError, "Your lockfile is unreadable. Run `rm #{
|
96
|
-
"and then `bundle install` to generate a new lockfile."
|
142
|
+
raise LockfileError, "Your lockfile is unreadable. Run `rm #{@lockfile_path}` " \
|
143
|
+
"and then `bundle install` to generate a new lockfile. The error occurred while " \
|
144
|
+
"evaluating #{@lockfile_path}:#{@pos}"
|
97
145
|
end
|
98
146
|
|
99
147
|
def may_include_redundant_platform_specific_gems?
|
@@ -144,8 +192,9 @@ module Bundler
|
|
144
192
|
(?:#{space}\(([^-]*) # Space, followed by version
|
145
193
|
(?:-(.*))?\))? # Optional platform
|
146
194
|
(!)? # Optional pinned marker
|
195
|
+
(?:#{space}([^ ]+))? # Optional checksum
|
147
196
|
$ # Line end
|
148
|
-
/xo
|
197
|
+
/xo
|
149
198
|
|
150
199
|
def parse_dependency(line)
|
151
200
|
return unless line =~ NAME_VERSION
|
@@ -176,6 +225,29 @@ module Bundler
|
|
176
225
|
@dependencies[dep.name] = dep
|
177
226
|
end
|
178
227
|
|
228
|
+
def parse_checksum(line)
|
229
|
+
return unless line =~ NAME_VERSION
|
230
|
+
|
231
|
+
spaces = $1
|
232
|
+
return unless spaces.size == 2
|
233
|
+
checksums = $6
|
234
|
+
return unless checksums
|
235
|
+
name = $2
|
236
|
+
version = $3
|
237
|
+
platform = $4
|
238
|
+
|
239
|
+
version = Gem::Version.new(version)
|
240
|
+
platform = platform ? Gem::Platform.new(platform) : Gem::Platform::RUBY
|
241
|
+
full_name = Gem::NameTuple.new(name, version, platform).full_name
|
242
|
+
return unless spec = @specs[full_name]
|
243
|
+
|
244
|
+
checksums.split(",") do |lock_checksum|
|
245
|
+
column = line.index(lock_checksum) + 1
|
246
|
+
checksum = Checksum.from_lock(lock_checksum, "#{@lockfile_path}:#{@pos.line}:#{column}")
|
247
|
+
spec.source.checksum_store.register(spec, checksum)
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
179
251
|
def parse_spec(line)
|
180
252
|
return unless line =~ NAME_VERSION
|
181
253
|
spaces = $1
|
@@ -188,8 +260,7 @@ module Bundler
|
|
188
260
|
|
189
261
|
version = Gem::Version.new(version)
|
190
262
|
platform = platform ? Gem::Platform.new(platform) : Gem::Platform::RUBY
|
191
|
-
@current_spec = LazySpecification.new(name, version, platform)
|
192
|
-
@current_spec.source = @current_source
|
263
|
+
@current_spec = LazySpecification.new(name, version, platform, @current_source)
|
193
264
|
@current_source.add_dependency_names(name)
|
194
265
|
|
195
266
|
@specs[@current_spec.full_name] = @current_spec
|
@@ -1,81 +1,58 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.
|
4
|
-
.TH "BUNDLE\-ADD" "1" "October 2023" "" ""
|
5
|
-
.
|
1
|
+
.\" generated with nRonn/v0.11.1
|
2
|
+
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
+
.TH "BUNDLE\-ADD" "1" "December 2023" ""
|
6
4
|
.SH "NAME"
|
7
5
|
\fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
|
8
|
-
.
|
9
6
|
.SH "SYNOPSIS"
|
10
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]
|
11
|
-
.
|
12
8
|
.SH "DESCRIPTION"
|
13
9
|
Adds the named gem to the Gemfile and run \fBbundle install\fR\. \fBbundle install\fR can be avoided by using the flag \fB\-\-skip\-install\fR\.
|
14
|
-
.
|
15
10
|
.P
|
16
11
|
Example:
|
17
|
-
.
|
18
12
|
.P
|
19
13
|
bundle add rails
|
20
|
-
.
|
21
14
|
.P
|
22
15
|
bundle add rails \-\-version "< 3\.0, > 1\.1"
|
23
|
-
.
|
24
16
|
.P
|
25
17
|
bundle add rails \-\-version "~> 5\.0\.0" \-\-source "https://gems\.example\.com" \-\-group "development"
|
26
|
-
.
|
27
18
|
.P
|
28
19
|
bundle add rails \-\-skip\-install
|
29
|
-
.
|
30
20
|
.P
|
31
21
|
bundle add rails \-\-group "development, test"
|
32
|
-
.
|
33
22
|
.SH "OPTIONS"
|
34
|
-
.
|
35
23
|
.TP
|
36
24
|
\fB\-\-version\fR, \fB\-v\fR
|
37
25
|
Specify version requirements(s) for the added gem\.
|
38
|
-
.
|
39
26
|
.TP
|
40
27
|
\fB\-\-group\fR, \fB\-g\fR
|
41
28
|
Specify the group(s) for the added gem\. Multiple groups should be separated by commas\.
|
42
|
-
.
|
43
29
|
.TP
|
44
30
|
\fB\-\-source\fR, \fB\-s\fR
|
45
31
|
Specify the source for the added gem\.
|
46
|
-
.
|
47
32
|
.TP
|
48
33
|
\fB\-\-require\fR, \fB\-r\fR
|
49
34
|
Adds require path to gem\. Provide false, or a path as a string\.
|
50
|
-
.
|
51
35
|
.TP
|
52
36
|
\fB\-\-path\fR
|
53
37
|
Specify the file system path for the added gem\.
|
54
|
-
.
|
55
38
|
.TP
|
56
39
|
\fB\-\-git\fR
|
57
40
|
Specify the git source for the added gem\.
|
58
|
-
.
|
59
41
|
.TP
|
60
42
|
\fB\-\-github\fR
|
61
43
|
Specify the github source for the added gem\.
|
62
|
-
.
|
63
44
|
.TP
|
64
45
|
\fB\-\-branch\fR
|
65
46
|
Specify the git branch for the added gem\.
|
66
|
-
.
|
67
47
|
.TP
|
68
48
|
\fB\-\-ref\fR
|
69
49
|
Specify the git ref for the added gem\.
|
70
|
-
.
|
71
50
|
.TP
|
72
51
|
\fB\-\-skip\-install\fR
|
73
52
|
Adds the gem to the Gemfile but does not install it\.
|
74
|
-
.
|
75
53
|
.TP
|
76
54
|
\fB\-\-optimistic\fR
|
77
55
|
Adds optimistic declaration of version\.
|
78
|
-
.
|
79
56
|
.TP
|
80
57
|
\fB\-\-strict\fR
|
81
58
|
Adds strict declaration of version\.
|
@@ -1,41 +1,29 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.
|
4
|
-
.TH "BUNDLE\-BINSTUBS" "1" "October 2023" "" ""
|
5
|
-
.
|
1
|
+
.\" generated with nRonn/v0.11.1
|
2
|
+
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
+
.TH "BUNDLE\-BINSTUBS" "1" "December 2023" ""
|
6
4
|
.SH "NAME"
|
7
5
|
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
|
8
|
-
.
|
9
6
|
.SH "SYNOPSIS"
|
10
7
|
\fBbundle binstubs\fR \fIGEM_NAME\fR [\-\-force] [\-\-path PATH] [\-\-standalone]
|
11
|
-
.
|
12
8
|
.SH "DESCRIPTION"
|
13
9
|
Binstubs are scripts that wrap around executables\. Bundler creates a small Ruby file (a binstub) that loads Bundler, runs the command, and puts it into \fBbin/\fR\. Binstubs are a shortcut\-or alternative\- to always using \fBbundle exec\fR\. This gives you a file that can be run directly, and one that will always run the correct gem version used by the application\.
|
14
|
-
.
|
15
10
|
.P
|
16
11
|
For example, if you run \fBbundle binstubs rspec\-core\fR, Bundler will create the file \fBbin/rspec\fR\. That file will contain enough code to load Bundler, tell it to load the bundled gems, and then run rspec\.
|
17
|
-
.
|
18
12
|
.P
|
19
13
|
This command generates binstubs for executables in \fBGEM_NAME\fR\. Binstubs are put into \fBbin\fR, or the \fB\-\-path\fR directory if one has been set\. Calling binstubs with [GEM [GEM]] will create binstubs for all given gems\.
|
20
|
-
.
|
21
14
|
.SH "OPTIONS"
|
22
|
-
.
|
23
15
|
.TP
|
24
16
|
\fB\-\-force\fR
|
25
17
|
Overwrite existing binstubs if they exist\.
|
26
|
-
.
|
27
18
|
.TP
|
28
19
|
\fB\-\-path\fR
|
29
20
|
The location to install the specified binstubs to\. This defaults to \fBbin\fR\.
|
30
|
-
.
|
31
21
|
.TP
|
32
22
|
\fB\-\-standalone\fR
|
33
23
|
Makes binstubs that can work without depending on Rubygems or Bundler at runtime\.
|
34
|
-
.
|
35
24
|
.TP
|
36
25
|
\fB\-\-shebang\fR
|
37
|
-
Specify a different shebang executable name than the default (default
|
38
|
-
.
|
26
|
+
Specify a different shebang executable name than the default (default 'ruby')
|
39
27
|
.TP
|
40
28
|
\fB\-\-all\fR
|
41
29
|
Create binstubs for all gems in the bundle\.
|
@@ -1,61 +1,40 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.
|
4
|
-
.TH "BUNDLE\-CACHE" "1" "October 2023" "" ""
|
5
|
-
.
|
1
|
+
.\" generated with nRonn/v0.11.1
|
2
|
+
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
+
.TH "BUNDLE\-CACHE" "1" "December 2023" ""
|
6
4
|
.SH "NAME"
|
7
5
|
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
|
8
|
-
.
|
9
6
|
.SH "SYNOPSIS"
|
10
7
|
\fBbundle cache\fR
|
11
|
-
.
|
12
8
|
.P
|
13
9
|
alias: \fBpackage\fR, \fBpack\fR
|
14
|
-
.
|
15
10
|
.SH "DESCRIPTION"
|
16
11
|
Copy all of the \fB\.gem\fR files needed to run the application into the \fBvendor/cache\fR directory\. In the future, when running \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR, use the gems in the cache in preference to the ones on \fBrubygems\.org\fR\.
|
17
|
-
.
|
18
12
|
.SH "GIT AND PATH GEMS"
|
19
13
|
The \fBbundle cache\fR command can also package \fB:git\fR and \fB:path\fR dependencies besides \.gem files\. This needs to be explicitly enabled via the \fB\-\-all\fR option\. Once used, the \fB\-\-all\fR option will be remembered\.
|
20
|
-
.
|
21
14
|
.SH "SUPPORT FOR MULTIPLE PLATFORMS"
|
22
15
|
When using gems that have different packages for different platforms, Bundler supports caching of gems for other platforms where the Gemfile has been resolved (i\.e\. present in the lockfile) in \fBvendor/cache\fR\. This needs to be enabled via the \fB\-\-all\-platforms\fR option\. This setting will be remembered in your local bundler configuration\.
|
23
|
-
.
|
24
16
|
.SH "REMOTE FETCHING"
|
25
17
|
By default, if you run \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR after running bundle cache(1) \fIbundle\-cache\.1\.html\fR, bundler will still connect to \fBrubygems\.org\fR to check whether a platform\-specific gem exists for any of the gems in \fBvendor/cache\fR\.
|
26
|
-
.
|
27
18
|
.P
|
28
19
|
For instance, consider this Gemfile(5):
|
29
|
-
.
|
30
20
|
.IP "" 4
|
31
|
-
.
|
32
21
|
.nf
|
33
|
-
|
34
22
|
source "https://rubygems\.org"
|
35
23
|
|
36
24
|
gem "nokogiri"
|
37
|
-
.
|
38
25
|
.fi
|
39
|
-
.
|
40
26
|
.IP "" 0
|
41
|
-
.
|
42
27
|
.P
|
43
28
|
If you run \fBbundle cache\fR under C Ruby, bundler will retrieve the version of \fBnokogiri\fR for the \fB"ruby"\fR platform\. If you deploy to JRuby and run \fBbundle install\fR, bundler is forced to check to see whether a \fB"java"\fR platformed \fBnokogiri\fR exists\.
|
44
|
-
.
|
45
29
|
.P
|
46
30
|
Even though the \fBnokogiri\fR gem for the Ruby platform is \fItechnically\fR acceptable on JRuby, it has a C extension that does not run on JRuby\. As a result, bundler will, by default, still connect to \fBrubygems\.org\fR to check whether it has a version of one of your gems more specific to your platform\.
|
47
|
-
.
|
48
31
|
.P
|
49
32
|
This problem is also not limited to the \fB"java"\fR platform\. A similar (common) problem can happen when developing on Windows and deploying to Linux, or even when developing on OSX and deploying to Linux\.
|
50
|
-
.
|
51
33
|
.P
|
52
34
|
If you know for sure that the gems packaged in \fBvendor/cache\fR are appropriate for the platform you are on, you can run \fBbundle install \-\-local\fR to skip checking for more appropriate gems, and use the ones in \fBvendor/cache\fR\.
|
53
|
-
.
|
54
35
|
.P
|
55
36
|
One way to be sure that you have the right platformed versions of all your gems is to run \fBbundle cache\fR on an identical machine and check in the gems\. For instance, you can run \fBbundle cache\fR on an identical staging box during your staging process, and check in the \fBvendor/cache\fR before deploying to production\.
|
56
|
-
.
|
57
37
|
.P
|
58
38
|
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
39
|
.SH "HISTORY"
|
61
40
|
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\.
|
@@ -1,30 +1,21 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.
|
4
|
-
.TH "BUNDLE\-CHECK" "1" "October 2023" "" ""
|
5
|
-
.
|
1
|
+
.\" generated with nRonn/v0.11.1
|
2
|
+
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
+
.TH "BUNDLE\-CHECK" "1" "December 2023" ""
|
6
4
|
.SH "NAME"
|
7
5
|
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
|
8
|
-
.
|
9
6
|
.SH "SYNOPSIS"
|
10
7
|
\fBbundle check\fR [\-\-dry\-run] [\-\-gemfile=FILE] [\-\-path=PATH]
|
11
|
-
.
|
12
8
|
.SH "DESCRIPTION"
|
13
9
|
\fBcheck\fR searches the local machine for each of the gems requested in the Gemfile\. If all gems are found, Bundler prints a success message and exits with a status of 0\.
|
14
|
-
.
|
15
10
|
.P
|
16
11
|
If not, the first missing gem is listed and Bundler exits status 1\.
|
17
|
-
.
|
18
12
|
.SH "OPTIONS"
|
19
|
-
.
|
20
13
|
.TP
|
21
14
|
\fB\-\-dry\-run\fR
|
22
15
|
Locks the [\fBGemfile(5)\fR][Gemfile(5)] before running the command\.
|
23
|
-
.
|
24
16
|
.TP
|
25
17
|
\fB\-\-gemfile\fR
|
26
18
|
Use the specified gemfile instead of the [\fBGemfile(5)\fR][Gemfile(5)]\.
|
27
|
-
.
|
28
19
|
.TP
|
29
20
|
\fB\-\-path\fR
|
30
21
|
Specify a different path than the system default (\fB$BUNDLE_PATH\fR or \fB$GEM_HOME\fR)\. Bundler will remember this value for future installs on this machine\.
|
@@ -1,23 +1,16 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.
|
4
|
-
.TH "BUNDLE\-CLEAN" "1" "October 2023" "" ""
|
5
|
-
.
|
1
|
+
.\" generated with nRonn/v0.11.1
|
2
|
+
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
+
.TH "BUNDLE\-CLEAN" "1" "December 2023" ""
|
6
4
|
.SH "NAME"
|
7
5
|
\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
|
8
|
-
.
|
9
6
|
.SH "SYNOPSIS"
|
10
7
|
\fBbundle clean\fR [\-\-dry\-run] [\-\-force]
|
11
|
-
.
|
12
8
|
.SH "DESCRIPTION"
|
13
9
|
This command will remove all unused gems in your bundler directory\. This is useful when you have made many changes to your gem dependencies\.
|
14
|
-
.
|
15
10
|
.SH "OPTIONS"
|
16
|
-
.
|
17
11
|
.TP
|
18
12
|
\fB\-\-dry\-run\fR
|
19
13
|
Print the changes, but do not clean the unused gems\.
|
20
|
-
.
|
21
14
|
.TP
|
22
15
|
\fB\-\-force\fR
|
23
16
|
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\.
|