bundler 1.15.1 → 1.17.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bundler might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/CHANGELOG.md +320 -0
- data/README.md +17 -8
- data/bundler.gemspec +25 -9
- data/exe/bundle +1 -6
- data/exe/bundle_ruby +4 -3
- data/lib/bundler/build_metadata.rb +53 -0
- data/lib/bundler/capistrano.rb +5 -0
- data/lib/bundler/cli/add.rb +15 -6
- data/lib/bundler/cli/binstubs.rb +17 -9
- data/lib/bundler/cli/cache.rb +5 -4
- data/lib/bundler/cli/check.rb +3 -5
- data/lib/bundler/cli/clean.rb +5 -6
- data/lib/bundler/cli/common.rb +11 -2
- data/lib/bundler/cli/config.rb +2 -1
- data/lib/bundler/cli/console.rb +2 -1
- data/lib/bundler/cli/doctor.rb +48 -1
- data/lib/bundler/cli/exec.rb +6 -5
- data/lib/bundler/cli/gem.rb +13 -8
- data/lib/bundler/cli/info.rb +0 -1
- data/lib/bundler/cli/init.rb +18 -6
- data/lib/bundler/cli/inject.rb +1 -0
- data/lib/bundler/cli/install.rb +64 -77
- data/lib/bundler/cli/issue.rb +1 -1
- data/lib/bundler/cli/list.rb +58 -0
- data/lib/bundler/cli/lock.rb +0 -1
- data/lib/bundler/cli/open.rb +2 -2
- data/lib/bundler/cli/outdated.rb +20 -9
- data/lib/bundler/cli/package.rb +9 -6
- data/lib/bundler/cli/platform.rb +1 -0
- data/lib/bundler/cli/plugin.rb +1 -0
- data/lib/bundler/cli/pristine.rb +20 -6
- data/lib/bundler/cli/remove.rb +18 -0
- data/lib/bundler/cli/show.rb +0 -1
- data/lib/bundler/cli/update.rb +35 -7
- data/lib/bundler/cli/viz.rb +4 -0
- data/lib/bundler/cli.rb +234 -90
- data/lib/bundler/compact_index_client/cache.rb +1 -2
- data/lib/bundler/compact_index_client/updater.rb +35 -7
- data/lib/bundler/compact_index_client.rb +1 -0
- data/lib/bundler/compatibility_guard.rb +14 -0
- data/lib/bundler/constants.rb +1 -0
- data/lib/bundler/current_ruby.rb +13 -5
- data/lib/bundler/definition.rb +192 -139
- data/lib/bundler/dep_proxy.rb +3 -1
- data/lib/bundler/dependency.rb +9 -9
- data/lib/bundler/deployment.rb +1 -1
- data/lib/bundler/deprecate.rb +15 -3
- data/lib/bundler/dsl.rb +115 -64
- data/lib/bundler/endpoint_specification.rb +10 -1
- data/lib/bundler/env.rb +90 -29
- data/lib/bundler/environment_preserver.rb +27 -6
- data/lib/bundler/errors.rb +1 -0
- data/lib/bundler/feature_flag.rb +46 -4
- data/lib/bundler/fetcher/base.rb +1 -0
- data/lib/bundler/fetcher/compact_index.rb +2 -11
- data/lib/bundler/fetcher/dependency.rb +2 -1
- data/lib/bundler/fetcher/downloader.rb +11 -5
- data/lib/bundler/fetcher/index.rb +3 -2
- data/lib/bundler/fetcher.rb +18 -11
- data/lib/bundler/friendly_errors.rb +6 -1
- data/lib/bundler/gem_helper.rb +19 -10
- data/lib/bundler/gem_helpers.rb +1 -0
- data/lib/bundler/gem_remote_fetcher.rb +1 -0
- data/lib/bundler/gem_tasks.rb +1 -0
- data/lib/bundler/gem_version_promoter.rb +17 -2
- data/lib/bundler/gemdeps.rb +1 -0
- data/lib/bundler/graph.rb +1 -0
- data/lib/bundler/index.rb +8 -8
- data/lib/bundler/injector.rb +192 -30
- data/lib/bundler/inline.rb +10 -10
- data/lib/bundler/installer/gem_installer.rb +12 -2
- data/lib/bundler/installer/parallel_installer.rb +78 -42
- data/lib/bundler/installer/standalone.rb +1 -0
- data/lib/bundler/installer.rb +138 -53
- data/lib/bundler/lazy_specification.rb +3 -2
- data/lib/bundler/lockfile_generator.rb +95 -0
- data/lib/bundler/lockfile_parser.rb +10 -4
- data/lib/bundler/match_platform.rb +1 -0
- data/lib/bundler/mirror.rb +8 -5
- data/lib/bundler/plugin/api/source.rb +9 -2
- data/lib/bundler/plugin/events.rb +61 -0
- data/lib/bundler/plugin/index.rb +7 -2
- data/lib/bundler/plugin/installer.rb +7 -6
- data/lib/bundler/plugin/source_list.rb +7 -8
- data/lib/bundler/plugin.rb +13 -5
- data/lib/bundler/process_lock.rb +24 -0
- data/lib/bundler/psyched_yaml.rb +10 -0
- data/lib/bundler/remote_specification.rb +10 -1
- data/lib/bundler/resolver/spec_group.rb +106 -0
- data/lib/bundler/resolver.rb +158 -195
- data/lib/bundler/retry.rb +1 -0
- data/lib/bundler/ruby_dsl.rb +1 -0
- data/lib/bundler/ruby_version.rb +2 -1
- data/lib/bundler/rubygems_ext.rb +5 -4
- data/lib/bundler/rubygems_gem_installer.rb +31 -1
- data/lib/bundler/rubygems_integration.rb +71 -32
- data/lib/bundler/runtime.rb +11 -9
- data/lib/bundler/settings/validator.rb +102 -0
- data/lib/bundler/settings.rb +213 -86
- data/lib/bundler/setup.rb +4 -7
- data/lib/bundler/shared_helpers.rb +131 -26
- data/lib/bundler/similarity_detector.rb +1 -0
- data/lib/bundler/source/gemspec.rb +1 -0
- data/lib/bundler/source/git/git_proxy.rb +21 -11
- data/lib/bundler/source/git.rb +24 -19
- data/lib/bundler/source/metadata.rb +62 -0
- data/lib/bundler/source/path/installer.rb +2 -0
- data/lib/bundler/source/path.rb +11 -7
- data/lib/bundler/source/rubygems/remote.rb +8 -2
- data/lib/bundler/source/rubygems.rb +161 -84
- data/lib/bundler/source.rb +36 -0
- data/lib/bundler/source_list.rb +75 -15
- data/lib/bundler/spec_set.rb +12 -6
- data/lib/bundler/ssl_certs/certificate_manager.rb +2 -1
- data/lib/bundler/stub_specification.rb +1 -0
- data/lib/bundler/templates/.document +1 -0
- data/lib/bundler/templates/Executable +12 -0
- data/lib/bundler/templates/Executable.bundler +105 -0
- data/lib/bundler/templates/Gemfile +3 -0
- data/lib/bundler/templates/gems.rb +8 -0
- data/lib/bundler/templates/newgem/Gemfile.tt +2 -0
- data/lib/bundler/templates/newgem/README.md.tt +1 -1
- data/lib/bundler/templates/newgem/gitignore.tt +0 -1
- data/lib/bundler/templates/newgem/lib/newgem.rb.tt +1 -0
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +12 -3
- data/lib/bundler/templates/newgem/rspec.tt +1 -0
- data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +0 -2
- data/lib/bundler/templates/newgem/{.travis.yml.tt → travis.yml.tt} +2 -0
- data/lib/bundler/ui/rg_proxy.rb +1 -0
- data/lib/bundler/ui/shell.rb +17 -4
- data/lib/bundler/ui/silent.rb +1 -0
- data/lib/bundler/ui.rb +1 -0
- data/lib/bundler/uri_credentials_filter.rb +1 -0
- data/lib/bundler/vendor/fileutils/lib/fileutils.rb +1638 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb +26 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +7 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +1 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +1 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +1 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +1 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +1 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +1 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +1 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +1 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +1 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +15 -4
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +3 -2
- data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +75 -7
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +2 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +1 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +3 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +491 -148
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +1 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +8 -4
- data/lib/bundler/vendor/molinillo/lib/molinillo.rb +2 -0
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +3 -1
- data/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +1 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +1 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +9 -1
- data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +45 -8
- data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +9 -3
- data/lib/bundler/vendor/thor/lib/thor/actions.rb +6 -3
- data/lib/bundler/vendor/thor/lib/thor/base.rb +27 -4
- data/lib/bundler/vendor/thor/lib/thor/command.rb +9 -7
- data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +12 -0
- data/lib/bundler/vendor/thor/lib/thor/group.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +2 -0
- data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +5 -5
- data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +6 -5
- data/lib/bundler/vendor/thor/lib/thor/runner.rb +6 -4
- data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +10 -9
- data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor.rb +25 -8
- data/lib/bundler/vendored_fileutils.rb +9 -0
- data/lib/bundler/vendored_molinillo.rb +1 -0
- data/lib/bundler/vendored_persistent.rb +35 -0
- data/lib/bundler/vendored_thor.rb +1 -0
- data/lib/bundler/version.rb +6 -2
- data/lib/bundler/version_ranges.rb +1 -0
- data/lib/bundler/vlad.rb +5 -0
- data/lib/bundler/worker.rb +1 -0
- data/lib/bundler/yaml_serializer.rb +3 -3
- data/lib/bundler.rb +86 -52
- data/man/bundle-add.1 +18 -3
- data/man/bundle-add.1.txt +26 -14
- data/man/bundle-add.ronn +13 -2
- data/man/bundle-binstubs.1 +11 -1
- data/man/bundle-binstubs.1.txt +33 -18
- data/man/bundle-binstubs.ronn +15 -1
- data/man/bundle-check.1 +4 -4
- data/man/bundle-check.1.txt +15 -14
- data/man/bundle-check.ronn +3 -3
- data/man/bundle-clean.1 +1 -1
- data/man/bundle-clean.1.txt +10 -10
- data/man/bundle-config.1 +129 -29
- data/man/bundle-config.1.txt +285 -174
- data/man/bundle-config.ronn +167 -88
- data/man/bundle-doctor.1 +44 -0
- data/man/bundle-doctor.1.txt +44 -0
- data/man/bundle-doctor.ronn +33 -0
- data/man/bundle-exec.1 +6 -3
- data/man/bundle-exec.1.txt +78 -71
- data/man/bundle-exec.ronn +10 -3
- data/man/bundle-gem.1 +4 -4
- data/man/bundle-gem.1.txt +41 -40
- data/man/bundle-gem.ronn +3 -2
- data/man/bundle-info.1 +1 -1
- data/man/bundle-info.1.txt +8 -8
- data/man/bundle-init.1 +9 -4
- data/man/bundle-init.1.txt +23 -13
- data/man/bundle-init.ronn +15 -4
- data/man/bundle-inject.1 +4 -4
- data/man/bundle-inject.1.txt +10 -10
- data/man/bundle-inject.ronn +3 -3
- data/man/bundle-install.1 +31 -28
- data/man/bundle-install.1.txt +205 -194
- data/man/bundle-install.ronn +44 -35
- data/man/bundle-list.1 +50 -0
- data/man/bundle-list.1.txt +43 -0
- data/man/bundle-list.ronn +33 -0
- data/man/bundle-lock.1 +1 -1
- data/man/bundle-lock.1.txt +47 -47
- data/man/bundle-lock.ronn +1 -1
- data/man/bundle-open.1 +1 -1
- data/man/bundle-open.1.txt +7 -7
- data/man/bundle-outdated.1 +7 -3
- data/man/bundle-outdated.1.txt +40 -36
- data/man/bundle-outdated.ronn +6 -2
- data/man/bundle-package.1 +6 -3
- data/man/bundle-package.1.txt +44 -39
- data/man/bundle-package.ronn +7 -2
- data/man/bundle-platform.1 +1 -1
- data/man/bundle-platform.1.txt +13 -13
- data/man/bundle-pristine.1 +21 -3
- data/man/bundle-pristine.1.txt +33 -10
- data/man/bundle-pristine.ronn +24 -3
- data/man/bundle-remove.1 +31 -0
- data/man/bundle-remove.1.txt +34 -0
- data/man/bundle-remove.ronn +23 -0
- data/man/bundle-show.1 +3 -3
- data/man/bundle-show.1.txt +14 -12
- data/man/bundle-show.ronn +3 -2
- data/man/bundle-update.1 +13 -9
- data/man/bundle-update.1.txt +133 -130
- data/man/bundle-update.ronn +21 -17
- data/man/bundle-viz.1 +7 -7
- data/man/bundle-viz.1.txt +17 -15
- data/man/bundle-viz.ronn +6 -6
- data/man/bundle.1 +31 -32
- data/man/bundle.1.txt +63 -75
- data/man/bundle.ronn +35 -47
- data/man/gemfile.5 +44 -8
- data/man/gemfile.5.ronn +54 -8
- data/man/gemfile.5.txt +218 -165
- data/man/index.txt +25 -15
- metadata +36 -44
- data/.codeclimate.yml +0 -25
- data/.gitignore +0 -18
- data/.rspec +0 -3
- data/.rubocop.yml +0 -131
- data/.rubocop_todo.yml +0 -418
- data/.travis.yml +0 -122
- data/CODE_OF_CONDUCT.md +0 -42
- data/CONTRIBUTING.md +0 -17
- data/Rakefile +0 -346
- data/bin/rake +0 -19
- data/bin/rspec +0 -15
- data/bin/rubocop +0 -17
- data/bin/with_rubygems +0 -39
- data/doc/README.md +0 -30
- data/doc/TROUBLESHOOTING.md +0 -64
- data/doc/contributing/BUG_TRIAGE.md +0 -36
- data/doc/contributing/COMMUNITY.md +0 -13
- data/doc/contributing/GETTING_HELP.md +0 -11
- data/doc/contributing/HOW_YOU_CAN_HELP.md +0 -27
- data/doc/contributing/ISSUES.md +0 -51
- data/doc/contributing/README.md +0 -38
- data/doc/development/NEW_FEATURES.md +0 -10
- data/doc/development/PULL_REQUESTS.md +0 -40
- data/doc/development/README.md +0 -19
- data/doc/development/RELEASING.md +0 -9
- data/doc/development/SETUP.md +0 -29
- data/doc/documentation/README.md +0 -29
- data/doc/documentation/VISION.md +0 -26
- data/doc/documentation/WRITING.md +0 -54
- data/lib/bundler/postit_trampoline.rb +0 -73
- data/lib/bundler/vendor/postit/lib/postit/environment.rb +0 -44
- data/lib/bundler/vendor/postit/lib/postit/installer.rb +0 -28
- data/lib/bundler/vendor/postit/lib/postit/parser.rb +0 -21
- data/lib/bundler/vendor/postit/lib/postit/setup.rb +0 -12
- data/lib/bundler/vendor/postit/lib/postit/version.rb +0 -3
- data/lib/bundler/vendor/postit/lib/postit.rb +0 -15
- data/task/release.rake +0 -116
data/man/gemfile.5.txt
CHANGED
@@ -2,24 +2,24 @@ GEMFILE(5) GEMFILE(5)
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
NAME
|
6
|
+
Gemfile - A format for describing gem dependencies for Ruby programs
|
7
7
|
|
8
|
-
|
9
|
-
A
|
8
|
+
SYNOPSIS
|
9
|
+
A Gemfile describes the gem dependencies required to execute associated
|
10
10
|
Ruby code.
|
11
11
|
|
12
|
-
Place the
|
13
|
-
ated code. For instance, in a Rails application, place the
|
14
|
-
the same directory as the
|
12
|
+
Place the Gemfile in the root of the directory containing the associ-
|
13
|
+
ated code. For instance, in a Rails application, place the Gemfile in
|
14
|
+
the same directory as the Rakefile.
|
15
15
|
|
16
|
-
|
17
|
-
A
|
16
|
+
SYNTAX
|
17
|
+
A Gemfile is evaluated as Ruby code, in a context which makes available
|
18
18
|
a number of methods used to describe the gem requirements.
|
19
19
|
|
20
|
-
|
21
|
-
At the top of the
|
22
|
-
tains the gems listed in the
|
20
|
+
GLOBAL SOURCES
|
21
|
+
At the top of the Gemfile, add a line for the Rubygems source that con-
|
22
|
+
tains the gems listed in the Gemfile.
|
23
23
|
|
24
24
|
|
25
25
|
|
@@ -28,20 +28,20 @@ GEMFILE(5) GEMFILE(5)
|
|
28
28
|
|
29
29
|
|
30
30
|
It is possible, but not recommended as of Bundler 1.7, to add multiple
|
31
|
-
global
|
31
|
+
global source lines. Each of these sources MUST be a valid Rubygems
|
32
32
|
repository.
|
33
33
|
|
34
34
|
Sources are checked for gems following the heuristics described in
|
35
|
-
|
35
|
+
SOURCE PRIORITY. If a gem is found in more than one global source,
|
36
36
|
Bundler will print a warning after installing the gem indicating which
|
37
37
|
source was used, and listing the other sources where the gem is avail-
|
38
38
|
able. A specific source can be selected for gems that need to use a
|
39
|
-
non-standard repository, suppressing this warning, by using the
|
40
|
-
option or a
|
39
|
+
non-standard repository, suppressing this warning, by using the :source
|
40
|
+
option or a source block.
|
41
41
|
|
42
|
-
|
42
|
+
CREDENTIALS
|
43
43
|
Some gem sources require a username and password. Use bundle config(1)
|
44
|
-
|
44
|
+
bundle-config.1.html to set the username and password for any of the
|
45
45
|
sources that need it. The command must be run once on each computer
|
46
46
|
that will install the Gemfile, but this keeps the credentials from
|
47
47
|
being stored in plain text in version control.
|
@@ -62,17 +62,18 @@ GEMFILE(5) GEMFILE(5)
|
|
62
62
|
|
63
63
|
|
64
64
|
Credentials in the source URL will take precedence over credentials set
|
65
|
-
using
|
65
|
+
using config.
|
66
66
|
|
67
|
-
|
67
|
+
RUBY
|
68
68
|
If your application requires a specific Ruby version or engine, specify
|
69
|
-
your requirements using the
|
70
|
-
All parameters are
|
69
|
+
your requirements using the ruby method, with the following arguments.
|
70
|
+
All parameters are OPTIONAL unless otherwise specified.
|
71
71
|
|
72
|
-
|
72
|
+
VERSION (required)
|
73
73
|
The version of Ruby that your application requires. If your application
|
74
|
-
requires an alternate Ruby engine,
|
75
|
-
should be the Ruby version that the engine is
|
74
|
+
requires an alternate Ruby engine, such as JRuby, Rubinius or Truf-
|
75
|
+
fleRuby, this should be the Ruby version that the engine is compatible
|
76
|
+
with.
|
76
77
|
|
77
78
|
|
78
79
|
|
@@ -80,14 +81,32 @@ GEMFILE(5) GEMFILE(5)
|
|
80
81
|
|
81
82
|
|
82
83
|
|
83
|
-
|
84
|
-
Each
|
85
|
-
an engine version
|
84
|
+
ENGINE
|
85
|
+
Each application may specify a Ruby engine. If an engine is specified,
|
86
|
+
an engine version must also be specified.
|
86
87
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
88
|
+
What exactly is an Engine? - A Ruby engine is an implementation of the
|
89
|
+
Ruby language.
|
90
|
+
|
91
|
+
o For background: the reference or original implementation of the
|
92
|
+
Ruby programming language is called Matz's Ruby Interpreter
|
93
|
+
https://en.wikipedia.org/wiki/Ruby_MRI, or MRI for short. This is
|
94
|
+
named after Ruby creator Yukihiro Matsumoto, also known as Matz.
|
95
|
+
MRI is also known as CRuby, because it is written in C. MRI is the
|
96
|
+
most widely used Ruby engine.
|
97
|
+
|
98
|
+
o Other implementations https://www.ruby-lang.org/en/about/ of Ruby
|
99
|
+
exist. Some of the more well-known implementations include Rubinius
|
100
|
+
https://rubinius.com/, and JRuby http://jruby.org/. Rubinius is an
|
101
|
+
alternative implementation of Ruby written in Ruby. JRuby is an
|
102
|
+
implementation of Ruby on the JVM, short for Java Virtual Machine.
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
ENGINE VERSION
|
107
|
+
Each application may specify a Ruby engine version. If an engine ver-
|
108
|
+
sion is specified, an engine must also be specified. If the engine is
|
109
|
+
"ruby" the engine version specified must match the Ruby version.
|
91
110
|
|
92
111
|
|
93
112
|
|
@@ -95,8 +114,8 @@ GEMFILE(5) GEMFILE(5)
|
|
95
114
|
|
96
115
|
|
97
116
|
|
98
|
-
|
99
|
-
Each application
|
117
|
+
PATCHLEVEL
|
118
|
+
Each application may specify a Ruby patchlevel.
|
100
119
|
|
101
120
|
|
102
121
|
|
@@ -104,12 +123,12 @@ GEMFILE(5) GEMFILE(5)
|
|
104
123
|
|
105
124
|
|
106
125
|
|
107
|
-
|
108
|
-
Specify gem requirements using the
|
109
|
-
ments. All parameters are
|
126
|
+
GEMS
|
127
|
+
Specify gem requirements using the gem method, with the following argu-
|
128
|
+
ments. All parameters are OPTIONAL unless otherwise specified.
|
110
129
|
|
111
|
-
|
112
|
-
For each gem requirement, list a single
|
130
|
+
NAME (required)
|
131
|
+
For each gem requirement, list a single gem line.
|
113
132
|
|
114
133
|
|
115
134
|
|
@@ -117,8 +136,8 @@ GEMFILE(5) GEMFILE(5)
|
|
117
136
|
|
118
137
|
|
119
138
|
|
120
|
-
|
121
|
-
Each
|
139
|
+
VERSION
|
140
|
+
Each gem MAY have one or more version specifiers.
|
122
141
|
|
123
142
|
|
124
143
|
|
@@ -127,10 +146,10 @@ GEMFILE(5) GEMFILE(5)
|
|
127
146
|
|
128
147
|
|
129
148
|
|
130
|
-
|
131
|
-
Each
|
132
|
-
|
133
|
-
file you want
|
149
|
+
REQUIRE AS
|
150
|
+
Each gem MAY specify files that should be used when autorequiring via
|
151
|
+
Bundler.require. You may pass an array with multiple files or true if
|
152
|
+
file you want required has same name as gem or false to prevent any
|
134
153
|
file from being autorequired.
|
135
154
|
|
136
155
|
|
@@ -152,9 +171,9 @@ GEMFILE(5) GEMFILE(5)
|
|
152
171
|
|
153
172
|
|
154
173
|
|
155
|
-
|
156
|
-
Each
|
157
|
-
does not specify membership in any group is placed in the
|
174
|
+
GROUPS
|
175
|
+
Each gem MAY specify membership in one or more groups. Any gem that
|
176
|
+
does not specify membership in any group is placed in the default
|
158
177
|
group.
|
159
178
|
|
160
179
|
|
@@ -164,8 +183,8 @@ GEMFILE(5) GEMFILE(5)
|
|
164
183
|
|
165
184
|
|
166
185
|
|
167
|
-
The Bundler runtime allows its two main methods,
|
168
|
-
|
186
|
+
The Bundler runtime allows its two main methods, Bundler.setup and
|
187
|
+
Bundler.require, to limit their impact to particular groups.
|
169
188
|
|
170
189
|
|
171
190
|
|
@@ -184,8 +203,8 @@ GEMFILE(5) GEMFILE(5)
|
|
184
203
|
|
185
204
|
|
186
205
|
|
187
|
-
The Bundler CLI allows you to specify a list of groups whose gems
|
188
|
-
|
206
|
+
The Bundler CLI allows you to specify a list of groups whose gems bun-
|
207
|
+
dle install should not install with the --without option. To specify
|
189
208
|
multiple groups to ignore, specify a list of groups separated by spa-
|
190
209
|
ces.
|
191
210
|
|
@@ -196,46 +215,49 @@ GEMFILE(5) GEMFILE(5)
|
|
196
215
|
|
197
216
|
|
198
217
|
|
199
|
-
After running
|
218
|
+
After running bundle install --without test, bundler will remember that
|
200
219
|
you excluded the test group in the last installation. The next time you
|
201
|
-
run
|
220
|
+
run bundle install, without any --without option, bundler will recall
|
202
221
|
it.
|
203
222
|
|
204
|
-
Also, calling
|
205
|
-
|
206
|
-
via
|
223
|
+
Also, calling Bundler.setup with no parameters, or calling require
|
224
|
+
"bundler/setup" will setup all groups except for the ones you excluded
|
225
|
+
via --without (since they are not available).
|
207
226
|
|
208
|
-
Note that on
|
227
|
+
Note that on bundle install, bundler downloads and evaluates all gems,
|
209
228
|
in order to create a single canonical list of all of the required gems
|
210
229
|
and their dependencies. This means that you cannot list different ver-
|
211
230
|
sions of the same gems in different groups. For more details, see
|
212
|
-
Understanding Bundler
|
231
|
+
Understanding Bundler http://bundler.io/rationale.html.
|
213
232
|
|
214
|
-
|
233
|
+
PLATFORMS
|
215
234
|
If a gem should only be used in a particular platform or set of plat-
|
216
235
|
forms, you can specify them. Platforms are essentially identical to
|
217
|
-
groups, except that you do not need to use the
|
236
|
+
groups, except that you do not need to use the --without install-time
|
218
237
|
flag to exclude groups of gems for other platforms.
|
219
238
|
|
220
|
-
There are a number of
|
239
|
+
There are a number of Gemfile platforms:
|
221
240
|
|
222
|
-
|
241
|
+
ruby C Ruby (MRI), Rubinius or TruffleRuby, but NOT Windows
|
223
242
|
|
224
|
-
|
243
|
+
mri Same as ruby, but only C Ruby (MRI)
|
225
244
|
|
226
|
-
|
245
|
+
mingw Windows 32 bit 'mingw32' platform (aka RubyInstaller)
|
227
246
|
|
228
|
-
|
247
|
+
x64_mingw
|
229
248
|
Windows 64 bit 'mingw32' platform (aka RubyInstaller x64)
|
230
249
|
|
231
|
-
|
250
|
+
rbx Rubinius
|
251
|
+
|
252
|
+
jruby JRuby
|
232
253
|
|
233
|
-
|
254
|
+
truffleruby
|
255
|
+
TruffleRuby
|
234
256
|
|
235
|
-
|
257
|
+
mswin Windows
|
236
258
|
|
237
259
|
You can restrict further by platform and version for all platforms
|
238
|
-
|
260
|
+
except for rbx, jruby, truffleruby and mswin.
|
239
261
|
|
240
262
|
To specify a version in addition to a platform, append the version num-
|
241
263
|
ber without the delimiter to the platform. For example, to specify that
|
@@ -249,13 +271,13 @@ GEMFILE(5) GEMFILE(5)
|
|
249
271
|
|
250
272
|
The full list of platforms and supported versions includes:
|
251
273
|
|
252
|
-
|
274
|
+
ruby 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
|
253
275
|
|
254
|
-
|
276
|
+
mri 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
|
255
277
|
|
256
|
-
|
278
|
+
mingw 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
|
257
279
|
|
258
|
-
|
280
|
+
x64_mingw
|
259
281
|
2.0, 2.1, 2.2, 2.3, 2.4, 2.5
|
260
282
|
|
261
283
|
As with groups, you can specify one or more platforms:
|
@@ -268,11 +290,11 @@ GEMFILE(5) GEMFILE(5)
|
|
268
290
|
|
269
291
|
|
270
292
|
|
271
|
-
All
|
272
|
-
|
273
|
-
the current platform were explicitly excluded.
|
293
|
+
All operations involving groups (bundle install bundle-install.1.html,
|
294
|
+
Bundler.setup, Bundler.require) behave exactly the same as if any
|
295
|
+
groups not matching the current platform were explicitly excluded.
|
274
296
|
|
275
|
-
|
297
|
+
SOURCE
|
276
298
|
You can select an alternate Rubygems repository for a gem using the
|
277
299
|
':source' option.
|
278
300
|
|
@@ -289,47 +311,53 @@ GEMFILE(5) GEMFILE(5)
|
|
289
311
|
Bundler will search for child dependencies of this gem by first looking
|
290
312
|
in the source selected for the parent, but if they are not found there,
|
291
313
|
it will fall back on global sources using the ordering described in
|
292
|
-
|
314
|
+
SOURCE PRIORITY.
|
293
315
|
|
294
316
|
Selecting a specific source repository this way also suppresses the
|
295
|
-
ambiguous gem warning described above in
|
317
|
+
ambiguous gem warning described above in GLOBAL SOURCES (#source).
|
318
|
+
|
319
|
+
Using the :source option for an individual gem will also make that
|
320
|
+
source available as a possible global source for any other gems which
|
321
|
+
do not specify explicit sources. Thus, when adding gems with explicit
|
322
|
+
sources, it is recommended that you also ensure all other gems in the
|
323
|
+
Gemfile are using explicit sources.
|
296
324
|
|
297
|
-
|
325
|
+
GIT
|
298
326
|
If necessary, you can specify that a gem is located at a particular git
|
299
|
-
repository using the
|
327
|
+
repository using the :git parameter. The repository can be accessed via
|
300
328
|
several protocols:
|
301
329
|
|
302
|
-
|
330
|
+
HTTP(S)
|
303
331
|
gem "rails", :git => "https://github.com/rails/rails.git"
|
304
332
|
|
305
|
-
|
333
|
+
SSH gem "rails", :git => "git@github.com:rails/rails.git"
|
306
334
|
|
307
|
-
|
335
|
+
git gem "rails", :git => "git://github.com/rails/rails.git"
|
308
336
|
|
309
|
-
If using SSH, the user that you use to run
|
310
|
-
appropriate keys available in their
|
337
|
+
If using SSH, the user that you use to run bundle install MUST have the
|
338
|
+
appropriate keys available in their $HOME/.ssh.
|
311
339
|
|
312
|
-
|
340
|
+
NOTE: http:// and git:// URLs should be avoided if at all possible.
|
313
341
|
These protocols are unauthenticated, so a man-in-the-middle attacker
|
314
342
|
can deliver malicious code and compromise your system. HTTPS and SSH
|
315
343
|
are strongly preferred.
|
316
344
|
|
317
|
-
The
|
345
|
+
The group, platforms, and require options are available and behave
|
318
346
|
exactly the same as they would for a normal gem.
|
319
347
|
|
320
|
-
A git repository
|
321
|
-
directory containing the gem, with the extension
|
322
|
-
|
348
|
+
A git repository SHOULD have at least one file, at the root of the
|
349
|
+
directory containing the gem, with the extension .gemspec. This file
|
350
|
+
MUST contain a valid gem specification, as expected by the gem build
|
323
351
|
command.
|
324
352
|
|
325
|
-
If a git repository does not have a
|
353
|
+
If a git repository does not have a .gemspec, bundler will attempt to
|
326
354
|
create one, but it will not contain any dependencies, executables, or C
|
327
355
|
extension compilation instructions. As a result, it may fail to prop-
|
328
356
|
erly integrate into your application.
|
329
357
|
|
330
|
-
If a git repository does have a
|
358
|
+
If a git repository does have a .gemspec for the gem you attached it
|
331
359
|
to, a version specifier, if provided, means that the git repository is
|
332
|
-
only valid if the
|
360
|
+
only valid if the .gemspec specifies a version matching the version
|
333
361
|
specifier. If not, bundler will print a warning.
|
334
362
|
|
335
363
|
|
@@ -340,23 +368,35 @@ GEMFILE(5) GEMFILE(5)
|
|
340
368
|
|
341
369
|
|
342
370
|
|
343
|
-
If a git repository does
|
344
|
-
it to, a version specifier
|
345
|
-
sion in the simple
|
371
|
+
If a git repository does not have a .gemspec for the gem you attached
|
372
|
+
it to, a version specifier MUST be provided. Bundler will use this ver-
|
373
|
+
sion in the simple .gemspec it creates.
|
346
374
|
|
347
375
|
Git repositories support a number of additional options.
|
348
376
|
|
349
|
-
|
350
|
-
You
|
351
|
-
is
|
377
|
+
branch, tag, and ref
|
378
|
+
You MUST only specify at most one of these options. The default
|
379
|
+
is :branch => "master"
|
352
380
|
|
353
|
-
|
354
|
-
Specify 1m:submodules => true 22mto cause bundler to expand any sub-
|
355
|
-
modules included in the git repository
|
381
|
+
For example:
|
356
382
|
|
357
|
-
|
358
|
-
|
359
|
-
|
383
|
+
git "https://github.com/rails/rails.git", :branch => "5-0-sta-
|
384
|
+
ble" do
|
385
|
+
|
386
|
+
git "https://github.com/rails/rails.git", :tag => "v5.0.0" do
|
387
|
+
|
388
|
+
git "https://github.com/rails/rails.git", :ref => "4aded" do
|
389
|
+
|
390
|
+
submodules
|
391
|
+
For reference, a git submodule
|
392
|
+
https://git-scm.com/book/en/v2/Git-Tools-Submodules lets you
|
393
|
+
have another git repository within a subfolder of your reposi-
|
394
|
+
tory. Specify :submodules => true to cause bundler to expand any
|
395
|
+
submodules included in the git repository
|
396
|
+
|
397
|
+
If a git repository contains multiple .gemspecs, each .gemspec repre-
|
398
|
+
sents a gem located at the same place in the file system as the .gem-
|
399
|
+
spec.
|
360
400
|
|
361
401
|
|
362
402
|
|
@@ -371,13 +411,13 @@ GEMFILE(5) GEMFILE(5)
|
|
371
411
|
|
372
412
|
|
373
413
|
To install a gem located in a git repository, bundler changes to the
|
374
|
-
directory containing the gemspec, runs
|
375
|
-
installs the resulting gem. The
|
376
|
-
with Rubygems, evaluates the
|
414
|
+
directory containing the gemspec, runs gem build name.gemspec and then
|
415
|
+
installs the resulting gem. The gem build command, which comes standard
|
416
|
+
with Rubygems, evaluates the .gemspec in the context of the directory
|
377
417
|
in which it is located.
|
378
418
|
|
379
|
-
|
380
|
-
A custom git source can be defined via the
|
419
|
+
GIT SOURCE
|
420
|
+
A custom git source can be defined via the git_source method. Provide
|
381
421
|
the source's name as an argument, and a block which receives a single
|
382
422
|
argument and interpolates it into a string to return the full repo
|
383
423
|
address:
|
@@ -397,9 +437,9 @@ GEMFILE(5) GEMFILE(5)
|
|
397
437
|
|
398
438
|
|
399
439
|
|
400
|
-
|
401
|
-
|
402
|
-
rently expands to an insecure
|
440
|
+
GITHUB
|
441
|
+
NOTE: This shorthand should be avoided until Bundler 2.0, since it cur-
|
442
|
+
rently expands to an insecure git:// URL. This allows a man-in-the-mid-
|
403
443
|
dle attacker to compromise your system.
|
404
444
|
|
405
445
|
If the git repository you want to use is hosted on GitHub and is pub-
|
@@ -423,10 +463,10 @@ GEMFILE(5) GEMFILE(5)
|
|
423
463
|
|
424
464
|
|
425
465
|
|
426
|
-
Since the
|
427
|
-
|
466
|
+
Since the github method is a specialization of git_source, it accepts a
|
467
|
+
:branch named argument.
|
428
468
|
|
429
|
-
|
469
|
+
GIST
|
430
470
|
If the git repository you want to use is hosted as a Github Gist and is
|
431
471
|
public, you can use the :gist shorthand to specify the gist identifier
|
432
472
|
(without the trailing ".git").
|
@@ -445,10 +485,10 @@ GEMFILE(5) GEMFILE(5)
|
|
445
485
|
|
446
486
|
|
447
487
|
|
448
|
-
Since the
|
449
|
-
|
488
|
+
Since the gist method is a specialization of git_source, it accepts a
|
489
|
+
:branch named argument.
|
450
490
|
|
451
|
-
|
491
|
+
BITBUCKET
|
452
492
|
If the git repository you want to use is hosted on Bitbucket and is
|
453
493
|
public, you can use the :bitbucket shorthand to specify the bitbucket
|
454
494
|
username and repository name (without the trailing ".git"), separated
|
@@ -470,19 +510,19 @@ GEMFILE(5) GEMFILE(5)
|
|
470
510
|
|
471
511
|
|
472
512
|
|
473
|
-
Since the
|
474
|
-
accepts a
|
513
|
+
Since the bitbucket method is a specialization of git_source, it
|
514
|
+
accepts a :branch named argument.
|
475
515
|
|
476
|
-
|
516
|
+
PATH
|
477
517
|
You can specify that a gem is located in a particular location on the
|
478
518
|
file system. Relative paths are resolved relative to the directory con-
|
479
|
-
taining the
|
519
|
+
taining the Gemfile.
|
480
520
|
|
481
|
-
Similar to the semantics of the
|
482
|
-
that the directory in question either contains a
|
521
|
+
Similar to the semantics of the :git option, the :path option requires
|
522
|
+
that the directory in question either contains a .gemspec for the gem,
|
483
523
|
or that you specify an explicit version that bundler should use.
|
484
524
|
|
485
|
-
Unlike
|
525
|
+
Unlike :git, bundler does not compile C extensions for gems specified
|
486
526
|
as paths.
|
487
527
|
|
488
528
|
|
@@ -492,8 +532,8 @@ GEMFILE(5) GEMFILE(5)
|
|
492
532
|
|
493
533
|
|
494
534
|
If you would like to use multiple local gems directly from the filesys-
|
495
|
-
tem, you can set a global
|
496
|
-
files.
|
535
|
+
tem, you can set a global path option to the path containing the gem's
|
536
|
+
files. This will automatically load gemspec files from subdirectories.
|
497
537
|
|
498
538
|
|
499
539
|
|
@@ -504,8 +544,8 @@ GEMFILE(5) GEMFILE(5)
|
|
504
544
|
|
505
545
|
|
506
546
|
|
507
|
-
|
508
|
-
The
|
547
|
+
BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS
|
548
|
+
The :source, :git, :path, :group, and :platforms options may be applied
|
509
549
|
to a group of gems by using block form.
|
510
550
|
|
511
551
|
|
@@ -532,16 +572,23 @@ GEMFILE(5) GEMFILE(5)
|
|
532
572
|
|
533
573
|
|
534
574
|
|
535
|
-
In
|
536
|
-
to
|
537
|
-
option given to the
|
575
|
+
In the case of the group block form the :optional option can be given
|
576
|
+
to prevent a group from being installed unless listed in the --with
|
577
|
+
option given to the bundle install command.
|
538
578
|
|
539
|
-
In
|
540
|
-
|
579
|
+
In the case of the git block form, the :ref, :branch, :tag, and :sub-
|
580
|
+
modules options may be passed to the git method, and all gems in the
|
541
581
|
block will inherit those options.
|
542
582
|
|
543
|
-
|
544
|
-
|
583
|
+
The presence of a source block in a Gemfile also makes that source
|
584
|
+
available as a possible global source for any other gems which do not
|
585
|
+
specify explicit sources. Thus, when defining source blocks, it is rec-
|
586
|
+
ommended that you also ensure all other gems in the Gemfile are using
|
587
|
+
explicit sources, either via source blocks or :source directives on
|
588
|
+
individual gems.
|
589
|
+
|
590
|
+
INSTALL_IF
|
591
|
+
The install_if method allows gems to be installed based on a proc or
|
545
592
|
lambda. This is especially useful for optional gems that can only be
|
546
593
|
used if certain software is installed or some other conditions are met.
|
547
594
|
|
@@ -553,48 +600,54 @@ GEMFILE(5) GEMFILE(5)
|
|
553
600
|
|
554
601
|
|
555
602
|
|
556
|
-
|
603
|
+
GEMSPEC
|
604
|
+
The .gemspec http://guides.rubygems.org/specification-reference/ file
|
605
|
+
is where you provide metadata about your gem to Rubygems. Some required
|
606
|
+
Gemspec attributes include the name, description, and homepage of your
|
607
|
+
gem. This is also where you specify the dependencies your gem needs to
|
608
|
+
run.
|
609
|
+
|
557
610
|
If you wish to use Bundler to help install dependencies for a gem while
|
558
|
-
it
|
559
|
-
cies listed in the
|
611
|
+
it is being developed, use the gemspec method to pull in the dependen-
|
612
|
+
cies listed in the .gemspec file.
|
560
613
|
|
561
|
-
The
|
562
|
-
the
|
563
|
-
requirements
|
564
|
-
ment on your project (
|
614
|
+
The gemspec method adds any runtime dependencies as gem requirements in
|
615
|
+
the default group. It also adds development dependencies as gem
|
616
|
+
requirements in the development group. Finally, it adds a gem require-
|
617
|
+
ment on your project (:path => '.'). In conjunction with Bundler.setup,
|
565
618
|
this allows you to require project files in your test code as you would
|
566
|
-
if
|
619
|
+
if the project were installed as a gem; you need not manipulate the
|
567
620
|
load path manually or require project files via relative paths.
|
568
621
|
|
569
|
-
The
|
570
|
-
|
571
|
-
the
|
572
|
-
spec"),
|
622
|
+
The gemspec method supports optional :path, :glob, :name, and :develop-
|
623
|
+
ment_group options, which control where bundler looks for the .gemspec,
|
624
|
+
the glob it uses to look for the gemspec (defaults to: "{,,/*}.gem-
|
625
|
+
spec"), what named .gemspec it uses (if more than one is present), and
|
573
626
|
which group development dependencies are included in.
|
574
627
|
|
575
|
-
When
|
576
|
-
tion,
|
577
|
-
even
|
578
|
-
for the
|
628
|
+
When a gemspec dependency encounters version conflicts during resolu-
|
629
|
+
tion, the local version under development will always be selected --
|
630
|
+
even if there are remote versions that better match other requirements
|
631
|
+
for the gemspec gem.
|
579
632
|
|
580
|
-
|
581
|
-
When
|
633
|
+
SOURCE PRIORITY
|
634
|
+
When attempting to locate a gem to satisfy a gem requirement, bundler
|
582
635
|
uses the following priority order:
|
583
636
|
|
584
|
-
1. The source explicitly attached to the gem (using
|
585
|
-
|
637
|
+
1. The source explicitly attached to the gem (using :source, :path, or
|
638
|
+
:git)
|
586
639
|
|
587
640
|
2. For implicit gems (dependencies of explicit gems), any source, git,
|
588
|
-
or
|
589
|
-
prioritizing
|
590
|
-
over ones from
|
641
|
+
or path repository declared on the parent. This results in bundler
|
642
|
+
prioritizing the ActiveSupport gem from the Rails git repository
|
643
|
+
over ones from rubygems.org
|
591
644
|
|
592
|
-
3. The
|
593
|
-
source in your
|
645
|
+
3. The sources specified via global source lines, searching each
|
646
|
+
source in your Gemfile from last added to first added.
|
594
647
|
|
595
648
|
|
596
649
|
|
597
650
|
|
598
651
|
|
599
652
|
|
600
|
-
|
653
|
+
November 2018 GEMFILE(5)
|