bundler 1.0.0 → 1.0.2
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/.gitignore +12 -0
- data/CHANGELOG.md +28 -6
- data/ISSUES.md +1 -1
- data/README.md +7 -5
- data/Rakefile +173 -0
- data/UPGRADING.md +103 -0
- data/bundler.gemspec +28 -0
- data/lib/bundler.rb +1 -0
- data/lib/bundler/capistrano.rb +2 -31
- data/lib/bundler/cli.rb +18 -16
- data/lib/bundler/deployment.rb +37 -0
- data/lib/bundler/dsl.rb +3 -3
- data/lib/bundler/gem_helper.rb +4 -7
- data/lib/bundler/graph.rb +3 -3
- data/lib/bundler/installer.rb +1 -0
- data/lib/bundler/lockfile_parser.rb +1 -1
- data/lib/bundler/man/bundle +1 -1
- data/lib/bundler/man/bundle-config +92 -0
- data/lib/bundler/man/bundle-config.txt +72 -30
- data/lib/bundler/man/bundle-exec +1 -1
- data/lib/bundler/man/bundle-exec.txt +1 -1
- data/lib/bundler/man/bundle-install +1 -1
- data/lib/bundler/man/bundle-install.txt +1 -1
- data/lib/bundler/man/bundle-package +1 -1
- data/lib/bundler/man/bundle-package.txt +1 -1
- data/lib/bundler/man/bundle-update +1 -1
- data/lib/bundler/man/bundle-update.txt +1 -1
- data/lib/bundler/man/bundle.txt +1 -1
- data/lib/bundler/man/gemfile.5 +2 -2
- data/lib/bundler/man/gemfile.5.txt +2 -2
- data/lib/bundler/settings.rb +2 -2
- data/lib/bundler/source.rb +2 -3
- data/lib/bundler/templates/Executable +1 -1
- data/lib/bundler/templates/newgem/Gemfile.tt +1 -1
- data/lib/bundler/templates/newgem/bin/newgem.tt +3 -0
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +11 -12
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler/vlad.rb +9 -0
- data/man/bundle-config.ronn +90 -0
- data/man/bundle-exec.ronn +98 -0
- data/man/bundle-install.ronn +310 -0
- data/man/bundle-package.ronn +59 -0
- data/man/bundle-update.ronn +176 -0
- data/man/bundle.ronn +77 -0
- data/man/gemfile.5.ronn +254 -0
- data/man/index.txt +6 -0
- data/spec/cache/gems_spec.rb +205 -0
- data/spec/cache/git_spec.rb +9 -0
- data/spec/cache/path_spec.rb +27 -0
- data/spec/cache/platform_spec.rb +57 -0
- data/spec/install/deploy_spec.rb +171 -0
- data/spec/install/deprecated_spec.rb +43 -0
- data/spec/install/gems/c_ext_spec.rb +48 -0
- data/spec/install/gems/env_spec.rb +107 -0
- data/spec/install/gems/flex_spec.rb +272 -0
- data/spec/install/gems/groups_spec.rb +209 -0
- data/spec/install/gems/locked_spec.rb +48 -0
- data/spec/install/gems/packed_spec.rb +72 -0
- data/spec/install/gems/platform_spec.rb +181 -0
- data/spec/install/gems/resolving_spec.rb +72 -0
- data/spec/install/gems/simple_case_spec.rb +709 -0
- data/spec/install/gems/sudo_spec.rb +77 -0
- data/spec/install/gems/win32_spec.rb +26 -0
- data/spec/install/gemspec_spec.rb +96 -0
- data/spec/install/git_spec.rb +552 -0
- data/spec/install/invalid_spec.rb +17 -0
- data/spec/install/path_spec.rb +335 -0
- data/spec/install/upgrade_spec.rb +26 -0
- data/spec/lock/flex_spec.rb +625 -0
- data/spec/lock/git_spec.rb +35 -0
- data/spec/other/check_spec.rb +221 -0
- data/spec/other/config_spec.rb +40 -0
- data/spec/other/console_spec.rb +102 -0
- data/spec/other/exec_spec.rb +241 -0
- data/spec/other/ext_spec.rb +16 -0
- data/spec/other/gem_helper_spec.rb +116 -0
- data/spec/other/help_spec.rb +36 -0
- data/spec/other/init_spec.rb +40 -0
- data/spec/other/newgem_spec.rb +24 -0
- data/spec/other/open_spec.rb +51 -0
- data/spec/other/show_spec.rb +99 -0
- data/spec/pack/gems_spec.rb +22 -0
- data/spec/quality_spec.rb +55 -0
- data/spec/resolver/basic_spec.rb +20 -0
- data/spec/resolver/platform_spec.rb +57 -0
- data/spec/runtime/environment_rb_spec.rb +170 -0
- data/spec/runtime/executable_spec.rb +110 -0
- data/spec/runtime/load_spec.rb +107 -0
- data/spec/runtime/platform_spec.rb +90 -0
- data/spec/runtime/require_spec.rb +261 -0
- data/spec/runtime/setup_spec.rb +412 -0
- data/spec/runtime/with_clean_env_spec.rb +15 -0
- data/spec/spec_helper.rb +81 -0
- data/spec/support/builders.rb +566 -0
- data/spec/support/helpers.rb +243 -0
- data/spec/support/indexes.rb +113 -0
- data/spec/support/matchers.rb +89 -0
- data/spec/support/path.rb +71 -0
- data/spec/support/platforms.rb +49 -0
- data/spec/support/ruby_ext.rb +19 -0
- data/spec/support/rubygems_ext.rb +30 -0
- data/spec/support/rubygems_hax/rubygems_plugin.rb +9 -0
- data/spec/support/sudo.rb +21 -0
- data/spec/update/gems_spec.rb +86 -0
- data/spec/update/git_spec.rb +159 -0
- data/spec/update/source_spec.rb +50 -0
- metadata +170 -32
- data/ROADMAP.md +0 -36
data/.gitignore
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,28 @@
|
|
1
|
-
## 1.0.
|
1
|
+
## 1.0.1 (October 1, 2010)
|
2
2
|
|
3
|
-
Features
|
3
|
+
Features:
|
4
|
+
|
5
|
+
- Vlad deployment recipe, `require 'bundler/vlad'`
|
6
|
+
- Prettier bundle graphs
|
7
|
+
- Improved gem skeleton for `bundle gem`
|
8
|
+
- Prompt on file clashes when generating a gem
|
9
|
+
- Option to generate binary with gem skeleton
|
10
|
+
- Allow subclassing of GemHelper for custom tasks
|
11
|
+
- Chdir to gem directory during `bundle open`
|
12
|
+
|
13
|
+
Bugfixes:
|
14
|
+
|
15
|
+
- Allow gemspec requirements with a list of versions
|
16
|
+
- Accept lockfiles with windows line endings
|
17
|
+
- Respect BUNDLE_WITHOUT env var
|
18
|
+
- Allow `gem "foo", :platform => :jruby`
|
19
|
+
- Specify loaded_from path in fake gemspec
|
20
|
+
- Flesh out gem_helper tasks, raise errors correctly
|
21
|
+
- Respect RBConfig::CONFIG['ruby_install_name'] in binstubs
|
22
|
+
|
23
|
+
## 1.0.0 (August 29, 2010)
|
24
|
+
|
25
|
+
Features:
|
4
26
|
|
5
27
|
- You can now define `:bundle_cmd` in the capistrano task
|
6
28
|
|
@@ -20,7 +42,7 @@ Bugfixes:
|
|
20
42
|
- Detect new Rubygems sources in the Gemfile and update
|
21
43
|
the lockfile
|
22
44
|
|
23
|
-
## 1.0.0.rc.6
|
45
|
+
## 1.0.0.rc.6 (August 23, 2010)
|
24
46
|
|
25
47
|
Features:
|
26
48
|
|
@@ -38,7 +60,7 @@ Bugfixes:
|
|
38
60
|
- Expand paths in Gemfile relative to the Gemfile and not the current
|
39
61
|
working directory.
|
40
62
|
|
41
|
-
## 1.0.0.rc.5
|
63
|
+
## 1.0.0.rc.5 (August 10, 2010)
|
42
64
|
|
43
65
|
Features:
|
44
66
|
|
@@ -49,7 +71,7 @@ Bugfixes:
|
|
49
71
|
- Fix a regression with determining whether or not to use sudo
|
50
72
|
- Allow using the --gemfile flag with the --deployment flag
|
51
73
|
|
52
|
-
## 1.0.0.rc.4
|
74
|
+
## 1.0.0.rc.4 (August 9, 2010)
|
53
75
|
|
54
76
|
Features:
|
55
77
|
|
@@ -132,7 +154,7 @@ for deployment.
|
|
132
154
|
|
133
155
|
If you want to share gems across deployments, and you use
|
134
156
|
Capistrano, symlink release_path/current/vendor/bundle to
|
135
|
-
release_path/shared/
|
157
|
+
release_path/shared/bundle. This will keep deployments
|
136
158
|
snappy while maintaining the benefits of clean, deploy-time
|
137
159
|
isolation.
|
138
160
|
|
data/ISSUES.md
CHANGED
@@ -6,7 +6,7 @@ Instructions for common Bundler use-cases can be found on the [Bundler documenta
|
|
6
6
|
|
7
7
|
After reading the documentation, try these troubleshooting steps:
|
8
8
|
|
9
|
-
rm -rf ~/.bundle/ ~/.gem/ .bundle/ Gemfile.lock
|
9
|
+
rm -rf ~/.bundle/ ~/.gem/ .bundle/ vendor/cache/ Gemfile.lock
|
10
10
|
bundle install
|
11
11
|
|
12
12
|
## Reporting unresolved problems
|
data/README.md
CHANGED
@@ -6,22 +6,24 @@ and all child dependencies specified in this manifest. It can manage any update
|
|
6
6
|
to the gem manifest file and update the bundle's gems accordingly. It also lets
|
7
7
|
you run any ruby code in context of the bundle's gem environment.
|
8
8
|
|
9
|
-
|
9
|
+
### Installation and usage
|
10
10
|
|
11
11
|
See [gembundler.com](http://gembundler.com) for up-to-date installation and usage instructions.
|
12
12
|
|
13
|
-
|
13
|
+
### Troubleshooting
|
14
14
|
|
15
15
|
For help with common problems, see [ISSUES](http://github.com/carlhuda/bundler/blob/master/ISSUES.md).
|
16
16
|
|
17
17
|
### Development
|
18
18
|
|
19
|
-
To see what has changed in
|
19
|
+
To see what has changed in recent versions of bundler, see the [CHANGELOG](http://github.com/carlhuda/bundler/blob/master/CHANGELOG.md).
|
20
20
|
|
21
|
-
|
21
|
+
The `master` branch contains our current progress towards version 1.1. Because of that, please submit bugfix pull requests against the `1-0-stable` branch.
|
22
|
+
|
23
|
+
### Upgrading from Bundler 0.8 to 0.9 and above
|
22
24
|
|
23
25
|
See [UPGRADING](http://github.com/carlhuda/bundler/blob/master/UPGRADING.md).
|
24
26
|
|
25
|
-
|
27
|
+
### Other questions
|
26
28
|
|
27
29
|
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/Rakefile
ADDED
@@ -0,0 +1,173 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.unshift File.expand_path("../lib", __FILE__)
|
3
|
+
|
4
|
+
require 'rubygems'
|
5
|
+
require 'rubygems/specification'
|
6
|
+
require 'bundler'
|
7
|
+
|
8
|
+
def gemspec
|
9
|
+
@gemspec ||= begin
|
10
|
+
file = File.expand_path('../bundler.gemspec', __FILE__)
|
11
|
+
eval(File.read(file), binding, file)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def sudo?
|
16
|
+
ENV['BUNDLER_SUDO_TESTS']
|
17
|
+
end
|
18
|
+
|
19
|
+
begin
|
20
|
+
require 'rspec/core/rake_task'
|
21
|
+
|
22
|
+
task :clear_tmp do
|
23
|
+
FileUtils.rm_rf(File.expand_path("../tmp", __FILE__))
|
24
|
+
end
|
25
|
+
|
26
|
+
desc "Run specs"
|
27
|
+
RSpec::Core::RakeTask.new do |t|
|
28
|
+
t.rspec_opts = %w(-fs --color)
|
29
|
+
t.ruby_opts = %w(-w)
|
30
|
+
end
|
31
|
+
|
32
|
+
task :spec => :build
|
33
|
+
|
34
|
+
namespace :spec do
|
35
|
+
task :sudo do
|
36
|
+
ENV['BUNDLER_SUDO_TESTS'] = '1'
|
37
|
+
end
|
38
|
+
|
39
|
+
task :clean do
|
40
|
+
if sudo?
|
41
|
+
system "sudo rm -rf #{File.expand_path('../tmp', __FILE__)}"
|
42
|
+
else
|
43
|
+
rm_rf 'tmp'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
desc "Run the full spec suite including SUDO tests"
|
48
|
+
task :full => ["sudo", "clean", "spec"]
|
49
|
+
end
|
50
|
+
|
51
|
+
# Rubygems 1.3.5, 1.3.6, and HEAD specs
|
52
|
+
rubyopt = ENV["RUBYOPT"]
|
53
|
+
%w(master REL_1_3_5 REL_1_3_6).each do |rg|
|
54
|
+
desc "Run specs with Rubygems #{rg}"
|
55
|
+
RSpec::Core::RakeTask.new("spec_gems_#{rg}") do |t|
|
56
|
+
t.rspec_opts = %w(-fs --color)
|
57
|
+
t.ruby_opts = %w(-w)
|
58
|
+
end
|
59
|
+
|
60
|
+
task "rubygems_#{rg}" do
|
61
|
+
unless File.directory?("tmp/rubygems_#{rg}")
|
62
|
+
system("git clone git://github.com/jbarnette/rubygems.git tmp/rubygems_#{rg} && cd tmp/rubygems_#{rg} && git reset --hard #{rg}")
|
63
|
+
end
|
64
|
+
ENV["RUBYOPT"] = "-I#{File.expand_path("tmp/rubygems_#{rg}/lib")} #{rubyopt}"
|
65
|
+
end
|
66
|
+
|
67
|
+
task "spec_gems_#{rg}" => "rubygems_#{rg}"
|
68
|
+
task :ci => "spec_gems_#{rg}"
|
69
|
+
end
|
70
|
+
|
71
|
+
# Ruby 1.8.6, 1.8.7, and 1.9.2 specs
|
72
|
+
task "ensure_rvm" do
|
73
|
+
raise "RVM is not available" unless File.exist?(File.expand_path("~/.rvm/scripts/rvm"))
|
74
|
+
end
|
75
|
+
|
76
|
+
%w(1.8.6-p399 1.8.7-p249 1.9.2-head).each do |ruby|
|
77
|
+
ruby_cmd = File.expand_path("~/.rvm/bin/ruby-#{ruby}")
|
78
|
+
|
79
|
+
desc "Run specs on Ruby #{ruby}"
|
80
|
+
RSpec::Core::RakeTask.new("spec_ruby_#{ruby}") do |t|
|
81
|
+
t.rspec_opts = %w(-fs --color)
|
82
|
+
t.ruby_opts = %w(-w)
|
83
|
+
end
|
84
|
+
|
85
|
+
task "ensure_ruby_#{ruby}" do
|
86
|
+
raise "Could not find Ruby #{ruby} at #{ruby_cmd}" unless File.exist?(ruby_cmd)
|
87
|
+
end
|
88
|
+
|
89
|
+
task "ensure_ruby_#{ruby}" => "ensure_rvm"
|
90
|
+
task "spec_ruby_#{ruby}" => "ensure_ruby_#{ruby}"
|
91
|
+
task :ci => "spec_ruby_#{ruby}"
|
92
|
+
end
|
93
|
+
rescue LoadError
|
94
|
+
task :spec do
|
95
|
+
abort "Run `gem install rspec --pre` to be able to run specs"
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
namespace :man do
|
100
|
+
directory "lib/bundler/man"
|
101
|
+
|
102
|
+
Dir["man/*.ronn"].each do |ronn|
|
103
|
+
basename = File.basename(ronn, ".ronn")
|
104
|
+
roff = "lib/bundler/man/#{basename}"
|
105
|
+
|
106
|
+
file roff => ["lib/bundler/man", ronn] do
|
107
|
+
sh "ronn --roff --pipe #{ronn} > #{roff}"
|
108
|
+
end
|
109
|
+
|
110
|
+
file "#{roff}.txt" => roff do
|
111
|
+
sh "groff -Wall -mtty-char -mandoc -Tascii #{roff} | col -b > #{roff}.txt"
|
112
|
+
end
|
113
|
+
|
114
|
+
task :build => "#{roff}.txt"
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
desc "Build the man pages"
|
119
|
+
task :build => "man:build"
|
120
|
+
|
121
|
+
desc "Clean up from the built man pages"
|
122
|
+
task :clean do
|
123
|
+
rm_rf "lib/bundler/man"
|
124
|
+
end
|
125
|
+
|
126
|
+
namespace :vendor do
|
127
|
+
desc "Build the vendor dir"
|
128
|
+
task :build => :clean do
|
129
|
+
sh "git clone git://github.com/wycats/thor.git lib/bundler/vendor/tmp"
|
130
|
+
sh "mv lib/bundler/vendor/tmp/lib/* lib/bundler/vendor/"
|
131
|
+
rm_rf "lib/bundler/vendor/tmp"
|
132
|
+
end
|
133
|
+
|
134
|
+
desc "Clean the vendor dir"
|
135
|
+
task :clean do
|
136
|
+
rm_rf "lib/bundler/vendor"
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
begin
|
141
|
+
require 'rake/gempackagetask'
|
142
|
+
rescue LoadError
|
143
|
+
task(:gem) { $stderr.puts '`gem install rake` to package gems' }
|
144
|
+
else
|
145
|
+
Rake::GemPackageTask.new(gemspec) do |pkg|
|
146
|
+
pkg.gem_spec = gemspec
|
147
|
+
end
|
148
|
+
task :gem => [:build, :gemspec]
|
149
|
+
end
|
150
|
+
|
151
|
+
desc "install the gem locally"
|
152
|
+
task :install => :package do
|
153
|
+
sh %{gem install pkg/#{gemspec.name}-#{gemspec.version}}
|
154
|
+
end
|
155
|
+
|
156
|
+
desc "validate the gemspec"
|
157
|
+
task :gemspec do
|
158
|
+
gemspec.validate
|
159
|
+
end
|
160
|
+
|
161
|
+
desc "Build the gem"
|
162
|
+
task :gem => [:gemspec, :build] do
|
163
|
+
mkdir_p "pkg"
|
164
|
+
sh "gem build bundler.gemspec"
|
165
|
+
mv "#{gemspec.full_name}.gem", "pkg"
|
166
|
+
end
|
167
|
+
|
168
|
+
desc "Install bundler"
|
169
|
+
task :install => :gem do
|
170
|
+
sh "gem install pkg/#{gemspec.full_name}.gem"
|
171
|
+
end
|
172
|
+
|
173
|
+
task :default => :spec
|
data/UPGRADING.md
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
## Bundler 0.9 to 1.0 and above
|
2
|
+
|
3
|
+
Upgrading from Bundler 0.9 to 1.0 is relatively painless. The
|
4
|
+
Gemfile API is the same, so your old Gemfiles should continue
|
5
|
+
to work.
|
6
|
+
|
7
|
+
The "env" file that 0.9 created at `.bundle/environment.rb` has been
|
8
|
+
removed. As a side effect of this, Passenger will only find your
|
9
|
+
bundled gems if you install with `bundle install --deployment`.
|
10
|
+
Alternatively, you can tell Passenger where you gems are installed,
|
11
|
+
[something like this](http://bit.ly/passenger-gem-home).
|
12
|
+
|
13
|
+
The `bundle lock` command is no longer needed, as the
|
14
|
+
Gemfile.lock file is now automatically generated by `bundle install`.
|
15
|
+
If you have not yet done so, add your Gemfile.lock to source control
|
16
|
+
and check it in.
|
17
|
+
|
18
|
+
Running `bundle install` no longer updates the versions of your gems.
|
19
|
+
If you need to update just one gem, run `bundle update GEMNAME`. To
|
20
|
+
update all gems to the newest versions possible, run `bundle update`.
|
21
|
+
|
22
|
+
Bundler now supports multiple platforms, using a block syntax to
|
23
|
+
declare platform-specific gems:
|
24
|
+
|
25
|
+
platform :jruby do
|
26
|
+
gem "jruby-maven-plugins"
|
27
|
+
end
|
28
|
+
|
29
|
+
Deploying using Bundler is even easier than it was before, as Bundler
|
30
|
+
now includes a Capistrano recipe. Simply add this line to the top of
|
31
|
+
your deploy.rb file to run Bundler automatically as part of deploying:
|
32
|
+
|
33
|
+
require 'bundler/capistrano'
|
34
|
+
|
35
|
+
For more details on deploying using bundler, see the documentation
|
36
|
+
for the bundler cap task, and the [documentation on deploying](http://gembundler.com/v1.0/deploying.html).
|
37
|
+
|
38
|
+
|
39
|
+
## Bundler 0.8 to 0.9 and above
|
40
|
+
|
41
|
+
Upgrading to Bundler 0.9 from Bundler 0.8 requires upgrading several
|
42
|
+
API calls in your Gemfile, and some workarounds if you are using Rails 2.3.
|
43
|
+
|
44
|
+
### Gemfile Removals
|
45
|
+
|
46
|
+
Bundler 0.9 removes the following Bundler 0.8 Gemfile APIs:
|
47
|
+
|
48
|
+
1. `disable_system_gems`: This is now the default (and only) option
|
49
|
+
for bundler. Bundler uses the system gems you have specified
|
50
|
+
in the Gemfile, and only the system gems you have specified
|
51
|
+
(and their dependencies)
|
52
|
+
2. `disable_rubygems`: This is no longer supported. We are looking
|
53
|
+
into ways to get the fastest performance out of each supported
|
54
|
+
scenario, and we will make speed the default where possible.
|
55
|
+
3. `clear_sources`: Bundler now defaults to an empty source
|
56
|
+
list. If you want to include Rubygems, you can add the source
|
57
|
+
via source "http://gemcutter.org". If you use bundle init, this
|
58
|
+
source will be automatically added for you in the generated
|
59
|
+
Gemfile
|
60
|
+
4. `bundle_path`: You can specify this setting when installing
|
61
|
+
via `bundle install /path/to/bundle`. Bundler will remember
|
62
|
+
where you installed the dependencies to on a particular
|
63
|
+
machine for future installs, loads, setups, etc.
|
64
|
+
5. `bin_path`: Bundler no longer generates binaries in the root
|
65
|
+
of your app. You should use `bundle exec` to execute binaries
|
66
|
+
in the current context.
|
67
|
+
|
68
|
+
### Gemfile Changes
|
69
|
+
|
70
|
+
Bundler 0.9 changes the following Bundler 0.8 Gemfile APIs:
|
71
|
+
|
72
|
+
1. Bundler 0.8 supported :only and :except as APIs for describing
|
73
|
+
groups of gems. Bundler 0.9 supports a single `group` method,
|
74
|
+
which you can use to group gems together. See the above "Group"
|
75
|
+
section for more information.
|
76
|
+
|
77
|
+
This means that `gem "foo", :only => :production` becomes
|
78
|
+
`gem "foo", :group => :production`, and
|
79
|
+
`only :production { gem "foo" }` becomes
|
80
|
+
`group :production { gem "foo" }`
|
81
|
+
|
82
|
+
The short version is: group your gems together logically, and
|
83
|
+
use the available commands to make use of the groups you've
|
84
|
+
created.
|
85
|
+
|
86
|
+
2. `:require_as` becomes `:require`
|
87
|
+
|
88
|
+
3. `:vendored_at` is fully removed; you should use `:path`
|
89
|
+
|
90
|
+
### API Changes
|
91
|
+
|
92
|
+
1. `Bundler.require_env(:environment)` becomes
|
93
|
+
`Bundler.require(:multiple, :groups)`. You must
|
94
|
+
now specify the default group (the default group is the
|
95
|
+
group made up of the gems not assigned to any group)
|
96
|
+
explicitly. So `Bundler.require_env(:test)` becomes
|
97
|
+
`Bundler.require(:default, :test)`
|
98
|
+
|
99
|
+
2. `require 'vendor/gems/environment'`: In unlocked
|
100
|
+
mode, where using system gems, this becomes
|
101
|
+
`Bundler.setup(:multiple, :groups)`. If you don't
|
102
|
+
specify any groups, this puts all groups on the load
|
103
|
+
path. In locked, mode, it becomes `require '.bundle/environment'`
|
data/bundler.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib/', __FILE__)
|
3
|
+
$:.unshift lib unless $:.include?(lib)
|
4
|
+
|
5
|
+
require 'bundler/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "bundler"
|
9
|
+
s.version = Bundler::VERSION
|
10
|
+
s.platform = Gem::Platform::RUBY
|
11
|
+
s.authors = ["Carl Lerche", "Yehuda Katz", "André Arko"]
|
12
|
+
s.email = ["carlhuda@engineyard.com"]
|
13
|
+
s.homepage = "http://gembundler.com"
|
14
|
+
s.summary = %q{The best way to manage your application's dependencies}
|
15
|
+
s.description = %q{Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably}
|
16
|
+
|
17
|
+
s.required_rubygems_version = ">= 1.3.6"
|
18
|
+
s.rubyforge_project = "bundler"
|
19
|
+
|
20
|
+
s.add_development_dependency "ronn"
|
21
|
+
s.add_development_dependency "rspec"
|
22
|
+
|
23
|
+
s.files = `git ls-files`.split("\n") + Dir.glob("lib/bundler/man/**/*")
|
24
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
25
|
+
s.executables = %w(bundle)
|
26
|
+
s.default_executable = "bundle"
|
27
|
+
s.require_paths = ["lib"]
|
28
|
+
end
|
data/lib/bundler.rb
CHANGED
data/lib/bundler/capistrano.rb
CHANGED
@@ -2,39 +2,10 @@
|
|
2
2
|
#
|
3
3
|
# Just add "require 'bundler/capistrano'" in your Capistrano deploy.rb, and
|
4
4
|
# Bundler will be activated after each new deployment.
|
5
|
+
require 'bundler/deployment'
|
5
6
|
|
6
7
|
Capistrano::Configuration.instance(:must_exist).load do
|
7
8
|
after "deploy:update_code", "bundle:install"
|
8
9
|
|
9
|
-
|
10
|
-
desc <<-DESC
|
11
|
-
Install the current Bundler environment. By default, gems will be \
|
12
|
-
installed to the shared/bundle path. Gems in the development and \
|
13
|
-
test group will not be installed. The install command is executed \
|
14
|
-
with the --deployment and --quiet flags. You can override any of \
|
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.
|
18
|
-
|
19
|
-
set :bundle_gemfile, "Gemfile"
|
20
|
-
set :bundle_dir, fetch(:shared_path)+"/bundle"
|
21
|
-
set :bundle_flags, "--deployment --quiet"
|
22
|
-
set :bundle_without, [:development, :test]
|
23
|
-
set :bundle_cmd, "bundle" # e.g. change to "/opt/ruby/bin/bundle"
|
24
|
-
DESC
|
25
|
-
task :install, :except => { :no_release => true } do
|
26
|
-
bundle_dir = fetch(:bundle_dir, " #{fetch(:shared_path)}/bundle")
|
27
|
-
bundle_without = [*fetch(:bundle_without, [:development, :test])].compact
|
28
|
-
bundle_flags = fetch(:bundle_flags, "--deployment --quiet")
|
29
|
-
bundle_gemfile = fetch(:bundle_gemfile, "Gemfile")
|
30
|
-
bundle_cmd = fetch(:bundle_cmd, "bundle")
|
31
|
-
|
32
|
-
args = ["--gemfile #{fetch(:latest_release)}/#{bundle_gemfile}"]
|
33
|
-
args << "--path #{bundle_dir}" unless bundle_dir.to_s.empty?
|
34
|
-
args << bundle_flags.to_s
|
35
|
-
args << "--without #{bundle_without.join(" ")}" unless bundle_without.empty?
|
36
|
-
|
37
|
-
run "#{bundle_cmd} install #{args.join(' ')}"
|
38
|
-
end
|
39
|
-
end
|
10
|
+
Bundler::Deployment.define_task(self, :task, :except => { :no_release => true })
|
40
11
|
end
|