bundler 1.0.22 → 1.1.pre

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.

Files changed (114) hide show
  1. data/CHANGELOG.md +15 -181
  2. data/ISSUES.md +11 -26
  3. data/LICENSE +0 -2
  4. data/Rakefile +67 -116
  5. data/UPGRADING.md +4 -4
  6. data/bin/bundle +10 -10
  7. data/bundler.gemspec +5 -5
  8. data/lib/bundler.rb +15 -25
  9. data/lib/bundler/capistrano.rb +2 -2
  10. data/lib/bundler/cli.rb +41 -72
  11. data/lib/bundler/definition.rb +11 -37
  12. data/lib/bundler/dependency.rb +9 -13
  13. data/lib/bundler/deployment.rb +3 -8
  14. data/lib/bundler/dsl.rb +10 -24
  15. data/lib/bundler/fetcher.rb +101 -0
  16. data/lib/bundler/gem_helper.rb +6 -11
  17. data/lib/bundler/index.rb +8 -15
  18. data/lib/bundler/installer.rb +55 -35
  19. data/lib/bundler/lazy_specification.rb +7 -10
  20. data/lib/bundler/remote_specification.rb +6 -8
  21. data/lib/bundler/resolver.rb +18 -12
  22. data/lib/bundler/rubygems_ext.rb +3 -20
  23. data/lib/bundler/runtime.rb +57 -8
  24. data/lib/bundler/settings.rb +6 -4
  25. data/lib/bundler/setup.rb +5 -12
  26. data/lib/bundler/shared_helpers.rb +100 -4
  27. data/lib/bundler/source.rb +61 -106
  28. data/lib/bundler/spec_set.rb +8 -9
  29. data/lib/bundler/templates/newgem/Rakefile.tt +2 -1
  30. data/lib/bundler/templates/newgem/lib/newgem.rb.tt +0 -2
  31. data/lib/bundler/templates/newgem/newgem.gemspec.tt +3 -6
  32. data/lib/bundler/ui.rb +1 -4
  33. data/lib/bundler/vendor/net/http/faster.rb +27 -0
  34. data/lib/bundler/vendor/net/http/persistent.rb +464 -0
  35. data/lib/bundler/vendor/thor.rb +4 -43
  36. data/lib/bundler/vendor/thor/actions.rb +11 -28
  37. data/lib/bundler/vendor/thor/actions/create_file.rb +2 -2
  38. data/lib/bundler/vendor/thor/actions/directory.rb +2 -2
  39. data/lib/bundler/vendor/thor/actions/empty_directory.rb +0 -0
  40. data/lib/bundler/vendor/thor/actions/file_manipulation.rb +15 -56
  41. data/lib/bundler/vendor/thor/actions/inject_into_file.rb +10 -15
  42. data/lib/bundler/vendor/thor/base.rb +4 -24
  43. data/lib/bundler/vendor/thor/core_ext/file_binary_read.rb +0 -0
  44. data/lib/bundler/vendor/thor/core_ext/hash_with_indifferent_access.rb +0 -0
  45. data/lib/bundler/vendor/thor/core_ext/ordered_hash.rb +0 -0
  46. data/lib/bundler/vendor/thor/error.rb +0 -0
  47. data/lib/bundler/vendor/thor/invocation.rb +0 -0
  48. data/lib/bundler/vendor/thor/parser.rb +0 -0
  49. data/lib/bundler/vendor/thor/parser/argument.rb +0 -0
  50. data/lib/bundler/vendor/thor/parser/arguments.rb +2 -2
  51. data/lib/bundler/vendor/thor/parser/option.rb +1 -1
  52. data/lib/bundler/vendor/thor/parser/options.rb +16 -17
  53. data/lib/bundler/vendor/thor/shell.rb +0 -0
  54. data/lib/bundler/vendor/thor/shell/basic.rb +13 -40
  55. data/lib/bundler/vendor/thor/shell/color.rb +0 -0
  56. data/lib/bundler/vendor/thor/task.rb +4 -3
  57. data/lib/bundler/vendor/thor/util.rb +2 -2
  58. data/lib/bundler/vendor/thor/version.rb +1 -1
  59. data/lib/bundler/version.rb +1 -1
  60. data/lib/bundler/vlad.rb +0 -2
  61. data/man/bundle-install.ronn +3 -6
  62. data/man/gemfile.5.ronn +2 -7
  63. data/spec/cache/gems_spec.rb +0 -11
  64. data/spec/cache/git_spec.rb +2 -5
  65. data/spec/install/deploy_spec.rb +8 -8
  66. data/spec/install/gems/dependency_api_spec.rb +85 -0
  67. data/spec/install/gems/flex_spec.rb +4 -4
  68. data/spec/install/gems/groups_spec.rb +3 -17
  69. data/spec/install/gems/platform_spec.rb +16 -0
  70. data/spec/install/gems/simple_case_spec.rb +24 -88
  71. data/spec/install/gems/standalone_spec.rb +162 -0
  72. data/spec/install/gems/sudo_spec.rb +2 -3
  73. data/spec/install/gemspec_spec.rb +0 -38
  74. data/spec/install/git_spec.rb +4 -3
  75. data/spec/install/invalid_spec.rb +0 -18
  76. data/spec/install/path_spec.rb +1 -53
  77. data/spec/lock/git_spec.rb +1 -1
  78. data/spec/lock/lockfile_spec.rb +16 -72
  79. data/spec/other/check_spec.rb +6 -6
  80. data/spec/other/clean_spec.rb +202 -0
  81. data/spec/other/exec_spec.rb +7 -14
  82. data/spec/other/ext_spec.rb +0 -21
  83. data/spec/{bundler → other}/gem_helper_spec.rb +1 -16
  84. data/spec/other/help_spec.rb +1 -2
  85. data/spec/other/init_spec.rb +3 -3
  86. data/spec/other/newgem_spec.rb +1 -23
  87. data/spec/pack/gems_spec.rb +22 -0
  88. data/spec/quality_spec.rb +2 -6
  89. data/spec/runtime/require_spec.rb +10 -10
  90. data/spec/runtime/setup_spec.rb +12 -54
  91. data/spec/spec_helper.rb +7 -14
  92. data/spec/support/artifice/endpoint.rb +50 -0
  93. data/spec/support/artifice/endpoint_fallback.rb +22 -0
  94. data/spec/support/artifice/endpoint_marshal_fail.rb +11 -0
  95. data/spec/support/artifice/endpoint_redirect.rb +11 -0
  96. data/spec/support/builders.rb +2 -25
  97. data/spec/support/fakeweb/rack-1.0.0.marshal +2 -0
  98. data/spec/support/fakeweb/windows.rb +23 -0
  99. data/spec/support/helpers.rb +12 -5
  100. data/spec/support/matchers.rb +16 -4
  101. data/spec/support/path.rb +2 -0
  102. data/spec/support/rubygems_ext.rb +2 -6
  103. data/spec/update/gems_spec.rb +2 -3
  104. data/spec/update/git_spec.rb +2 -2
  105. metadata +41 -24
  106. data/.travis.yml +0 -31
  107. data/lib/bundler/gem_installer.rb +0 -9
  108. data/lib/bundler/gem_tasks.rb +0 -2
  109. data/lib/bundler/rubygems_integration.rb +0 -344
  110. data/lib/bundler/vendor/thor/actions/create_link.rb +0 -57
  111. data/lib/bundler/vendor/thor/group.rb +0 -273
  112. data/lib/bundler/vendor/thor/rake_compat.rb +0 -66
  113. data/lib/bundler/vendor/thor/runner.rb +0 -309
  114. data/lib/bundler/vendored_thor.rb +0 -7
