rkh-bundler 1.2.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. data/.gitignore +22 -0
  2. data/.travis.yml +42 -0
  3. data/CHANGELOG.md +1105 -0
  4. data/ISSUES.md +67 -0
  5. data/LICENSE +23 -0
  6. data/README.md +31 -0
  7. data/Rakefile +208 -0
  8. data/UPGRADING.md +103 -0
  9. data/bin/bundle +31 -0
  10. data/bundler.gemspec +31 -0
  11. data/lib/bundler.rb +353 -0
  12. data/lib/bundler/capistrano.rb +11 -0
  13. data/lib/bundler/cli.rb +693 -0
  14. data/lib/bundler/definition.rb +568 -0
  15. data/lib/bundler/dep_proxy.rb +43 -0
  16. data/lib/bundler/dependency.rb +134 -0
  17. data/lib/bundler/deployment.rb +58 -0
  18. data/lib/bundler/dsl.rb +256 -0
  19. data/lib/bundler/endpoint_specification.rb +78 -0
  20. data/lib/bundler/environment.rb +47 -0
  21. data/lib/bundler/fetcher.rb +225 -0
  22. data/lib/bundler/gem_helper.rb +162 -0
  23. data/lib/bundler/gem_helpers.rb +23 -0
  24. data/lib/bundler/gem_installer.rb +9 -0
  25. data/lib/bundler/gem_tasks.rb +2 -0
  26. data/lib/bundler/graph.rb +148 -0
  27. data/lib/bundler/index.rb +187 -0
  28. data/lib/bundler/installer.rb +190 -0
  29. data/lib/bundler/lazy_specification.rb +79 -0
  30. data/lib/bundler/lockfile_parser.rb +127 -0
  31. data/lib/bundler/match_platform.rb +13 -0
  32. data/lib/bundler/psyched_yaml.rb +15 -0
  33. data/lib/bundler/remote_specification.rb +57 -0
  34. data/lib/bundler/resolver.rb +486 -0
  35. data/lib/bundler/ruby_version.rb +94 -0
  36. data/lib/bundler/rubygems_ext.rb +153 -0
  37. data/lib/bundler/rubygems_integration.rb +394 -0
  38. data/lib/bundler/runtime.rb +233 -0
  39. data/lib/bundler/settings.rb +128 -0
  40. data/lib/bundler/setup.rb +23 -0
  41. data/lib/bundler/shared_helpers.rb +71 -0
  42. data/lib/bundler/source.rb +869 -0
  43. data/lib/bundler/spec_set.rb +137 -0
  44. data/lib/bundler/templates/Executable +16 -0
  45. data/lib/bundler/templates/Executable.standalone +12 -0
  46. data/lib/bundler/templates/Gemfile +4 -0
  47. data/lib/bundler/templates/newgem/Gemfile.tt +4 -0
  48. data/lib/bundler/templates/newgem/LICENSE.tt +22 -0
  49. data/lib/bundler/templates/newgem/README.md.tt +29 -0
  50. data/lib/bundler/templates/newgem/Rakefile.tt +2 -0
  51. data/lib/bundler/templates/newgem/bin/newgem.tt +3 -0
  52. data/lib/bundler/templates/newgem/gitignore.tt +17 -0
  53. data/lib/bundler/templates/newgem/lib/newgem.rb.tt +9 -0
  54. data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +7 -0
  55. data/lib/bundler/templates/newgem/newgem.gemspec.tt +17 -0
  56. data/lib/bundler/ui.rb +88 -0
  57. data/lib/bundler/vendor/net/http/faster.rb +27 -0
  58. data/lib/bundler/vendor/net/http/persistent.rb +468 -0
  59. data/lib/bundler/vendor/thor.rb +358 -0
  60. data/lib/bundler/vendor/thor/actions.rb +314 -0
  61. data/lib/bundler/vendor/thor/actions/create_file.rb +105 -0
  62. data/lib/bundler/vendor/thor/actions/create_link.rb +57 -0
  63. data/lib/bundler/vendor/thor/actions/directory.rb +93 -0
  64. data/lib/bundler/vendor/thor/actions/empty_directory.rb +134 -0
  65. data/lib/bundler/vendor/thor/actions/file_manipulation.rb +270 -0
  66. data/lib/bundler/vendor/thor/actions/inject_into_file.rb +109 -0
  67. data/lib/bundler/vendor/thor/base.rb +576 -0
  68. data/lib/bundler/vendor/thor/core_ext/file_binary_read.rb +9 -0
  69. data/lib/bundler/vendor/thor/core_ext/hash_with_indifferent_access.rb +75 -0
  70. data/lib/bundler/vendor/thor/core_ext/ordered_hash.rb +100 -0
  71. data/lib/bundler/vendor/thor/error.rb +30 -0
  72. data/lib/bundler/vendor/thor/group.rb +273 -0
  73. data/lib/bundler/vendor/thor/invocation.rb +168 -0
  74. data/lib/bundler/vendor/thor/parser.rb +4 -0
  75. data/lib/bundler/vendor/thor/parser/argument.rb +67 -0
  76. data/lib/bundler/vendor/thor/parser/arguments.rb +161 -0
  77. data/lib/bundler/vendor/thor/parser/option.rb +120 -0
  78. data/lib/bundler/vendor/thor/parser/options.rb +172 -0
  79. data/lib/bundler/vendor/thor/rake_compat.rb +66 -0
  80. data/lib/bundler/vendor/thor/runner.rb +309 -0
  81. data/lib/bundler/vendor/thor/shell.rb +88 -0
  82. data/lib/bundler/vendor/thor/shell/basic.rb +302 -0
  83. data/lib/bundler/vendor/thor/shell/color.rb +108 -0
  84. data/lib/bundler/vendor/thor/shell/html.rb +121 -0
  85. data/lib/bundler/vendor/thor/task.rb +113 -0
  86. data/lib/bundler/vendor/thor/util.rb +229 -0
  87. data/lib/bundler/vendor/thor/version.rb +3 -0
  88. data/lib/bundler/vendored_thor.rb +7 -0
  89. data/lib/bundler/version.rb +6 -0
  90. data/lib/bundler/vlad.rb +11 -0
  91. data/man/bundle-config.ronn +130 -0
  92. data/man/bundle-exec.ronn +111 -0
  93. data/man/bundle-install.ronn +335 -0
  94. data/man/bundle-package.ronn +59 -0
  95. data/man/bundle-update.ronn +176 -0
  96. data/man/bundle.ronn +83 -0
  97. data/man/gemfile.5.ronn +324 -0
  98. data/man/index.txt +6 -0
  99. data/spec/bundler/dsl_spec.rb +48 -0
  100. data/spec/bundler/gem_helper_spec.rb +174 -0
  101. data/spec/bundler/source_spec.rb +25 -0
  102. data/spec/cache/gems_spec.rb +239 -0
  103. data/spec/cache/git_spec.rb +124 -0
  104. data/spec/cache/path_spec.rb +103 -0
  105. data/spec/cache/platform_spec.rb +57 -0
  106. data/spec/install/deploy_spec.rb +211 -0
  107. data/spec/install/gems/c_ext_spec.rb +48 -0
  108. data/spec/install/gems/dependency_api_spec.rb +402 -0
  109. data/spec/install/gems/env_spec.rb +107 -0
  110. data/spec/install/gems/flex_spec.rb +313 -0
  111. data/spec/install/gems/groups_spec.rb +268 -0
  112. data/spec/install/gems/packed_spec.rb +84 -0
  113. data/spec/install/gems/platform_spec.rb +208 -0
  114. data/spec/install/gems/post_install_spec.rb +47 -0
  115. data/spec/install/gems/resolving_spec.rb +72 -0
  116. data/spec/install/gems/simple_case_spec.rb +814 -0
  117. data/spec/install/gems/standalone_spec.rb +260 -0
  118. data/spec/install/gems/sudo_spec.rb +74 -0
  119. data/spec/install/gems/win32_spec.rb +26 -0
  120. data/spec/install/gemspec_spec.rb +170 -0
  121. data/spec/install/git_spec.rb +796 -0
  122. data/spec/install/invalid_spec.rb +35 -0
  123. data/spec/install/path_spec.rb +405 -0
  124. data/spec/install/upgrade_spec.rb +26 -0
  125. data/spec/lock/git_spec.rb +35 -0
  126. data/spec/lock/lockfile_spec.rb +809 -0
  127. data/spec/other/check_spec.rb +265 -0
  128. data/spec/other/clean_spec.rb +492 -0
  129. data/spec/other/config_spec.rb +138 -0
  130. data/spec/other/console_spec.rb +54 -0
  131. data/spec/other/exec_spec.rb +229 -0
  132. data/spec/other/ext_spec.rb +37 -0
  133. data/spec/other/help_spec.rb +39 -0
  134. data/spec/other/init_spec.rb +40 -0
  135. data/spec/other/newgem_spec.rb +87 -0
  136. data/spec/other/open_spec.rb +35 -0
  137. data/spec/other/outdated_spec.rb +93 -0
  138. data/spec/other/platform_spec.rb +881 -0
  139. data/spec/other/show_spec.rb +88 -0
  140. data/spec/quality_spec.rb +62 -0
  141. data/spec/realworld/edgecases_spec.rb +177 -0
  142. data/spec/resolver/basic_spec.rb +20 -0
  143. data/spec/resolver/platform_spec.rb +82 -0
  144. data/spec/runtime/executable_spec.rb +120 -0
  145. data/spec/runtime/load_spec.rb +107 -0
  146. data/spec/runtime/platform_spec.rb +90 -0
  147. data/spec/runtime/require_spec.rb +261 -0
  148. data/spec/runtime/setup_spec.rb +755 -0
  149. data/spec/runtime/with_clean_env_spec.rb +80 -0
  150. data/spec/spec_helper.rb +98 -0
  151. data/spec/support/artifice/endopint_marshal_fail_basic_authentication.rb +13 -0
  152. data/spec/support/artifice/endpoint.rb +54 -0
  153. data/spec/support/artifice/endpoint_500.rb +37 -0
  154. data/spec/support/artifice/endpoint_api_missing.rb +16 -0
  155. data/spec/support/artifice/endpoint_basic_authentication.rb +13 -0
  156. data/spec/support/artifice/endpoint_extra.rb +27 -0
  157. data/spec/support/artifice/endpoint_extra_missing.rb +15 -0
  158. data/spec/support/artifice/endpoint_fallback.rb +18 -0
  159. data/spec/support/artifice/endpoint_marshal_fail.rb +11 -0
  160. data/spec/support/artifice/endpoint_redirect.rb +15 -0
  161. data/spec/support/builders.rb +604 -0
  162. data/spec/support/fakeweb/rack-1.0.0.marshal +2 -0
  163. data/spec/support/fakeweb/windows.rb +23 -0
  164. data/spec/support/helpers.rb +317 -0
  165. data/spec/support/indexes.rb +112 -0
  166. data/spec/support/matchers.rb +77 -0
  167. data/spec/support/path.rb +73 -0
  168. data/spec/support/platforms.rb +86 -0
  169. data/spec/support/ruby_ext.rb +20 -0
  170. data/spec/support/rubygems_ext.rb +37 -0
  171. data/spec/support/rubygems_hax/platform.rb +22 -0
  172. data/spec/support/sudo.rb +21 -0
  173. data/spec/update/gems_spec.rb +134 -0
  174. data/spec/update/git_spec.rb +196 -0
  175. data/spec/update/source_spec.rb +51 -0
  176. metadata +338 -0
