bundler 2.3.12 → 2.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +367 -1
- data/README.md +2 -2
- data/bundler.gemspec +8 -10
- data/exe/bundle +1 -4
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/cli/add.rb +1 -1
- data/lib/bundler/cli/binstubs.rb +5 -1
- data/lib/bundler/cli/check.rb +1 -1
- data/lib/bundler/cli/common.rb +3 -1
- data/lib/bundler/cli/console.rb +2 -2
- data/lib/bundler/cli/doctor.rb +4 -6
- data/lib/bundler/cli/gem.rb +62 -40
- data/lib/bundler/cli/init.rb +5 -1
- data/lib/bundler/cli/install.rb +7 -5
- data/lib/bundler/cli/lock.rb +8 -5
- data/lib/bundler/cli/open.rb +6 -4
- data/lib/bundler/cli/outdated.rb +13 -6
- data/lib/bundler/cli/platform.rb +1 -1
- data/lib/bundler/cli/viz.rb +1 -1
- data/lib/bundler/cli.rb +52 -7
- data/lib/bundler/compact_index_client/cache.rb +1 -1
- data/lib/bundler/compact_index_client/updater.rb +53 -39
- data/lib/bundler/constants.rb +1 -1
- data/lib/bundler/current_ruby.rb +15 -6
- data/lib/bundler/definition.rb +203 -110
- data/lib/bundler/dependency.rb +21 -84
- data/lib/bundler/digest.rb +1 -1
- data/lib/bundler/dsl.rb +13 -18
- data/lib/bundler/endpoint_specification.rb +6 -10
- data/lib/bundler/env.rb +1 -1
- data/lib/bundler/environment_preserver.rb +1 -0
- data/lib/bundler/errors.rb +15 -15
- data/lib/bundler/feature_flag.rb +0 -1
- data/lib/bundler/fetcher/base.rb +6 -8
- data/lib/bundler/fetcher/compact_index.rb +9 -11
- data/lib/bundler/fetcher/dependency.rb +1 -1
- data/lib/bundler/fetcher/downloader.rb +2 -5
- data/lib/bundler/fetcher.rb +12 -12
- data/lib/bundler/force_platform.rb +18 -0
- data/lib/bundler/friendly_errors.rb +21 -7
- data/lib/bundler/gem_helpers.rb +9 -2
- data/lib/bundler/gem_version_promoter.rb +53 -98
- data/lib/bundler/graph.rb +3 -3
- data/lib/bundler/index.rb +11 -49
- data/lib/bundler/injector.rb +8 -3
- data/lib/bundler/inline.rb +9 -21
- data/lib/bundler/installer/gem_installer.rb +14 -1
- data/lib/bundler/installer/parallel_installer.rb +0 -31
- data/lib/bundler/installer/standalone.rb +41 -10
- data/lib/bundler/installer.rb +18 -39
- data/lib/bundler/lazy_specification.rb +53 -48
- data/lib/bundler/lockfile_generator.rb +1 -1
- data/lib/bundler/lockfile_parser.rb +9 -5
- data/lib/bundler/man/bundle-add.1 +13 -5
- data/lib/bundler/man/bundle-add.1.ronn +10 -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 +26 -7
- data/lib/bundler/man/bundle-config.1.ronn +17 -7
- 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 +6 -6
- data/lib/bundler/man/bundle-exec.1.ronn +6 -6
- data/lib/bundler/man/bundle-gem.1 +27 -37
- data/lib/bundler/man/bundle-gem.1.ronn +5 -5
- 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 +5 -30
- data/lib/bundler/man/bundle-install.1.ronn +6 -29
- 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 +22 -2
- data/lib/bundler/man/bundle-open.1.ronn +9 -1
- data/lib/bundler/man/bundle-outdated.1 +1 -1
- 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 +1 -1
- 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 +92 -81
- data/lib/bundler/man/gemfile.5.ronn +98 -85
- 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/mirror.rb +5 -7
- data/lib/bundler/plugin/api/source.rb +3 -3
- data/lib/bundler/plugin/index.rb +4 -4
- data/lib/bundler/plugin/installer/git.rb +0 -4
- data/lib/bundler/plugin/installer/rubygems.rb +0 -8
- data/lib/bundler/plugin.rb +2 -0
- data/lib/bundler/process_lock.rb +1 -1
- data/lib/bundler/remote_specification.rb +8 -9
- data/lib/bundler/resolver/base.rb +77 -0
- data/lib/bundler/resolver/candidate.rb +94 -0
- data/lib/bundler/resolver/incompatibility.rb +15 -0
- data/lib/bundler/resolver/package.rb +72 -0
- data/lib/bundler/resolver/root.rb +25 -0
- data/lib/bundler/resolver/spec_group.rb +42 -70
- data/lib/bundler/resolver.rb +322 -326
- data/lib/bundler/ruby_dsl.rb +1 -1
- data/lib/bundler/ruby_version.rb +5 -5
- data/lib/bundler/rubygems_ext.rb +102 -12
- data/lib/bundler/rubygems_gem_installer.rb +32 -20
- data/lib/bundler/rubygems_integration.rb +12 -34
- data/lib/bundler/runtime.rb +1 -6
- data/lib/bundler/settings.rb +2 -8
- data/lib/bundler/shared_helpers.rb +7 -7
- data/lib/bundler/source/git/git_proxy.rb +193 -67
- data/lib/bundler/source/git.rb +21 -25
- data/lib/bundler/source/metadata.rb +1 -2
- data/lib/bundler/source/path/installer.rb +1 -22
- data/lib/bundler/source/path.rb +6 -6
- data/lib/bundler/source/rubygems.rb +75 -117
- data/lib/bundler/source.rb +3 -4
- data/lib/bundler/source_list.rb +12 -2
- data/lib/bundler/spec_set.rb +52 -34
- data/lib/bundler/stub_specification.rb +5 -3
- data/lib/bundler/templates/Executable +1 -1
- data/lib/bundler/templates/Executable.bundler +4 -9
- data/lib/bundler/templates/Executable.standalone +2 -0
- data/lib/bundler/templates/newgem/Cargo.toml.tt +7 -0
- data/lib/bundler/templates/newgem/Gemfile.tt +3 -0
- data/lib/bundler/templates/newgem/README.md.tt +6 -4
- data/lib/bundler/templates/newgem/Rakefile.tt +2 -1
- data/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
- data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
- data/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
- data/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +10 -0
- data/lib/bundler/templates/newgem/gitignore.tt +3 -0
- data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +13 -4
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +8 -2
- data/lib/bundler/ui/shell.rb +35 -12
- data/lib/bundler/ui/silent.rb +21 -5
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +3 -3
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +0 -1
- data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +3 -1
- data/lib/bundler/vendor/fileutils/lib/fileutils.rb +1350 -408
- data/lib/bundler/vendor/net-http-persistent/README.rdoc +1 -1
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1 -1
- data/lib/bundler/vendor/pub_grub/LICENSE.txt +21 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +20 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +189 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +182 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +151 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb +43 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +121 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +45 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +19 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +53 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb +105 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb +3 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +128 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +409 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +240 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +178 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
- data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +1 -1
- data/lib/bundler/vendor/uri/lib/uri/common.rb +64 -16
- data/lib/bundler/vendor/uri/lib/uri/file.rb +7 -1
- data/lib/bundler/vendor/uri/lib/uri/ftp.rb +2 -1
- data/lib/bundler/vendor/uri/lib/uri/generic.rb +27 -7
- data/lib/bundler/vendor/uri/lib/uri/http.rb +40 -2
- data/lib/bundler/vendor/uri/lib/uri/https.rb +2 -1
- data/lib/bundler/vendor/uri/lib/uri/ldap.rb +1 -1
- data/lib/bundler/vendor/uri/lib/uri/ldaps.rb +2 -1
- data/lib/bundler/vendor/uri/lib/uri/mailto.rb +2 -2
- data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +13 -7
- data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +10 -5
- data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/bundler/vendor/uri/lib/uri/ws.rb +1 -2
- data/lib/bundler/vendor/uri/lib/uri/wss.rb +2 -1
- data/lib/bundler/vendor/uri/lib/uri.rb +3 -2
- data/lib/bundler/vendored_persistent.rb +1 -33
- data/lib/bundler/{vendored_tmpdir.rb → vendored_pub_grub.rb} +1 -1
- data/lib/bundler/version.rb +5 -1
- data/lib/bundler/worker.rb +5 -7
- data/lib/bundler.rb +35 -69
- metadata +45 -34
- data/lib/bundler/dep_proxy.rb +0 -55
- data/lib/bundler/templates/newgem/travis.yml.tt +0 -6
- data/lib/bundler/vendor/molinillo/LICENSE +0 -9
- data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
- data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +0 -88
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +0 -36
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +0 -66
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +0 -62
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +0 -63
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +0 -61
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +0 -126
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +0 -46
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +0 -36
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +0 -164
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -255
- data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +0 -149
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +0 -6
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +0 -112
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +0 -67
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +0 -839
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +0 -46
- data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +0 -58
- data/lib/bundler/vendor/molinillo/lib/molinillo.rb +0 -11
- data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +0 -154
- data/lib/bundler/vendored_molinillo.rb +0 -4
- data/lib/bundler/version_ranges.rb +0 -122
- /data/lib/bundler/templates/newgem/ext/newgem/{extconf.rb.tt → extconf-c.rb.tt} +0 -0
data/lib/bundler/man/gemfile.5
CHANGED
@@ -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 "GEMFILE" "5" "
|
4
|
+
.TH "GEMFILE" "5" "January 2023" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
|
@@ -15,8 +15,8 @@ Place the \fBGemfile\fR in the root of the directory containing the associated c
|
|
15
15
|
.SH "SYNTAX"
|
16
16
|
A \fBGemfile\fR is evaluated as Ruby code, in a context which makes available a number of methods used to describe the gem requirements\.
|
17
17
|
.
|
18
|
-
.SH "GLOBAL
|
19
|
-
At the top of the \fBGemfile\fR, add a line for the \
|
18
|
+
.SH "GLOBAL SOURCE"
|
19
|
+
At the top of the \fBGemfile\fR, add a single line for the \fBRubyGems\fR source that contains the gems listed in the \fBGemfile\fR\.
|
20
20
|
.
|
21
21
|
.IP "" 4
|
22
22
|
.
|
@@ -29,10 +29,16 @@ source "https://rubygems\.org"
|
|
29
29
|
.IP "" 0
|
30
30
|
.
|
31
31
|
.P
|
32
|
-
|
32
|
+
You can add only one global source\. In Bundler 1\.13, adding multiple global sources was deprecated\. The \fBsource\fR \fBMUST\fR be a valid RubyGems repository\.
|
33
33
|
.
|
34
34
|
.P
|
35
|
-
|
35
|
+
To use more than one source of RubyGems, you should use \fI\fBsource\fR block\fR\.
|
36
|
+
.
|
37
|
+
.P
|
38
|
+
A source is checked for gems following the heuristics described in \fISOURCE PRIORITY\fR\.
|
39
|
+
.
|
40
|
+
.P
|
41
|
+
\fBNote about a behavior of the feature deprecated in Bundler 1\.13\fR: If a gem is found in more than one global source, Bundler will print a warning after installing the gem indicating which source was used, and listing the other sources where the gem is available\. A specific source can be selected for gems that need to use a non\-standard repository, suppressing this warning, by using the \fI\fB:source\fR option\fR or \fBsource\fR block\.
|
36
42
|
.
|
37
43
|
.SS "CREDENTIALS"
|
38
44
|
Some gem sources require a username and password\. Use bundle config(1) \fIbundle\-config\.1\.html\fR to set the username and password for any of the sources that need it\. The command must be run once on each computer that will install the Gemfile, but this keeps the credentials from being stored in plain text in version control\.
|
@@ -67,13 +73,13 @@ Credentials in the source URL will take precedence over credentials set using \f
|
|
67
73
|
If your application requires a specific Ruby version or engine, specify your requirements using the \fBruby\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
|
68
74
|
.
|
69
75
|
.SS "VERSION (required)"
|
70
|
-
The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby,
|
76
|
+
The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby, TruffleRuby, etc\., this should be the Ruby version that the engine is compatible with\.
|
71
77
|
.
|
72
78
|
.IP "" 4
|
73
79
|
.
|
74
80
|
.nf
|
75
81
|
|
76
|
-
ruby "1\.
|
82
|
+
ruby "3\.1\.2"
|
77
83
|
.
|
78
84
|
.fi
|
79
85
|
.
|
@@ -89,7 +95,7 @@ What exactly is an Engine? \- A Ruby engine is an implementation of the Ruby lan
|
|
89
95
|
For background: the reference or original implementation of the Ruby programming language is called Matz\'s Ruby Interpreter \fIhttps://en\.wikipedia\.org/wiki/Ruby_MRI\fR, or MRI for short\. This is named after Ruby creator Yukihiro Matsumoto, also known as Matz\. MRI is also known as CRuby, because it is written in C\. MRI is the most widely used Ruby engine\.
|
90
96
|
.
|
91
97
|
.IP "\(bu" 4
|
92
|
-
Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include
|
98
|
+
Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include JRuby \fIhttp://jruby\.org/\fR and TruffleRuby \fIhttps://www\.graalvm\.org/ruby/\fR\. Rubinius is an alternative implementation of Ruby written in Ruby\. JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine\. TruffleRuby is a Ruby implementation on the GraalVM, a language toolkit built on the JVM\.
|
93
99
|
.
|
94
100
|
.IP "" 0
|
95
101
|
.
|
@@ -100,20 +106,23 @@ Each application \fImay\fR specify a Ruby engine version\. If an engine version
|
|
100
106
|
.
|
101
107
|
.nf
|
102
108
|
|
103
|
-
ruby "
|
109
|
+
ruby "2\.6\.8", engine: "jruby", engine_version: "9\.3\.8\.0"
|
104
110
|
.
|
105
111
|
.fi
|
106
112
|
.
|
107
113
|
.IP "" 0
|
108
114
|
.
|
109
115
|
.SS "PATCHLEVEL"
|
110
|
-
Each application \fImay\fR specify a Ruby patchlevel\.
|
116
|
+
Each application \fImay\fR specify a Ruby patchlevel\. Specifying the patchlevel has been meaningless since Ruby 2\.1\.0 was released as the patchlevel is now uniquely determined by a combination of major, minor, and teeny version numbers\.
|
117
|
+
.
|
118
|
+
.P
|
119
|
+
This option was implemented in Bundler 1\.4\.0 for Ruby 2\.0 or earlier\.
|
111
120
|
.
|
112
121
|
.IP "" 4
|
113
122
|
.
|
114
123
|
.nf
|
115
124
|
|
116
|
-
ruby "
|
125
|
+
ruby "3\.1\.2", patchlevel: "20"
|
117
126
|
.
|
118
127
|
.fi
|
119
128
|
.
|
@@ -156,9 +165,9 @@ Each \fIgem\fR \fBMAY\fR specify files that should be used when autorequiring vi
|
|
156
165
|
.
|
157
166
|
.nf
|
158
167
|
|
159
|
-
gem "redis", :
|
160
|
-
gem "webmock", :
|
161
|
-
gem "byebug", :
|
168
|
+
gem "redis", require: ["redis/connection/hiredis", "redis"]
|
169
|
+
gem "webmock", require: false
|
170
|
+
gem "byebug", require: true
|
162
171
|
.
|
163
172
|
.fi
|
164
173
|
.
|
@@ -172,8 +181,8 @@ The argument defaults to the name of the gem\. For example, these are identical:
|
|
172
181
|
.nf
|
173
182
|
|
174
183
|
gem "nokogiri"
|
175
|
-
gem "nokogiri", :
|
176
|
-
gem "nokogiri", :
|
184
|
+
gem "nokogiri", require: "nokogiri"
|
185
|
+
gem "nokogiri", require: true
|
177
186
|
.
|
178
187
|
.fi
|
179
188
|
.
|
@@ -186,8 +195,8 @@ Each \fIgem\fR \fBMAY\fR specify membership in one or more groups\. Any \fIgem\f
|
|
186
195
|
.
|
187
196
|
.nf
|
188
197
|
|
189
|
-
gem "rspec", :
|
190
|
-
gem "wirble", :
|
198
|
+
gem "rspec", group: :test
|
199
|
+
gem "wirble", groups: [:development, :test]
|
191
200
|
.
|
192
201
|
.fi
|
193
202
|
.
|
@@ -248,19 +257,23 @@ There are a number of \fBGemfile\fR platforms:
|
|
248
257
|
.
|
249
258
|
.TP
|
250
259
|
\fBruby\fR
|
251
|
-
C Ruby (MRI), Rubinius or TruffleRuby, but
|
260
|
+
C Ruby (MRI), Rubinius, or TruffleRuby, but not Windows
|
252
261
|
.
|
253
262
|
.TP
|
254
263
|
\fBmri\fR
|
255
|
-
|
264
|
+
C Ruby (MRI) only, but not Windows
|
265
|
+
.
|
266
|
+
.TP
|
267
|
+
\fBwindows\fR
|
268
|
+
Windows C Ruby (MRI), including RubyInstaller 32\-bit and 64\-bit versions
|
256
269
|
.
|
257
270
|
.TP
|
258
|
-
\
|
259
|
-
Windows
|
271
|
+
\fBmswin\fR
|
272
|
+
Windows C Ruby (MRI), including RubyInstaller 32\-bit versions
|
260
273
|
.
|
261
274
|
.TP
|
262
|
-
\
|
263
|
-
Windows
|
275
|
+
\fBmswin64\fR
|
276
|
+
Windows C Ruby (MRI), including RubyInstaller 64\-bit versions
|
264
277
|
.
|
265
278
|
.TP
|
266
279
|
\fBrbx\fR
|
@@ -274,84 +287,82 @@ JRuby
|
|
274
287
|
\fBtruffleruby\fR
|
275
288
|
TruffleRuby
|
276
289
|
.
|
277
|
-
.TP
|
278
|
-
\fBmswin\fR
|
279
|
-
Windows
|
280
|
-
.
|
281
|
-
.P
|
282
|
-
You can restrict further by platform and version for all platforms \fIexcept\fR for \fBrbx\fR, \fBjruby\fR, \fBtruffleruby\fR and \fBmswin\fR\.
|
283
|
-
.
|
284
290
|
.P
|
285
|
-
|
291
|
+
On platforms \fBruby\fR, \fBmri\fR, \fBmswin\fR, \fBmswin64\fR, and \fBwindows\fR, you may additionally specify a version by appending the major and minor version numbers without a delimiter\. For example, to specify that a gem should only be used on platform \fBruby\fR version 3\.1, use:
|
286
292
|
.
|
287
293
|
.IP "" 4
|
288
294
|
.
|
289
295
|
.nf
|
290
296
|
|
291
|
-
|
297
|
+
ruby_31
|
292
298
|
.
|
293
299
|
.fi
|
294
300
|
.
|
295
301
|
.IP "" 0
|
296
302
|
.
|
297
303
|
.P
|
298
|
-
|
304
|
+
As with groups (above), you may specify one or more platforms:
|
299
305
|
.
|
300
|
-
.
|
301
|
-
\fBruby\fR
|
302
|
-
1\.8, 1\.9, 2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
|
306
|
+
.IP "" 4
|
303
307
|
.
|
304
|
-
.
|
305
|
-
|
306
|
-
|
308
|
+
.nf
|
309
|
+
|
310
|
+
gem "weakling", platforms: :jruby
|
311
|
+
gem "ruby\-debug", platforms: :mri_31
|
312
|
+
gem "nokogiri", platforms: [:windows_31, :jruby]
|
307
313
|
.
|
308
|
-
.
|
309
|
-
\fBmingw\fR
|
310
|
-
1\.8, 1\.9, 2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
|
314
|
+
.fi
|
311
315
|
.
|
312
|
-
.
|
313
|
-
\fBx64_mingw\fR
|
314
|
-
2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
|
316
|
+
.IP "" 0
|
315
317
|
.
|
316
318
|
.P
|
317
|
-
|
319
|
+
All operations involving groups (\fBbundle install\fR \fIbundle\-install\.1\.html\fR, \fBBundler\.setup\fR, \fBBundler\.require\fR) behave exactly the same as if any groups not matching the current platform were explicitly excluded\.
|
320
|
+
.
|
321
|
+
.SS "FORCE_RUBY_PLATFORM"
|
322
|
+
If you always want the pure ruby variant of a gem to be chosen over platform specific variants, you can use the \fBforce_ruby_platform\fR option:
|
318
323
|
.
|
319
324
|
.IP "" 4
|
320
325
|
.
|
321
326
|
.nf
|
322
327
|
|
323
|
-
gem "
|
324
|
-
gem "ruby\-debug", :platforms => :mri_18
|
325
|
-
gem "nokogiri", :platforms => [:mri_18, :jruby]
|
328
|
+
gem "ffi", force_ruby_platform: true
|
326
329
|
.
|
327
330
|
.fi
|
328
331
|
.
|
329
332
|
.IP "" 0
|
330
333
|
.
|
331
334
|
.P
|
332
|
-
|
335
|
+
This can be handy (assuming the pure ruby variant works fine) when:
|
336
|
+
.
|
337
|
+
.IP "\(bu" 4
|
338
|
+
You\'re having issues with the platform specific variant\.
|
339
|
+
.
|
340
|
+
.IP "\(bu" 4
|
341
|
+
The platform specific variant does not yet support a newer ruby (and thus has a \fBrequired_ruby_version\fR upper bound), but you still want your Gemfile{\.lock} files to resolve under that ruby\.
|
342
|
+
.
|
343
|
+
.IP "" 0
|
333
344
|
.
|
334
345
|
.SS "SOURCE"
|
335
|
-
You can select an alternate
|
346
|
+
You can select an alternate RubyGems repository for a gem using the \':source\' option\.
|
336
347
|
.
|
337
348
|
.IP "" 4
|
338
349
|
.
|
339
350
|
.nf
|
340
351
|
|
341
|
-
gem "some_internal_gem", :
|
352
|
+
gem "some_internal_gem", source: "https://gems\.example\.com"
|
342
353
|
.
|
343
354
|
.fi
|
344
355
|
.
|
345
356
|
.IP "" 0
|
346
357
|
.
|
347
358
|
.P
|
348
|
-
This forces the gem to be loaded from this source and ignores
|
359
|
+
This forces the gem to be loaded from this source and ignores the global source declared at the top level of the file\. If the gem does not exist in this source, it will not be installed\.
|
349
360
|
.
|
350
361
|
.P
|
351
|
-
Bundler will search for child dependencies of this gem by first looking in the source selected for the parent, but if they are not found there, it will fall back on
|
362
|
+
Bundler will search for child dependencies of this gem by first looking in the source selected for the parent, but if they are not found there, it will fall back on the global source\.
|
352
363
|
.
|
353
364
|
.P
|
354
|
-
Selecting a specific source repository this way also suppresses the ambiguous gem warning described above in \fIGLOBAL
|
365
|
+
\fBNote about a behavior of the feature deprecated in Bundler 1\.13\fR: Selecting a specific source repository this way also suppresses the ambiguous gem warning described above in \fIGLOBAL SOURCE\fR\.
|
355
366
|
.
|
356
367
|
.P
|
357
368
|
Using the \fB:source\fR option for an individual gem will also make that source available as a possible global source for any other gems which do not specify explicit sources\. Thus, when adding gems with explicit sources, it is recommended that you also ensure all other gems in the Gemfile are using explicit sources\.
|
@@ -361,15 +372,15 @@ If necessary, you can specify that a gem is located at a particular git reposito
|
|
361
372
|
.
|
362
373
|
.TP
|
363
374
|
\fBHTTP(S)\fR
|
364
|
-
gem "rails", :
|
375
|
+
gem "rails", git: "https://github\.com/rails/rails\.git"
|
365
376
|
.
|
366
377
|
.TP
|
367
378
|
\fBSSH\fR
|
368
|
-
gem "rails", :
|
379
|
+
gem "rails", git: "git@github\.com:rails/rails\.git"
|
369
380
|
.
|
370
381
|
.TP
|
371
382
|
\fBgit\fR
|
372
|
-
gem "rails", :
|
383
|
+
gem "rails", git: "git://github\.com/rails/rails\.git"
|
373
384
|
.
|
374
385
|
.P
|
375
386
|
If using SSH, the user that you use to run \fBbundle install\fR \fBMUST\fR have the appropriate keys available in their \fB$HOME/\.ssh\fR\.
|
@@ -393,7 +404,7 @@ If a git repository does have a \fB\.gemspec\fR for the gem you attached it to,
|
|
393
404
|
.
|
394
405
|
.nf
|
395
406
|
|
396
|
-
gem "rails", "2\.3\.8", :
|
407
|
+
gem "rails", "2\.3\.8", git: "https://github\.com/rails/rails\.git"
|
397
408
|
# bundle install will fail, because the \.gemspec in the rails
|
398
409
|
# repository\'s master branch specifies version 3\.0\.0
|
399
410
|
.
|
@@ -409,20 +420,20 @@ Git repositories support a number of additional options\.
|
|
409
420
|
.
|
410
421
|
.TP
|
411
422
|
\fBbranch\fR, \fBtag\fR, and \fBref\fR
|
412
|
-
You \fBMUST\fR only specify at most one of these options\. The default is \
|
423
|
+
You \fBMUST\fR only specify at most one of these options\. The default is \fBbranch: "master"\fR\. For example:
|
413
424
|
.
|
414
425
|
.IP
|
415
|
-
gem "rails", :
|
426
|
+
gem "rails", git: "https://github\.com/rails/rails\.git", branch: "5\-0\-stable"
|
416
427
|
.
|
417
428
|
.IP
|
418
|
-
gem "rails", :
|
429
|
+
gem "rails", git: "https://github\.com/rails/rails\.git", tag: "v5\.0\.0"
|
419
430
|
.
|
420
431
|
.IP
|
421
|
-
gem "rails", :
|
432
|
+
gem "rails", git: "https://github\.com/rails/rails\.git", ref: "4aded"
|
422
433
|
.
|
423
434
|
.TP
|
424
435
|
\fBsubmodules\fR
|
425
|
-
For reference, a git submodule \fIhttps://git\-scm\.com/book/en/v2/Git\-Tools\-Submodules\fR lets you have another git repository within a subfolder of your repository\. Specify \
|
436
|
+
For reference, a git submodule \fIhttps://git\-scm\.com/book/en/v2/Git\-Tools\-Submodules\fR lets you have another git repository within a subfolder of your repository\. Specify \fBsubmodules: true\fR to cause bundler to expand any submodules included in the git repository
|
426
437
|
.
|
427
438
|
.P
|
428
439
|
If a git repository contains multiple \fB\.gemspecs\fR, each \fB\.gemspec\fR represents a gem located at the same place in the file system as the \fB\.gemspec\fR\.
|
@@ -454,7 +465,7 @@ A custom git source can be defined via the \fBgit_source\fR method\. Provide the
|
|
454
465
|
.nf
|
455
466
|
|
456
467
|
git_source(:stash){ |repo_name| "https://stash\.corp\.acme\.pl/#{repo_name}\.git" }
|
457
|
-
gem \'rails\', :
|
468
|
+
gem \'rails\', stash: \'forks/rails\'
|
458
469
|
.
|
459
470
|
.fi
|
460
471
|
.
|
@@ -467,7 +478,7 @@ In addition, if you wish to choose a specific branch:
|
|
467
478
|
.
|
468
479
|
.nf
|
469
480
|
|
470
|
-
gem "rails", :
|
481
|
+
gem "rails", stash: "forks/rails", branch: "branch_name"
|
471
482
|
.
|
472
483
|
.fi
|
473
484
|
.
|
@@ -483,8 +494,8 @@ If the git repository you want to use is hosted on GitHub and is public, you can
|
|
483
494
|
.
|
484
495
|
.nf
|
485
496
|
|
486
|
-
gem "rails", :
|
487
|
-
gem "rails", :
|
497
|
+
gem "rails", github: "rails/rails"
|
498
|
+
gem "rails", github: "rails"
|
488
499
|
.
|
489
500
|
.fi
|
490
501
|
.
|
@@ -497,7 +508,7 @@ Are both equivalent to
|
|
497
508
|
.
|
498
509
|
.nf
|
499
510
|
|
500
|
-
gem "rails", :
|
511
|
+
gem "rails", git: "https://github\.com/rails/rails\.git"
|
501
512
|
.
|
502
513
|
.fi
|
503
514
|
.
|
@@ -513,7 +524,7 @@ You can also directly pass a pull request URL:
|
|
513
524
|
.
|
514
525
|
.nf
|
515
526
|
|
516
|
-
gem "rails", :
|
527
|
+
gem "rails", github: "https://github\.com/rails/rails/pull/43753"
|
517
528
|
.
|
518
529
|
.fi
|
519
530
|
.
|
@@ -526,7 +537,7 @@ Which is equivalent to:
|
|
526
537
|
.
|
527
538
|
.nf
|
528
539
|
|
529
|
-
gem "rails", :
|
540
|
+
gem "rails", github: "rails/rails", branch: "refs/pull/43753/head"
|
530
541
|
.
|
531
542
|
.fi
|
532
543
|
.
|
@@ -539,7 +550,7 @@ If the git repository you want to use is hosted as a GitHub Gist and is public,
|
|
539
550
|
.
|
540
551
|
.nf
|
541
552
|
|
542
|
-
gem "the_hatch", :
|
553
|
+
gem "the_hatch", gist: "4815162342"
|
543
554
|
.
|
544
555
|
.fi
|
545
556
|
.
|
@@ -552,7 +563,7 @@ Is equivalent to:
|
|
552
563
|
.
|
553
564
|
.nf
|
554
565
|
|
555
|
-
gem "the_hatch", :
|
566
|
+
gem "the_hatch", git: "https://gist\.github\.com/4815162342\.git"
|
556
567
|
.
|
557
568
|
.fi
|
558
569
|
.
|
@@ -568,8 +579,8 @@ If the git repository you want to use is hosted on Bitbucket and is public, you
|
|
568
579
|
.
|
569
580
|
.nf
|
570
581
|
|
571
|
-
gem "rails", :
|
572
|
-
gem "rails", :
|
582
|
+
gem "rails", bitbucket: "rails/rails"
|
583
|
+
gem "rails", bitbucket: "rails"
|
573
584
|
.
|
574
585
|
.fi
|
575
586
|
.
|
@@ -582,7 +593,7 @@ Are both equivalent to
|
|
582
593
|
.
|
583
594
|
.nf
|
584
595
|
|
585
|
-
gem "rails", :
|
596
|
+
gem "rails", git: "https://rails@bitbucket\.org/rails/rails\.git"
|
586
597
|
.
|
587
598
|
.fi
|
588
599
|
.
|
@@ -604,7 +615,7 @@ Unlike \fB:git\fR, bundler does not compile C extensions for gems specified as p
|
|
604
615
|
.
|
605
616
|
.nf
|
606
617
|
|
607
|
-
gem "rails", :
|
618
|
+
gem "rails", path: "vendor/rails"
|
608
619
|
.
|
609
620
|
.fi
|
610
621
|
.
|
@@ -648,7 +659,7 @@ platforms :ruby do
|
|
648
659
|
gem "sqlite3"
|
649
660
|
end
|
650
661
|
|
651
|
-
group :development, :
|
662
|
+
group :development, optional: true do
|
652
663
|
gem "wirble"
|
653
664
|
gem "faker"
|
654
665
|
end
|
@@ -688,7 +699,7 @@ The \fB\.gemspec\fR \fIhttp://guides\.rubygems\.org/specification\-reference/\fR
|
|
688
699
|
If you wish to use Bundler to help install dependencies for a gem while it is being developed, use the \fBgemspec\fR method to pull in the dependencies listed in the \fB\.gemspec\fR file\.
|
689
700
|
.
|
690
701
|
.P
|
691
|
-
The \fBgemspec\fR method adds any runtime dependencies as gem requirements in the default group\. It also adds development dependencies as gem requirements in the \fBdevelopment\fR group\. Finally, it adds a gem requirement on your project (\
|
702
|
+
The \fBgemspec\fR method adds any runtime dependencies as gem requirements in the default group\. It also adds development dependencies as gem requirements in the \fBdevelopment\fR group\. Finally, it adds a gem requirement on your project (\fBpath: \'\.\'\fR)\. In conjunction with \fBBundler\.setup\fR, this allows you to require project files in your test code as you would if the project were installed as a gem; you need not manipulate the load path manually or require project files via relative paths\.
|
692
703
|
.
|
693
704
|
.P
|
694
705
|
The \fBgemspec\fR method supports optional \fB:path\fR, \fB:glob\fR, \fB:name\fR, and \fB:development_group\fR options, which control where bundler looks for the \fB\.gemspec\fR, the glob it uses to look for the gemspec (defaults to: "{,\fI,\fR/*}\.gemspec"), what named \fB\.gemspec\fR it uses (if more than one is present), and which group development dependencies are included in\.
|
@@ -706,7 +717,7 @@ The source explicitly attached to the gem (using \fB:source\fR, \fB:path\fR, or
|
|
706
717
|
For implicit gems (dependencies of explicit gems), any source, git, or path repository declared on the parent\. This results in bundler prioritizing the ActiveSupport gem from the Rails git repository over ones from \fBrubygems\.org\fR
|
707
718
|
.
|
708
719
|
.IP "3." 4
|
709
|
-
|
720
|
+
If neither of the above conditions are met, the global source will be used\. If multiple global sources are specified, they will be prioritized from last to first, but this is deprecated since Bundler 1\.13, so Bundler prints a warning and will abort with an error in the future\.
|
710
721
|
.
|
711
722
|
.IP "" 0
|
712
723
|
|