@@ -1,196 +1,30 @@
1
- ## 1.0.22 (February 8, 2012)
2
-
3
- Bugfixes:
4
-
5
- - Tweaks to cache on Rubygems 1.3
6
- - Fix for `gemspec` with development dependencies in deployment (@raggi)
7
-
8
- ## 1.0.21 (September 30, 2011)
9
-
10
- - No changes from RC
11
-
12
- ## 1.0.21.rc (September 29, 2011)
13
-
14
- Bugfixes:
15
-
16
- - Load Psych unless Syck is defined, because 1.9.2 defines YAML
17
-
18
- ## 1.0.20 (September 27, 2011)
19
-
20
- Features:
21
-
22
- - Add platform :maglev (@timfel, #1444)
23
-
24
- Bugfixes:
25
-
26
- - Ensure YAML is required even if Psych is found
27
- - Handle directory names that contain invalid regex characters
28
-
29
- ## 1.0.20.rc (September 18, 2011)
30
-
31
- Features:
32
-
33
- - Rescue interrupts to `bundle` while loading bundler.rb (#1395)
34
- - Allow clearing without groups by passing `--without ''` (#1259)
35
-
36
- Bugfixes:
37
-
38
- - Manually sort requirements in the lockfile (#1375)
39
- - Remove several warnings generated by ruby -w (@stephencelis)
40
- - Handle trailing slashes on names passed to `gem` (#1372)
41
- - Name modules for gems like 'test-foo_bar' correctly (#1303)
42
- - Don't require Psych if Syck is already loaded (#1239)
43
-
44
- ## 1.0.19.rc (September 13, 2011)
45
-
46
- Features:
47
-
48
- - Compatability with Rubygems 1.8.10 installer changes
49
- - Report gem installation failures clearly (@rwilcox, #1380)
50
- - Useful error for cap and vlad on first deploy (@nexmat, @kirs)
51
-
52
- Bugfixes:
53
-
54
- - `exec` now works when the command contains 'exec'
55
- - Only touch lock after changes on Windows (@robertwahler, #1358)
56
- - Keep load paths when #setup is called multiple times (@radsaq, #1379)
57
-
58
- ## 1.0.18 (August 16, 2011)
59
-
60
- Bugfixes:
61
-
62
- - Fix typo in DEBUG_RESOLVER (@geemus)
63
- - Fixes rake 0.9.x warning (@mtylty, #1333)
64
- - Fix `bundle cache` again for rubygems 1.3.x
65
-
66
- Features:
67
-
68
- - Run the bundle install earlier in a Capistrano deployment (@cgriego, #1300)
69
- - Support hidden gemspec (@trans, @cldwalker, #827)
70
- - Make fetch_specs faster (@zeha, #1294)
71
- - Allow overriding development deps loaded by #gemspec (@lgierth, #1245)
72
-
73
- ## 1.0.17 (August 8, 2011)
74
-
75
- Bugfixes:
76
-
77
- - Fix rake issues with rubygems 1.3.x (#1342)
78
- - Fixed invalid byte sequence error while installing gem on Ruby 1.9 (#1341)
79
-
80
- ## 1.0.16 (August 8, 2011)
1
+ ## 1.1.pre (January 21, 2010)
81
2
 
82
3
  Features:
83
4
 
84
- - Performance fix for MRI 1.9 (@efficientcloud, #1288)
85
- - Shortcuts (like `bundle i`) for all commands (@amatsuda)
86
- - Correcly identify missing child dependency in error message
5
+ - Add bundle clean. Removes unused gems from --path directory
6
+ - Initial Gemcutter Endpoint API work, BAI Fetching source index
7
+ - Added bundle install --standalone
8
+ - Ignore Gemfile.lock when buliding new gems
9
+ - Make it possible to override a .gemspec dependency's source in the
10
+ Gemfile
87
11
 
88
- Bugfixes:
89
-
90
- - Allow Windows network share paths with forward slashes (@mtscout6, #1253)
91
- - Check for rubygems.org credentials so `rake release` doesn't hang (#980)
92
- - Find cached prerelease gems on rubygems 1.3.x (@dburt, #1202)
93
- - Fix `bundle install --without` on kiji (@tmm1, #1287)
94
- - Get rid of warning in ruby 1.9.3 (@smartinez87, #1231)
95
-
96
- Documentation:
97
-
98
- - Documentation for `gem ..., :require => false` (@kmayer, #1292)
99
- - Gems provide "executables", they are rarely also binaries (@fxn, #1242)
100
-
101
- ## 1.0.15 (June 9, 2011)
102
-
103
- Features:
104
-
105
- - Improved Rubygems integration, removed many deprecation notices
106
-
107
- Bugfixes:
108
-
109
- - Escape URL arguments to git correctly on Windows (1.0.14 regression)
110
-
111
- ## 1.0.14 (May 27, 2011)
112
-
113
- Features:
114
-
115
- - Rubinius platform :rbx (@rkbodenner)
116
- - Include gem rake tasks with "require 'bundler/gem_tasks" (@indirect)
117
- - Include user name and email from git config in new gemspec (@ognevsky)
118
-
119
- Bugfixes:
120
-
121
- - Set file permissions after checking out git repos (@tissak)
122
- - Remove deprecated call to Gem::SourceIndex#all_gems (@mpj)
123
- - Require the version file in new gemspecs (@rubiii)
124
- - Allow relative paths from the Gemfile in gems with no gemspec (@mbirk)
125
- - Install gems that contain 'bundler', e.g. guard-bundler (@hone)
126
- - Display installed path correctly on Windows (@tadman)
127
- - Escape quotes in git URIs (@mheffner)
128
- - Improve Rake 0.9 support (@quix)
129
- - Handle certain directories already existing (@raggi)
130
- - Escape filenames containing regex characters (@indirect)
131
-
132
- ## 1.0.13 (May 4, 2011)
133
-
134
- Features:
135
-
136
- - Compatibility with Rubygems master (soon to be v1.8) (@evanphx)
137
- - Informative error when --path points to a broken symlink
138
- - Support Rake 0.9 and greater (@e2)
139
- - Output full errors for non-TTYs e.g. pow (@josh)
140
-
141
- Bugfixes:
142
-
143
- - Allow spaces in gem path names for gem tasks (@rslifka)
144
- - Have cap run bundle install from release_path (@martinjagusch)
145
- - Quote git refspec so zsh doesn't expand it (@goneflyin)
146
-
147
- ## 1.0.12 (April 8, 2011)
148
-
149
- Features:
150
-
151
- - Add --no-deployment option to `install` for disabling it on dev machines
152
- - Better error message when git fails and cache is present (@parndt)
153
- - Honor :bundle_cmd in cap `rake` command (@voidlock, @cgriego)
154
-
155
- Bugfixes:
156
-
157
- - Compatibility with Rubygems 1.7 and Rails 2.3 and vendored gems (@evanphx)
158
- - Fix changing gem order in lock (@gucki)
159
- - Remove color escape sequences when displaying man pages (@bgreenlee)
160
- - Fix creating GEM_HOME on both JRuby 1.5 and 1.6 (@nickseiger)
161
- - Fix gems without a gemspec and directories in bin/ (@epall)
162
- - Fix --no-prune option for `bundle install` (@cmeiklejohn)
163
-
164
- ## 1.0.11 (April 1, 2011)
165
-
166
- Features:
167
-
168
- - Compatibility with Rubygems 1.6 and 1.7
169
- - Better error messages when a git command fails
170
-
171
- Bugfixes:
172
-
173
- - Don't always update gemspec gems (@carllerche)
174
- - Remove ivar warnings (@jackdempsey)
175
- - Fix occasional git failures in zsh (@jonah-carbonfive)
176
- - Consistent lock for gems with double deps like Cap (@akahn)
177
-
178
- ## 1.0.10 (February 1, 2011)
179
-
180
- Bugfixes:
12
+ Removed:
181
13
 
182
- - Fix a regression loading YAML gemspecs from :git and :path gems
183
- - Requires, namespaces, etc. to work with changes in Rubygems 1.5
14
+ - Removed bundle lock
15
+ - Removed bundle install <path>
16
+ - Removed bundle install --production
17
+ - Removed bundle install --disable-shared-gems
184
18
 
185
- ## 1.0.9 (January 19, 2011)
19
+ ## 1.0.9 (January 19, 2010)
186
20
 
187
21
  Bugfixes:
188
22
 
189
23
  - Fix a bug where Bundler.require could remove gems from the load
190
24
  path. In Rails apps with a default application.rb, this removed
191
- all gems in groups other than :default and Rails.env.
25
+ all gems in groups other than :default and Rails.env
192
26
 
193
- ## 1.0.8 (January 18, 2011)
27
+ ## 1.0.8 (January 18, 2010)
194
28
 
195
29
  Features:
196
30
 
data/ISSUES.md CHANGED
@@ -1,20 +1,8 @@
1
1
  # Bundler Issues
2
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
3
  ## Troubleshooting
14
4
 
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).
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).
18
6
 
19
7
  After reading the documentation, try these troubleshooting steps:
20
8
 
@@ -38,25 +26,22 @@ After reading the documentation, try these troubleshooting steps:
38
26
 
39
27
  ## Reporting unresolved problems
40
28
 
41
- Instructions that allow the Bundler team to reproduce your issue are vitally important. When you report a bug, please include the following information:
29
+ If you are still having problems, please report issues to the [Bundler issue tracker](http://github.com/carlhuda/bundler/issues/).
30
+
31
+ 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:
42
32
 
43
- - The command you ran
44
- - Exception backtrace(s), if any
33
+ - What version of bundler you are using
34
+ - What version of Ruby you are using
35
+ - Whether you are using RVM, and if so what version
45
36
  - Your Gemfile
46
37
  - 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
-
38
+ - If you are on 0.9, whether you have locked or not
39
+ - If you are on 1.0, the result of `bundle config`
40
+ - The command you ran to generate exception(s)
41
+ - The exception backtrace(s)
55
42
 
56
43
  If you are using Rails 2.3, please also include:
57
44
 
58
45
  - Your boot.rb file
59
46
  - Your preinitializer.rb file
60
47
  - 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 CHANGED
@@ -1,8 +1,6 @@
1
1
  Portions copyright (c) 2010 Andre Arko
2
2
  Portions copyright (c) 2009 Engine Yard
3
3
 
4
- MIT License
5
-
6
4
  Permission is hereby granted, free of charge, to any person obtaining
7
5
  a copy of this software and associated documentation files (the
8
6
  "Software"), to deal in the Software without restriction, including
data/Rakefile CHANGED
@@ -1,26 +1,13 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.unshift File.expand_path("../lib", __FILE__)
3
- require 'bundler/gem_tasks'
3
+ require 'bundler/gem_helper'
4
+ Bundler::GemHelper.install_tasks
4
5
 
5
- task :release => ["man:clean", "man:build"]
6
-
7
- def safe_task(&block)
8
- yield
9
- true
10
- rescue
11
- false
12
- end
13
-
14
- namespace :spec do
15
- desc "Ensure spec dependencies are installed"
16
- task :deps do
17
- sh "gem list ronn | (grep 'ronn' 1> /dev/null) || gem install ronn --no-ri --no-rdoc"
18
- sh "gem list rspec | (grep 'rspec (2.' 1> /dev/null) || gem install rspec --no-ri --no-rdoc"
19
- end
6
+ def sudo?
7
+ ENV['BUNDLER_SUDO_TESTS']
20
8
  end
21
9
 
22
10
  begin
23
- # running the specs needs both rspec and ronn
24
11
  require 'rspec/core/rake_task'
25
12
  require 'ronn'
26
13
 
@@ -31,71 +18,65 @@ begin
31
18
  end
32
19
  task :spec => "man:build"
33
20
 
34
- namespace :spec do
35
- task :clean do
36
- rm_rf 'tmp'
21
+ begin
22
+ require 'ci/reporter/rake/rspec'
23
+
24
+ namespace :ci do
25
+ desc "Run specs with Hudson output"
26
+ RSpec::Core::RakeTask.new(:spec)
27
+ task :spec => ["ci:setup:rspec", "man:build"]
37
28
  end
38
29
 
30
+ rescue LoadError
31
+ namespace :ci do
32
+ task :spec do
33
+ abort "Run `rake ci:deps` to be able to run the CI specs"
34
+ end
35
+
36
+ desc "Install CI dependencies"
37
+ task :deps do
38
+ sh "gem list ci_reporter | (grep 'ci_reporter' 1> /dev/null) || gem install ci_reporter --no-ri --no-rdoc"
39
+ end
40
+ task :deps => "spec:deps"
41
+ end
42
+ end
43
+
44
+ namespace :spec do
39
45
  desc "Run the spec suite with the sudo tests"
40
- task :sudo => ["set_sudo", "spec", "clean_sudo"]
46
+ task :sudo => ["set_sudo", "clean", "spec"]
41
47
 
42
48
  task :set_sudo do
43
49
  ENV['BUNDLER_SUDO_TESTS'] = '1'
44
50
  end
45
51
 
46
- task :clean_sudo do
47
- puts "Cleaning up sudo test files..."
48
- system "sudo rm -rf #{File.expand_path('../tmp/sudo_gem_home', __FILE__)}"
52
+ task :clean do
53
+ if sudo?
54
+ system "sudo rm -rf #{File.expand_path('../tmp', __FILE__)}"
55
+ else
56
+ rm_rf 'tmp'
57
+ end
49
58
  end
50
59
 
51
60
  namespace :rubygems do
52
- # Rubygems specs by version
61
+ # Rubygems 1.3.5, 1.3.6, and HEAD specs
53
62
  rubyopt = ENV["RUBYOPT"]
54
- %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|
63
+ %w(master v1.3.5 v1.3.6 v1.3.7 v1.4.0 v1.4.1).each do |rg|
55
64
  desc "Run specs with Rubygems #{rg}"
56
65
  RSpec::Core::RakeTask.new(rg) do |t|
57
66
  t.rspec_opts = %w(-fs --color)
58
67
  t.ruby_opts = %w(-w)
59
68
  end
60
69
 
61
- # Create tasks like spec:rubygems:v1.8.3:sudo to run the sudo specs
62
- namespace rg do
63
- task :sudo => ["set_sudo", rg, "clean_sudo"]
64
- end
65
-
66
70
  task "clone_rubygems_#{rg}" do
67
- unless File.directory?("tmp/rubygems")
68
- system("git clone git://github.com/rubygems/rubygems.git tmp/rubygems")
69
- end
70
- hash = nil
71
-
72
- Dir.chdir("tmp/rubygems") do
73
- system("git remote update")
74
- system("git checkout #{rg}")
75
- system("git pull origin master") if rg == "master"
76
- hash = `git rev-parse HEAD`.strip
71
+ unless File.directory?("tmp/rubygems_#{rg}")
72
+ system("git clone git://github.com/rubygems/rubygems.git tmp/rubygems_#{rg} && cd tmp/rubygems_#{rg} && git reset --hard #{rg}")
77
73
  end
78
-
79
- puts "Running bundler specs against rubygems '#{rg}' at #{hash}"
80
- ENV["RUBYOPT"] = "-I#{File.expand_path("tmp/rubygems/lib")} #{rubyopt}"
74
+ ENV["RUBYOPT"] = "-I#{File.expand_path("tmp/rubygems_#{rg}/lib")} #{rubyopt}"
81
75
  end
82
76
 
83
- task rg => ["clone_rubygems_#{rg}", "man:build"]
77
+ task rg => "clone_rubygems_#{rg}"
84
78
  task "rubygems:all" => rg
85
79
  end
86
-
87
- desc "Run specs under a Rubygems checkout (set RG=path)"
88
- RSpec::Core::RakeTask.new("co") do |t|
89
- t.rspec_opts = %w(-fs --color)
90
- t.ruby_opts = %w(-w)
91
- end
92
-
93
- task "setup_co" do
94
- ENV["RUBYOPT"] = "-I#{File.expand_path ENV['RG']} #{rubyopt}"
95
- end
96
-
97
- task "co" => "setup_co"
98
- task "rubygems:all" => "co"
99
80
  end
100
81
 
101
82
  namespace :ruby do
@@ -104,7 +85,7 @@ begin
104
85
  raise "RVM is not available" unless File.exist?(File.expand_path("~/.rvm/scripts/rvm"))
105
86
  end
106
87
 
107
- %w(1.8.6-p420 1.8.7-p334 1.9.2-p180).each do |ruby|
88
+ %w(1.8.6-p399 1.8.7-p302 1.9.2-p0).each do |ruby|
108
89
  ruby_cmd = File.expand_path("~/.rvm/bin/ruby-#{ruby}")
109
90
 
110
91
  desc "Run specs on Ruby #{ruby}"
@@ -123,77 +104,47 @@ begin
123
104
  end
124
105
  end
125
106
 
126
- desc "Run the tests on Travis CI against a rubygem version (using ENV['RGV'])"
127
- task "travis" do
128
- rg = ENV['RGV'] || 'master'
129
-
130
- puts "\n\e[1;33m[Travis CI] Running bundler specs against rubygems #{rg}\e[m\n\n"
131
- specs = safe_task { Rake::Task["spec:rubygems:#{rg}"].invoke }
132
-
133
- Rake::Task["spec:rubygems:#{rg}"].reenable
107
+ end
134
108
 
135
- puts "\n\e[1;33m[Travis CI] Running bundler sudo specs against rubygems #{rg}\e[m\n\n"
136
- sudos = safe_task { Rake::Task["spec:rubygems:#{rg}:sudo"].invoke }
109
+ rescue LoadError
110
+ task :spec do
111
+ abort "Run `rake spec:deps` to be able to run the specs"
112
+ end
137
113
 
138
- unless specs && sudos
139
- fail "Bundler tests failed, please review the log for more information"
140
- end
114
+ namespace :spec do
115
+ desc "Ensure spec dependencies are installed"
116
+ task :deps do
117
+ sh "gem list ronn | (grep 'ronn' 1> /dev/null) || gem install ronn --no-ri --no-rdoc"
118
+ sh "gem list rspec | (grep 'rspec (2.0' 1> /dev/null) || gem install rspec --no-ri --no-rdoc"
141
119
  end
142
120
  end
143
121
 
144
- namespace :man do
145
- directory "lib/bundler/man"
122
+ end
146
123
 
147
- Dir["man/*.ronn"].each do |ronn|
148
- basename = File.basename(ronn, ".ronn")
149
- roff = "lib/bundler/man/#{basename}"
124
+ namespace :man do
125
+ directory "lib/bundler/man"
150
126
 
151
- file roff => ["lib/bundler/man", ronn] do
152
- sh "ronn --roff --pipe #{ronn} > #{roff}"
153
- end
127
+ Dir["man/*.ronn"].each do |ronn|
128
+ basename = File.basename(ronn, ".ronn")
129
+ roff = "lib/bundler/man/#{basename}"
154
130
 
155
- file "#{roff}.txt" => roff do
156
- sh "groff -Wall -mtty-char -mandoc -Tascii #{roff} | col -b > #{roff}.txt"
157
- end
158
-
159
- task :build_all_pages => "#{roff}.txt"
131
+ file roff => ["lib/bundler/man", ronn] do
132
+ sh "ronn --roff --pipe #{ronn} > #{roff}"
160
133
  end
161
134
 
162
- desc "Build the man pages"
163
- task :build => "man:build_all_pages"
164
-
165
- desc "Clean up from the built man pages"
166
- task :clean do
167
- rm_rf "lib/bundler/man"
135
+ file "#{roff}.txt" => roff do
136
+ sh "groff -Wall -mtty-char -mandoc -Tascii #{roff} | col -b > #{roff}.txt"
168
137
  end
169
- end
170
-
171
- begin
172
- require 'ci/reporter/rake/rspec'
173
138
 
174
- namespace :ci do
175
- desc "Run specs with Hudson output"
176
- RSpec::Core::RakeTask.new(:spec)
177
- task :spec => ["ci:setup:rspec", "man:build"]
178
- end
179
-
180
- rescue LoadError
181
- namespace :ci do
182
- task :spec do
183
- abort "Run `rake ci:deps` to be able to run the CI specs"
184
- end
185
-
186
- desc "Install CI dependencies"
187
- task :deps do
188
- sh "gem list ci_reporter | (grep 'ci_reporter' 1> /dev/null) || gem install ci_reporter --no-ri --no-rdoc"
189
- end
190
- task :deps => "spec:deps"
191
- end
139
+ task :build_all_pages => "#{roff}.txt"
192
140
  end
193
141
 
194
- rescue LoadError
195
- task :spec do
196
- abort "Run `rake spec:deps` to be able to run the specs"
142
+ desc "Build the man pages"
143
+ task :build => "man:build_all_pages"
144
+
145
+ desc "Clean up from the built man pages"
146
+ task :clean do
147
+ rm_rf "lib/bundler/man"
197
148
  end
198
149
  end
199
150