shopify-bundler 1.10.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +16 -0
- data/.rspec +3 -0
- data/.rubocop.yml +96 -0
- data/.rubocop_todo.yml +177 -0
- data/.travis.yml +104 -0
- data/CHANGELOG.md +2131 -0
- data/CODE_OF_CONDUCT.md +42 -0
- data/CONTRIBUTING.md +32 -0
- data/DEVELOPMENT.md +118 -0
- data/ISSUES.md +96 -0
- data/LICENSE.md +23 -0
- data/README.md +40 -0
- data/Rakefile +309 -0
- data/bin/rake +14 -0
- data/bin/rspec +10 -0
- data/bin/rubocop +11 -0
- data/bundler.gemspec +34 -0
- data/exe/bundle +21 -0
- data/exe/bundle_ruby +60 -0
- data/exe/bundler +21 -0
- data/lib/bundler.rb +499 -0
- data/lib/bundler/capistrano.rb +16 -0
- data/lib/bundler/cli.rb +435 -0
- data/lib/bundler/cli/binstubs.rb +37 -0
- data/lib/bundler/cli/cache.rb +34 -0
- data/lib/bundler/cli/check.rb +37 -0
- data/lib/bundler/cli/clean.rb +25 -0
- data/lib/bundler/cli/common.rb +56 -0
- data/lib/bundler/cli/config.rb +88 -0
- data/lib/bundler/cli/console.rb +37 -0
- data/lib/bundler/cli/exec.rb +51 -0
- data/lib/bundler/cli/gem.rb +208 -0
- data/lib/bundler/cli/init.rb +32 -0
- data/lib/bundler/cli/inject.rb +32 -0
- data/lib/bundler/cli/install.rb +188 -0
- data/lib/bundler/cli/lock.rb +35 -0
- data/lib/bundler/cli/open.rb +22 -0
- data/lib/bundler/cli/outdated.rb +86 -0
- data/lib/bundler/cli/package.rb +45 -0
- data/lib/bundler/cli/platform.rb +42 -0
- data/lib/bundler/cli/show.rb +74 -0
- data/lib/bundler/cli/update.rb +72 -0
- data/lib/bundler/cli/viz.rb +26 -0
- data/lib/bundler/constants.rb +5 -0
- data/lib/bundler/current_ruby.rb +218 -0
- data/lib/bundler/definition.rb +675 -0
- data/lib/bundler/dep_proxy.rb +45 -0
- data/lib/bundler/dependency.rb +119 -0
- data/lib/bundler/deployment.rb +62 -0
- data/lib/bundler/deprecate.rb +17 -0
- data/lib/bundler/dsl.rb +478 -0
- data/lib/bundler/endpoint_specification.rb +100 -0
- data/lib/bundler/env.rb +82 -0
- data/lib/bundler/environment.rb +41 -0
- data/lib/bundler/fetcher.rb +288 -0
- data/lib/bundler/fetcher/base.rb +26 -0
- data/lib/bundler/fetcher/dependency.rb +88 -0
- data/lib/bundler/fetcher/downloader.rb +60 -0
- data/lib/bundler/fetcher/index.rb +32 -0
- data/lib/bundler/friendly_errors.rb +92 -0
- data/lib/bundler/gem_helper.rb +191 -0
- data/lib/bundler/gem_helpers.rb +26 -0
- data/lib/bundler/gem_installer.rb +9 -0
- data/lib/bundler/gem_path_manipulation.rb +8 -0
- data/lib/bundler/gem_tasks.rb +5 -0
- data/lib/bundler/graph.rb +173 -0
- data/lib/bundler/index.rb +199 -0
- data/lib/bundler/injector.rb +62 -0
- data/lib/bundler/inline.rb +58 -0
- data/lib/bundler/installer.rb +242 -0
- data/lib/bundler/installer/parallel_installer.rb +122 -0
- data/lib/bundler/installer/standalone.rb +48 -0
- data/lib/bundler/lazy_specification.rb +82 -0
- data/lib/bundler/lockfile_parser.rb +199 -0
- data/lib/bundler/match_platform.rb +13 -0
- data/lib/bundler/psyched_yaml.rb +26 -0
- data/lib/bundler/remote_specification.rb +82 -0
- data/lib/bundler/resolver.rb +350 -0
- data/lib/bundler/retry.rb +60 -0
- data/lib/bundler/ruby_dsl.rb +11 -0
- data/lib/bundler/ruby_version.rb +116 -0
- data/lib/bundler/rubygems_ext.rb +175 -0
- data/lib/bundler/rubygems_integration.rb +674 -0
- data/lib/bundler/runtime.rb +285 -0
- data/lib/bundler/settings.rb +263 -0
- data/lib/bundler/setup.rb +26 -0
- data/lib/bundler/shared_helpers.rb +176 -0
- data/lib/bundler/similarity_detector.rb +61 -0
- data/lib/bundler/source.rb +35 -0
- data/lib/bundler/source/git.rb +286 -0
- data/lib/bundler/source/git/git_proxy.rb +190 -0
- data/lib/bundler/source/path.rb +224 -0
- data/lib/bundler/source/path/installer.rb +43 -0
- data/lib/bundler/source/rubygems.rb +436 -0
- data/lib/bundler/source/rubygems/remote.rb +38 -0
- data/lib/bundler/source_list.rb +101 -0
- data/lib/bundler/spec_set.rb +156 -0
- data/lib/bundler/ssl_certs/.document +1 -0
- data/lib/bundler/ssl_certs/AddTrustExternalCARoot-2048.pem +25 -0
- data/lib/bundler/ssl_certs/AddTrustExternalCARoot.pem +32 -0
- data/lib/bundler/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem +14 -0
- data/lib/bundler/ssl_certs/DigiCertHighAssuranceEVRootCA.pem +23 -0
- data/lib/bundler/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem +28 -0
- data/lib/bundler/ssl_certs/GeoTrustGlobalCA.pem +20 -0
- data/lib/bundler/ssl_certs/certificate_manager.rb +64 -0
- data/lib/bundler/stub_specification.rb +23 -0
- data/lib/bundler/templates/Executable +16 -0
- data/lib/bundler/templates/Executable.standalone +12 -0
- data/lib/bundler/templates/Gemfile +4 -0
- data/lib/bundler/templates/newgem/.travis.yml.tt +4 -0
- data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +22 -0
- data/lib/bundler/templates/newgem/Gemfile.tt +4 -0
- data/lib/bundler/templates/newgem/LICENSE.txt.tt +21 -0
- data/lib/bundler/templates/newgem/README.md.tt +41 -0
- data/lib/bundler/templates/newgem/Rakefile.tt +29 -0
- data/lib/bundler/templates/newgem/bin/console.tt +14 -0
- data/lib/bundler/templates/newgem/bin/setup.tt +8 -0
- data/lib/bundler/templates/newgem/exe/newgem.tt +3 -0
- data/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +3 -0
- data/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +9 -0
- data/lib/bundler/templates/newgem/ext/newgem/newgem.h.tt +6 -0
- data/lib/bundler/templates/newgem/gitignore.tt +16 -0
- data/lib/bundler/templates/newgem/lib/newgem.rb.tt +12 -0
- data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +7 -0
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +43 -0
- data/lib/bundler/templates/newgem/rspec.tt +2 -0
- data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +11 -0
- data/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +2 -0
- data/lib/bundler/templates/newgem/test/newgem_test.rb.tt +11 -0
- data/lib/bundler/templates/newgem/test/test_helper.rb.tt +4 -0
- data/lib/bundler/ui.rb +7 -0
- data/lib/bundler/ui/rg_proxy.rb +17 -0
- data/lib/bundler/ui/shell.rb +108 -0
- data/lib/bundler/ui/silent.rb +44 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo.rb +5 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +277 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +69 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +3 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +99 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +63 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +434 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +43 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +51 -0
- data/lib/bundler/vendor/net/http/faster.rb +26 -0
- data/lib/bundler/vendor/net/http/persistent.rb +1230 -0
- data/lib/bundler/vendor/net/http/persistent/ssl_reuse.rb +128 -0
- data/lib/bundler/vendor/thor/lib/thor.rb +484 -0
- data/lib/bundler/vendor/thor/lib/thor/actions.rb +319 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +103 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +59 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +118 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +135 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +316 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +107 -0
- data/lib/bundler/vendor/thor/lib/thor/base.rb +656 -0
- data/lib/bundler/vendor/thor/lib/thor/command.rb +133 -0
- data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +77 -0
- data/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb +10 -0
- data/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb +98 -0
- data/lib/bundler/vendor/thor/lib/thor/error.rb +32 -0
- data/lib/bundler/vendor/thor/lib/thor/group.rb +281 -0
- data/lib/bundler/vendor/thor/lib/thor/invocation.rb +178 -0
- data/lib/bundler/vendor/thor/lib/thor/line_editor.rb +17 -0
- data/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +35 -0
- data/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb +88 -0
- data/lib/bundler/vendor/thor/lib/thor/parser.rb +4 -0
- data/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +73 -0
- data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +175 -0
- data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +125 -0
- data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +218 -0
- data/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +71 -0
- data/lib/bundler/vendor/thor/lib/thor/runner.rb +322 -0
- data/lib/bundler/vendor/thor/lib/thor/shell.rb +81 -0
- data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +421 -0
- data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +149 -0
- data/lib/bundler/vendor/thor/lib/thor/shell/html.rb +126 -0
- data/lib/bundler/vendor/thor/lib/thor/util.rb +267 -0
- data/lib/bundler/vendor/thor/lib/thor/version.rb +3 -0
- data/lib/bundler/vendored_molinillo.rb +2 -0
- data/lib/bundler/vendored_persistent.rb +11 -0
- data/lib/bundler/vendored_thor.rb +3 -0
- data/lib/bundler/version.rb +6 -0
- data/lib/bundler/vlad.rb +11 -0
- data/lib/bundler/worker.rb +72 -0
- data/man/bundle-config.ronn +187 -0
- data/man/bundle-exec.ronn +136 -0
- data/man/bundle-gem.ronn +77 -0
- data/man/bundle-install.ronn +398 -0
- data/man/bundle-package.ronn +66 -0
- data/man/bundle-platform.ronn +42 -0
- data/man/bundle-update.ronn +188 -0
- data/man/bundle.ronn +98 -0
- data/man/gemfile.5.ronn +495 -0
- data/man/index.txt +8 -0
- metadata +346 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
bundle-platform(1) -- Displays platform compatibility information
|
2
|
+
=================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bundle platform` [--ruby]
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
`platform` will display information from your Gemfile, Gemfile.lock, and Ruby
|
11
|
+
VM about your platform.
|
12
|
+
|
13
|
+
For instance, using this Gemfile(5):
|
14
|
+
|
15
|
+
source "https://rubygems.org"
|
16
|
+
|
17
|
+
ruby "1.9.3"
|
18
|
+
|
19
|
+
gem "rack"
|
20
|
+
|
21
|
+
If you run `bundle platform` on Ruby 1.9.3, it will display the following output:
|
22
|
+
|
23
|
+
Your platform is: x86_64-linux
|
24
|
+
|
25
|
+
Your app has gems that work on these platforms:
|
26
|
+
* ruby
|
27
|
+
|
28
|
+
Your Gemfile specifies a Ruby version requirement:
|
29
|
+
* ruby 1.9.3
|
30
|
+
|
31
|
+
Your current platform satisfies the Ruby version requirement.
|
32
|
+
|
33
|
+
`platform` will list all the platforms in your `Gemfile.lock` as well as the
|
34
|
+
`ruby` directive if applicable from your Gemfile(5). It will also let you know
|
35
|
+
if the `ruby` directive requirement has been met. If `ruby` directive doesn't
|
36
|
+
match the running Ruby VM, it will tell you what part does not.
|
37
|
+
|
38
|
+
## OPTIONS
|
39
|
+
|
40
|
+
* `--ruby`:
|
41
|
+
It will just display the ruby directive information, so you don't have to
|
42
|
+
parse it from the Gemfile(5).
|
@@ -0,0 +1,188 @@
|
|
1
|
+
bundle-update(1) -- Update your gems to the latest available versions
|
2
|
+
=====================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bundle update` <*gems> [--group=NAME] [--source=NAME] [--local]
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
Update the gems specified (all gems, if none are specified), ignoring
|
11
|
+
the previously installed gems specified in the `Gemfile.lock`. In
|
12
|
+
general, you should use [bundle install(1)][bundle-install] to install the same exact
|
13
|
+
gems and versions across machines.
|
14
|
+
|
15
|
+
You would use `bundle update` to explicitly update the version of a
|
16
|
+
gem.
|
17
|
+
|
18
|
+
## OPTIONS
|
19
|
+
|
20
|
+
* `--group=<name>`:
|
21
|
+
Only update the gems in the specified group. For instance, you can update all gems
|
22
|
+
in the development group with `bundle update --group development`. You can also
|
23
|
+
call `bundle update rails --group test` to update the rails gem and all gems in
|
24
|
+
the test group, for example.
|
25
|
+
|
26
|
+
* `--source=<name>`:
|
27
|
+
The name of a `:git` or `:path` source used in the Gemfile(5). For
|
28
|
+
instance, with a `:git` source of `http://github.com/rails/rails.git`,
|
29
|
+
you would call `bundle update --source rails`
|
30
|
+
|
31
|
+
* `--local`:
|
32
|
+
Do not attempt to fetch gems remotely and use the gem cache instead.
|
33
|
+
|
34
|
+
## UPDATING ALL GEMS
|
35
|
+
|
36
|
+
If you run `bundle update` with no parameters, bundler will ignore
|
37
|
+
any previously installed gems and resolve all dependencies again
|
38
|
+
based on the latest versions of all gems available in the sources.
|
39
|
+
|
40
|
+
Consider the following Gemfile(5):
|
41
|
+
|
42
|
+
source "https://rubygems.org"
|
43
|
+
|
44
|
+
gem "rails", "3.0.0.rc"
|
45
|
+
gem "nokogiri"
|
46
|
+
|
47
|
+
When you run [bundle install(1)][bundle-install] the first time, bundler will resolve
|
48
|
+
all of the dependencies, all the way down, and install what you need:
|
49
|
+
|
50
|
+
Fetching gem metadata from https://rubygems.org/.........
|
51
|
+
Resolving dependencies...
|
52
|
+
Installing builder 2.1.2
|
53
|
+
Installing abstract 1.0.0
|
54
|
+
Installing rack 1.2.8
|
55
|
+
Using bundler 1.7.6
|
56
|
+
Installing rake 10.4.0
|
57
|
+
Installing polyglot 0.3.5
|
58
|
+
Installing mime-types 1.25.1
|
59
|
+
Installing i18n 0.4.2
|
60
|
+
Installing mini_portile 0.6.1
|
61
|
+
Installing tzinfo 0.3.42
|
62
|
+
Installing rack-mount 0.6.14
|
63
|
+
Installing rack-test 0.5.7
|
64
|
+
Installing treetop 1.4.15
|
65
|
+
Installing thor 0.14.6
|
66
|
+
Installing activesupport 3.0.0.rc
|
67
|
+
Installing erubis 2.6.6
|
68
|
+
Installing activemodel 3.0.0.rc
|
69
|
+
Installing arel 0.4.0
|
70
|
+
Installing mail 2.2.20
|
71
|
+
Installing activeresource 3.0.0.rc
|
72
|
+
Installing actionpack 3.0.0.rc
|
73
|
+
Installing activerecord 3.0.0.rc
|
74
|
+
Installing actionmailer 3.0.0.rc
|
75
|
+
Installing railties 3.0.0.rc
|
76
|
+
Installing rails 3.0.0.rc
|
77
|
+
Installing nokogiri 1.6.5
|
78
|
+
|
79
|
+
Bundle complete! 2 Gemfile dependencies, 26 gems total.
|
80
|
+
Use `bundle show [gemname]` to see where a bundled gem is installed.
|
81
|
+
|
82
|
+
As you can see, even though you have just two gems in the Gemfile(5), your application
|
83
|
+
actually needs 26 different gems in order to run. Bundler remembers the exact versions
|
84
|
+
it installed in `Gemfile.lock`. The next time you run [bundle install(1)][bundle-install], bundler skips
|
85
|
+
the dependency resolution and installs the same gems as it installed last time.
|
86
|
+
|
87
|
+
After checking in the `Gemfile.lock` into version control and cloning it on another
|
88
|
+
machine, running [bundle install(1)][bundle-install] will _still_ install the gems that you installed
|
89
|
+
last time. You don't need to worry that a new release of `erubis` or `mail` changes
|
90
|
+
the gems you use.
|
91
|
+
|
92
|
+
However, from time to time, you might want to update the gems you are using to the
|
93
|
+
newest versions that still match the gems in your Gemfile(5).
|
94
|
+
|
95
|
+
To do this, run `bundle update`, which will ignore the `Gemfile.lock`, and resolve
|
96
|
+
all the dependencies again. Keep in mind that this process can result in a significantly
|
97
|
+
different set of the 25 gems, based on the requirements of new gems that the gem
|
98
|
+
authors released since the last time you ran `bundle update`.
|
99
|
+
|
100
|
+
## UPDATING A LIST OF GEMS
|
101
|
+
|
102
|
+
Sometimes, you want to update a single gem in the Gemfile(5), and leave the rest of the
|
103
|
+
gems that you specified locked to the versions in the `Gemfile.lock`.
|
104
|
+
|
105
|
+
For instance, in the scenario above, imagine that `nokogiri` releases version `1.4.4`, and
|
106
|
+
you want to update it _without_ updating Rails and all of its dependencies. To do this,
|
107
|
+
run `bundle update nokogiri`.
|
108
|
+
|
109
|
+
Bundler will update `nokogiri` and any of its dependencies, but leave alone Rails and
|
110
|
+
its dependencies.
|
111
|
+
|
112
|
+
## OVERLAPPING DEPENDENCIES
|
113
|
+
|
114
|
+
Sometimes, multiple gems declared in your Gemfile(5) are satisfied by the same
|
115
|
+
second-level dependency. For instance, consider the case of `thin` and
|
116
|
+
`rack-perftools-profiler`.
|
117
|
+
|
118
|
+
source "https://rubygems.org"
|
119
|
+
|
120
|
+
gem "thin"
|
121
|
+
gem "rack-perftools-profiler"
|
122
|
+
|
123
|
+
The `thin` gem depends on `rack >= 1.0`, while `rack-perftools-profiler` depends
|
124
|
+
on `rack ~> 1.0`. If you run bundle install, you get:
|
125
|
+
|
126
|
+
Fetching source index for https://rubygems.org/
|
127
|
+
Installing daemons (1.1.0)
|
128
|
+
Installing eventmachine (0.12.10) with native extensions
|
129
|
+
Installing open4 (1.0.1)
|
130
|
+
Installing perftools.rb (0.4.7) with native extensions
|
131
|
+
Installing rack (1.2.1)
|
132
|
+
Installing rack-perftools_profiler (0.0.2)
|
133
|
+
Installing thin (1.2.7) with native extensions
|
134
|
+
Using bundler (1.0.0.rc.3)
|
135
|
+
|
136
|
+
In this case, the two gems have their own set of dependencies, but they share
|
137
|
+
`rack` in common. If you run `bundle update thin`, bundler will update `daemons`,
|
138
|
+
`eventmachine` and `rack`, which are dependencies of `thin`, but not `open4` or
|
139
|
+
`perftools.rb`, which are dependencies of `rack-perftools_profiler`. Note that
|
140
|
+
`bundle update thin` will update `rack` even though it's _also_ a dependency of
|
141
|
+
`rack-perftools_profiler`.
|
142
|
+
|
143
|
+
`In short`, when you update a gem using `bundle update`, bundler will update all
|
144
|
+
dependencies of that gem, including those that are also dependencies of another gem.
|
145
|
+
|
146
|
+
In this scenario, updating the `thin` version manually in the Gemfile(5),
|
147
|
+
and then running [bundle install(1)][bundle-install] will only update `daemons` and `eventmachine`,
|
148
|
+
but not `rack`. For more information, see the `CONSERVATIVE UPDATING` section
|
149
|
+
of [bundle install(1)][bundle-install].
|
150
|
+
|
151
|
+
## RECOMMENDED WORKFLOW
|
152
|
+
|
153
|
+
In general, when working with an application managed with bundler, you should
|
154
|
+
use the following workflow:
|
155
|
+
|
156
|
+
* After you create your Gemfile(5) for the first time, run
|
157
|
+
|
158
|
+
$ bundle install
|
159
|
+
|
160
|
+
* Check the resulting `Gemfile.lock` into version control
|
161
|
+
|
162
|
+
$ git add Gemfile.lock
|
163
|
+
|
164
|
+
* When checking out this repository on another development machine, run
|
165
|
+
|
166
|
+
$ bundle install
|
167
|
+
|
168
|
+
* When checking out this repository on a deployment machine, run
|
169
|
+
|
170
|
+
$ bundle install --deployment
|
171
|
+
|
172
|
+
* After changing the Gemfile(5) to reflect a new or update dependency, run
|
173
|
+
|
174
|
+
$ bundle install
|
175
|
+
|
176
|
+
* Make sure to check the updated `Gemfile.lock` into version control
|
177
|
+
|
178
|
+
$ git add Gemfile.lock
|
179
|
+
|
180
|
+
* If [bundle install(1)][bundle-install] reports a conflict, manually update the specific
|
181
|
+
gems that you changed in the Gemfile(5)
|
182
|
+
|
183
|
+
$ bundle update rails thin
|
184
|
+
|
185
|
+
* If you want to update all the gems to the latest possible versions that
|
186
|
+
still match the gems listed in the Gemfile(5), run
|
187
|
+
|
188
|
+
$ bundle update
|
data/man/bundle.ronn
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
bundle(1) -- Ruby Dependency Management
|
2
|
+
=======================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bundle` COMMAND [--no-color] [--verbose] [ARGS]
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
Bundler manages an `application's dependencies` through its entire life
|
11
|
+
across many machines systematically and repeatably.
|
12
|
+
|
13
|
+
See [the bundler website](http://bundler.io) for information on getting
|
14
|
+
started, and Gemfile(5) for more information on the `Gemfile` format.
|
15
|
+
|
16
|
+
## OPTIONS
|
17
|
+
|
18
|
+
* `--no-color`:
|
19
|
+
Prints all output without color
|
20
|
+
|
21
|
+
* `--verbose`:
|
22
|
+
Prints out additional logging information
|
23
|
+
|
24
|
+
## BUNDLE COMMANDS
|
25
|
+
|
26
|
+
We divide `bundle` subcommands into primary commands and utilities.
|
27
|
+
|
28
|
+
## PRIMARY COMMANDS
|
29
|
+
|
30
|
+
* [bundle install(1)][bundle-install]:
|
31
|
+
Install the gems specified by the `Gemfile` or `Gemfile.lock`
|
32
|
+
|
33
|
+
* [bundle update(1)][bundle-update]:
|
34
|
+
Update dependencies to their latest versions
|
35
|
+
|
36
|
+
* [bundle package(1)][bundle-package]:
|
37
|
+
Package the .gem files required by your application into the
|
38
|
+
`vendor/cache` directory
|
39
|
+
|
40
|
+
* [bundle exec(1)][bundle-exec]:
|
41
|
+
Execute a script in the context of the current bundle
|
42
|
+
|
43
|
+
* [bundle config(1)][bundle-config]:
|
44
|
+
Specify and read configuration options for bundler
|
45
|
+
|
46
|
+
* `bundle help(1)`:
|
47
|
+
Displays detailed help for each subcommand
|
48
|
+
|
49
|
+
## UTILITIES
|
50
|
+
|
51
|
+
* `bundle check(1)`:
|
52
|
+
Determine whether the requirements for your application are installed
|
53
|
+
and available to bundler
|
54
|
+
|
55
|
+
* `bundle list(1)`:
|
56
|
+
Show all of the gems in the current bundle
|
57
|
+
|
58
|
+
* `bundle show(1)`:
|
59
|
+
Show the source location of a particular gem in the bundle
|
60
|
+
|
61
|
+
* `bundle outdated(1)`:
|
62
|
+
Show all of the outdated gems in the current bundle
|
63
|
+
|
64
|
+
* `bundle console(1)`:
|
65
|
+
Start an IRB session in the context of the current bundle
|
66
|
+
|
67
|
+
* `bundle open(1)`:
|
68
|
+
Open an installed gem in the editor
|
69
|
+
|
70
|
+
* `bundle lock(1)`:
|
71
|
+
Generate a lockfile for your dependencies
|
72
|
+
|
73
|
+
* `bundle viz(1)`:
|
74
|
+
Generate a visual representation of your dependencies
|
75
|
+
|
76
|
+
* `bundle init(1)`:
|
77
|
+
Generate a simple `Gemfile`, placed in the current directory
|
78
|
+
|
79
|
+
* [bundle gem(1)][bundle-gem]:
|
80
|
+
Create a simple gem, suitable for development with bundler
|
81
|
+
|
82
|
+
* [bundle platform(1)][bundle-platform]:
|
83
|
+
Displays platform compatibility information
|
84
|
+
|
85
|
+
* `bundle clean(1)`:
|
86
|
+
Cleans up unused gems in your bundler directory
|
87
|
+
|
88
|
+
## PLUGINS
|
89
|
+
|
90
|
+
When running a command that isn't listed in PRIMARY COMMANDS or UTILITIES,
|
91
|
+
Bundler will try to find an executable on your path named `bundler-<command>`
|
92
|
+
and execute it, passing down any extra arguments to it.
|
93
|
+
|
94
|
+
## OBSOLETE
|
95
|
+
|
96
|
+
These commands are obsolete and should no longer be used
|
97
|
+
|
98
|
+
* `bundle cache(1)`
|
data/man/gemfile.5.ronn
ADDED
@@ -0,0 +1,495 @@
|
|
1
|
+
Gemfile(5) -- A format for describing gem dependencies for Ruby programs
|
2
|
+
========================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
A `Gemfile` describes the gem dependencies required to execute associated
|
7
|
+
Ruby code.
|
8
|
+
|
9
|
+
Place the `Gemfile` in the root of the directory containing the associated
|
10
|
+
code. For instance, in a Rails application, place the `Gemfile` in the same
|
11
|
+
directory as the `Rakefile`.
|
12
|
+
|
13
|
+
## SYNTAX
|
14
|
+
|
15
|
+
A `Gemfile` is evaluated as Ruby code, in a context which makes available
|
16
|
+
a number of methods used to describe the gem requirements.
|
17
|
+
|
18
|
+
## GLOBAL SOURCES (#source)
|
19
|
+
|
20
|
+
At the top of the `Gemfile`, add a line for the `Rubygems` source that contains
|
21
|
+
the gems listed in the `Gemfile`.
|
22
|
+
|
23
|
+
source "https://rubygems.org"
|
24
|
+
|
25
|
+
It is possible, but not recommended as of Bundler 1.7, to add multiple global
|
26
|
+
`source` lines. Each of these `source`s `MUST` be a valid Rubygems repository.
|
27
|
+
|
28
|
+
Sources are checked for gems following the heuristics described in
|
29
|
+
[SOURCE PRIORITY][]. If a gem is found in more than one global source, Bundler
|
30
|
+
will print a warning after installing the gem indicating which source was used,
|
31
|
+
and listing the other sources where the gem is available. A specific source can
|
32
|
+
be selected for gems that need to use a non-standard repository, suppressing
|
33
|
+
this warning, by using the [`:source` option](#SOURCE-source-) or a
|
34
|
+
[`source` block](#BLOCK-FORM-OF-SOURCE-GIT-PATH-GROUP-and-PLATFORMS).
|
35
|
+
|
36
|
+
### CREDENTIALS (#credentials)
|
37
|
+
|
38
|
+
Some gem sources require a username and password. Use `bundle config` to set
|
39
|
+
the username and password for any sources that need it. The command must be run
|
40
|
+
once on each computer that will install the Gemfile, but this keeps the
|
41
|
+
credentials from being stored in plain text in version control.
|
42
|
+
|
43
|
+
bundle config gems.example.com user:password
|
44
|
+
|
45
|
+
For some sources, like a company Gemfury account, it may be easier to simply
|
46
|
+
include the credentials in the Gemfile as part of the source URL.
|
47
|
+
|
48
|
+
source "https://user:password@gems.example.com"
|
49
|
+
|
50
|
+
Credentials in the source URL will take precedence over credentials set using
|
51
|
+
`config`.
|
52
|
+
|
53
|
+
## RUBY (#ruby)
|
54
|
+
|
55
|
+
If your application requires a specific Ruby version or engine, specify your
|
56
|
+
requirements using the `ruby` method, with the following arguments.
|
57
|
+
All parameters are `OPTIONAL` unless otherwise specified.
|
58
|
+
|
59
|
+
### VERSION (required)
|
60
|
+
|
61
|
+
The version of Ruby that your application requires. If your application
|
62
|
+
requires an alternate Ruby engine, such as JRuby or Rubinius, this should be
|
63
|
+
the Ruby version that the engine is compatible with.
|
64
|
+
|
65
|
+
ruby "1.9.3"
|
66
|
+
|
67
|
+
### ENGINE (:engine)
|
68
|
+
|
69
|
+
Each application _may_ specify a Ruby engine. If an engine is specified, an
|
70
|
+
engine version _must_ also be specified.
|
71
|
+
|
72
|
+
### ENGINE VERSION (:engine_version)
|
73
|
+
|
74
|
+
Each application _may_ specify a Ruby engine version. If an engine version is
|
75
|
+
specified, an engine _must_ also be specified. If the engine is "ruby" the
|
76
|
+
engine version specified _must_ match the Ruby version.
|
77
|
+
|
78
|
+
ruby "1.8.7", :engine => "jruby", :engine_version => "1.6.7"
|
79
|
+
|
80
|
+
### PATCHLEVEL (:patchlevel)
|
81
|
+
|
82
|
+
Each application _may_ specify a Ruby patchlevel.
|
83
|
+
|
84
|
+
ruby "2.0.0", :patchlevel => "247"
|
85
|
+
|
86
|
+
## GEMS (#gem)
|
87
|
+
|
88
|
+
Specify gem requirements using the `gem` method, with the following arguments.
|
89
|
+
All parameters are `OPTIONAL` unless otherwise specified.
|
90
|
+
|
91
|
+
### NAME (required)
|
92
|
+
|
93
|
+
For each gem requirement, list a single _gem_ line.
|
94
|
+
|
95
|
+
gem "nokogiri"
|
96
|
+
|
97
|
+
### VERSION
|
98
|
+
|
99
|
+
Each _gem_ `MAY` have one or more version specifiers.
|
100
|
+
|
101
|
+
gem "nokogiri", ">= 1.4.2"
|
102
|
+
gem "RedCloth", ">= 4.1.0", "< 4.2.0"
|
103
|
+
|
104
|
+
### REQUIRE AS (:require)
|
105
|
+
|
106
|
+
Each _gem_ `MAY` specify files that should be used when autorequiring via
|
107
|
+
`Bundler.require`. You may pass an array with multiple files or `true` if file
|
108
|
+
you want `required` has same name as _gem_ or `false` to
|
109
|
+
prevent any file from being autorequired.
|
110
|
+
|
111
|
+
gem "redis", :require => ["redis/connection/hiredis", "redis"]
|
112
|
+
gem "webmock", :require => false
|
113
|
+
gem "debugger", :require => true
|
114
|
+
|
115
|
+
The argument defaults to the name of the gem. For example, these are identical:
|
116
|
+
|
117
|
+
gem "nokogiri"
|
118
|
+
gem "nokogiri", :require => "nokogiri"
|
119
|
+
gem "nokogiri", :require => true
|
120
|
+
|
121
|
+
### GROUPS (:group or :groups)
|
122
|
+
|
123
|
+
Each _gem_ `MAY` specify membership in one or more groups. Any _gem_ that does
|
124
|
+
not specify membership in any group is placed in the `default` group.
|
125
|
+
|
126
|
+
gem "rspec", :group => :test
|
127
|
+
gem "wirble", :groups => [:development, :test]
|
128
|
+
|
129
|
+
The Bundler runtime allows its two main methods, `Bundler.setup` and
|
130
|
+
`Bundler.require`, to limit their impact to particular groups.
|
131
|
+
|
132
|
+
# setup adds gems to Ruby's load path
|
133
|
+
Bundler.setup # defaults to all groups
|
134
|
+
require "bundler/setup" # same as Bundler.setup
|
135
|
+
Bundler.setup(:default) # only set up the _default_ group
|
136
|
+
Bundler.setup(:test) # only set up the _test_ group (but `not` _default_)
|
137
|
+
Bundler.setup(:default, :test) # set up the _default_ and _test_ groups, but no others
|
138
|
+
|
139
|
+
# require requires all of the gems in the specified groups
|
140
|
+
Bundler.require # defaults to just the _default_ group
|
141
|
+
Bundler.require(:default) # identical
|
142
|
+
Bundler.require(:default, :test) # requires the _default_ and _test_ groups
|
143
|
+
Bundler.require(:test) # requires just the _test_ group
|
144
|
+
|
145
|
+
The Bundler CLI allows you to specify a list of groups whose gems `bundle install` should
|
146
|
+
not install with the `--without` option. To specify multiple groups to ignore, specify a
|
147
|
+
list of groups separated by spaces.
|
148
|
+
|
149
|
+
bundle install --without test
|
150
|
+
bundle install --without development test
|
151
|
+
|
152
|
+
After running `bundle install --without test`, bundler will remember that you excluded
|
153
|
+
the test group in the last installation. The next time you run `bundle install`,
|
154
|
+
without any `--without option`, bundler will recall it.
|
155
|
+
|
156
|
+
Also, calling `Bundler.setup` with no parameters, or calling `require "bundler/setup"`
|
157
|
+
will setup all groups except for the ones you excluded via `--without` (since they
|
158
|
+
are obviously not available).
|
159
|
+
|
160
|
+
Note that on `bundle install`, bundler downloads and evaluates all gems, in order to
|
161
|
+
create a single canonical list of all of the required gems and their dependencies.
|
162
|
+
This means that you cannot list different versions of the same gems in different
|
163
|
+
groups. For more details, see [Understanding Bundler](http://bundler.io/rationale.html).
|
164
|
+
|
165
|
+
### PLATFORMS (:platforms)
|
166
|
+
|
167
|
+
If a gem should only be used in a particular platform or set of platforms, you can
|
168
|
+
specify them. Platforms are essentially identical to groups, except that you do not
|
169
|
+
need to use the `--without` install-time flag to exclude groups of gems for other
|
170
|
+
platforms.
|
171
|
+
|
172
|
+
There are a number of `Gemfile` platforms:
|
173
|
+
|
174
|
+
* `ruby`:
|
175
|
+
C Ruby (MRI) or Rubinius, but `NOT` Windows
|
176
|
+
* `ruby_18`:
|
177
|
+
_ruby_ `AND` version 1.8
|
178
|
+
* `ruby_19`:
|
179
|
+
_ruby_ `AND` version 1.9
|
180
|
+
* `ruby_20`:
|
181
|
+
_ruby_ `AND` version 2.0
|
182
|
+
* `ruby_21`:
|
183
|
+
_ruby_ `AND` version 2.1
|
184
|
+
* `ruby_22`:
|
185
|
+
_ruby_ `AND` version 2.2
|
186
|
+
* `ruby_23`:
|
187
|
+
_ruby_ `AND` version 2.3
|
188
|
+
* `mri`:
|
189
|
+
Same as _ruby_, but not Rubinius
|
190
|
+
* `mri_18`:
|
191
|
+
_mri_ `AND` version 1.8
|
192
|
+
* `mri_19`:
|
193
|
+
_mri_ `AND` version 1.9
|
194
|
+
* `mri_20`:
|
195
|
+
_mri_ `AND` version 2.0
|
196
|
+
* `mri_21`:
|
197
|
+
_mri_ `AND` version 2.1
|
198
|
+
* `mri_22`:
|
199
|
+
_mri_ `AND` version 2.2
|
200
|
+
* `mri_23`:
|
201
|
+
_mri_ `AND` version 2.3
|
202
|
+
* `rbx`:
|
203
|
+
Same as _ruby_, but only Rubinius (not MRI)
|
204
|
+
* `jruby`:
|
205
|
+
JRuby
|
206
|
+
* `mswin`:
|
207
|
+
Windows
|
208
|
+
* `mingw`:
|
209
|
+
Windows 32 bit 'mingw32' platform (aka RubyInstaller)
|
210
|
+
* `mingw_18`:
|
211
|
+
_mingw_ `AND` version 1.8
|
212
|
+
* `mingw_19`:
|
213
|
+
_mingw_ `AND` version 1.9
|
214
|
+
* `mingw_20`:
|
215
|
+
_mingw_ `AND` version 2.0
|
216
|
+
* `mingw_21`:
|
217
|
+
_mingw_ `AND` version 2.1
|
218
|
+
* `mingw_22`:
|
219
|
+
_mingw_ `AND` version 2.2
|
220
|
+
* `mingw_23`:
|
221
|
+
_mingw_ `AND` version 2.3
|
222
|
+
* `x64_mingw`:
|
223
|
+
Windows 64 bit 'mingw32' platform (aka RubyInstaller x64)
|
224
|
+
* `x64_mingw_20`:
|
225
|
+
_x64_mingw_ `AND` version 2.0
|
226
|
+
* `x64_mingw_21`:
|
227
|
+
_x64_mingw_ `AND` version 2.1
|
228
|
+
* `x64_mingw_22`:
|
229
|
+
_x64_mingw_ `AND` version 2.2
|
230
|
+
* `x64_mingw_23`:
|
231
|
+
_x64_mingw_ `AND` version 2.3
|
232
|
+
|
233
|
+
As with groups, you can specify one or more platforms:
|
234
|
+
|
235
|
+
gem "weakling", :platforms => :jruby
|
236
|
+
gem "ruby-debug", :platforms => :mri_18
|
237
|
+
gem "nokogiri", :platforms => [:mri_18, :jruby]
|
238
|
+
|
239
|
+
All operations involving groups (`bundle install`, `Bundler.setup`,
|
240
|
+
`Bundler.require`) behave exactly the same as if any groups not
|
241
|
+
matching the current platform were explicitly excluded.
|
242
|
+
|
243
|
+
### SOURCE (:source)
|
244
|
+
|
245
|
+
You can select an alternate Rubygems repository for a gem using the ':source'
|
246
|
+
option.
|
247
|
+
|
248
|
+
gem "some_internal_gem", :source => "https://gems.example.com"
|
249
|
+
|
250
|
+
This forces the gem to be loaded from this source and ignores any global sources
|
251
|
+
declared at the top level of the file. If the gem does not exist in this source,
|
252
|
+
it will not be installed.
|
253
|
+
|
254
|
+
Bundler will search for child dependencies of this gem by first looking in the
|
255
|
+
source selected for the parent, but if they are not found there, it will fall
|
256
|
+
back on global sources using the ordering described in [SOURCE PRIORITY][].
|
257
|
+
|
258
|
+
Selecting a specific source repository this way also suppresses the ambiguous
|
259
|
+
gem warning described above in
|
260
|
+
[GLOBAL SOURCES (#source)](#GLOBAL-SOURCES-source-).
|
261
|
+
|
262
|
+
### GIT (:git)
|
263
|
+
|
264
|
+
If necessary, you can specify that a gem is located at a particular
|
265
|
+
git repository using the `:git` parameter. The repository can be accessed via
|
266
|
+
several protocols:
|
267
|
+
|
268
|
+
* `HTTP(S)`:
|
269
|
+
gem "rails", :git => "https://github.com/rails/rails.git"
|
270
|
+
* `SSH`:
|
271
|
+
gem "rails", :git => "git@github.com:rails/rails.git"
|
272
|
+
* `git`:
|
273
|
+
gem "rails", :git => "git://github.com/rails/rails.git"
|
274
|
+
|
275
|
+
If using SSH, the user that you use to run `bundle install` `MUST` have the
|
276
|
+
appropriate keys available in their `$HOME/.ssh`.
|
277
|
+
|
278
|
+
`NOTE`: `http://` and `git://` URLs should be avoided if at all possible. These
|
279
|
+
protocols are unauthenticated, so a man-in-the-middle attacker can deliver
|
280
|
+
malicious code and compromise your system. HTTPS and SSH are strongly
|
281
|
+
preferred.
|
282
|
+
|
283
|
+
The `group`, `platforms`, and `require` options are available and behave
|
284
|
+
exactly the same as they would for a normal gem.
|
285
|
+
|
286
|
+
A git repository `SHOULD` have at least one file, at the root of the
|
287
|
+
directory containing the gem, with the extension `.gemspec`. This file
|
288
|
+
`MUST` contain a valid gem specification, as expected by the `gem build`
|
289
|
+
command.
|
290
|
+
|
291
|
+
If a git repository does not have a `.gemspec`, bundler will attempt to
|
292
|
+
create one, but it will not contain any dependencies, executables, or
|
293
|
+
C extension compilation instructions. As a result, it may fail to properly
|
294
|
+
integrate into your application.
|
295
|
+
|
296
|
+
If a git repository does have a `.gemspec` for the gem you attached it
|
297
|
+
to, a version specifier, if provided, means that the git repository is
|
298
|
+
only valid if the `.gemspec` specifies a version matching the version
|
299
|
+
specifier. If not, bundler will print a warning.
|
300
|
+
|
301
|
+
gem "rails", "2.3.8", :git => "https://github.com/rails/rails.git"
|
302
|
+
# bundle install will fail, because the .gemspec in the rails
|
303
|
+
# repository's master branch specifies version 3.0.0
|
304
|
+
|
305
|
+
If a git repository does `not` have a `.gemspec` for the gem you attached
|
306
|
+
it to, a version specifier `MUST` be provided. Bundler will use this
|
307
|
+
version in the simple `.gemspec` it creates.
|
308
|
+
|
309
|
+
Git repositories support a number of additional options.
|
310
|
+
|
311
|
+
* `branch`, `tag`, and `ref`:
|
312
|
+
You `MUST` only specify at most one of these options. The default
|
313
|
+
is `:branch => "master"`
|
314
|
+
* `submodules`:
|
315
|
+
Specify `:submodules => true` to cause bundler to expand any
|
316
|
+
submodules included in the git repository
|
317
|
+
|
318
|
+
If a git repository contains multiple `.gemspecs`, each `.gemspec`
|
319
|
+
represents a gem located at the same place in the file system as
|
320
|
+
the `.gemspec`.
|
321
|
+
|
322
|
+
|~rails [git root]
|
323
|
+
| |-rails.gemspec [rails gem located here]
|
324
|
+
|~actionpack
|
325
|
+
| |-actionpack.gemspec [actionpack gem located here]
|
326
|
+
|~activesupport
|
327
|
+
| |-activesupport.gemspec [activesupport gem located here]
|
328
|
+
|...
|
329
|
+
|
330
|
+
To install a gem located in a git repository, bundler changes to
|
331
|
+
the directory containing the gemspec, runs `gem build name.gemspec`
|
332
|
+
and then installs the resulting gem. The `gem build` command,
|
333
|
+
which comes standard with Rubygems, evaluates the `.gemspec` in
|
334
|
+
the context of the directory in which it is located.
|
335
|
+
|
336
|
+
### GIT SOURCE (:git_source)
|
337
|
+
|
338
|
+
A custom git source can be defined via the `git_source` method. Provide the source's name
|
339
|
+
as an argument, and a block which receives a single argument and interpolates it into a
|
340
|
+
string to return the full repo address:
|
341
|
+
|
342
|
+
git_source(:stash){ |repo_name| "https://stash.corp.acme.pl/#{repo_name}.git" }
|
343
|
+
gem 'rails', :stash => 'forks/rails'
|
344
|
+
|
345
|
+
In addition, if you wish to choose a specific branch:
|
346
|
+
|
347
|
+
gem "rails", :stash => "forks/rails", :branch => "branch_name"
|
348
|
+
|
349
|
+
### GITHUB (:github)
|
350
|
+
|
351
|
+
`NOTE`: This shorthand should be avoided until Bundler 2.0, since it
|
352
|
+
currently expands to an insecure `git://` URL. This allows a
|
353
|
+
man-in-the-middle attacker to compromise your system.
|
354
|
+
|
355
|
+
If the git repository you want to use is hosted on GitHub and is public, you can use the
|
356
|
+
:github shorthand to specify just the github username and repository name (without the
|
357
|
+
trailing ".git"), separated by a slash. If both the username and repository name are the
|
358
|
+
same, you can omit one.
|
359
|
+
|
360
|
+
gem "rails", :github => "rails/rails"
|
361
|
+
gem "rails", :github => "rails"
|
362
|
+
|
363
|
+
Are both equivalent to
|
364
|
+
|
365
|
+
gem "rails", :git => "git://github.com/rails/rails.git"
|
366
|
+
|
367
|
+
Since the `github` method is a specialization of `git_source`, it accepts a `:branch` named argument.
|
368
|
+
|
369
|
+
### GIST (:gist)
|
370
|
+
|
371
|
+
If the git repository you want to use is hosted as a Github Gist and is public, you can use
|
372
|
+
the :gist shorthand to specify just the gist identifier (without the trailing ".git").
|
373
|
+
|
374
|
+
gem "the_hatch", :gist => "4815162342"
|
375
|
+
|
376
|
+
Is equivalent to:
|
377
|
+
|
378
|
+
gem "the_hatch", :git => "https://gist.github.com/4815162342.git"
|
379
|
+
|
380
|
+
Since the `gist` method is a specialization of `git_source`, it accepts a `:branch` named argument.
|
381
|
+
|
382
|
+
### BITBUCKET (:bitbucket)
|
383
|
+
|
384
|
+
If the git repository you want to use is hosted on Bitbucket and is public, you can use the
|
385
|
+
:bitbucket shorthand to specify just the bitbucket username and repository name (without the
|
386
|
+
trailing ".git"), separated by a slash. If both the username and repository name are the
|
387
|
+
same, you can omit one.
|
388
|
+
|
389
|
+
gem "rails", :bitbucket => "rails/rails"
|
390
|
+
gem "rails", :bitbucket => "rails"
|
391
|
+
|
392
|
+
Are both equivalent to
|
393
|
+
|
394
|
+
gem "rails", :git => "https://rails@bitbucket.org/rails/rails.git"
|
395
|
+
|
396
|
+
Since the `bitbucket` method is a specialization of `git_source`, it accepts a `:branch` named argument.
|
397
|
+
|
398
|
+
### PATH (:path)
|
399
|
+
|
400
|
+
You can specify that a gem is located in a particular location
|
401
|
+
on the file system. Relative paths are resolved relative to the
|
402
|
+
directory containing the `Gemfile`.
|
403
|
+
|
404
|
+
Similar to the semantics of the `:git` option, the `:path`
|
405
|
+
option requires that the directory in question either contains
|
406
|
+
a `.gemspec` for the gem, or that you specify an explicit
|
407
|
+
version that bundler should use.
|
408
|
+
|
409
|
+
Unlike `:git`, bundler does not compile C extensions for
|
410
|
+
gems specified as paths.
|
411
|
+
|
412
|
+
gem "rails", :path => "vendor/rails"
|
413
|
+
|
414
|
+
If you would like to use multiple local gems directly from the filesystem, you can set a global `path` option to the path containing the gem's files. This will automatically load gemspec files from subdirectories.
|
415
|
+
|
416
|
+
path 'components' do
|
417
|
+
gem 'admin_ui'
|
418
|
+
gem 'public_ui'
|
419
|
+
end
|
420
|
+
|
421
|
+
## BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS
|
422
|
+
|
423
|
+
The `:source`, `:git`, `:path`, `:group`, and `:platforms` options may be
|
424
|
+
applied to a group of gems by using block form.
|
425
|
+
|
426
|
+
source "https://gems.example.com" do
|
427
|
+
gem "some_internal_gem"
|
428
|
+
gem "another_internal_gem"
|
429
|
+
end
|
430
|
+
|
431
|
+
git "https://github.com/rails/rails.git" do
|
432
|
+
gem "activesupport"
|
433
|
+
gem "actionpack"
|
434
|
+
end
|
435
|
+
|
436
|
+
platforms :ruby do
|
437
|
+
gem "ruby-debug"
|
438
|
+
gem "sqlite3"
|
439
|
+
end
|
440
|
+
|
441
|
+
group :development, :optional => true do
|
442
|
+
gem "wirble"
|
443
|
+
gem "faker"
|
444
|
+
end
|
445
|
+
|
446
|
+
In the case of the group block form the :optional option can be given
|
447
|
+
to prevent a group from being installed unless listed in the `--with`
|
448
|
+
option given to the `bundle install` command.
|
449
|
+
|
450
|
+
In the case of the `git` block form, the `:ref`, `:branch`, `:tag`,
|
451
|
+
and `:submodules` options may be passed to the `git` method, and
|
452
|
+
all gems in the block will inherit those options.
|
453
|
+
|
454
|
+
## INSTALL_IF (#install_if)
|
455
|
+
|
456
|
+
The `install_if` method allows gems to be installed based on a proc or lambda.
|
457
|
+
This is especially useful for optional gems that can only be used if certain
|
458
|
+
software is installed or some other conditions are met.
|
459
|
+
|
460
|
+
install_if -> { RUBY_PLATFORM =~ /darwin/ } do
|
461
|
+
gem "pasteboard"
|
462
|
+
end
|
463
|
+
|
464
|
+
## GEMSPEC (#gemspec)
|
465
|
+
|
466
|
+
If you wish to use Bundler to help install dependencies for a gem while it is
|
467
|
+
being developed, use the `gemspec` method to pull in the dependencies listed in
|
468
|
+
the `.gemspec` file.
|
469
|
+
|
470
|
+
The `gemspec` method adds any runtime dependencies as gem requirements in the
|
471
|
+
default group. It also adds development dependencies as gem requirements in the
|
472
|
+
`development` group. Finally, it adds a gem requirement on your project (`:path
|
473
|
+
=> '.'`). In conjunction with `Bundler.setup`, this allows you to require project
|
474
|
+
files in your test code as you would if the project were installed as a gem; you
|
475
|
+
need not manipulate the load path manually or require project files via relative
|
476
|
+
paths.
|
477
|
+
|
478
|
+
The `gemspec` method supports optional `:path`, `:glob`, `:name`, and `:development_group`
|
479
|
+
options, which control where bundler looks for the `.gemspec`, the glob it uses to look
|
480
|
+
for the gemspec (defaults to: "{,*,*/*}.gemspec"), what named `.gemspec` it uses
|
481
|
+
(if more than one is present), and which group development dependencies are included in.
|
482
|
+
|
483
|
+
## SOURCE PRIORITY
|
484
|
+
|
485
|
+
When attempting to locate a gem to satisfy a gem requirement,
|
486
|
+
bundler uses the following priority order:
|
487
|
+
|
488
|
+
1. The source explicitly attached to the gem (using `:source`, `:path`, or
|
489
|
+
`:git`)
|
490
|
+
2. For implicit gems (dependencies of explicit gems), any source, git, or path
|
491
|
+
repository declared on the parent. This results in bundler prioritizing the
|
492
|
+
ActiveSupport gem from the Rails git repository over ones from
|
493
|
+
`rubygems.org`
|
494
|
+
3. The sources specified via global `source` lines, searching each source in
|
495
|
+
your `Gemfile` from last added to first added.
|