summaryrefslogtreecommitdiff
path: root/lib/bundler/man
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2022-07-13 12:56:36 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-07-13 14:11:55 +0900
commit437a5ae9d6d60bd1972641167a98204007bd1c0b (patch)
tree79b9ea49442fe896dbd8ef59a8622ea010fb3fb7 /lib/bundler/man
parente3a988a29c2cfa4a7e2e045d82989a7342955be8 (diff)
Merge RubyGems and Bundler master
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6124
Diffstat (limited to 'lib/bundler/man')
-rw-r--r--lib/bundler/man/gemfile.526
-rw-r--r--lib/bundler/man/gemfile.5.ronn18
2 files changed, 41 insertions, 3 deletions
diff --git a/lib/bundler/man/gemfile.5 b/lib/bundler/man/gemfile.5
index eaef7c99be..bf1b8b1c74 100644
--- a/lib/bundler/man/gemfile.5
+++ b/lib/bundler/man/gemfile.5
@@ -331,6 +331,30 @@ gem "nokogiri", platforms: [:mri_18, :jruby]
.P
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\.
.
+.SS "FORCE_RUBY_PLATFORM"
+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:
+.
+.IP "" 4
+.
+.nf
+
+gem "ffi", force_ruby_platform: true
+.
+.fi
+.
+.IP "" 0
+.
+.P
+This can be handy (assuming the pure ruby variant works fine) when:
+.
+.IP "\(bu" 4
+You\'re having issues with the platform specific variant\.
+.
+.IP "\(bu" 4
+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\.
+.
+.IP "" 0
+.
.SS "SOURCE"
You can select an alternate Rubygems repository for a gem using the \':source\' option\.
.
@@ -688,7 +712,7 @@ The \fB\.gemspec\fR \fIhttp://guides\.rubygems\.org/specification\-reference/\fR
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\.
.
.P
-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 (\fB:path => \'\.\'\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\.
+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\.
.
.P
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\.
diff --git a/lib/bundler/man/gemfile.5.ronn b/lib/bundler/man/gemfile.5.ronn
index f94a174b72..e23e1d49df 100644
--- a/lib/bundler/man/gemfile.5.ronn
+++ b/lib/bundler/man/gemfile.5.ronn
@@ -231,6 +231,20 @@ All operations involving groups ([`bundle install`](bundle-install.1.html), `Bun
`Bundler.require`) behave exactly the same as if any groups not
matching the current platform were explicitly excluded.
+### FORCE_RUBY_PLATFORM
+
+If you always want the pure ruby variant of a gem to be chosen over platform
+specific variants, you can use the `force_ruby_platform` option:
+
+ gem "ffi", force_ruby_platform: true
+
+This can be handy (assuming the pure ruby variant works fine) when:
+
+* You're having issues with the platform specific variant.
+* The platform specific variant does not yet support a newer ruby (and thus has
+ a `required_ruby_version` upper bound), but you still want your Gemfile{.lock}
+ files to resolve under that ruby.
+
### SOURCE
You can select an alternate Rubygems repository for a gem using the ':source'
@@ -495,8 +509,8 @@ the `.gemspec` file.
The `gemspec` method adds any runtime dependencies as gem requirements in the
default group. It also adds development dependencies as gem requirements in the
-`development` group. Finally, it adds a gem requirement on your project (`:path
-=> '.'`). In conjunction with `Bundler.setup`, this allows you to require project
+`development` group. Finally, it adds a gem requirement on your project (`path:
+'.'`). In conjunction with `Bundler.setup`, 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.