bundler-maglev- 1.0.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. data/.gitignore +22 -0
  2. data/.travis.yml +32 -0
  3. data/CHANGELOG.md +805 -0
  4. data/ISSUES.md +62 -0
  5. data/LICENSE +23 -0
  6. data/README.md +29 -0
  7. data/Rakefile +212 -0
  8. data/UPGRADING.md +103 -0
  9. data/bin/bundle +22 -0
  10. data/bundler.gemspec +30 -0
  11. data/lib/bundler.rb +286 -0
  12. data/lib/bundler/capistrano.rb +11 -0
  13. data/lib/bundler/cli.rb +520 -0
  14. data/lib/bundler/definition.rb +438 -0
  15. data/lib/bundler/dependency.rb +134 -0
  16. data/lib/bundler/deployment.rb +58 -0
  17. data/lib/bundler/dsl.rb +257 -0
  18. data/lib/bundler/environment.rb +47 -0
  19. data/lib/bundler/gem_helper.rb +151 -0
  20. data/lib/bundler/gem_installer.rb +9 -0
  21. data/lib/bundler/gem_tasks.rb +2 -0
  22. data/lib/bundler/graph.rb +130 -0
  23. data/lib/bundler/index.rb +138 -0
  24. data/lib/bundler/installer.rb +97 -0
  25. data/lib/bundler/lazy_specification.rb +74 -0
  26. data/lib/bundler/lockfile_parser.rb +108 -0
  27. data/lib/bundler/remote_specification.rb +59 -0
  28. data/lib/bundler/resolver.rb +464 -0
  29. data/lib/bundler/rubygems_ext.rb +237 -0
  30. data/lib/bundler/rubygems_integration.rb +349 -0
  31. data/lib/bundler/runtime.rb +152 -0
  32. data/lib/bundler/settings.rb +115 -0
  33. data/lib/bundler/setup.rb +23 -0
  34. data/lib/bundler/shared_helpers.rb +71 -0
  35. data/lib/bundler/source.rb +708 -0
  36. data/lib/bundler/spec_set.rb +135 -0
  37. data/lib/bundler/templates/Executable +16 -0
  38. data/lib/bundler/templates/Gemfile +4 -0
  39. data/lib/bundler/templates/newgem/Gemfile.tt +4 -0
  40. data/lib/bundler/templates/newgem/Rakefile.tt +1 -0
  41. data/lib/bundler/templates/newgem/bin/newgem.tt +3 -0
  42. data/lib/bundler/templates/newgem/gitignore.tt +4 -0
  43. data/lib/bundler/templates/newgem/lib/newgem.rb.tt +9 -0
  44. data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +7 -0
  45. data/lib/bundler/templates/newgem/newgem.gemspec.tt +24 -0
  46. data/lib/bundler/ui.rb +73 -0
  47. data/lib/bundler/vendor/thor.rb +358 -0
  48. data/lib/bundler/vendor/thor/actions.rb +314 -0
  49. data/lib/bundler/vendor/thor/actions/create_file.rb +105 -0
  50. data/lib/bundler/vendor/thor/actions/create_link.rb +57 -0
  51. data/lib/bundler/vendor/thor/actions/directory.rb +93 -0
  52. data/lib/bundler/vendor/thor/actions/empty_directory.rb +134 -0
  53. data/lib/bundler/vendor/thor/actions/file_manipulation.rb +270 -0
  54. data/lib/bundler/vendor/thor/actions/inject_into_file.rb +109 -0
  55. data/lib/bundler/vendor/thor/base.rb +576 -0
  56. data/lib/bundler/vendor/thor/core_ext/file_binary_read.rb +9 -0
  57. data/lib/bundler/vendor/thor/core_ext/hash_with_indifferent_access.rb +75 -0
  58. data/lib/bundler/vendor/thor/core_ext/ordered_hash.rb +100 -0
  59. data/lib/bundler/vendor/thor/error.rb +30 -0
  60. data/lib/bundler/vendor/thor/group.rb +273 -0
  61. data/lib/bundler/vendor/thor/invocation.rb +168 -0
  62. data/lib/bundler/vendor/thor/parser.rb +4 -0
  63. data/lib/bundler/vendor/thor/parser/argument.rb +67 -0
  64. data/lib/bundler/vendor/thor/parser/arguments.rb +161 -0
  65. data/lib/bundler/vendor/thor/parser/option.rb +120 -0
  66. data/lib/bundler/vendor/thor/parser/options.rb +175 -0
  67. data/lib/bundler/vendor/thor/rake_compat.rb +66 -0
  68. data/lib/bundler/vendor/thor/runner.rb +309 -0
  69. data/lib/bundler/vendor/thor/shell.rb +88 -0
  70. data/lib/bundler/vendor/thor/shell/basic.rb +302 -0
  71. data/lib/bundler/vendor/thor/shell/color.rb +108 -0
  72. data/lib/bundler/vendor/thor/shell/html.rb +121 -0
  73. data/lib/bundler/vendor/thor/task.rb +113 -0
  74. data/lib/bundler/vendor/thor/util.rb +229 -0
  75. data/lib/bundler/vendor/thor/version.rb +3 -0
  76. data/lib/bundler/vendored_thor.rb +7 -0
  77. data/lib/bundler/version.rb +6 -0
  78. data/lib/bundler/vlad.rb +11 -0
  79. data/man/bundle-config.ronn +90 -0
  80. data/man/bundle-exec.ronn +111 -0
  81. data/man/bundle-install.ronn +317 -0
  82. data/man/bundle-package.ronn +59 -0
  83. data/man/bundle-update.ronn +176 -0
  84. data/man/bundle.ronn +80 -0
  85. data/man/gemfile.5.ronn +284 -0
  86. data/man/index.txt +6 -0
  87. data/spec/bundler/gem_helper_spec.rb +143 -0
  88. data/spec/cache/gems_spec.rb +230 -0
  89. data/spec/cache/git_spec.rb +12 -0
  90. data/spec/cache/path_spec.rb +27 -0
  91. data/spec/cache/platform_spec.rb +57 -0
  92. data/spec/install/deploy_spec.rb +197 -0
  93. data/spec/install/deprecated_spec.rb +37 -0
  94. data/spec/install/gems/c_ext_spec.rb +48 -0
  95. data/spec/install/gems/env_spec.rb +107 -0
  96. data/spec/install/gems/flex_spec.rb +313 -0
  97. data/spec/install/gems/groups_spec.rb +259 -0
  98. data/spec/install/gems/packed_spec.rb +84 -0
  99. data/spec/install/gems/platform_spec.rb +192 -0
  100. data/spec/install/gems/resolving_spec.rb +72 -0
  101. data/spec/install/gems/simple_case_spec.rb +770 -0
  102. data/spec/install/gems/sudo_spec.rb +74 -0
  103. data/spec/install/gems/win32_spec.rb +26 -0
  104. data/spec/install/gemspec_spec.rb +125 -0
  105. data/spec/install/git_spec.rb +570 -0
  106. data/spec/install/invalid_spec.rb +35 -0
  107. data/spec/install/path_spec.rb +405 -0
  108. data/spec/install/upgrade_spec.rb +26 -0
  109. data/spec/lock/git_spec.rb +35 -0
  110. data/spec/lock/lockfile_spec.rb +739 -0
  111. data/spec/other/check_spec.rb +221 -0
  112. data/spec/other/config_spec.rb +40 -0
  113. data/spec/other/console_spec.rb +54 -0
  114. data/spec/other/exec_spec.rb +248 -0
  115. data/spec/other/ext_spec.rb +37 -0
  116. data/spec/other/help_spec.rb +39 -0
  117. data/spec/other/init_spec.rb +40 -0
  118. data/spec/other/newgem_spec.rb +46 -0
  119. data/spec/other/open_spec.rb +35 -0
  120. data/spec/other/show_spec.rb +82 -0
  121. data/spec/quality_spec.rb +62 -0
  122. data/spec/resolver/basic_spec.rb +20 -0
  123. data/spec/resolver/platform_spec.rb +82 -0
  124. data/spec/runtime/executable_spec.rb +110 -0
  125. data/spec/runtime/load_spec.rb +107 -0
  126. data/spec/runtime/platform_spec.rb +90 -0
  127. data/spec/runtime/require_spec.rb +231 -0
  128. data/spec/runtime/setup_spec.rb +730 -0
  129. data/spec/runtime/with_clean_env_spec.rb +15 -0
  130. data/spec/spec_helper.rb +92 -0
  131. data/spec/support/builders.rb +597 -0
  132. data/spec/support/helpers.rb +239 -0
  133. data/spec/support/indexes.rb +112 -0
  134. data/spec/support/matchers.rb +77 -0
  135. data/spec/support/path.rb +71 -0
  136. data/spec/support/platforms.rb +53 -0
  137. data/spec/support/ruby_ext.rb +20 -0
  138. data/spec/support/rubygems_ext.rb +37 -0
  139. data/spec/support/rubygems_hax/platform.rb +11 -0
  140. data/spec/support/sudo.rb +21 -0
  141. data/spec/update/gems_spec.rb +122 -0
  142. data/spec/update/git_spec.rb +196 -0
  143. data/spec/update/source_spec.rb +51 -0
  144. metadata +296 -0