@@ -0,0 +1,67 @@
1
+ # Bundler Issues
2
+
3
+ ## Troubleshooting
4
+
5
+ Instructions for common Bundler use-cases can be found on the [Bundler documentation site](http://gembundler.com/v1.0/).
6
+
7
+ 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).
8
+
9
+ After reading the documentation, try these troubleshooting steps:
10
+
11
+ # remove user-specific gems and git repos
12
+ rm -rf ~/.bundle/ ~/.gem/
13
+
14
+ # remove system-wide git repos and git checkouts
15
+ rm -rf $GEM_HOME/bundler/ $GEM_HOME/cache/bundler/
16
+
17
+ # remove project-specific settings and git repos
18
+ rm -rf .bundle/
19
+
20
+ # remove project-specific cached .gem files
21
+ rm -rf vendor/cache/
22
+
23
+ # remove the saved resolve of the Gemfile
24
+ rm -rf Gemfile.lock
25
+
26
+ # try to install one more time
27
+ bundle install
28
+
29
+ ## Frequently encountered issues
30
+
31
+ ### Heroku errors
32
+
33
+ Open a ticket with Heroku. If the issue somehow turns out to be with Bundler itself, the Heroku support team will forward the details of your issue to us.
34
+
35
+ ### REE and Zlib::GzipFile::Error
36
+
37
+ 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.
38
+
39
+ ### Rake activation error
40
+
41
+ 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"`.
42
+
43
+
44
+ ## Reporting unresolved problems
45
+
46
+ Instructions that allow the Bundler team to reproduce your issue are vitally important. When you report a bug, please include the following information:
47
+
48
+ - The command you ran
49
+ - Exception backtrace(s), if any
50
+ - Your Gemfile
51
+ - Your Gemfile.lock
52
+ - Your Bundler configuration settings (run `bundle config`)
53
+ - What version of bundler you are using (run `bundle -v`)
54
+ - What version of Ruby you are using (run `ruby -v`)
55
+ - What version of Rubygems you are using (run `gem -v`)
56
+ - Whether you are using RVM, and if so what version (run `rvm -v`)
57
+ - Whether you have the `rubygems-bundler` gem, which can break gem binares
58
+ - Whether you have the `open_gem` gem, which can cause rake activation conflicts
59
+
60
+
61
+ If you are using Rails 2.3, please also include:
62
+
63
+ - Your boot.rb file
64
+ - Your preinitializer.rb file
65
+ - Your environment.rb file
66
+
67
+ [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.
@@ -0,0 +1,31 @@
1
+ [![Build Status](https://secure.travis-ci.org/carlhuda/bundler.png?branch=master)](http://travis-ci.org/carlhuda/bundler)
2
+
3
+ # Bundler: a gem to bundle gems
4
+
5
+ Bundler is a tool that manages gem dependencies for your ruby application. It
6
+ takes a gem manifest file and is able to fetch, download, and install the gems
7
+ and all child dependencies specified in this manifest. It can manage any update
8
+ to the gem manifest file and update the bundle's gems accordingly. It also lets
9
+ you run any ruby code in context of the bundle's gem environment.
10
+
11
+ ### Installation and usage
12
+
13
+ See [gembundler.com](http://gembundler.com) for up-to-date installation and usage instructions.
14
+
15
+ ### Troubleshooting
16
+
17
+ For help with common problems, see [ISSUES](https://github.com/carlhuda/bundler/blob/master/ISSUES.md).
18
+
19
+ ### Development
20
+
21
+ To see what has changed in recent versions of bundler, see the [CHANGELOG](https://github.com/carlhuda/bundler/blob/master/CHANGELOG.md).
22
+
23
+ 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.
24
+
25
+ ### Upgrading from Bundler 0.8 to 0.9 and above
26
+
27
+ See [UPGRADING](https://github.com/carlhuda/bundler/blob/master/UPGRADING.md).
28
+
29
+ ### Other questions
30
+
31
+ 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).
@@ -0,0 +1,208 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.unshift File.expand_path("../lib", __FILE__)
3
+ require 'rubygems'
4
+ require 'bundler/gem_tasks'
5
+
6
+ task :release => ["man:clean", "man:build"]
7
+
8
+ def safe_task(&block)
9
+ yield
10
+ true
11
+ rescue
12
+ false
13
+ end
14
+
15
+ def sudo_task(task)
16
+ system("sudo -E rake #{task}")
17
+ end
18
+
19
+ namespace :spec do
20
+ desc "Ensure spec dependencies are installed"
21
+ task :deps do
22
+ sh "#{Gem.ruby} -S gem list ronn | (grep 'ronn' 1> /dev/null) || #{Gem.ruby} -S gem install ronn --no-ri --no-rdoc"
23
+ sh "#{Gem.ruby} -S gem list rspec | (grep 'rspec (2.' 1> /dev/null) || #{Gem.ruby} -S gem install rspec --no-ri --no-rdoc"
24
+ end
25
+ end
26
+
27
+ begin
28
+ # running the specs needs both rspec and ronn
29
+ require 'rspec/core/rake_task'
30
+ require 'ronn'
31
+
32
+ desc "Run specs"
33
+ RSpec::Core::RakeTask.new do |t|
34
+ t.rspec_opts = %w(-fs --color)
35
+ t.ruby_opts = %w(-w)
36
+ end
37
+ task :spec => "man:build"
38
+
39
+ namespace :spec do
40
+ task :clean do
41
+ rm_rf 'tmp'
42
+ end
43
+
44
+ desc "Run the real-world spec suite (requires internet)"
45
+ task :realworld => ["set_realworld", "spec"]
46
+
47
+ task :set_realworld do
48
+ ENV['BUNDLER_REALWORLD_TESTS'] = '1'
49
+ end
50
+
51
+ desc "Run the spec suite with the sudo tests"
52
+ task :sudo => ["set_sudo", "spec", "clean_sudo"]
53
+
54
+ task :set_sudo do
55
+ ENV['BUNDLER_SUDO_TESTS'] = '1'
56
+ end
57
+
58
+ task :clean_sudo do
59
+ puts "Cleaning up sudo test files..."
60
+ system "sudo rm -rf #{File.expand_path('../tmp/sudo_gem_home', __FILE__)}"
61
+ end
62
+
63
+ namespace :rubygems do
64
+ # Rubygems specs by version
65
+ rubyopt = ENV["RUBYOPT"]
66
+ %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|
67
+ desc "Run specs with Rubygems #{rg}"
68
+ RSpec::Core::RakeTask.new(rg) do |t|
69
+ t.rspec_opts = %w(-fs --color)
70
+ t.ruby_opts = %w(-w)
71
+ end
72
+
73
+ # Create tasks like spec:rubygems:v1.8.3:sudo to run the sudo specs
74
+ namespace rg do
75
+ task :sudo => ["set_sudo", rg, "clean_sudo"]
76
+ task :realworld => ["set_realworld", rg]
77
+ end
78
+
79
+ task "clone_rubygems_#{rg}" do
80
+ unless File.directory?("tmp/rubygems")
81
+ system("git clone git://github.com/rubygems/rubygems.git tmp/rubygems")
82
+ end
83
+ hash = nil
84
+
85
+ Dir.chdir("tmp/rubygems") do
86
+ system("git remote update")
87
+ system("git checkout #{rg}")
88
+ system("git pull origin master") if rg == "master"
89
+ hash = `git rev-parse HEAD`.strip
90
+ end
91
+
92
+ puts "Running bundler specs against rubygems '#{rg}' at #{hash}"
93
+ ENV["RUBYOPT"] = "-I#{File.expand_path("tmp/rubygems/lib")} #{rubyopt}"
94
+ end
95
+
96
+ task rg => ["clone_rubygems_#{rg}", "man:build"]
97
+ task "rubygems:all" => rg
98
+ end
99
+
100
+ desc "Run specs under a Rubygems checkout (set RG=path)"
101
+ RSpec::Core::RakeTask.new("co") do |t|
102
+ t.rspec_opts = %w(-fs --color)
103
+ t.ruby_opts = %w(-w)
104
+ end
105
+
106
+ task "setup_co" do
107
+ ENV["RUBYOPT"] = "-I#{File.expand_path ENV['RG']} #{rubyopt}"
108
+ end
109
+
110
+ task "co" => "setup_co"
111
+ task "rubygems:all" => "co"
112
+ end
113
+
114
+ desc "Run the tests on Travis CI against a rubygem version (using ENV['RGV'])"
115
+ task :travis do
116
+ rg = ENV['RGV'] || 'master'
117
+
118
+ puts "\n\e[1;33m[Travis CI] Running bundler specs against rubygems #{rg}\e[m\n\n"
119
+ specs = safe_task { Rake::Task["spec:rubygems:#{rg}"].invoke }
120
+
121
+ Rake::Task["spec:rubygems:#{rg}"].reenable
122
+
123
+ puts "\n\e[1;33m[Travis CI] Running bundler sudo specs against rubygems #{rg}\e[m\n\n"
124
+ sudos = sudo_task "spec:rubygems:#{rg}:sudo"
125
+ chown = system("sudo chown -R #{ENV['USER']} #{File.join(File.dirname(__FILE__), 'tmp')}")
126
+
127
+ Rake::Task["spec:rubygems:#{rg}"].reenable
128
+
129
+ puts "\n\e[1;33m[Travis CI] Running bundler real world specs against rubygems #{rg}\e[m\n\n"
130
+ realworld = safe_task { Rake::Task["spec:rubygems:#{rg}:realworld"].invoke }
131
+
132
+ unless specs && sudos && realworld
133
+ fail "Bundler tests failed, please review the log for more information"
134
+ end
135
+ end
136
+ end
137
+
138
+ namespace :man do
139
+ directory "lib/bundler/man"
140
+
141
+ Dir["man/*.ronn"].each do |ronn|
142
+ basename = File.basename(ronn, ".ronn")
143
+ roff = "lib/bundler/man/#{basename}"
144
+
145
+ file roff => ["lib/bundler/man", ronn] do
146
+ sh "#{Gem.ruby} -S ronn --roff --pipe #{ronn} > #{roff}"
147
+ end
148
+
149
+ file "#{roff}.txt" => roff do
150
+ sh "groff -Wall -mtty-char -mandoc -Tascii #{roff} | col -b > #{roff}.txt"
151
+ end
152
+
153
+ task :build_all_pages => "#{roff}.txt"
154
+ end
155
+
156
+ desc "Build the man pages"
157
+ task :build => "man:build_all_pages"
158
+
159
+ desc "Clean up from the built man pages"
160
+ task :clean do
161
+ rm_rf "lib/bundler/man"
162
+ end
163
+ end
164
+
165
+ begin
166
+ require 'ci/reporter/rake/rspec'
167
+
168
+ namespace :ci do
169
+ desc "Run specs with Hudson output"
170
+ RSpec::Core::RakeTask.new(:spec)
171
+ task :spec => ["ci:setup:rspec", "man:build"]
172
+ end
173
+
174
+ rescue LoadError
175
+ namespace :ci do
176
+ task :spec do
177
+ abort "Run `rake ci:deps` to be able to run the CI specs"
178
+ end
179
+
180
+ desc "Install CI dependencies"
181
+ task :deps do
182
+ sh "#{Gem.ruby} -S gem list ci_reporter | (grep 'ci_reporter' 1> /dev/null) || #{Gem.ruby} -S gem install ci_reporter --no-ri --no-rdoc"
183
+ end
184
+ task :deps => "spec:deps"
185
+ end
186
+ end
187
+
188
+ rescue LoadError
189
+ task :spec do
190
+ abort "Run `rake spec:deps` to be able to run the specs"
191
+ end
192
+ end
193
+
194
+ namespace :vendor do
195
+ desc "Build the vendor dir"
196
+ task :build => :clean do
197
+ sh "git clone git://github.com/wycats/thor.git lib/bundler/vendor/tmp"
198
+ sh "mv lib/bundler/vendor/tmp/lib/* lib/bundler/vendor/"
199
+ rm_rf "lib/bundler/vendor/tmp"
200
+ end
201
+
202
+ desc "Clean the vendor dir"
203
+ task :clean do
204
+ rm_rf "lib/bundler/vendor"
205
+ end
206
+ end
207
+
208
+ task :default => :spec
@@ -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'`
@@ -0,0 +1,31 @@
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
+ rescue SystemExit => e
23
+ exit e.status
24
+ rescue Exception => e
25
+ Bundler.ui.error "Unfortunately, a fatal error has occurred. " +
26
+ "Please report this error to the Bundler issue tracker at " +
27
+ "https://github.com/carlhuda/bundler/issues so that we can fix it. " +
28
+ "Please include the full output of the command, your Gemfile and Gemfile.lock. " +
29
+ "Thanks!"
30
+ raise e
31
+ end