bundler 1.0.0.rc.6 → 1.0.0
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.
- data/CHANGELOG.md +23 -1
- data/ISSUES.md +5 -3
- data/README.md +9 -73
- data/lib/bundler.rb +4 -0
- data/lib/bundler/capistrano.rb +6 -2
- data/lib/bundler/cli.rb +1 -1
- data/lib/bundler/definition.rb +10 -3
- data/lib/bundler/dsl.rb +6 -6
- data/lib/bundler/gem_helper.rb +36 -13
- data/lib/bundler/lockfile_parser.rb +1 -1
- data/lib/bundler/man/bundle-config +0 -92
- data/lib/bundler/man/bundle-config.txt +30 -72
- data/lib/bundler/source.rb +17 -6
- data/lib/bundler/version.rb +1 -1
- metadata +17 -10
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,25 @@
|
|
1
|
+
## 1.0.0
|
2
|
+
|
3
|
+
Features
|
4
|
+
|
5
|
+
- You can now define `:bundle_cmd` in the capistrano task
|
6
|
+
|
7
|
+
Bugfixes:
|
8
|
+
|
9
|
+
- Various bugfixes to the built-in rake helpers
|
10
|
+
- Fix a bug where shortrefs weren't unique enough and were
|
11
|
+
therfore colliding
|
12
|
+
- Fix a small bug involving checking whether a local git
|
13
|
+
clone is up to date
|
14
|
+
- Correctly handle explicit '=' dependencies with gems
|
15
|
+
pinned to a git source
|
16
|
+
- Fix an issue with Windows-generated lockfiles by reading
|
17
|
+
and writing the lockfile in binary mode
|
18
|
+
- Fix an issue with shelling out to git in Windows by
|
19
|
+
using double quotes around paths
|
20
|
+
- Detect new Rubygems sources in the Gemfile and update
|
21
|
+
the lockfile
|
22
|
+
|
1
23
|
## 1.0.0.rc.6
|
2
24
|
|
3
25
|
Features:
|
@@ -5,7 +27,7 @@ Features:
|
|
5
27
|
- Much better documentation for most of the commands and Gemfile
|
6
28
|
format
|
7
29
|
|
8
|
-
|
30
|
+
Bugfixes:
|
9
31
|
|
10
32
|
- Don't attempt to create directories if they already exist
|
11
33
|
- Fix the capistrano task so that it actually runs
|
data/ISSUES.md
CHANGED
@@ -2,14 +2,16 @@
|
|
2
2
|
|
3
3
|
## Troubleshooting
|
4
4
|
|
5
|
-
|
5
|
+
Instructions for common Bundler use-cases can be found on the [Bundler documentation site](http://gembundler.com/v1.0/). Detailed information about each Bundler command, including help with common problems, can be found in the [Bundler man pages](http://gembundler.com/man/bundle.1.html).
|
6
|
+
|
7
|
+
After reading the documentation, try these troubleshooting steps:
|
6
8
|
|
7
9
|
rm -rf ~/.bundle/ ~/.gem/ .bundle/ Gemfile.lock
|
8
10
|
bundle install
|
9
11
|
|
10
|
-
## Reporting
|
12
|
+
## Reporting unresolved problems
|
11
13
|
|
12
|
-
If you are still having problems, please report
|
14
|
+
If you are still having problems, please report issues to the [Bundler issue tracker](http://github.com/carlhuda/bundler/issues/).
|
13
15
|
|
14
16
|
Instructions that allow the Bundler team to reproduce your issue are vitally important. When you report a bug, please create a gist of the following information and include a link in your ticket:
|
15
17
|
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# Bundler: a gem to bundle gems
|
2
2
|
|
3
3
|
Bundler is a tool that manages gem dependencies for your ruby application. It
|
4
4
|
takes a gem manifest file and is able to fetch, download, and install the gems
|
@@ -8,84 +8,20 @@ you run any ruby code in context of the bundle's gem environment.
|
|
8
8
|
|
9
9
|
## Installation and usage
|
10
10
|
|
11
|
-
See [gembundler.com](http://gembundler.com) for up-to-date installation and usage instructions
|
11
|
+
See [gembundler.com](http://gembundler.com) for up-to-date installation and usage instructions.
|
12
12
|
|
13
|
-
##
|
14
|
-
|
15
|
-
Upgrading to Bundler 0.9 from Bundler 0.8 requires upgrading several
|
16
|
-
API calls in your Gemfile, and some workarounds if you are using Rails 2.3.
|
17
|
-
|
18
|
-
### Gemfile Removals
|
19
|
-
|
20
|
-
Bundler 0.9 removes the following Bundler 0.8 Gemfile APIs:
|
21
|
-
|
22
|
-
1. `disable_system_gems`: This is now the default (and only) option
|
23
|
-
for bundler. Bundler uses the system gems you have specified
|
24
|
-
in the Gemfile, and only the system gems you have specified
|
25
|
-
(and their dependencies)
|
26
|
-
2. `disable_rubygems`: This is no longer supported. We are looking
|
27
|
-
into ways to get the fastest performance out of each supported
|
28
|
-
scenario, and we will make speed the default where possible.
|
29
|
-
3. `clear_sources`: Bundler now defaults to an empty source
|
30
|
-
list. If you want to include Rubygems, you can add the source
|
31
|
-
via source "http://gemcutter.org". If you use bundle init, this
|
32
|
-
source will be automatically added for you in the generated
|
33
|
-
Gemfile
|
34
|
-
4. `bundle_path`: You can specify this setting when installing
|
35
|
-
via `bundle install /path/to/bundle`. Bundler will remember
|
36
|
-
where you installed the dependencies to on a particular
|
37
|
-
machine for future installs, loads, setups, etc.
|
38
|
-
5. `bin_path`: Bundler no longer generates binaries in the root
|
39
|
-
of your app. You should use `bundle exec` to execute binaries
|
40
|
-
in the current context.
|
41
|
-
|
42
|
-
### Gemfile Changes
|
43
|
-
|
44
|
-
Bundler 0.9 changes the following Bundler 0.8 Gemfile APIs:
|
45
|
-
|
46
|
-
1. Bundler 0.8 supported :only and :except as APIs for describing
|
47
|
-
groups of gems. Bundler 0.9 supports a single `group` method,
|
48
|
-
which you can use to group gems together. See the above "Group"
|
49
|
-
section for more information.
|
13
|
+
## Troubleshooting
|
50
14
|
|
51
|
-
|
52
|
-
`gem "foo", :group => :production`, and
|
53
|
-
`only :production { gem "foo" }` becomes
|
54
|
-
`group :production { gem "foo" }`
|
55
|
-
|
56
|
-
The short version is: group your gems together logically, and
|
57
|
-
use the available commands to make use of the groups you've
|
58
|
-
created.
|
59
|
-
|
60
|
-
2. `:require_as` becomes `:require`
|
61
|
-
|
62
|
-
3. `:vendored_at` is fully removed; you should use `:path`
|
63
|
-
|
64
|
-
### API Changes
|
65
|
-
|
66
|
-
1. `Bundler.require_env(:environment)` becomes
|
67
|
-
`Bundler.require(:multiple, :groups)`. You must
|
68
|
-
now specify the default group (the default group is the
|
69
|
-
group made up of the gems not assigned to any group)
|
70
|
-
explicitly. So `Bundler.require_env(:test)` becomes
|
71
|
-
`Bundler.require(:default, :test)`
|
72
|
-
|
73
|
-
2. `require 'vendor/gems/environment'`: In unlocked
|
74
|
-
mode, where using system gems, this becomes
|
75
|
-
`Bundler.setup(:multiple, :groups)`. If you don't
|
76
|
-
specify any groups, this puts all groups on the load
|
77
|
-
path. In locked, mode, it becomes `require '.bundle/environment'`
|
78
|
-
|
79
|
-
## More information
|
15
|
+
For help with common problems, see [ISSUES](http://github.com/carlhuda/bundler/blob/master/ISSUES.md).
|
80
16
|
|
81
17
|
### Development
|
82
18
|
|
83
|
-
|
19
|
+
To see what has changed in each version of bundler, starting with 0.9.5, see the [CHANGELOG](http://github.com/carlhuda/bundler/blob/master/CHANGELOG.md). For information about changes that will happen in the future, see the [ROADMAP](http://github.com/carlhuda/bundler/blob/master/ROADMAP.md).
|
84
20
|
|
85
|
-
|
21
|
+
## Upgrading from Bundler 0.8 to 0.9 and above
|
86
22
|
|
87
|
-
|
23
|
+
See [UPGRADING](http://github.com/carlhuda/bundler/blob/master/UPGRADING.md).
|
88
24
|
|
89
|
-
|
25
|
+
## Other questions
|
90
26
|
|
91
|
-
|
27
|
+
Feel free to chat with the Bundler core team (and many other users) on IRC in the [#bundler](irc://irc.freenode.net/bundler) channel on Freenode, or via email on the [Bundler mailing list](http://groups.google.com/group/ruby-bundler).
|
data/lib/bundler.rb
CHANGED
@@ -211,6 +211,10 @@ module Bundler
|
|
211
211
|
`sudo -p 'Enter your password to install the bundled RubyGems to your system: ' #{str}`
|
212
212
|
end
|
213
213
|
|
214
|
+
def read_file(file)
|
215
|
+
File.open(file, "rb") { |file| file.read }
|
216
|
+
end
|
217
|
+
|
214
218
|
def load_gemspec(file)
|
215
219
|
path = Pathname.new(file)
|
216
220
|
# Eval the gemspec from its parent directory
|
data/lib/bundler/capistrano.rb
CHANGED
@@ -12,25 +12,29 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
12
12
|
installed to the shared/bundle path. Gems in the development and \
|
13
13
|
test group will not be installed. The install command is executed \
|
14
14
|
with the --deployment and --quiet flags. You can override any of \
|
15
|
-
these defaults by setting the variables shown below.
|
15
|
+
these defaults by setting the variables shown below. If capistrano \
|
16
|
+
can not find the 'bundle' cmd then you can override the bundle_cmd \
|
17
|
+
variable to specifiy which one it should use.
|
16
18
|
|
17
19
|
set :bundle_gemfile, "Gemfile"
|
18
20
|
set :bundle_dir, fetch(:shared_path)+"/bundle"
|
19
21
|
set :bundle_flags, "--deployment --quiet"
|
20
22
|
set :bundle_without, [:development, :test]
|
23
|
+
set :bundle_cmd, "bundle" # e.g. change to "/opt/ruby/bin/bundle"
|
21
24
|
DESC
|
22
25
|
task :install, :except => { :no_release => true } do
|
23
26
|
bundle_dir = fetch(:bundle_dir, " #{fetch(:shared_path)}/bundle")
|
24
27
|
bundle_without = [*fetch(:bundle_without, [:development, :test])].compact
|
25
28
|
bundle_flags = fetch(:bundle_flags, "--deployment --quiet")
|
26
29
|
bundle_gemfile = fetch(:bundle_gemfile, "Gemfile")
|
30
|
+
bundle_cmd = fetch(:bundle_cmd, "bundle")
|
27
31
|
|
28
32
|
args = ["--gemfile #{fetch(:latest_release)}/#{bundle_gemfile}"]
|
29
33
|
args << "--path #{bundle_dir}" unless bundle_dir.to_s.empty?
|
30
34
|
args << bundle_flags.to_s
|
31
35
|
args << "--without #{bundle_without.join(" ")}" unless bundle_without.empty?
|
32
36
|
|
33
|
-
run "
|
37
|
+
run "#{bundle_cmd} install #{args.join(' ')}"
|
34
38
|
end
|
35
39
|
end
|
36
40
|
end
|
data/lib/bundler/cli.rb
CHANGED
@@ -77,7 +77,7 @@ module Bundler
|
|
77
77
|
end
|
78
78
|
spec = Gem::Specification.load(gemspec)
|
79
79
|
puts "Writing new Gemfile to #{Dir.pwd}/Gemfile"
|
80
|
-
File.open('Gemfile', '
|
80
|
+
File.open('Gemfile', 'wb') do |file|
|
81
81
|
file << "# Generated from #{gemspec}\n"
|
82
82
|
file << spec.to_gemfile
|
83
83
|
end
|
data/lib/bundler/definition.rb
CHANGED
@@ -16,7 +16,7 @@ module Bundler
|
|
16
16
|
|
17
17
|
# TODO: move this back into DSL
|
18
18
|
builder = Dsl.new
|
19
|
-
builder.instance_eval(
|
19
|
+
builder.instance_eval(Bundler.read_file(gemfile.to_s), gemfile.to_s, 1)
|
20
20
|
builder.to_definition(lockfile, unlock)
|
21
21
|
end
|
22
22
|
|
@@ -39,7 +39,7 @@ module Bundler
|
|
39
39
|
@lockfile_contents = ""
|
40
40
|
|
41
41
|
if lockfile && File.exists?(lockfile)
|
42
|
-
@lockfile_contents =
|
42
|
+
@lockfile_contents = Bundler.read_file(lockfile)
|
43
43
|
locked = LockfileParser.new(@lockfile_contents)
|
44
44
|
@platforms = locked.platforms
|
45
45
|
|
@@ -181,7 +181,7 @@ module Bundler
|
|
181
181
|
return
|
182
182
|
end
|
183
183
|
|
184
|
-
File.open(file, '
|
184
|
+
File.open(file, 'wb') do |f|
|
185
185
|
f.puts contents
|
186
186
|
end
|
187
187
|
end
|
@@ -293,6 +293,13 @@ module Bundler
|
|
293
293
|
end
|
294
294
|
|
295
295
|
def converge_sources
|
296
|
+
locked_gem = @locked_sources.find { |s| Source::Rubygems === s }
|
297
|
+
actual_gem = @sources.find { |s| Source::Rubygems === s }
|
298
|
+
|
299
|
+
if locked_gem && actual_gem
|
300
|
+
locked_gem.merge_remotes actual_gem
|
301
|
+
end
|
302
|
+
|
296
303
|
@sources.map! do |source|
|
297
304
|
@locked_sources.find { |s| s == source } || source
|
298
305
|
end
|
data/lib/bundler/dsl.rb
CHANGED
@@ -4,7 +4,7 @@ module Bundler
|
|
4
4
|
class Dsl
|
5
5
|
def self.evaluate(gemfile)
|
6
6
|
builder = new
|
7
|
-
builder.instance_eval(
|
7
|
+
builder.instance_eval(Bundler.read_file(gemfile.to_s), gemfile.to_s, 1)
|
8
8
|
builder.to_definition
|
9
9
|
end
|
10
10
|
|
@@ -173,10 +173,6 @@ module Bundler
|
|
173
173
|
@sources << @rubygems_source
|
174
174
|
end
|
175
175
|
|
176
|
-
def _version?(version)
|
177
|
-
version && Gem::Version.new(version) rescue false
|
178
|
-
end
|
179
|
-
|
180
176
|
def _normalize_hash(opts)
|
181
177
|
# Cannot modify a hash during an iteration in 1.9
|
182
178
|
opts.keys.each do |k|
|
@@ -218,7 +214,11 @@ module Bundler
|
|
218
214
|
# Normalize git and path options
|
219
215
|
["git", "path"].each do |type|
|
220
216
|
if param = opts[type]
|
221
|
-
|
217
|
+
if version.first && version.first =~ /^\s*=?\s*(\d[^\s]*)\s*$/
|
218
|
+
options = opts.merge("name" => name, "version" => $1)
|
219
|
+
else
|
220
|
+
options = opts.dup
|
221
|
+
end
|
222
222
|
source = send(type, param, options, :prepend => true) {}
|
223
223
|
opts["source"] = source
|
224
224
|
end
|
data/lib/bundler/gem_helper.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
+
$:.unshift File.expand_path('../vendor', __FILE__)
|
1
2
|
require 'open3'
|
3
|
+
require 'thor'
|
2
4
|
|
3
5
|
module Bundler
|
4
6
|
class GemHelper
|
@@ -10,6 +12,7 @@ module Bundler
|
|
10
12
|
attr_reader :spec_path, :base, :gemspec
|
11
13
|
|
12
14
|
def initialize(base, name = nil)
|
15
|
+
Bundler.ui = UI::Shell.new(Thor::Shell::Color.new)
|
13
16
|
@base = base
|
14
17
|
gemspecs = name ? [File.join(base, "#{name}.gemspec")] : Dir[File.join(base, "*.gemspec")]
|
15
18
|
raise "Unable to determine name from existing gemspec. Use :name => 'gemname' in #install_tasks to manually set it." unless gemspecs.size == 1
|
@@ -29,8 +32,8 @@ module Bundler
|
|
29
32
|
end
|
30
33
|
|
31
34
|
desc "Create tag #{version_tag} and build and push #{name}-#{version}.gem to Rubygems"
|
32
|
-
task '
|
33
|
-
|
35
|
+
task 'release' do
|
36
|
+
release_gem
|
34
37
|
end
|
35
38
|
end
|
36
39
|
|
@@ -41,27 +44,35 @@ module Bundler
|
|
41
44
|
file_name = File.basename(built_gem_path)
|
42
45
|
FileUtils.mkdir_p(File.join(base, 'pkg'))
|
43
46
|
FileUtils.mv(built_gem_path, 'pkg')
|
47
|
+
Bundler.ui.confirm "#{name} #{version} built to pkg/#{file_name}"
|
44
48
|
}
|
45
49
|
File.join(base, 'pkg', file_name)
|
46
50
|
end
|
47
51
|
|
48
52
|
def install_gem
|
49
53
|
built_gem_path = build_gem
|
50
|
-
|
54
|
+
out, err, code = sh_with_code("gem install #{built_gem_path}")
|
55
|
+
if err[/ERROR/]
|
56
|
+
Bundler.ui.error err
|
57
|
+
else
|
58
|
+
Bundler.ui.confirm "#{name} (#{version}) installed"
|
59
|
+
end
|
51
60
|
end
|
52
61
|
|
53
|
-
def
|
62
|
+
def release_gem
|
54
63
|
guard_clean
|
55
64
|
guard_already_tagged
|
65
|
+
built_gem_path = build_gem
|
56
66
|
tag_version {
|
57
67
|
git_push
|
58
|
-
rubygem_push(
|
68
|
+
rubygem_push(built_gem_path)
|
59
69
|
}
|
60
70
|
end
|
61
71
|
|
62
72
|
protected
|
63
73
|
def rubygem_push(path)
|
64
74
|
sh("gem push #{path}")
|
75
|
+
Bundler.ui.confirm "Pushed #{name} #{version} to rubygems.org"
|
65
76
|
end
|
66
77
|
|
67
78
|
def built_gem_path
|
@@ -69,8 +80,14 @@ module Bundler
|
|
69
80
|
end
|
70
81
|
|
71
82
|
def git_push
|
72
|
-
|
73
|
-
|
83
|
+
perform_git_push
|
84
|
+
perform_git_push ' --tags'
|
85
|
+
Bundler.ui.confirm "Pushed git commits and tags"
|
86
|
+
end
|
87
|
+
|
88
|
+
def perform_git_push(options = '')
|
89
|
+
out, err, code = sh_with_code "git push --quiet#{options}"
|
90
|
+
raise err unless err == ''
|
74
91
|
end
|
75
92
|
|
76
93
|
def guard_already_tagged
|
@@ -89,12 +106,18 @@ module Bundler
|
|
89
106
|
|
90
107
|
def tag_version
|
91
108
|
sh "git tag -am 'Version #{version}' #{version_tag}"
|
109
|
+
Bundler.ui.confirm "Tagged #{tagged_sha} with #{version_tag}"
|
92
110
|
yield if block_given?
|
93
111
|
rescue
|
112
|
+
Bundler.ui.error "Untagged #{tagged_sha} with #{version_tag} due to error"
|
94
113
|
sh "git tag -d #{version_tag}"
|
95
114
|
raise
|
96
115
|
end
|
97
116
|
|
117
|
+
def tagged_sha
|
118
|
+
sh("git show-ref --tags #{version_tag}").split(' ').first[0, 8]
|
119
|
+
end
|
120
|
+
|
98
121
|
def version
|
99
122
|
gemspec.version
|
100
123
|
end
|
@@ -108,20 +131,20 @@ module Bundler
|
|
108
131
|
end
|
109
132
|
|
110
133
|
def sh(cmd, &block)
|
111
|
-
|
112
|
-
code == 0 ?
|
134
|
+
out, err, code = sh_with_code(cmd, &block)
|
135
|
+
code == 0 ? out : raise(out.empty? ? err : out)
|
113
136
|
end
|
114
137
|
|
115
138
|
def sh_with_code(cmd, &block)
|
116
|
-
|
139
|
+
outbuf, errbuf = '', ''
|
117
140
|
Dir.chdir(base) {
|
118
141
|
stdin, stdout, stderr = *Open3.popen3(cmd)
|
119
142
|
if $? == 0
|
120
|
-
|
121
|
-
block.call(
|
143
|
+
outbuf, errbuf = stdout.read, stderr.read
|
144
|
+
block.call(outbuf, errbuf) if block
|
122
145
|
end
|
123
146
|
}
|
124
|
-
[
|
147
|
+
[outbuf, errbuf, $?]
|
125
148
|
end
|
126
149
|
end
|
127
150
|
end
|
@@ -73,7 +73,7 @@ module Bundler
|
|
73
73
|
# to use in the case that there are no gemspecs present. A fake
|
74
74
|
# gemspec is created based on the version set on the dependency
|
75
75
|
# TODO: Use the version from the spec instead of from the dependency
|
76
|
-
if version && version.size == 1 && version.first =~
|
76
|
+
if version && version.size == 1 && version.first =~ /^\s*= (.+)\s*$/ && dep.source.is_a?(Bundler::Source::Path)
|
77
77
|
dep.source.name = name
|
78
78
|
dep.source.version = $1
|
79
79
|
end
|
@@ -1,92 +0,0 @@
|
|
1
|
-
.\" generated with Ronn/v0.7.3
|
2
|
-
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
|
-
.
|
4
|
-
.TH "BUNDLE\-CONFIG" "1" "August 2010" "" ""
|
5
|
-
.
|
6
|
-
.SH "NAME"
|
7
|
-
\fBbundle\-config\fR \- Set bundler configuration options
|
8
|
-
.
|
9
|
-
.SH "SYNOPSIS"
|
10
|
-
\fBbundle config\fR [\fIname\fR [\fIvalue\fR]]
|
11
|
-
.
|
12
|
-
.SH "DESCRIPTION"
|
13
|
-
This command allows you to interact with bundler\'s configuration system\. Bundler retrieves its configuration from the local application (\fBapp/\.bundle/config\fR), environment variables, and the user\'s home directory (\fB~/\.bundle/config\fR), in that order of priority\.
|
14
|
-
.
|
15
|
-
.P
|
16
|
-
Executing \fBbundle config\fR with no parameters will print a list of all bundler configuration for the current bundle, and where that configuration was set\.
|
17
|
-
.
|
18
|
-
.P
|
19
|
-
Executing \fBbundle config <name>\fR will print the value of that configuration setting, and where it was set\.
|
20
|
-
.
|
21
|
-
.P
|
22
|
-
Executing \fBbundle config <name> <value>\fR will set that configuration to the value specified for all bundles executed as the current user\. The configuration will be stored in \fB~/\.bundle/config\fR\.
|
23
|
-
.
|
24
|
-
.SH "BUILD OPTIONS"
|
25
|
-
You can use \fBbundle config\fR to give bundler the flags to pass to the gem installer every time bundler tries to install a particular gem\.
|
26
|
-
.
|
27
|
-
.P
|
28
|
-
A very common example, the \fBmysql\fR gem, requires Snow Leopard users to pass configuration flags to \fBgem install\fR to specify where to find the \fBmysql_config\fR executable\.
|
29
|
-
.
|
30
|
-
.IP "" 4
|
31
|
-
.
|
32
|
-
.nf
|
33
|
-
|
34
|
-
gem install mysql \-\- \-\-with\-mysql\-config=/usr/local/mysql/bin/mysql_config
|
35
|
-
.
|
36
|
-
.fi
|
37
|
-
.
|
38
|
-
.IP "" 0
|
39
|
-
.
|
40
|
-
.P
|
41
|
-
Since the specific location of that executable can change from machine to machine, you can specify these flags on a per\-machine basis\.
|
42
|
-
.
|
43
|
-
.IP "" 4
|
44
|
-
.
|
45
|
-
.nf
|
46
|
-
|
47
|
-
bundle config build\.mysql \-\-with\-mysql\-config=/usr/local/mysql/bin/mysql_config
|
48
|
-
.
|
49
|
-
.fi
|
50
|
-
.
|
51
|
-
.IP "" 0
|
52
|
-
.
|
53
|
-
.P
|
54
|
-
After running this command, every time bundler needs to install the \fBmysql\fR gem, it will pass along the flags you specified\.
|
55
|
-
.
|
56
|
-
.SH "CONFIGURATION KEYS"
|
57
|
-
Configuration keys in bundler have two forms: the canonical form and the environment variable form\.
|
58
|
-
.
|
59
|
-
.P
|
60
|
-
For instance, passing the \fB\-\-without\fR flag to bundle install(1) \fIbundle\-install\.1\.html\fR prevents Bundler from installing certain groups specified in the Gemfile(5)\. Bundler persists this value in \fBapp/\.bundle/config\fR so that calls to \fBBundler\.setup\fR do not try to find gems from the \fBGemfile\fR that you didn\'t install\. Additionally, subsequent calls to bundle install(1) \fIbundle\-install\.1\.html\fR remember this setting and skip those groups\.
|
61
|
-
.
|
62
|
-
.P
|
63
|
-
The canonical form of this configuration is \fB"without"\fR\. To convert the canonical form to the environment variable form, capitalize it, and prepend \fBBUNDLE_\fR\. The environment variable form of \fB"without"\fR is \fBBUNDLE_WITHOUT\fR\.
|
64
|
-
.
|
65
|
-
.SH "LIST OF AVAILABLE KEYS"
|
66
|
-
The following is a list of all configuration keys and their purpose\. You can learn more about their operation in bundle install(1) \fIbundle\-install\.1\.html\fR\.
|
67
|
-
.
|
68
|
-
.TP
|
69
|
-
\fBpath\fR (\fBBUNDLE_PATH\fR)
|
70
|
-
The location on disk to install gems\. Defaults to \fB$GEM_HOME\fR in development and \fBvendor/bundler\fR when \fB\-\-deployment\fR is used
|
71
|
-
.
|
72
|
-
.TP
|
73
|
-
\fBfrozen\fR (\fBBUNDLE_FROZEN\fR)
|
74
|
-
Disallow changes to the \fBGemfile\fR\. Defaults to \fBtrue\fR when \fB\-\-deployment\fR is used\.
|
75
|
-
.
|
76
|
-
.TP
|
77
|
-
\fBwithout\fR (\fBBUNDLE_WITHOUT\fR)
|
78
|
-
A \fB:\fR\-separated list of groups whose gems bundler should not install
|
79
|
-
.
|
80
|
-
.TP
|
81
|
-
\fBbin\fR (\fBBUNDLE_BIN\fR)
|
82
|
-
Install executables from gems in the bundle to the specified directory\. Defaults to \fBfalse\fR\.
|
83
|
-
.
|
84
|
-
.TP
|
85
|
-
\fBgemfile\fR (\fBBUNDLE_GEMFILE\fR)
|
86
|
-
The name of the file that bundler should use as the \fBGemfile\fR\. This location of this file also sets the root of the project, which is used to resolve relative paths in the \fBGemfile\fR, among other things\. By default, bundler will search up from the current working directory until it finds a \fBGemfile\fR\.
|
87
|
-
.
|
88
|
-
.P
|
89
|
-
In general, you should set these settings per\-application by using the applicable flag to the bundle install(1) \fIbundle\-install\.1\.html\fR command\.
|
90
|
-
.
|
91
|
-
.P
|
92
|
-
You can set them globally either via environment variables or \fBbundle config\fR, whichever is preferable for your setup\. If you use both, environment variables will take preference over global settings\.
|
@@ -1,108 +1,66 @@
|
|
1
|
-
BUNDLE-CONFIG(1) BUNDLE-CONFIG(1)
|
2
1
|
|
3
2
|
|
4
3
|
|
5
|
-
NAME
|
6
|
-
bundle-config - Set bundler configuration options
|
7
4
|
|
8
|
-
SYNOPSIS
|
9
|
-
bundle config [name [value]]
|
10
5
|
|
11
|
-
DESCRIPTION
|
12
|
-
This command allows you to interact with bundler's configuration sys-
|
13
|
-
tem. Bundler retrieves its configuration from the local application
|
14
|
-
(app/.bundle/config), environment variables, and the user's home direc-
|
15
|
-
tory (~/.bundle/config), in that order of priority.
|
16
6
|
|
17
|
-
Executing bundle config with no parameters will print a list of all
|
18
|
-
bundler configuration for the current bundle, and where that configura-
|
19
|
-
tion was set.
|
20
7
|
|
21
|
-
Executing bundle config <name> will print the value of that configura-
|
22
|
-
tion setting, and where it was set.
|
23
8
|
|
24
|
-
Executing bundle config <name> <value> will set that configuration to
|
25
|
-
the value specified for all bundles executed as the current user. The
|
26
|
-
configuration will be stored in ~/.bundle/config.
|
27
9
|
|
28
|
-
BUILD OPTIONS
|
29
|
-
You can use bundle config to give bundler the flags to pass to the gem
|
30
|
-
installer every time bundler tries to install a particular gem.
|
31
10
|
|
32
|
-
A very common example, the mysql gem, requires Snow Leopard users to
|
33
|
-
pass configuration flags to gem install to specify where to find the
|
34
|
-
mysql_config executable.
|
35
11
|
|
36
12
|
|
37
13
|
|
38
|
-
gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
|
39
14
|
|
40
15
|
|
41
16
|
|
42
|
-
Since the specific location of that executable can change from machine
|
43
|
-
to machine, you can specify these flags on a per-machine basis.
|
44
17
|
|
45
18
|
|
46
19
|
|
47
|
-
bundle config build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config
|
48
20
|
|
49
21
|
|
50
22
|
|
51
|
-
After running this command, every time bundler needs to install the
|
52
|
-
mysql gem, it will pass along the flags you specified.
|
53
23
|
|
54
|
-
CONFIGURATION KEYS
|
55
|
-
Configuration keys in bundler have two forms: the canonical form and
|
56
|
-
the environment variable form.
|
57
24
|
|
58
|
-
For instance, passing the --without flag to bundle install(1) bun-
|
59
|
-
dle-install.1.html prevents Bundler from installing certain groups
|
60
|
-
specified in the Gemfile(5). Bundler persists this value in app/.bun-
|
61
|
-
dle/config so that calls to Bundler.setup do not try to find gems from
|
62
|
-
the Gemfile that you didn't install. Additionally, subsequent calls to
|
63
|
-
bundle install(1) bundle-install.1.html remember this setting and skip
|
64
|
-
those groups.
|
65
25
|
|
66
|
-
The canonical form of this configuration is "without". To convert the
|
67
|
-
canonical form to the environment variable form, capitalize it, and
|
68
|
-
prepend BUNDLE_. The environment variable form of "without" is BUN-
|
69
|
-
DLE_WITHOUT.
|
70
26
|
|
71
|
-
LIST OF AVAILABLE KEYS
|
72
|
-
The following is a list of all configuration keys and their purpose.
|
73
|
-
You can learn more about their operation in bundle install(1) bun-
|
74
|
-
dle-install.1.html.
|
75
27
|
|
76
|
-
path (BUNDLE_PATH)
|
77
|
-
The location on disk to install gems. Defaults to $GEM_HOME in
|
78
|
-
development and vendor/bundler when --deployment is used
|
79
28
|
|
80
|
-
frozen (BUNDLE_FROZEN)
|
81
|
-
Disallow changes to the Gemfile. Defaults to true when --deploy-
|
82
|
-
ment is used.
|
83
29
|
|
84
|
-
without (BUNDLE_WITHOUT)
|
85
|
-
A :-separated list of groups whose gems bundler should not
|
86
|
-
install
|
87
30
|
|
88
|
-
bin (BUNDLE_BIN)
|
89
|
-
Install executables from gems in the bundle to the specified
|
90
|
-
directory. Defaults to false.
|
91
31
|
|
92
|
-
gemfile (BUNDLE_GEMFILE)
|
93
|
-
The name of the file that bundler should use as the Gemfile.
|
94
|
-
This location of this file also sets the root of the project,
|
95
|
-
which is used to resolve relative paths in the Gemfile, among
|
96
|
-
other things. By default, bundler will search up from the cur-
|
97
|
-
rent working directory until it finds a Gemfile.
|
98
32
|
|
99
|
-
In general, you should set these settings per-application by using the
|
100
|
-
applicable flag to the bundle install(1) bundle-install.1.html command.
|
101
33
|
|
102
|
-
You can set them globally either via environment variables or bundle
|
103
|
-
config, whichever is preferable for your setup. If you use both, envi-
|
104
|
-
ronment variables will take preference over global settings.
|
105
34
|
|
106
35
|
|
107
36
|
|
108
|
-
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
|
data/lib/bundler/source.rb
CHANGED
@@ -129,6 +129,13 @@ module Bundler
|
|
129
129
|
@remotes << normalize_uri(source)
|
130
130
|
end
|
131
131
|
|
132
|
+
def merge_remotes(source)
|
133
|
+
@remotes = []
|
134
|
+
source.remotes.each do |r|
|
135
|
+
add_remote r.to_s
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
132
139
|
private
|
133
140
|
|
134
141
|
def cached_gem(spec)
|
@@ -465,7 +472,7 @@ module Bundler
|
|
465
472
|
def to_lock
|
466
473
|
out = "GIT\n"
|
467
474
|
out << " remote: #{@uri}\n"
|
468
|
-
out << " revision: #{
|
475
|
+
out << " revision: #{revision}\n"
|
469
476
|
%w(ref branch tag submodules).each do |opt|
|
470
477
|
out << " #{opt}: #{options[opt]}\n" if options[opt]
|
471
478
|
end
|
@@ -485,7 +492,7 @@ module Bundler
|
|
485
492
|
alias == eql?
|
486
493
|
|
487
494
|
def to_s
|
488
|
-
ref = @options["ref"] ?
|
495
|
+
ref = @options["ref"] ? shortref_for_display(@options["ref"]) : @ref
|
489
496
|
"#{@uri} (at #{ref})"
|
490
497
|
end
|
491
498
|
|
@@ -495,7 +502,7 @@ module Bundler
|
|
495
502
|
|
496
503
|
def path
|
497
504
|
@install_path ||= begin
|
498
|
-
git_scope = "#{base_name}-#{
|
505
|
+
git_scope = "#{base_name}-#{shortref_for_path(revision)}"
|
499
506
|
|
500
507
|
if Bundler.requires_sudo?
|
501
508
|
Bundler.user_bundle_path.join(Bundler.ruby_scope).join(git_scope)
|
@@ -558,10 +565,14 @@ module Bundler
|
|
558
565
|
File.basename(uri.sub(%r{^(\w+://)?([^/:]+:)},''), ".git")
|
559
566
|
end
|
560
567
|
|
561
|
-
def
|
568
|
+
def shortref_for_display(ref)
|
562
569
|
ref[0..6]
|
563
570
|
end
|
564
571
|
|
572
|
+
def shortref_for_path(ref)
|
573
|
+
ref[0..11]
|
574
|
+
end
|
575
|
+
|
565
576
|
def uri_hash
|
566
577
|
if uri =~ %r{^\w+://(\w+@)?}
|
567
578
|
# Downcase the domain component of the URI
|
@@ -604,7 +615,7 @@ module Bundler
|
|
604
615
|
git %|clone --no-checkout "#{cache_path}" "#{path}"|
|
605
616
|
end
|
606
617
|
Dir.chdir(path) do
|
607
|
-
git
|
618
|
+
git %|fetch --force --quiet "#{cache_path}"|
|
608
619
|
git "reset --hard #{revision}"
|
609
620
|
|
610
621
|
if @submodules
|
@@ -616,7 +627,7 @@ module Bundler
|
|
616
627
|
|
617
628
|
def has_revision_cached?
|
618
629
|
return unless @revision
|
619
|
-
in_cache { git %|
|
630
|
+
in_cache { git %|cat-file -e #{@revision}| }
|
620
631
|
true
|
621
632
|
rescue GitError
|
622
633
|
false
|
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.0.0
|
5
|
+
VERSION = "1.0.0" unless defined?(::Bundler::VERSION)
|
6
6
|
end
|
metadata
CHANGED
@@ -1,15 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease: true
|
4
|
+
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 1
|
8
7
|
- 0
|
9
8
|
- 0
|
10
|
-
|
11
|
-
- 6
|
12
|
-
version: 1.0.0.rc.6
|
9
|
+
version: 1.0.0
|
13
10
|
platform: ruby
|
14
11
|
authors:
|
15
12
|
- Carl Lerche
|
@@ -19,23 +16,35 @@ autorequire:
|
|
19
16
|
bindir: bin
|
20
17
|
cert_chain: []
|
21
18
|
|
22
|
-
date: 2010-08-
|
19
|
+
date: 2010-08-30 00:00:00 +09:00
|
23
20
|
default_executable:
|
24
21
|
dependencies:
|
25
22
|
- !ruby/object:Gem::Dependency
|
26
|
-
name:
|
23
|
+
name: ronn
|
27
24
|
prerelease: false
|
28
25
|
requirement: &id001 !ruby/object:Gem::Requirement
|
29
26
|
none: false
|
30
27
|
requirements:
|
31
28
|
- - ">="
|
32
29
|
- !ruby/object:Gem::Version
|
33
|
-
hash: 3
|
34
30
|
segments:
|
35
31
|
- 0
|
36
32
|
version: "0"
|
37
33
|
type: :development
|
38
34
|
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rspec
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
46
|
+
type: :development
|
47
|
+
version_requirements: *id002
|
39
48
|
description: Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably
|
40
49
|
email:
|
41
50
|
- carlhuda@engineyard.com
|
@@ -137,7 +146,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
137
146
|
requirements:
|
138
147
|
- - ">="
|
139
148
|
- !ruby/object:Gem::Version
|
140
|
-
hash: 3
|
141
149
|
segments:
|
142
150
|
- 0
|
143
151
|
version: "0"
|
@@ -146,7 +154,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
154
|
requirements:
|
147
155
|
- - ">="
|
148
156
|
- !ruby/object:Gem::Version
|
149
|
-
hash: 23
|
150
157
|
segments:
|
151
158
|
- 1
|
152
159
|
- 3
|