bundler 1.12.6 → 1.13.0.pre.1
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 +4 -4
- data/.rubocop_todo.yml +15 -13
- data/.travis.yml +2 -2
- data/CHANGELOG.md +40 -3
- data/CONTRIBUTING.md +9 -5
- data/DEVELOPMENT.md +30 -18
- data/ISSUES.md +26 -22
- data/Rakefile +15 -4
- data/bin/rubocop +1 -1
- data/bundler.gemspec +2 -2
- data/exe/bundle +7 -0
- data/lib/bundler.rb +6 -3
- data/lib/bundler/capistrano.rb +1 -1
- data/lib/bundler/cli.rb +27 -10
- data/lib/bundler/cli/binstubs.rb +2 -0
- data/lib/bundler/cli/exec.rb +1 -1
- data/lib/bundler/cli/install.rb +87 -56
- data/lib/bundler/cli/lock.rb +5 -0
- data/lib/bundler/cli/open.rb +3 -1
- data/lib/bundler/cli/outdated.rb +8 -8
- data/lib/bundler/cli/plugin.rb +23 -0
- data/lib/bundler/cli/update.rb +2 -2
- data/lib/bundler/cli/viz.rb +3 -0
- data/lib/bundler/definition.rb +72 -16
- data/lib/bundler/dsl.rb +19 -7
- data/lib/bundler/endpoint_specification.rb +2 -2
- data/lib/bundler/env.rb +2 -2
- data/lib/bundler/errors.rb +15 -1
- data/lib/bundler/fetcher.rb +5 -2
- data/lib/bundler/fetcher/compact_index.rb +2 -2
- data/lib/bundler/fetcher/dependency.rb +8 -4
- data/lib/bundler/fetcher/downloader.rb +1 -1
- data/lib/bundler/friendly_errors.rb +1 -1
- data/lib/bundler/index.rb +29 -36
- data/lib/bundler/inline.rb +14 -4
- data/lib/bundler/installer.rb +22 -3
- data/lib/bundler/installer/gem_installer.rb +1 -1
- data/lib/bundler/installer/standalone.rb +1 -1
- data/lib/bundler/mirror.rb +4 -4
- data/lib/bundler/plugin.rb +156 -0
- data/lib/bundler/plugin/api.rb +56 -0
- data/lib/bundler/plugin/dsl.rb +29 -0
- data/lib/bundler/plugin/index.rb +88 -0
- data/lib/bundler/plugin/installer.rb +99 -0
- data/lib/bundler/plugin/installer/git.rb +38 -0
- data/lib/bundler/plugin/installer/rubygems.rb +27 -0
- data/lib/bundler/plugin/source_list.rb +24 -0
- data/lib/bundler/postit_trampoline.rb +54 -0
- data/lib/bundler/psyched_yaml.rb +1 -1
- data/lib/bundler/remote_specification.rb +5 -5
- data/lib/bundler/resolver.rb +27 -29
- data/lib/bundler/ruby_version.rb +29 -3
- data/lib/bundler/rubygems_ext.rb +3 -1
- data/lib/bundler/rubygems_integration.rb +10 -4
- data/lib/bundler/runtime.rb +1 -16
- data/lib/bundler/settings.rb +19 -15
- data/lib/bundler/setup.rb +1 -0
- data/lib/bundler/shared_helpers.rb +3 -0
- data/lib/bundler/source.rb +4 -3
- data/lib/bundler/source/gemspec.rb +13 -0
- data/lib/bundler/source/git.rb +4 -3
- data/lib/bundler/source/git/git_proxy.rb +9 -5
- data/lib/bundler/source/path.rb +11 -2
- data/lib/bundler/source/rubygems.rb +28 -15
- data/lib/bundler/source_list.rb +5 -1
- data/lib/bundler/spec_set.rb +3 -3
- data/lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem +21 -0
- data/lib/bundler/ssl_certs/rubygems.org/{AddTrustExternalCARoot-2048.pem → AddTrustExternalCARoot.pem} +0 -0
- data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +54 -29
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +5 -2
- data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +3 -3
- data/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +2 -2
- data/lib/bundler/ui/shell.rb +4 -0
- data/lib/bundler/ui/silent.rb +3 -0
- data/lib/bundler/uri_credentials_filter.rb +36 -0
- data/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +50 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +80 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +56 -144
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +35 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +58 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +61 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +53 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +114 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +45 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +35 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +123 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +46 -51
- data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +4 -2
- data/lib/bundler/vendor/postit/lib/postit.rb +15 -0
- data/lib/bundler/vendor/postit/lib/postit/environment.rb +44 -0
- data/lib/bundler/vendor/postit/lib/postit/installer.rb +28 -0
- data/lib/bundler/vendor/postit/lib/postit/parser.rb +21 -0
- data/lib/bundler/vendor/postit/lib/postit/setup.rb +12 -0
- data/lib/bundler/vendor/postit/lib/postit/version.rb +3 -0
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler/vlad.rb +1 -1
- data/lib/bundler/yaml_serializer.rb +67 -0
- data/man/bundle-install.ronn +10 -5
- data/man/bundle-package.ronn +7 -6
- data/man/bundle-platform.ronn +1 -1
- data/man/bundle-update.ronn +5 -2
- data/man/bundle.ronn +5 -5
- data/man/gemfile.5.ronn +32 -28
- metadata +37 -12
- data/lib/bundler/ssl_certs/Fastly.pem +0 -82
- data/lib/bundler/ssl_certs/GlobalSignOrganizationValidationCA.pem +0 -26
- data/lib/bundler/ssl_certs/GlobalSignRoot.pem +0 -18
- data/lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRoot.pem +0 -18
@@ -36,12 +36,14 @@ module Bundler::Molinillo
|
|
36
36
|
PossibilityState.new(
|
37
37
|
name,
|
38
38
|
requirements.dup,
|
39
|
-
activated
|
39
|
+
activated,
|
40
40
|
requirement,
|
41
41
|
[possibilities.pop],
|
42
42
|
depth + 1,
|
43
43
|
conflicts.dup
|
44
|
-
)
|
44
|
+
).tap do |state|
|
45
|
+
state.activated.tag(state)
|
46
|
+
end
|
45
47
|
end
|
46
48
|
end
|
47
49
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'postit/environment'
|
2
|
+
require 'postit/installer'
|
3
|
+
require 'postit/parser'
|
4
|
+
require 'postit/version'
|
5
|
+
require 'rubygems'
|
6
|
+
|
7
|
+
module BundlerVendoredPostIt
|
8
|
+
def self.setup
|
9
|
+
load File.expand_path('../postit/setup.rb', __FILE__)
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.bundler_version
|
13
|
+
defined?(Bundler::VERSION) && Bundler::VERSION
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'postit/parser'
|
2
|
+
|
3
|
+
module BundlerVendoredPostIt
|
4
|
+
class Environment
|
5
|
+
def initialize(argv)
|
6
|
+
@argv = argv
|
7
|
+
end
|
8
|
+
|
9
|
+
def env_var_version
|
10
|
+
ENV['BUNDLER_VERSION']
|
11
|
+
end
|
12
|
+
|
13
|
+
def cli_arg_version
|
14
|
+
return unless str = @argv.first
|
15
|
+
str = str.dup.force_encoding('BINARY') if str.respond_to?(:force_encoding)
|
16
|
+
if Gem::Version.correct?(str)
|
17
|
+
@argv.shift
|
18
|
+
str
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def gemfile
|
23
|
+
ENV['BUNDLE_GEMFILE'] || 'Gemfile'
|
24
|
+
end
|
25
|
+
|
26
|
+
def lockfile
|
27
|
+
File.expand_path case File.basename(gemfile)
|
28
|
+
when 'gems.rb' then gemfile.sub(/\.rb$/, gemfile)
|
29
|
+
else "#{gemfile}.lock"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def lockfile_version
|
34
|
+
BundlerVendoredPostIt::Parser.new(lockfile).parse
|
35
|
+
end
|
36
|
+
|
37
|
+
def bundler_version
|
38
|
+
@bundler_version ||= begin
|
39
|
+
env_var_version || cli_arg_version ||
|
40
|
+
lockfile_version || "#{Gem::Requirement.default}.a"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module BundlerVendoredPostIt
|
2
|
+
class Installer
|
3
|
+
def initialize(bundler_version)
|
4
|
+
@bundler_version = bundler_version
|
5
|
+
end
|
6
|
+
|
7
|
+
def installed?
|
8
|
+
if Gem::Specification.respond_to?(:find_by_name)
|
9
|
+
!Gem::Specification.find_by_name('bundler', @bundler_version).nil?
|
10
|
+
else
|
11
|
+
requirement = Gem::Requirement.new(@bundler_version)
|
12
|
+
Gem.source_index.gems.values.any? do |s|
|
13
|
+
s.name == 'bundler' && requirement.satisfied_by?(s.version)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
rescue LoadError
|
17
|
+
false
|
18
|
+
end
|
19
|
+
|
20
|
+
def install!
|
21
|
+
return if installed?
|
22
|
+
require 'rubygems/dependency_installer'
|
23
|
+
installer = Gem::DependencyInstaller.new
|
24
|
+
installer.install('bundler', @bundler_version)
|
25
|
+
installer.installed_gems
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
module BundlerVendoredPostIt
|
4
|
+
class Parser
|
5
|
+
def initialize(file)
|
6
|
+
@file = file
|
7
|
+
end
|
8
|
+
|
9
|
+
BUNDLED_WITH =
|
10
|
+
/\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
|
11
|
+
|
12
|
+
def parse
|
13
|
+
return unless lockfile = File.file?(@file) && File.read(@file)
|
14
|
+
if lockfile =~ BUNDLED_WITH
|
15
|
+
Regexp.last_match(1)
|
16
|
+
else
|
17
|
+
'< 1.10'
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'postit/environment'
|
2
|
+
require 'postit/installer'
|
3
|
+
|
4
|
+
environment = BundlerVendoredPostIt::Environment.new(ARGV)
|
5
|
+
version = environment.bundler_version
|
6
|
+
|
7
|
+
installer = BundlerVendoredPostIt::Installer.new(version)
|
8
|
+
installer.install!
|
9
|
+
|
10
|
+
gem 'bundler', version
|
11
|
+
|
12
|
+
require 'bundler/version'
|
data/lib/bundler/version.rb
CHANGED
@@ -7,5 +7,5 @@ module Bundler
|
|
7
7
|
# We're doing this because we might write tests that deal
|
8
8
|
# with other versions of bundler and we are unsure how to
|
9
9
|
# handle this better.
|
10
|
-
VERSION = "1.
|
10
|
+
VERSION = "1.13.0.pre.1" unless defined?(::Bundler::VERSION)
|
11
11
|
end
|
data/lib/bundler/vlad.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# Vlad task for Bundler.
|
3
3
|
#
|
4
|
-
#
|
4
|
+
# Add "require 'bundler/vlad'" in your Vlad deploy.rb, and
|
5
5
|
# include the vlad:bundle:install task in your vlad:deploy task.
|
6
6
|
require "bundler/deployment"
|
7
7
|
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
# A stub yaml serializer that can handle only hashes and strings (as of now).
|
5
|
+
module YAMLSerializer
|
6
|
+
module_function
|
7
|
+
|
8
|
+
def dump(hash)
|
9
|
+
yaml = String.new("---")
|
10
|
+
yaml << dump_hash(hash)
|
11
|
+
end
|
12
|
+
|
13
|
+
def dump_hash(hash)
|
14
|
+
yaml = String.new("\n")
|
15
|
+
hash.each do |k, v|
|
16
|
+
yaml << k << ":"
|
17
|
+
if v.is_a?(Hash)
|
18
|
+
yaml << dump_hash(v).gsub(/^(?!$)/, " ") # indent all non-empty lines
|
19
|
+
else
|
20
|
+
yaml << " " << v.to_s.gsub(/\s+/, " ").inspect << "\n"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
yaml
|
24
|
+
end
|
25
|
+
|
26
|
+
SCAN_REGEX = /
|
27
|
+
^
|
28
|
+
([ ]*) # indentations
|
29
|
+
(.*) # key
|
30
|
+
(?::(?=\s)) # : (without the lookahead the #key includes this when : is present in value)
|
31
|
+
[ ]?
|
32
|
+
(?: !\s)? # optional exclamation mark found with ruby 1.9.3
|
33
|
+
(['"]?) # optional opening quote
|
34
|
+
(.*) # value
|
35
|
+
\3 # matching closing quote
|
36
|
+
$
|
37
|
+
/xo
|
38
|
+
|
39
|
+
def load(str)
|
40
|
+
res = {}
|
41
|
+
stack = [res]
|
42
|
+
str.scan(SCAN_REGEX).each do |(indent, key, _, val)|
|
43
|
+
key = convert_to_backward_compatible_key(key)
|
44
|
+
depth = indent.scan(/ /).length
|
45
|
+
if val.empty?
|
46
|
+
new_hash = {}
|
47
|
+
stack[depth][key] = new_hash
|
48
|
+
stack[depth + 1] = new_hash
|
49
|
+
else
|
50
|
+
stack[depth][key] = val
|
51
|
+
end
|
52
|
+
end
|
53
|
+
res
|
54
|
+
end
|
55
|
+
|
56
|
+
# for settings' keys
|
57
|
+
def convert_to_backward_compatible_key(key)
|
58
|
+
key = "#{key}/" if key =~ /https?:/i && key !~ %r{/\Z}
|
59
|
+
key = key.gsub(".", "__") if key.include?(".")
|
60
|
+
key
|
61
|
+
end
|
62
|
+
|
63
|
+
class << self
|
64
|
+
private :dump_hash, :convert_to_backward_compatible_key
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
data/man/bundle-install.ronn
CHANGED
@@ -11,6 +11,7 @@ bundle-install(1) -- Install the dependencies specified in your Gemfile
|
|
11
11
|
[--local]
|
12
12
|
[--deployment]
|
13
13
|
[--force]
|
14
|
+
[--frozen]
|
14
15
|
[--no-cache]
|
15
16
|
[--no-prune]
|
16
17
|
[--path PATH]
|
@@ -86,6 +87,10 @@ update process below under [CONSERVATIVE UPDATING][].
|
|
86
87
|
Force download every gem, even if the required versions are already available
|
87
88
|
locally.
|
88
89
|
|
90
|
+
* `--frozen`:
|
91
|
+
Do not allow the Gemfile.lock to be updated after this install. Exits
|
92
|
+
non-zero if there are going to be changes to the Gemfile.lock.
|
93
|
+
|
89
94
|
* `--system`:
|
90
95
|
Installs the gems specified in the bundle to the system's Rubygems location.
|
91
96
|
This overrides any previous [remembered][REMEMBERED OPTIONS] use of `--path`.
|
@@ -174,7 +179,7 @@ will cause an error when the Gemfile(5) is modified.
|
|
174
179
|
3. Gems are installed to `vendor/bundle` not your default system location
|
175
180
|
|
176
181
|
In development, it's convenient to share the gems used in your
|
177
|
-
application with other applications and other scripts run on
|
182
|
+
application with other applications and other scripts that run on
|
178
183
|
the system.
|
179
184
|
|
180
185
|
In deployment, isolation is a more important default. In addition,
|
@@ -195,7 +200,7 @@ that case, Bundler will stage everything in a temporary directory,
|
|
195
200
|
then ask you for your `sudo` password in order to copy the gems into
|
196
201
|
their system location.
|
197
202
|
|
198
|
-
From your perspective, this is identical to installing
|
203
|
+
From your perspective, this is identical to installing the gems
|
199
204
|
directly into the system.
|
200
205
|
|
201
206
|
You should never use `sudo bundle install`. This is because several
|
@@ -207,7 +212,7 @@ other steps in `bundle install` must be performed as the current user:
|
|
207
212
|
|
208
213
|
Of these three, the first two could theoretically be performed by
|
209
214
|
`chown`ing the resulting files to `$SUDO_USER`. The third, however,
|
210
|
-
can only be performed by
|
215
|
+
can only be performed by invoking the `git` command as
|
211
216
|
the current user. Therefore, git gems are downloaded and installed
|
212
217
|
into `~/.bundle` rather than $GEM_HOME or $BUNDLE_PATH.
|
213
218
|
|
@@ -266,7 +271,7 @@ This also means that you cannot include different versions of the same
|
|
266
271
|
gem in different groups, because doing so would result in different
|
267
272
|
sets of dependencies used in development and production. Because of
|
268
273
|
the vagaries of the dependency resolution process, this usually
|
269
|
-
affects more than
|
274
|
+
affects more than the gems you list in your Gemfile(5), and can
|
270
275
|
(surprisingly) radically change the gems you are using.
|
271
276
|
|
272
277
|
## REMEMBERED OPTIONS
|
@@ -390,7 +395,7 @@ which other gems in the Gemfile(5) still depend on, run
|
|
390
395
|
|
391
396
|
`Summary`: In general, after making a change to the Gemfile(5) , you
|
392
397
|
should first try to run `bundle install`, which will guarantee that no
|
393
|
-
other
|
398
|
+
other gem in the Gemfile(5) is impacted by the change. If that
|
394
399
|
does not work, run [bundle update(1)][bundle-update].
|
395
400
|
|
396
401
|
## SEE ALSO
|
data/man/bundle-package.ronn
CHANGED
@@ -20,9 +20,10 @@ via the `--all` option. Once used, the `--all` option will be remembered.
|
|
20
20
|
## SUPPORT FOR MULTIPLE PLATFORMS
|
21
21
|
|
22
22
|
When using gems that have different packages for different platforms, Bundler
|
23
|
-
1.8 and newer support caching of gems for other platforms
|
24
|
-
|
25
|
-
|
23
|
+
1.8 and newer support caching of gems for other platforms where the Gemfile
|
24
|
+
has been resolved (i.e. present in the lockfile) in `vendor/cache`. This needs
|
25
|
+
to be enabled via the `--all-platforms` option. This setting will be remembered
|
26
|
+
in your local bundler configuration.
|
26
27
|
|
27
28
|
## REMOTE FETCHING
|
28
29
|
|
@@ -43,12 +44,12 @@ to JRuby and run `bundle install`, bundler is forced to check to
|
|
43
44
|
see whether a `"java"` platformed `nokogiri` exists.
|
44
45
|
|
45
46
|
Even though the `nokogiri` gem for the Ruby platform is
|
46
|
-
_technically_ acceptable on JRuby, it
|
47
|
+
_technically_ acceptable on JRuby, it has a C extension
|
47
48
|
that does not run on JRuby. As a result, bundler will, by default,
|
48
49
|
still connect to `rubygems.org` to check whether it has a version
|
49
50
|
of one of your gems more specific to your platform.
|
50
51
|
|
51
|
-
This problem is also not
|
52
|
+
This problem is also not limited to the `"java"` platform.
|
52
53
|
A similar (common) problem can happen when developing on Windows
|
53
54
|
and deploying to Linux, or even when developing on OSX and
|
54
55
|
deploying to Linux.
|
@@ -56,7 +57,7 @@ deploying to Linux.
|
|
56
57
|
If you know for sure that the gems packaged in `vendor/cache`
|
57
58
|
are appropriate for the platform you are on, you can run
|
58
59
|
`bundle install --local` to skip checking for more appropriate
|
59
|
-
gems, and
|
60
|
+
gems, and use the ones in `vendor/cache`.
|
60
61
|
|
61
62
|
One way to be sure that you have the right platformed versions
|
62
63
|
of all your gems is to run `bundle package` on an identical
|
data/man/bundle-platform.ronn
CHANGED
@@ -38,5 +38,5 @@ match the running Ruby VM, it will tell you what part does not.
|
|
38
38
|
## OPTIONS
|
39
39
|
|
40
40
|
* `--ruby`:
|
41
|
-
It will
|
41
|
+
It will display the ruby directive information, so you don't have to
|
42
42
|
parse it from the Gemfile(5).
|
data/man/bundle-update.ronn
CHANGED
@@ -34,6 +34,9 @@ gem.
|
|
34
34
|
* `--ruby`:
|
35
35
|
Update the locked version of Ruby to the current version of Ruby.
|
36
36
|
|
37
|
+
* `--bundler`:
|
38
|
+
Update the locked version of bundler to the invoked bundler version.
|
39
|
+
|
37
40
|
## UPDATING ALL GEMS
|
38
41
|
|
39
42
|
If you run `bundle update` with no parameters, bundler will ignore
|
@@ -82,8 +85,8 @@ all of the dependencies, all the way down, and install what you need:
|
|
82
85
|
Bundle complete! 2 Gemfile dependencies, 26 gems total.
|
83
86
|
Use `bundle show [gemname]` to see where a bundled gem is installed.
|
84
87
|
|
85
|
-
As you can see, even though you have
|
86
|
-
|
88
|
+
As you can see, even though you have two gems in the Gemfile(5), your application
|
89
|
+
needs 26 different gems in order to run. Bundler remembers the exact versions
|
87
90
|
it installed in `Gemfile.lock`. The next time you run [bundle install(1)][bundle-install], bundler skips
|
88
91
|
the dependency resolution and installs the same gems as it installed last time.
|
89
92
|
|
data/man/bundle.ronn
CHANGED
@@ -16,10 +16,10 @@ started, and Gemfile(5) for more information on the `Gemfile` format.
|
|
16
16
|
## OPTIONS
|
17
17
|
|
18
18
|
* `--no-color`:
|
19
|
-
|
19
|
+
Print all output without color
|
20
20
|
|
21
21
|
* `--verbose`:
|
22
|
-
|
22
|
+
Print out additional logging information
|
23
23
|
|
24
24
|
## BUNDLE COMMANDS
|
25
25
|
|
@@ -44,7 +44,7 @@ We divide `bundle` subcommands into primary commands and utilities.
|
|
44
44
|
Specify and read configuration options for bundler
|
45
45
|
|
46
46
|
* `bundle help(1)`:
|
47
|
-
|
47
|
+
Display detailed help for each subcommand
|
48
48
|
|
49
49
|
## UTILITIES
|
50
50
|
|
@@ -80,10 +80,10 @@ We divide `bundle` subcommands into primary commands and utilities.
|
|
80
80
|
Create a simple gem, suitable for development with bundler
|
81
81
|
|
82
82
|
* [bundle platform(1)][bundle-platform]:
|
83
|
-
|
83
|
+
Display platform compatibility information
|
84
84
|
|
85
85
|
* `bundle clean(1)`:
|
86
|
-
|
86
|
+
Clean up unused gems in your bundler directory
|
87
87
|
|
88
88
|
## PLUGINS
|
89
89
|
|
data/man/gemfile.5.ronn
CHANGED
@@ -15,7 +15,7 @@ directory as the `Rakefile`.
|
|
15
15
|
A `Gemfile` is evaluated as Ruby code, in a context which makes available
|
16
16
|
a number of methods used to describe the gem requirements.
|
17
17
|
|
18
|
-
## GLOBAL SOURCES
|
18
|
+
## GLOBAL SOURCES
|
19
19
|
|
20
20
|
At the top of the `Gemfile`, add a line for the `Rubygems` source that contains
|
21
21
|
the gems listed in the `Gemfile`.
|
@@ -33,11 +33,11 @@ be selected for gems that need to use a non-standard repository, suppressing
|
|
33
33
|
this warning, by using the [`:source` option](#SOURCE-source-) or a
|
34
34
|
[`source` block](#BLOCK-FORM-OF-SOURCE-GIT-PATH-GROUP-and-PLATFORMS).
|
35
35
|
|
36
|
-
### CREDENTIALS
|
36
|
+
### CREDENTIALS
|
37
37
|
|
38
|
-
Some gem sources require a username and password. Use
|
39
|
-
the username and password for any sources that need it. The command must
|
40
|
-
once on each computer that will install the Gemfile, but this keeps the
|
38
|
+
Some gem sources require a username and password. Use [bundle config(1)][bundle-config] to set
|
39
|
+
the username and password for any of the sources that need it. The command must
|
40
|
+
be run once on each computer that will install the Gemfile, but this keeps the
|
41
41
|
credentials from being stored in plain text in version control.
|
42
42
|
|
43
43
|
bundle config gems.example.com user:password
|
@@ -50,7 +50,7 @@ include the credentials in the Gemfile as part of the source URL.
|
|
50
50
|
Credentials in the source URL will take precedence over credentials set using
|
51
51
|
`config`.
|
52
52
|
|
53
|
-
## RUBY
|
53
|
+
## RUBY
|
54
54
|
|
55
55
|
If your application requires a specific Ruby version or engine, specify your
|
56
56
|
requirements using the `ruby` method, with the following arguments.
|
@@ -64,12 +64,12 @@ the Ruby version that the engine is compatible with.
|
|
64
64
|
|
65
65
|
ruby "1.9.3"
|
66
66
|
|
67
|
-
### ENGINE
|
67
|
+
### ENGINE
|
68
68
|
|
69
69
|
Each application _may_ specify a Ruby engine. If an engine is specified, an
|
70
70
|
engine version _must_ also be specified.
|
71
71
|
|
72
|
-
### ENGINE VERSION
|
72
|
+
### ENGINE VERSION
|
73
73
|
|
74
74
|
Each application _may_ specify a Ruby engine version. If an engine version is
|
75
75
|
specified, an engine _must_ also be specified. If the engine is "ruby" the
|
@@ -77,13 +77,13 @@ engine version specified _must_ match the Ruby version.
|
|
77
77
|
|
78
78
|
ruby "1.8.7", :engine => "jruby", :engine_version => "1.6.7"
|
79
79
|
|
80
|
-
### PATCHLEVEL
|
80
|
+
### PATCHLEVEL
|
81
81
|
|
82
82
|
Each application _may_ specify a Ruby patchlevel.
|
83
83
|
|
84
84
|
ruby "2.0.0", :patchlevel => "247"
|
85
85
|
|
86
|
-
## GEMS
|
86
|
+
## GEMS
|
87
87
|
|
88
88
|
Specify gem requirements using the `gem` method, with the following arguments.
|
89
89
|
All parameters are `OPTIONAL` unless otherwise specified.
|
@@ -101,7 +101,7 @@ Each _gem_ `MAY` have one or more version specifiers.
|
|
101
101
|
gem "nokogiri", ">= 1.4.2"
|
102
102
|
gem "RedCloth", ">= 4.1.0", "< 4.2.0"
|
103
103
|
|
104
|
-
### REQUIRE AS
|
104
|
+
### REQUIRE AS
|
105
105
|
|
106
106
|
Each _gem_ `MAY` specify files that should be used when autorequiring via
|
107
107
|
`Bundler.require`. You may pass an array with multiple files or `true` if file
|
@@ -118,7 +118,7 @@ The argument defaults to the name of the gem. For example, these are identical:
|
|
118
118
|
gem "nokogiri", :require => "nokogiri"
|
119
119
|
gem "nokogiri", :require => true
|
120
120
|
|
121
|
-
### GROUPS
|
121
|
+
### GROUPS
|
122
122
|
|
123
123
|
Each _gem_ `MAY` specify membership in one or more groups. Any _gem_ that does
|
124
124
|
not specify membership in any group is placed in the `default` group.
|
@@ -137,10 +137,10 @@ The Bundler runtime allows its two main methods, `Bundler.setup` and
|
|
137
137
|
Bundler.setup(:default, :test) # set up the _default_ and _test_ groups, but no others
|
138
138
|
|
139
139
|
# require requires all of the gems in the specified groups
|
140
|
-
Bundler.require # defaults to
|
140
|
+
Bundler.require # defaults to the _default_ group
|
141
141
|
Bundler.require(:default) # identical
|
142
142
|
Bundler.require(:default, :test) # requires the _default_ and _test_ groups
|
143
|
-
Bundler.require(:test) # requires
|
143
|
+
Bundler.require(:test) # requires the _test_ group
|
144
144
|
|
145
145
|
The Bundler CLI allows you to specify a list of groups whose gems `bundle install` should
|
146
146
|
not install with the `--without` option. To specify multiple groups to ignore, specify a
|
@@ -155,14 +155,14 @@ without any `--without option`, bundler will recall it.
|
|
155
155
|
|
156
156
|
Also, calling `Bundler.setup` with no parameters, or calling `require "bundler/setup"`
|
157
157
|
will setup all groups except for the ones you excluded via `--without` (since they
|
158
|
-
are
|
158
|
+
are not available).
|
159
159
|
|
160
160
|
Note that on `bundle install`, bundler downloads and evaluates all gems, in order to
|
161
161
|
create a single canonical list of all of the required gems and their dependencies.
|
162
162
|
This means that you cannot list different versions of the same gems in different
|
163
163
|
groups. For more details, see [Understanding Bundler](http://bundler.io/rationale.html).
|
164
164
|
|
165
|
-
### PLATFORMS
|
165
|
+
### PLATFORMS
|
166
166
|
|
167
167
|
If a gem should only be used in a particular platform or set of platforms, you can
|
168
168
|
specify them. Platforms are essentially identical to groups, except that you do not
|
@@ -240,7 +240,7 @@ All operations involving groups (`bundle install`, `Bundler.setup`,
|
|
240
240
|
`Bundler.require`) behave exactly the same as if any groups not
|
241
241
|
matching the current platform were explicitly excluded.
|
242
242
|
|
243
|
-
### SOURCE
|
243
|
+
### SOURCE
|
244
244
|
|
245
245
|
You can select an alternate Rubygems repository for a gem using the ':source'
|
246
246
|
option.
|
@@ -259,7 +259,7 @@ Selecting a specific source repository this way also suppresses the ambiguous
|
|
259
259
|
gem warning described above in
|
260
260
|
[GLOBAL SOURCES (#source)](#GLOBAL-SOURCES-source-).
|
261
261
|
|
262
|
-
### GIT
|
262
|
+
### GIT
|
263
263
|
|
264
264
|
If necessary, you can specify that a gem is located at a particular
|
265
265
|
git repository using the `:git` parameter. The repository can be accessed via
|
@@ -333,7 +333,7 @@ and then installs the resulting gem. The `gem build` command,
|
|
333
333
|
which comes standard with Rubygems, evaluates the `.gemspec` in
|
334
334
|
the context of the directory in which it is located.
|
335
335
|
|
336
|
-
### GIT SOURCE
|
336
|
+
### GIT SOURCE
|
337
337
|
|
338
338
|
A custom git source can be defined via the `git_source` method. Provide the source's name
|
339
339
|
as an argument, and a block which receives a single argument and interpolates it into a
|
@@ -346,14 +346,14 @@ In addition, if you wish to choose a specific branch:
|
|
346
346
|
|
347
347
|
gem "rails", :stash => "forks/rails", :branch => "branch_name"
|
348
348
|
|
349
|
-
### GITHUB
|
349
|
+
### GITHUB
|
350
350
|
|
351
351
|
`NOTE`: This shorthand should be avoided until Bundler 2.0, since it
|
352
352
|
currently expands to an insecure `git://` URL. This allows a
|
353
353
|
man-in-the-middle attacker to compromise your system.
|
354
354
|
|
355
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
|
356
|
+
:github shorthand to specify the github username and repository name (without the
|
357
357
|
trailing ".git"), separated by a slash. If both the username and repository name are the
|
358
358
|
same, you can omit one.
|
359
359
|
|
@@ -366,10 +366,10 @@ Are both equivalent to
|
|
366
366
|
|
367
367
|
Since the `github` method is a specialization of `git_source`, it accepts a `:branch` named argument.
|
368
368
|
|
369
|
-
### GIST
|
369
|
+
### GIST
|
370
370
|
|
371
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
|
372
|
+
the :gist shorthand to specify the gist identifier (without the trailing ".git").
|
373
373
|
|
374
374
|
gem "the_hatch", :gist => "4815162342"
|
375
375
|
|
@@ -379,10 +379,10 @@ Is equivalent to:
|
|
379
379
|
|
380
380
|
Since the `gist` method is a specialization of `git_source`, it accepts a `:branch` named argument.
|
381
381
|
|
382
|
-
### BITBUCKET
|
382
|
+
### BITBUCKET
|
383
383
|
|
384
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
|
385
|
+
:bitbucket shorthand to specify the bitbucket username and repository name (without the
|
386
386
|
trailing ".git"), separated by a slash. If both the username and repository name are the
|
387
387
|
same, you can omit one.
|
388
388
|
|
@@ -395,7 +395,7 @@ Are both equivalent to
|
|
395
395
|
|
396
396
|
Since the `bitbucket` method is a specialization of `git_source`, it accepts a `:branch` named argument.
|
397
397
|
|
398
|
-
### PATH
|
398
|
+
### PATH
|
399
399
|
|
400
400
|
You can specify that a gem is located in a particular location
|
401
401
|
on the file system. Relative paths are resolved relative to the
|
@@ -451,7 +451,7 @@ In the case of the `git` block form, the `:ref`, `:branch`, `:tag`,
|
|
451
451
|
and `:submodules` options may be passed to the `git` method, and
|
452
452
|
all gems in the block will inherit those options.
|
453
453
|
|
454
|
-
## INSTALL_IF
|
454
|
+
## INSTALL_IF
|
455
455
|
|
456
456
|
The `install_if` method allows gems to be installed based on a proc or lambda.
|
457
457
|
This is especially useful for optional gems that can only be used if certain
|
@@ -461,7 +461,7 @@ software is installed or some other conditions are met.
|
|
461
461
|
gem "pasteboard"
|
462
462
|
end
|
463
463
|
|
464
|
-
## GEMSPEC
|
464
|
+
## GEMSPEC
|
465
465
|
|
466
466
|
If you wish to use Bundler to help install dependencies for a gem while it is
|
467
467
|
being developed, use the `gemspec` method to pull in the dependencies listed in
|
@@ -480,6 +480,10 @@ options, which control where bundler looks for the `.gemspec`, the glob it uses
|
|
480
480
|
for the gemspec (defaults to: "{,*,*/*}.gemspec"), what named `.gemspec` it uses
|
481
481
|
(if more than one is present), and which group development dependencies are included in.
|
482
482
|
|
483
|
+
When a `gemspec` dependency encounters version conflicts during resolution, the
|
484
|
+
local version under development will always be selected -- even if there are
|
485
|
+
remote versions that better match other requirements for the `gemspec` gem.
|
486
|
+
|
483
487
|
## SOURCE PRIORITY
|
484
488
|
|
485
489
|
When attempting to locate a gem to satisfy a gem requirement,
|