bundler 1.7.15 → 1.8.0.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of bundler might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.gitignore +5 -14
- data/.rspec +1 -0
- data/.travis.yml +22 -15
- data/CHANGELOG.md +43 -13
- data/CODE_OF_CONDUCT.md +40 -0
- data/CONTRIBUTING.md +14 -12
- data/DEVELOPMENT.md +4 -2
- data/ISSUES.md +1 -1
- data/README.md +10 -14
- data/Rakefile +10 -10
- data/bin/bundle +1 -1
- data/bundler.gemspec +5 -4
- data/lib/bundler.rb +22 -3
- data/lib/bundler/anonymizable_uri.rb +24 -8
- data/lib/bundler/cli.rb +103 -66
- data/lib/bundler/cli/cache.rb +1 -0
- data/lib/bundler/cli/clean.rb +11 -4
- data/lib/bundler/cli/common.rb +2 -0
- data/lib/bundler/cli/console.rb +22 -26
- data/lib/bundler/cli/exec.rb +29 -22
- data/lib/bundler/cli/gem.rb +125 -37
- data/lib/bundler/cli/install.rb +22 -9
- data/lib/bundler/cli/outdated.rb +1 -1
- data/lib/bundler/cli/package.rb +8 -1
- data/lib/bundler/cli/show.rb +29 -3
- data/lib/bundler/cli/update.rb +2 -2
- data/lib/bundler/cli/viz.rb +1 -1
- data/lib/bundler/definition.rb +14 -22
- data/lib/bundler/dependency.rb +8 -1
- data/lib/bundler/dsl.rb +17 -4
- data/lib/bundler/endpoint_specification.rb +1 -1
- data/lib/bundler/env.rb +44 -25
- data/lib/bundler/fetcher.rb +33 -25
- data/lib/bundler/friendly_errors.rb +38 -5
- data/lib/bundler/gem_helper.rb +16 -10
- data/lib/bundler/gem_helpers.rb +1 -0
- data/lib/bundler/graph.rb +4 -1
- data/lib/bundler/index.rb +15 -25
- data/lib/bundler/installer.rb +6 -6
- data/lib/bundler/lockfile_parser.rb +7 -7
- data/lib/bundler/resolver.rb +2 -1
- data/lib/bundler/ruby_version.rb +1 -1
- data/lib/bundler/rubygems_ext.rb +1 -0
- data/lib/bundler/rubygems_integration.rb +1 -1
- data/lib/bundler/runtime.rb +22 -40
- data/lib/bundler/settings.rb +14 -5
- data/lib/bundler/setup.rb +2 -1
- data/lib/bundler/shared_helpers.rb +56 -4
- data/lib/bundler/source.rb +8 -9
- data/lib/bundler/source/git.rb +5 -1
- data/lib/bundler/source/git/git_proxy.rb +4 -0
- data/lib/bundler/source/path.rb +8 -11
- data/lib/bundler/source/path/installer.rb +0 -2
- data/lib/bundler/source/rubygems.rb +58 -72
- data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +13 -0
- data/lib/bundler/templates/newgem/LICENSE.txt.tt +17 -18
- data/lib/bundler/templates/newgem/README.md.tt +9 -1
- data/lib/bundler/templates/newgem/Rakefile.tt +2 -0
- data/lib/bundler/templates/newgem/bin/console.tt +14 -0
- data/lib/bundler/templates/newgem/bin/setup.tt +7 -0
- data/lib/bundler/templates/newgem/exe/newgem.tt +3 -0
- data/lib/bundler/templates/newgem/gitignore.tt +2 -0
- data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +1 -1
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +17 -13
- data/lib/bundler/templates/newgem/test/test_newgem.rb.tt +1 -1
- data/lib/bundler/ui/shell.rb +1 -1
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler/worker.rb +73 -0
- data/man/bundle-config.ronn +17 -15
- data/man/bundle-install.ronn +102 -93
- data/man/bundle-update.ronn +39 -30
- data/man/bundle.ronn +6 -0
- data/man/gemfile.5.ronn +74 -13
- metadata +10 -231
- data/lib/bundler/parallel_workers.rb +0 -18
- data/lib/bundler/parallel_workers/thread_worker.rb +0 -30
- data/lib/bundler/parallel_workers/unix_worker.rb +0 -101
- data/lib/bundler/parallel_workers/worker.rb +0 -69
- data/lib/bundler/templates/newgem/bin/newgem.tt +0 -3
- data/spec/bundler/anonymizable_uri_spec.rb +0 -32
- data/spec/bundler/bundler_spec.rb +0 -72
- data/spec/bundler/cli_spec.rb +0 -16
- data/spec/bundler/definition_spec.rb +0 -22
- data/spec/bundler/dsl_spec.rb +0 -82
- data/spec/bundler/friendly_errors_spec.rb +0 -13
- data/spec/bundler/gem_helper_spec.rb +0 -226
- data/spec/bundler/psyched_yaml_spec.rb +0 -8
- data/spec/bundler/retry_spec.rb +0 -59
- data/spec/bundler/settings_spec.rb +0 -13
- data/spec/bundler/source/rubygems_spec.rb +0 -25
- data/spec/bundler/source_list_spec.rb +0 -361
- data/spec/cache/gems_spec.rb +0 -284
- data/spec/cache/git_spec.rb +0 -188
- data/spec/cache/path_spec.rb +0 -121
- data/spec/cache/platform_spec.rb +0 -57
- data/spec/commands/binstubs_spec.rb +0 -219
- data/spec/commands/check_spec.rb +0 -278
- data/spec/commands/clean_spec.rb +0 -592
- data/spec/commands/config_spec.rb +0 -263
- data/spec/commands/console_spec.rb +0 -76
- data/spec/commands/exec_spec.rb +0 -309
- data/spec/commands/help_spec.rb +0 -39
- data/spec/commands/init_spec.rb +0 -39
- data/spec/commands/inject_spec.rb +0 -78
- data/spec/commands/licenses_spec.rb +0 -18
- data/spec/commands/newgem_spec.rb +0 -428
- data/spec/commands/open_spec.rb +0 -68
- data/spec/commands/outdated_spec.rb +0 -156
- data/spec/commands/package_spec.rb +0 -114
- data/spec/commands/show_spec.rb +0 -125
- data/spec/install/binstubs_spec.rb +0 -24
- data/spec/install/bundler_spec.rb +0 -146
- data/spec/install/deploy_spec.rb +0 -250
- data/spec/install/gemfile/gemspec_spec.rb +0 -170
- data/spec/install/gemfile/git_spec.rb +0 -967
- data/spec/install/gemfile/path_spec.rb +0 -500
- data/spec/install/gemfile_spec.rb +0 -44
- data/spec/install/gems/c_ext_spec.rb +0 -48
- data/spec/install/gems/dependency_api_spec.rb +0 -652
- data/spec/install/gems/env_spec.rb +0 -107
- data/spec/install/gems/flex_spec.rb +0 -314
- data/spec/install/gems/groups_spec.rb +0 -308
- data/spec/install/gems/mirror_spec.rb +0 -39
- data/spec/install/gems/platform_spec.rb +0 -195
- data/spec/install/gems/post_install_spec.rb +0 -121
- data/spec/install/gems/resolving_spec.rb +0 -124
- data/spec/install/gems/simple_case_spec.rb +0 -377
- data/spec/install/gems/sources_spec.rb +0 -386
- data/spec/install/gems/standalone_spec.rb +0 -260
- data/spec/install/gems/sudo_spec.rb +0 -136
- data/spec/install/gems/win32_spec.rb +0 -26
- data/spec/install/gemspecs_spec.rb +0 -50
- data/spec/install/path_spec.rb +0 -150
- data/spec/install/post_bundle_message_spec.rb +0 -142
- data/spec/install/prereleases_spec.rb +0 -43
- data/spec/install/security_policy_spec.rb +0 -77
- data/spec/install/upgrade_spec.rb +0 -26
- data/spec/lock/git_spec.rb +0 -34
- data/spec/lock/lockfile_spec.rb +0 -924
- data/spec/other/bundle_ruby_spec.rb +0 -142
- data/spec/other/cli_dispatch_spec.rb +0 -21
- data/spec/other/ext_spec.rb +0 -60
- data/spec/other/platform_spec.rb +0 -1285
- data/spec/other/ssl_cert_spec.rb +0 -23
- data/spec/quality_spec.rb +0 -88
- data/spec/realworld/dependency_api_spec.rb +0 -60
- data/spec/realworld/edgecases_spec.rb +0 -212
- data/spec/realworld/parallel_spec.rb +0 -71
- data/spec/resolver/basic_spec.rb +0 -66
- data/spec/resolver/platform_spec.rb +0 -88
- data/spec/runtime/executable_spec.rb +0 -149
- data/spec/runtime/load_spec.rb +0 -107
- data/spec/runtime/platform_spec.rb +0 -90
- data/spec/runtime/require_spec.rb +0 -332
- data/spec/runtime/setup_spec.rb +0 -853
- data/spec/runtime/with_clean_env_spec.rb +0 -91
- data/spec/spec_helper.rb +0 -123
- data/spec/support/artifice/endopint_marshal_fail_basic_authentication.rb +0 -13
- data/spec/support/artifice/endpoint.rb +0 -71
- data/spec/support/artifice/endpoint_500.rb +0 -37
- data/spec/support/artifice/endpoint_api_forbidden.rb +0 -11
- data/spec/support/artifice/endpoint_api_missing.rb +0 -16
- data/spec/support/artifice/endpoint_basic_authentication.rb +0 -13
- data/spec/support/artifice/endpoint_creds_diff_host.rb +0 -38
- data/spec/support/artifice/endpoint_extra.rb +0 -31
- data/spec/support/artifice/endpoint_extra_api.rb +0 -32
- data/spec/support/artifice/endpoint_extra_missing.rb +0 -15
- data/spec/support/artifice/endpoint_fallback.rb +0 -17
- data/spec/support/artifice/endpoint_host_redirect.rb +0 -15
- data/spec/support/artifice/endpoint_marshal_fail.rb +0 -11
- data/spec/support/artifice/endpoint_redirect.rb +0 -15
- data/spec/support/artifice/endpoint_strict_basic_authentication.rb +0 -18
- data/spec/support/artifice/endpoint_timeout.rb +0 -13
- data/spec/support/builders.rb +0 -693
- data/spec/support/fakeweb/rack-1.0.0.marshal +0 -2
- data/spec/support/fakeweb/windows.rb +0 -23
- data/spec/support/hax.rb +0 -22
- data/spec/support/helpers.rb +0 -361
- data/spec/support/indexes.rb +0 -280
- data/spec/support/matchers.rb +0 -77
- data/spec/support/path.rb +0 -85
- data/spec/support/permissions.rb +0 -10
- data/spec/support/platforms.rb +0 -94
- data/spec/support/ruby_ext.rb +0 -20
- data/spec/support/rubygems_ext.rb +0 -39
- data/spec/support/streams.rb +0 -13
- data/spec/support/sudo.rb +0 -16
- data/spec/update/gems_spec.rb +0 -201
- data/spec/update/git_spec.rb +0 -283
- data/spec/update/path_spec.rb +0 -18
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
@@ -1,22 +1,21 @@
|
|
1
|
-
|
1
|
+
The MIT License (MIT)
|
2
2
|
|
3
|
-
|
3
|
+
Copyright (c) <%=Time.now.year%> <%=config[:author]%>
|
4
4
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
the following conditions:
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
12
11
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
15
14
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
OF
|
22
|
-
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# <%=config[:constant_name]%>
|
2
2
|
|
3
|
-
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/<%=config[:namespaced_path]%>`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
@@ -22,6 +24,12 @@ Or install it yourself as:
|
|
22
24
|
|
23
25
|
TODO: Write usage instructions here
|
24
26
|
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment. <% if config[:bin] %>Run `bundle exec <%= config[:name] %>` to use the code located in this directory, ignoring other installed copies of this gem.<% end %>
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
25
33
|
## Contributing
|
26
34
|
|
27
35
|
1. Fork it ( https://github.com/[my-github-username]/<%=config[:name]%>/fork )
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "<%= config[:namespaced_path] %>"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%- config[:constant_array].each_with_index do |c,i| -%>
|
2
2
|
<%= ' '*i %>module <%= c %>
|
3
3
|
<%- end -%>
|
4
|
-
<%= ' '*config[:constant_array].size %>VERSION = "0.0
|
4
|
+
<%= ' '*config[:constant_array].size %>VERSION = "0.1.0"
|
5
5
|
<%- (config[:constant_array].size-1).downto(0) do |i| -%>
|
6
6
|
<%= ' '*i %>end
|
7
7
|
<%- end -%>
|
@@ -8,25 +8,29 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = <%=config[:constant_name]%>::VERSION
|
9
9
|
spec.authors = [<%=config[:author].inspect%>]
|
10
10
|
spec.email = [<%=config[:email].inspect%>]
|
11
|
-
|
12
|
-
spec.
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
spec.
|
11
|
+
|
12
|
+
if spec.respond_to?(:metadata)
|
13
|
+
spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com' to prevent pushes to rubygems.org, or delete to allow pushes to any server."
|
14
|
+
end
|
15
|
+
|
16
|
+
spec.summary = %q{TODO: Write a short summary, because Rubygems requires one.}
|
17
|
+
spec.description = %q{TODO: Write a longer description or delete this line.}
|
18
|
+
spec.homepage = "TODO: Put your gem's website or public repo URL here."
|
17
19
|
spec.license = "MIT"
|
18
20
|
|
19
|
-
spec.files = `git ls-files -z`.split("\x0")
|
20
|
-
spec.executables = spec.files.grep(%r{^
|
21
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
23
|
spec.require_paths = ["lib"]
|
24
|
+
<%- if config[:ext] -%>
|
25
|
+
spec.extensions = ["ext/<%=config[:underscored_name]%>/extconf.rb"]
|
26
|
+
<%- end -%>
|
23
27
|
|
24
28
|
spec.add_development_dependency "bundler", "~> <%= Bundler::VERSION.split(".")[0..1].join(".") %>"
|
25
29
|
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
-
|
30
|
+
<%- if config[:ext] -%>
|
27
31
|
spec.add_development_dependency "rake-compiler"
|
28
|
-
|
29
|
-
|
32
|
+
<%- end -%>
|
33
|
+
<%- if config[:test] && config[:test] != "false" -%>
|
30
34
|
spec.add_development_dependency "<%=config[:test]%>"
|
31
|
-
|
35
|
+
<%- end -%>
|
32
36
|
end
|
data/lib/bundler/ui/shell.rb
CHANGED
data/lib/bundler/version.rb
CHANGED
@@ -2,5 +2,5 @@ module Bundler
|
|
2
2
|
# We're doing this because we might write tests that deal
|
3
3
|
# with other versions of bundler and we are unsure how to
|
4
4
|
# handle this better.
|
5
|
-
VERSION = "1.
|
5
|
+
VERSION = "1.8.0.pre" unless defined?(::Bundler::VERSION)
|
6
6
|
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
require 'thread'
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
class Worker
|
5
|
+
POISON = Object.new
|
6
|
+
|
7
|
+
class WrappedException < StandardError
|
8
|
+
attr_reader :exception
|
9
|
+
def initialize(exn)
|
10
|
+
@exception = exn
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
# Creates a worker pool of specified size
|
15
|
+
#
|
16
|
+
# @param size [Integer] Size of pool
|
17
|
+
# @param func [Proc] job to run in inside the worker pool
|
18
|
+
def initialize(size, func)
|
19
|
+
@request_queue = Queue.new
|
20
|
+
@response_queue = Queue.new
|
21
|
+
@func = func
|
22
|
+
@threads = size.times.map { |i| Thread.start { process_queue(i) } }
|
23
|
+
trap("INT") { abort_threads }
|
24
|
+
end
|
25
|
+
|
26
|
+
# Enqueue a request to be executed in the worker pool
|
27
|
+
#
|
28
|
+
# @param obj [String] mostly it is name of spec that should be downloaded
|
29
|
+
def enq(obj)
|
30
|
+
@request_queue.enq obj
|
31
|
+
end
|
32
|
+
|
33
|
+
# Retrieves results of job function being executed in worker pool
|
34
|
+
def deq
|
35
|
+
result = @response_queue.deq
|
36
|
+
raise result.exception if result.is_a?(WrappedException)
|
37
|
+
result
|
38
|
+
end
|
39
|
+
|
40
|
+
def stop
|
41
|
+
stop_threads
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def process_queue(i)
|
47
|
+
loop do
|
48
|
+
obj = @request_queue.deq
|
49
|
+
break if obj.equal? POISON
|
50
|
+
@response_queue.enq apply_func(obj, i)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def apply_func(obj, i)
|
55
|
+
@func.call(obj, i)
|
56
|
+
rescue Exception => e
|
57
|
+
WrappedException.new(e)
|
58
|
+
end
|
59
|
+
|
60
|
+
# Stop the worker threads by sending a poison object down the request queue
|
61
|
+
# so as worker threads after retrieving it, shut themselves down
|
62
|
+
def stop_threads
|
63
|
+
@threads.each { @request_queue.enq POISON }
|
64
|
+
@threads.each { |thread| thread.join }
|
65
|
+
end
|
66
|
+
|
67
|
+
def abort_threads
|
68
|
+
@threads.each {|i| i.exit }
|
69
|
+
exit 1
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
73
|
+
end
|
data/man/bundle-config.ronn
CHANGED
@@ -70,6 +70,10 @@ The canonical form of this configuration is `"without"`. To convert the canonica
|
|
70
70
|
form to the environment variable form, capitalize it, and prepend `BUNDLE_`. The
|
71
71
|
environment variable form of `"without"` is `BUNDLE_WITHOUT`.
|
72
72
|
|
73
|
+
Any periods in the configuration keys must be replaced with two underscores when
|
74
|
+
setting it via environment variables. The configuration key `local.rack` becomes
|
75
|
+
the environment variable `BUNDLE_LOCAL__RACK`.
|
76
|
+
|
73
77
|
## LIST OF AVAILABLE KEYS
|
74
78
|
|
75
79
|
The following is a list of all configuration keys and their purpose. You can
|
@@ -77,7 +81,7 @@ learn more about their operation in [bundle install(1)][bundle-install].
|
|
77
81
|
|
78
82
|
* `path` (`BUNDLE_PATH`):
|
79
83
|
The location on disk to install gems. Defaults to `$GEM_HOME` in development
|
80
|
-
and `vendor/
|
84
|
+
and `vendor/bundle` when `--deployment` is used
|
81
85
|
* `frozen` (`BUNDLE_FROZEN`):
|
82
86
|
Disallow changes to the `Gemfile`. Defaults to `true` when `--deployment`
|
83
87
|
is used.
|
@@ -86,6 +90,12 @@ learn more about their operation in [bundle install(1)][bundle-install].
|
|
86
90
|
* `bin` (`BUNDLE_BIN`):
|
87
91
|
Install executables from gems in the bundle to the specified directory.
|
88
92
|
Defaults to `false`.
|
93
|
+
* `gemfile` (`BUNDLE_GEMFILE`):
|
94
|
+
The name of the file that bundler should use as the `Gemfile`. This location
|
95
|
+
of this file also sets the root of the project, which is used to resolve
|
96
|
+
relative paths in the `Gemfile`, among other things. By default, bundler
|
97
|
+
will search up from the current working directory until it finds a
|
98
|
+
`Gemfile`.
|
89
99
|
* `ssl_ca_cert` (`BUNDLE_SSL_CA_CERT`):
|
90
100
|
Path to a designated CA certificate file or folder containing multiple
|
91
101
|
certificates for trusted CAs in PEM format.
|
@@ -100,18 +110,6 @@ You can set them globally either via environment variables or `bundle config`,
|
|
100
110
|
whichever is preferable for your setup. If you use both, environment variables
|
101
111
|
will take preference over global settings.
|
102
112
|
|
103
|
-
An additional setting is available only as an environment variable:
|
104
|
-
|
105
|
-
* `BUNDLE_GEMFILE`:
|
106
|
-
The name of the file that bundler should use as the `Gemfile`. This location
|
107
|
-
of this file also sets the root of the project, which is used to resolve
|
108
|
-
relative paths in the `Gemfile`, among other things. By default, bundler
|
109
|
-
will search up from the current working directory until it finds a
|
110
|
-
`Gemfile`.
|
111
|
-
|
112
|
-
Bundler will ignore any `BUNDLE_GEMFILE` entries in local or global
|
113
|
-
configuration files.
|
114
|
-
|
115
113
|
## LOCAL GIT REPOS
|
116
114
|
|
117
115
|
Bundler also allows you to work against a git repository locally
|
@@ -162,9 +160,13 @@ For example, to use a mirror of rubygems.org hosted at
|
|
162
160
|
Bundler allows you to configure credentials for any gem source, which allows
|
163
161
|
you to avoid putting secrets into your Gemfile.
|
164
162
|
|
165
|
-
bundle config
|
163
|
+
bundle config SOURCE_HOSTNAME USERNAME:PASSWORD
|
166
164
|
|
167
165
|
For example, to save the credentials of user `claudette` for the gem source at
|
168
166
|
`gems.longerous.com`, you would run:
|
169
167
|
|
170
|
-
bundle config
|
168
|
+
bundle config gems.longerous.com claudette:s00pers3krit
|
169
|
+
|
170
|
+
Or you can set the credentials as an environment variable like this:
|
171
|
+
|
172
|
+
export BUNDLE_GEMS__LONGEROUS__COM="claudette:s00pers3krit"
|
data/man/bundle-install.ronn
CHANGED
@@ -3,128 +3,137 @@ bundle-install(1) -- Install the dependencies specified in your Gemfile
|
|
3
3
|
|
4
4
|
## SYNOPSIS
|
5
5
|
|
6
|
-
`bundle install` [--
|
7
|
-
[--path PATH] [--system]
|
8
|
-
[--without=GROUP1[ GROUP2...]]
|
9
|
-
[--local] [--deployment]
|
10
|
-
[--binstubs[=DIRECTORY]]
|
11
|
-
[--standalone[=GROUP1[ GROUP2...]]]
|
12
|
-
[--trust-policy=POLICY]
|
13
|
-
[--jobs=SIZE]
|
14
|
-
[--retry=TRIES]
|
15
|
-
[--no-cache]
|
16
|
-
[--quiet]
|
6
|
+
`bundle install` [--binstubs[=DIRECTORY]]
|
17
7
|
[--clean]
|
18
8
|
[--full-index]
|
9
|
+
[--gemfile=GEMFILE]
|
10
|
+
[--jobs=NUMBER]
|
11
|
+
[--local] [--deployment]
|
12
|
+
[--no-cache]
|
19
13
|
[--no-prune]
|
14
|
+
[--path PATH] [--system]
|
15
|
+
[--quiet]
|
16
|
+
[--retry=NUMBER]
|
20
17
|
[--shebang]
|
18
|
+
[--standalone[=GROUP[ GROUP...]]]
|
19
|
+
[--trust-policy=POLICY]
|
20
|
+
[--without=GROUP[ GROUP...]]
|
21
21
|
|
22
22
|
## DESCRIPTION
|
23
23
|
|
24
24
|
Install the gems specified in your Gemfile(5). If this is the first
|
25
25
|
time you run bundle install (and a `Gemfile.lock` does not exist),
|
26
|
-
|
26
|
+
Bundler will fetch all remote sources, resolve dependencies and
|
27
27
|
install all needed gems.
|
28
28
|
|
29
29
|
If a `Gemfile.lock` does exist, and you have not updated your Gemfile(5),
|
30
|
-
|
30
|
+
Bundler will fetch all remote sources, but use the dependencies
|
31
31
|
specified in the `Gemfile.lock` instead of resolving dependencies.
|
32
32
|
|
33
33
|
If a `Gemfile.lock` does exist, and you have updated your Gemfile(5),
|
34
|
-
|
34
|
+
Bundler will use the dependencies in the `Gemfile.lock` for all gems
|
35
35
|
that you did not update, but will re-resolve the dependencies of
|
36
36
|
gems that you did update. You can find more information about this
|
37
37
|
update process below under [CONSERVATIVE UPDATING][].
|
38
38
|
|
39
39
|
## OPTIONS
|
40
40
|
|
41
|
-
* `--
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
41
|
+
* `--binstubs[=<directory>]`:
|
42
|
+
Creates a directory (defaults to `~/bin`) and place any executables from the
|
43
|
+
gem there. These executables run in Bundler's context. If used, you might add
|
44
|
+
this directory to your environment's `PATH` variable. For instance, if the
|
45
|
+
`rails` gem comes with a `rails` executable, this flag will create a
|
46
|
+
`bin/rails` executable that ensures that all referred dependencies will be
|
47
|
+
resolved using the bundled gems.
|
47
48
|
|
48
|
-
* `--
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
without a `--path` setting will show up in `gem list`. This setting is
|
53
|
-
a [remembered option][REMEMBERED OPTIONS].
|
49
|
+
* `--clean`:
|
50
|
+
On finishing the installation Bundler is going to remove any gems not present
|
51
|
+
in the current Gemfile(5). Don't worry, gems currently in use will not be
|
52
|
+
removed.
|
54
53
|
|
55
|
-
* `--
|
56
|
-
|
57
|
-
|
58
|
-
|
54
|
+
* `--full-index`:
|
55
|
+
Bundler will not call Rubygems' API endpoint (default) but download and cache
|
56
|
+
a (currently big) index file of all gems. Performance can be improved for
|
57
|
+
large bundles that seldomly change by enabling this option.
|
59
58
|
|
60
|
-
* `--
|
61
|
-
|
62
|
-
|
59
|
+
* `--gemfile=<gemfile>`:
|
60
|
+
The location of the Gemfile(5) which Bundler should use. This defaults
|
61
|
+
to a Gemfile(5) in the current working directory. In general, Bundler
|
62
|
+
will assume that the location of the Gemfile(5) is also the project's
|
63
|
+
root and will try to find `Gemfile.lock` and `vendor/cache` relative
|
64
|
+
to this location.
|
65
|
+
|
66
|
+
* `--jobs=[<number>]`:
|
67
|
+
Install gems by starting <number> of workers parallely.
|
63
68
|
|
64
69
|
* `--local`:
|
65
|
-
Do not attempt to connect to `rubygems.org
|
66
|
-
|
67
|
-
|
68
|
-
|
70
|
+
Do not attempt to connect to `rubygems.org`. Instead, Bundler will use the
|
71
|
+
gems already present in Rubygems' cache or in `vendor/cache`. Note that if a
|
72
|
+
appropriate platform-specific gem exists on `rubygems.org` it will not be
|
73
|
+
found.
|
69
74
|
|
70
75
|
* `--deployment`:
|
71
|
-
|
72
|
-
|
76
|
+
In [deployment mode][DEPLOYMENT MODE], Bundler will 'roll-out' the bundle for
|
77
|
+
`production` use. Please check carefully if you want to have this option
|
78
|
+
enabled in `development` or `test` environments.
|
73
79
|
|
74
|
-
* `--
|
75
|
-
|
76
|
-
|
77
|
-
`rails` gem comes with a `rails` executable, this flag will create
|
78
|
-
a `bin/rails` executable that ensures that all dependencies used
|
79
|
-
come from the bundled gems.
|
80
|
+
* `--system`:
|
81
|
+
Installs the gems specified in the bundle to the system's Rubygems location.
|
82
|
+
This overrides any previous [remembered][REMEMBERED OPTIONS] use of `--path`.
|
80
83
|
|
81
|
-
* `--
|
82
|
-
|
83
|
-
|
84
|
-
|
84
|
+
* `--no-cache`:
|
85
|
+
Do not update the cache in `vendor/cache` with the newly bundled gems. This
|
86
|
+
does not remove any gems in the cache but keeps the newly bundled gems from
|
87
|
+
being cached during the install.
|
85
88
|
|
86
|
-
* `--
|
87
|
-
|
88
|
-
It takes a space separated list of groups to install. It creates a
|
89
|
-
`bundle` directory and installs the bundle there. It also generates
|
90
|
-
a `bundle/bundler/setup.rb` file to replace Bundler's own setup.
|
89
|
+
* `--no-prune`:
|
90
|
+
Don't remove stale gems from the cache when the installation finishes.
|
91
91
|
|
92
|
-
* `--
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
92
|
+
* `--path=<path>`:
|
93
|
+
The location to install the specified gems to. This defaults to Rubygems'
|
94
|
+
setting. Bundler shares this location with Rubygems, `gem install ...` will
|
95
|
+
have gem installed there, too. Therefore, gems installed without a
|
96
|
+
`--path ...` setting will show up by calling `gem list`. Accodingly, gems
|
97
|
+
installed to other locations will not get listed. This setting is a
|
98
|
+
[remembered option][REMEMBERED OPTIONS].
|
97
99
|
|
98
|
-
* `--
|
99
|
-
|
100
|
+
* `--quiet`:
|
101
|
+
Do not print progress information to the standard output. Instead, Bundler
|
102
|
+
will exit using a status code (`$?`).
|
100
103
|
|
101
|
-
* `--retry[<
|
102
|
-
|
104
|
+
* `--retry=[<number>]`:
|
105
|
+
Retry failed network or git requests for <number> times.
|
103
106
|
|
104
|
-
* `--
|
105
|
-
|
106
|
-
|
107
|
-
|
107
|
+
* `--shebang=<ruby-executable>`:
|
108
|
+
Uses the specified ruby executable (usually `ruby`) to execute the scripts
|
109
|
+
created with `--binstubs`. In addition, if you use `--binstubs` together with
|
110
|
+
`--shebang jruby` these executables will be changed to execute `jruby`
|
111
|
+
instead.
|
108
112
|
|
109
|
-
* `--
|
110
|
-
|
111
|
-
|
113
|
+
* `--standalone[=<list>]`:
|
114
|
+
Makes a bundle that can work without depending on Rubygems or Bundler at
|
115
|
+
runtime. A space separated list of groups to install has to be specified.
|
116
|
+
Bundler creates a directory named `bundle` and installs the bundle there. It
|
117
|
+
also generates a `bundle/bundler/setup.rb` file to replace Bundler's own setup
|
118
|
+
in the manner required.
|
112
119
|
|
113
|
-
* `--
|
114
|
-
|
120
|
+
* `--trust-policy=[<policy>]`:
|
121
|
+
Apply the Rubygems security policy <policy>, where policy is one of
|
122
|
+
`HighSecurity`, `MediumSecurity`, `LowSecurity`, `AlmostNoSecurity`, or
|
123
|
+
`NoSecurity`. For more details, please see the Rubygems signing documentation
|
124
|
+
linked below in [SEE ALSO][].
|
115
125
|
|
116
|
-
* `--
|
117
|
-
|
126
|
+
* `--without=<list>`:
|
127
|
+
A space-separated list of groups referencing gems to skip during installation.
|
128
|
+
This is a [remembered option][REMEMBERED OPTIONS].
|
118
129
|
|
119
|
-
* `--no-prune`:
|
120
|
-
Don't remove stale gems from the cache.
|
121
130
|
|
122
131
|
## DEPLOYMENT MODE
|
123
132
|
|
124
133
|
Bundler's defaults are optimized for development. To switch to
|
125
134
|
defaults optimized for deployment, use the `--deployment` flag.
|
126
135
|
Do not activate deployment mode on development machines, as it
|
127
|
-
will cause
|
136
|
+
will cause an error when the Gemfile(5) is modified.
|
128
137
|
|
129
138
|
1. A `Gemfile.lock` is required.
|
130
139
|
|
@@ -161,10 +170,10 @@ will cause in an error when the Gemfile is modified.
|
|
161
170
|
|
162
171
|
## SUDO USAGE
|
163
172
|
|
164
|
-
By default,
|
173
|
+
By default, Bundler installs gems to the same location as `gem install`.
|
165
174
|
|
166
175
|
In some cases, that location may not be writable by your Unix user. In
|
167
|
-
that case,
|
176
|
+
that case, Bundler will stage everything in a temporary directory,
|
168
177
|
then ask you for your `sudo` password in order to copy the gems into
|
169
178
|
their system location.
|
170
179
|
|
@@ -185,7 +194,7 @@ the current user. Therefore, git gems are downloaded and installed
|
|
185
194
|
into `~/.bundle` rather than $GEM_HOME or $BUNDLE_PATH.
|
186
195
|
|
187
196
|
As a result, you should run `bundle install` as the current user,
|
188
|
-
and
|
197
|
+
and Bundler will ask for your password if it is needed to put the
|
189
198
|
gems into their final location.
|
190
199
|
|
191
200
|
## INSTALLING GROUPS
|
@@ -193,7 +202,7 @@ gems into their final location.
|
|
193
202
|
By default, `bundle install` will install all gems in all groups
|
194
203
|
in your Gemfile(5), except those declared for a different platform.
|
195
204
|
|
196
|
-
However, you can explicitly tell
|
205
|
+
However, you can explicitly tell Bundler to skip installing
|
197
206
|
certain groups with the `--without` option. This option takes
|
198
207
|
a space-separated list of groups.
|
199
208
|
|
@@ -214,21 +223,21 @@ third-party code being used in different environments.`
|
|
214
223
|
|
215
224
|
For a simple illustration, consider the following Gemfile(5):
|
216
225
|
|
217
|
-
source
|
226
|
+
source 'https://rubygems.org'
|
218
227
|
|
219
|
-
gem
|
228
|
+
gem 'sinatra'
|
220
229
|
|
221
230
|
group :production do
|
222
|
-
gem
|
231
|
+
gem 'rack-perftools-profiler'
|
223
232
|
end
|
224
233
|
|
225
|
-
In this case, `sinatra` depends on any version of Rack (`>= 1.0
|
234
|
+
In this case, `sinatra` depends on any version of Rack (`>= 1.0`), while
|
226
235
|
`rack-perftools-profiler` depends on 1.x (`~> 1.0`).
|
227
236
|
|
228
237
|
When you run `bundle install --without production` in development, we
|
229
238
|
look at the dependencies of `rack-perftools-profiler` as well. That way,
|
230
239
|
you do not spend all your time developing against Rack 2.0, using new
|
231
|
-
APIs unavailable in Rack 1.x, only to have
|
240
|
+
APIs unavailable in Rack 1.x, only to have Bundler switch to Rack 1.2
|
232
241
|
when the `production` group _is_ used.
|
233
242
|
|
234
243
|
This should not cause any problems in practice, because we do not
|
@@ -310,10 +319,10 @@ same versions of all dependencies as it used before the update.
|
|
310
319
|
|
311
320
|
Let's take a look at an example. Here's your original Gemfile(5):
|
312
321
|
|
313
|
-
source
|
322
|
+
source 'https://rubygems.org'
|
314
323
|
|
315
|
-
gem
|
316
|
-
gem
|
324
|
+
gem 'actionpack', '2.3.8'
|
325
|
+
gem 'activemerchant'
|
317
326
|
|
318
327
|
In this case, both `actionpack` and `activemerchant` depend on
|
319
328
|
`activesupport`. The `actionpack` gem depends on `activesupport 2.3.8`
|
@@ -326,10 +335,10 @@ gems in your Gemfile(5).
|
|
326
335
|
|
327
336
|
Next, you modify your Gemfile(5) to:
|
328
337
|
|
329
|
-
source
|
338
|
+
source 'https://rubygems.org'
|
330
339
|
|
331
|
-
gem
|
332
|
-
gem
|
340
|
+
gem 'actionpack', '3.0.0.rc'
|
341
|
+
gem 'activemerchant'
|
333
342
|
|
334
343
|
The `actionpack 3.0.0.rc` gem has a number of new dependencies,
|
335
344
|
and updates the `activesupport` dependency to `= 3.0.0.rc` and
|
@@ -351,7 +360,7 @@ you would not expect it to suddenly stop working after updating
|
|
351
360
|
dependency of actionpack requires updating one of its dependencies.
|
352
361
|
|
353
362
|
Even though `activemerchant` declares a very loose dependency
|
354
|
-
that theoretically matches `activesupport 3.0.0.rc`,
|
363
|
+
that theoretically matches `activesupport 3.0.0.rc`, Bundler treats
|
355
364
|
gems in your Gemfile(5) that have not changed as an atomic unit
|
356
365
|
together with their dependencies. In this case, the `activemerchant`
|
357
366
|
dependency is treated as `activemerchant 1.7.1 + activesupport 2.3.8`,
|