data/ISSUES.md ADDED
@@ -0,0 +1,62 @@
1
+ # Bundler Issues
2
+
3
+ ## Frequently encountered issues
4
+
5
+ ### REE and Zlib::GzipFile::Error
6
+
7
+ Ruby Enterprise Edition users may see a `Zlib::GzipFile::Error` while installing gems. It is due to [a bug in REE](http://code.google.com/p/rubyenterpriseedition/issues/detail?id=45). You may be able to resolve the issue by upgrading REE, or changing to a different interpreter.
8
+
9
+ ### Rake activation error
10
+
11
+ Anyone who has installed the Spork gem may see activation errors while running `rake` directly. This is because old versions of Spork would [install the newest rake using a mkmf file](https://github.com/timcharper/spork/issues/119). To resolve the issue, update the Spork version requirement in your Gemfile to at least `"~>0.8.5"` or `"~>0.9.0.rc8"`.
12
+
13
+ ## Troubleshooting
14
+
15
+ Instructions for common Bundler use-cases can be found on the [Bundler documentation site](http://gembundler.com/v1.0/).
16
+
17
+ 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).
18
+
19
+ After reading the documentation, try these troubleshooting steps:
20
+
21
+ # remove user-specific gems and git repos
22
+ rm -rf ~/.bundle/ ~/.gem/
23
+
24
+ # remove system-wide git repos and git checkouts
25
+ rm -rf $GEM_HOME/bundler/ $GEM_HOME/cache/bundler/
26
+
27
+ # remove project-specific settings and git repos
28
+ rm -rf .bundle/
29
+
30
+ # remove project-specific cached .gem files
31
+ rm -rf vendor/cache/
32
+
33
+ # remove the saved resolve of the Gemfile
34
+ rm -rf Gemfile.lock
35
+
36
+ # try to install one more time
37
+ bundle install
38
+
39
+ ## Reporting unresolved problems
40
+
41
+ Instructions that allow the Bundler team to reproduce your issue are vitally important. When you report a bug, please include the following information:
42
+
43
+ - The command you ran
44
+ - Exception backtrace(s), if any
45
+ - Your Gemfile
46
+ - Your Gemfile.lock
47
+ - Your Bundler configuration settings (run `bundle config`)
48
+ - What version of bundler you are using (run `bundle -v`)
49
+ - What version of Ruby you are using (run `ruby -v`)
50
+ - What version of Rubygems you are using (run `gem -v`)
51
+ - Whether you are using RVM, and if so what version (run `rvm -v`)
52
+ - Whether you have the `rubygems-bundler` gem, which can break gem binares
53
+ - Whether you have the `open_gem` gem, which can cause rake activation conflicts
54
+
55
+
56
+ If you are using Rails 2.3, please also include:
57
+
58
+ - Your boot.rb file
59
+ - Your preinitializer.rb file
60
+ - Your environment.rb file
61
+
62
+ [Create a gist](https://gist.github.com) containing all of that information, then visit the [Bundler issue tracker](https://github.com/carlhuda/bundler) and create a new ticket describing your problem and linking to your gist.
data/LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ Portions copyright (c) 2010 Andre Arko
2
+ Portions copyright (c) 2009 Engine Yard
3
+
4
+ MIT License
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining
7
+ a copy of this software and associated documentation files (the
8
+ "Software"), to deal in the Software without restriction, including
9
+ without limitation the rights to use, copy, modify, merge, publish,
10
+ distribute, sublicense, and/or sell copies of the Software, and to
11
+ permit persons to whom the Software is furnished to do so, subject to
12
+ the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # Bundler: a gem to bundle gems
2
+
3
+ Bundler is a tool that manages gem dependencies for your ruby application. It
4
+ takes a gem manifest file and is able to fetch, download, and install the gems
5
+ and all child dependencies specified in this manifest. It can manage any update
6
+ to the gem manifest file and update the bundle's gems accordingly. It also lets
7
+ you run any ruby code in context of the bundle's gem environment.
8
+
9
+ ### Installation and usage
10
+
11
+ See [gembundler.com](http://gembundler.com) for up-to-date installation and usage instructions.
12
+
13
+ ### Troubleshooting
14
+
15
+ For help with common problems, see [ISSUES](http://github.com/carlhuda/bundler/blob/master/ISSUES.md).
16
+
17
+ ### Development
18
+
19
+ To see what has changed in recent versions of bundler, see the [CHANGELOG](http://github.com/carlhuda/bundler/blob/master/CHANGELOG.md).
20
+
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
24
+
25
+ See [UPGRADING](http://github.com/carlhuda/bundler/blob/master/UPGRADING.md).
26
+
27
+ ### Other questions
28
+
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,212 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.unshift File.expand_path("../lib", __FILE__)
3
+ require 'bundler/gem_tasks'
4
+
5
+ def safe_task(&block)
6
+ yield
7
+ true
8
+ rescue
9
+ false
10
+ end
11
+
12
+ namespace :spec do
13
+ desc "Ensure spec dependencies are installed"
14
+ task :deps do
15
+ sh "gem list ronn | (grep 'ronn' 1> /dev/null) || gem install ronn --no-ri --no-rdoc"
16
+ sh "gem list rspec | (grep 'rspec (2.' 1> /dev/null) || gem install rspec --no-ri --no-rdoc"
17
+ end
18
+ end
19
+
20
+ begin
21
+ # running the specs needs both rspec and ronn
22
+ require 'rspec/core/rake_task'
23
+ require 'ronn'
24
+
25
+ desc "Run specs"
26
+ RSpec::Core::RakeTask.new do |t|
27
+ t.rspec_opts = %w(-fs --color)
28
+ t.ruby_opts = %w(-w)
29
+ end
30
+ task :spec => "man:build"
31
+
32
+ namespace :spec do
33
+ task :clean do
34
+ rm_rf 'tmp'
35
+ end
36
+
37
+ desc "Run the spec suite with the sudo tests"
38
+ task :sudo => ["set_sudo", "spec", "clean_sudo"]
39
+
40
+ task :set_sudo do
41
+ ENV['BUNDLER_SUDO_TESTS'] = '1'
42
+ end
43
+
44
+ task :clean_sudo do
45
+ puts "Cleaning up sudo test files..."
46
+ system "sudo rm -rf #{File.expand_path('../tmp/sudo_gem_home', __FILE__)}"
47
+ end
48
+
49
+ namespace :rubygems do
50
+ # Rubygems specs by version
51
+ rubyopt = ENV["RUBYOPT"]
52
+ %w(master v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.10).each do |rg|
53
+ desc "Run specs with Rubygems #{rg}"
54
+ RSpec::Core::RakeTask.new(rg) do |t|
55
+ t.rspec_opts = %w(-fs --color)
56
+ t.ruby_opts = %w(-w)
57
+ end
58
+
59
+ # Create tasks like spec:rubygems:v1.8.3:sudo to run the sudo specs
60
+ namespace rg do
61
+ task :sudo => ["set_sudo", rg, "clean_sudo"]
62
+ end
63
+
64
+ task "clone_rubygems_#{rg}" do
65
+ unless File.directory?("tmp/rubygems")
66
+ system("git clone git://github.com/rubygems/rubygems.git tmp/rubygems")
67
+ end
68
+ hash = nil
69
+
70
+ Dir.chdir("tmp/rubygems") do
71
+ system("git remote update")
72
+ system("git checkout #{rg}")
73
+ system("git pull origin master") if rg == "master"
74
+ hash = `git rev-parse HEAD`.strip
75
+ end
76
+
77
+ puts "Running bundler specs against rubygems '#{rg}' at #{hash}"
78
+ ENV["RUBYOPT"] = "-I#{File.expand_path("tmp/rubygems/lib")} #{rubyopt}"
79
+ end
80
+
81
+ task rg => ["clone_rubygems_#{rg}", "man:build"]
82
+ task "rubygems:all" => rg
83
+ end
84
+
85
+ desc "Run specs under a Rubygems checkout (set RG=path)"
86
+ RSpec::Core::RakeTask.new("co") do |t|
87
+ t.rspec_opts = %w(-fs --color)
88
+ t.ruby_opts = %w(-w)
89
+ end
90
+
91
+ task "setup_co" do
92
+ ENV["RUBYOPT"] = "-I#{File.expand_path ENV['RG']} #{rubyopt}"
93
+ end
94
+
95
+ task "co" => "setup_co"
96
+ task "rubygems:all" => "co"
97
+ end
98
+
99
+ namespace :ruby do
100
+ # Ruby 1.8.6, 1.8.7, and 1.9.2 specs
101
+ task "ensure_rvm" do
102
+ raise "RVM is not available" unless File.exist?(File.expand_path("~/.rvm/scripts/rvm"))
103
+ end
104
+
105
+ %w(1.8.6-p420 1.8.7-p334 1.9.2-p180).each do |ruby|
106
+ ruby_cmd = File.expand_path("~/.rvm/bin/ruby-#{ruby}")
107
+
108
+ desc "Run specs on Ruby #{ruby}"
109
+ RSpec::Core::RakeTask.new(ruby) do |t|
110
+ t.rspec_opts = %w(-fs --color)
111
+ t.ruby_opts = %w(-w)
112
+ end
113
+
114
+ task "ensure_ruby_#{ruby}" do
115
+ raise "Could not find Ruby #{ruby} at #{ruby_cmd}" unless File.exist?(ruby_cmd)
116
+ end
117
+
118
+ task "ensure_ruby_#{ruby}" => "ensure_rvm"
119
+ task ruby => "ensure_ruby_#{ruby}"
120
+ task "ruby:all" => ruby
121
+ end
122
+ end
123
+
124
+ desc "Run the tests on Travis CI against a rubygem version (using ENV['RGV'])"
125
+ task "travis" do
126
+ rg = ENV['RGV'] || 'master'
127
+
128
+ puts "\n\e[1;33m[Travis CI] Running bundler specs against rubygems #{rg}\e[m\n\n"
129
+ specs = safe_task { Rake::Task["spec:rubygems:#{rg}"].invoke }
130
+
131
+ Rake::Task["spec:rubygems:#{rg}"].reenable
132
+
133
+ puts "\n\e[1;33m[Travis CI] Running bundler sudo specs against rubygems #{rg}\e[m\n\n"
134
+ sudos = safe_task { Rake::Task["spec:rubygems:#{rg}:sudo"].invoke }
135
+
136
+ unless specs && sudos
137
+ fail "Bundler tests failed, please review the log for more information"
138
+ end
139
+ end
140
+ end
141
+
142
+ namespace :man do
143
+ directory "lib/bundler/man"
144
+
145
+ Dir["man/*.ronn"].each do |ronn|
146
+ basename = File.basename(ronn, ".ronn")
147
+ roff = "lib/bundler/man/#{basename}"
148
+
149
+ file roff => ["lib/bundler/man", ronn] do
150
+ sh "ronn --roff --pipe #{ronn} > #{roff}"
151
+ end
152
+
153
+ file "#{roff}.txt" => roff do
154
+ sh "groff -Wall -mtty-char -mandoc -Tascii #{roff} | col -b > #{roff}.txt"
155
+ end
156
+
157
+ task :build_all_pages => "#{roff}.txt"
158
+ end
159
+
160
+ desc "Build the man pages"
161
+ task :build => "man:build_all_pages"
162
+
163
+ desc "Clean up from the built man pages"
164
+ task :clean do
165
+ rm_rf "lib/bundler/man"
166
+ end
167
+ end
168
+
169
+ begin
170
+ require 'ci/reporter/rake/rspec'
171
+
172
+ namespace :ci do
173
+ desc "Run specs with Hudson output"
174
+ RSpec::Core::RakeTask.new(:spec)
175
+ task :spec => ["ci:setup:rspec", "man:build"]
176
+ end
177
+
178
+ rescue LoadError
179
+ namespace :ci do
180
+ task :spec do
181
+ abort "Run `rake ci:deps` to be able to run the CI specs"
182
+ end
183
+
184
+ desc "Install CI dependencies"
185
+ task :deps do
186
+ sh "gem list ci_reporter | (grep 'ci_reporter' 1> /dev/null) || gem install ci_reporter --no-ri --no-rdoc"
187
+ end
188
+ task :deps => "spec:deps"
189
+ end
190
+ end
191
+
192
+ rescue LoadError
193
+ task :spec do
194
+ abort "Run `rake spec:deps` to be able to run the specs"
195
+ end
196
+ end
197
+
198
+ namespace :vendor do
199
+ desc "Build the vendor dir"
200
+ task :build => :clean do
201
+ sh "git clone git://github.com/wycats/thor.git lib/bundler/vendor/tmp"
202
+ sh "mv lib/bundler/vendor/tmp/lib/* lib/bundler/vendor/"
203
+ rm_rf "lib/bundler/vendor/tmp"
204
+ end
205
+
206
+ desc "Clean the vendor dir"
207
+ task :clean do
208
+ rm_rf "lib/bundler/vendor"
209
+ end
210
+ end
211
+
212
+ 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/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 executables in the root
65
+ of your app. You should use `bundle exec` to execute executables
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/bin/bundle ADDED
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env ruby
2
+ require 'bundler'
3
+ begin
4
+ # Check if an older version of bundler is installed
5
+ $:.each do |path|
6
+ if path =~ %r'/bundler-0.(\d+)' && $1.to_i < 9
7
+ err = "Please remove Bundler 0.8 versions."
8
+ err << "This can be done by running `gem cleanup bundler`."
9
+ abort(err)
10
+ end
11
+ end
12
+ require 'bundler/cli'
13
+ Bundler::CLI.start
14
+ rescue Bundler::BundlerError => e
15
+ Bundler.ui.error e.message
16
+ Bundler.ui.debug e.backtrace.join("\n")
17
+ exit e.status_code
18
+ rescue Interrupt => e
19
+ Bundler.ui.error "\nQuitting..."
20
+ Bundler.ui.debug e.backtrace.join("\n")
21
+ exit 1
22
+ end