bundler 1.1.pre.5 → 1.1.pre.7

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 (66) hide show
  1. data/CHANGELOG.md +52 -1
  2. data/ISSUES.md +1 -0
  3. data/Rakefile +3 -3
  4. data/UPGRADING.md +2 -2
  5. data/lib/bundler/cli.rb +6 -5
  6. data/lib/bundler/definition.rb +13 -2
  7. data/lib/bundler/endpoint_specification.rb +19 -0
  8. data/lib/bundler/fetcher.rb +34 -2
  9. data/lib/bundler/gem_helper.rb +6 -4
  10. data/lib/bundler/index.rb +29 -4
  11. data/lib/bundler/installer.rb +2 -1
  12. data/lib/bundler/lazy_specification.rb +4 -2
  13. data/lib/bundler/resolver.rb +14 -16
  14. data/lib/bundler/rubygems_ext.rb +1 -0
  15. data/lib/bundler/rubygems_integration.rb +22 -2
  16. data/lib/bundler/runtime.rb +2 -0
  17. data/lib/bundler/source.rb +52 -44
  18. data/lib/bundler/spec_set.rb +10 -9
  19. data/lib/bundler/templates/newgem/Rakefile.tt +1 -1
  20. data/lib/bundler/templates/newgem/newgem.gemspec.tt +2 -2
  21. data/lib/bundler/vendor/thor.rb +43 -4
  22. data/lib/bundler/vendor/thor/actions.rb +28 -11
  23. data/lib/bundler/vendor/thor/actions/create_file.rb +2 -2
  24. data/lib/bundler/vendor/thor/actions/create_link.rb +57 -0
  25. data/lib/bundler/vendor/thor/actions/directory.rb +2 -2
  26. data/lib/bundler/vendor/thor/actions/empty_directory.rb +0 -0
  27. data/lib/bundler/vendor/thor/actions/file_manipulation.rb +56 -15
  28. data/lib/bundler/vendor/thor/actions/inject_into_file.rb +13 -8
  29. data/lib/bundler/vendor/thor/base.rb +24 -4
  30. data/lib/bundler/vendor/thor/core_ext/file_binary_read.rb +0 -0
  31. data/lib/bundler/vendor/thor/core_ext/hash_with_indifferent_access.rb +0 -0
  32. data/lib/bundler/vendor/thor/core_ext/ordered_hash.rb +0 -0
  33. data/lib/bundler/vendor/thor/error.rb +0 -0
  34. data/lib/bundler/vendor/thor/group.rb +273 -0
  35. data/lib/bundler/vendor/thor/invocation.rb +0 -0
  36. data/lib/bundler/vendor/thor/parser.rb +0 -0
  37. data/lib/bundler/vendor/thor/parser/argument.rb +0 -0
  38. data/lib/bundler/vendor/thor/parser/arguments.rb +2 -2
  39. data/lib/bundler/vendor/thor/parser/option.rb +0 -0
  40. data/lib/bundler/vendor/thor/parser/options.rb +17 -16
  41. data/lib/bundler/vendor/thor/rake_compat.rb +66 -0
  42. data/lib/bundler/vendor/thor/runner.rb +309 -0
  43. data/lib/bundler/vendor/thor/shell.rb +0 -0
  44. data/lib/bundler/vendor/thor/shell/basic.rb +40 -13
  45. data/lib/bundler/vendor/thor/shell/color.rb +0 -0
  46. data/lib/bundler/vendor/thor/task.rb +3 -4
  47. data/lib/bundler/vendor/thor/util.rb +2 -2
  48. data/lib/bundler/vendor/thor/version.rb +1 -1
  49. data/lib/bundler/version.rb +1 -1
  50. data/man/gemfile.5.ronn +3 -0
  51. data/spec/cache/git_spec.rb +5 -2
  52. data/spec/install/gems/dependency_api_spec.rb +69 -0
  53. data/spec/install/gems/simple_case_spec.rb +7 -0
  54. data/spec/install/gems/standalone_spec.rb +62 -0
  55. data/spec/install/git_spec.rb +63 -1
  56. data/spec/other/clean_spec.rb +22 -26
  57. data/spec/other/exec_spec.rb +2 -2
  58. data/spec/other/gem_helper_spec.rb +1 -1
  59. data/spec/runtime/setup_spec.rb +1 -1
  60. data/spec/support/artifice/endpoint.rb +2 -2
  61. data/spec/support/artifice/endpoint_api_missing.rb +16 -0
  62. data/spec/support/artifice/endpoint_extra.rb +27 -0
  63. data/spec/support/artifice/endpoint_extra_missing.rb +15 -0
  64. data/spec/support/helpers.rb +7 -6
  65. metadata +73 -40
  66. data/spec/pack/gems_spec.rb +0 -22
@@ -101,7 +101,7 @@ describe "bundle exec" do
101
101
  bundle "exec foobarbaz", :exitstatus => true
102
102
  exitstatus.should eq(127)
103
103
  out.should include("bundler: command not found: foobarbaz")
104
- out.should include("Install missing gem binaries with `bundle install`")
104
+ out.should include("Install missing gem executables with `bundle install`")
105
105
  end
106
106
 
107
107
  it "errors nicely when the argument is not executable" do
@@ -115,7 +115,7 @@ describe "bundle exec" do
115
115
  out.should include("bundler: not executable: ./foo")
116
116
  end
117
117
 
118
- describe "with gem binaries" do
118
+ describe "with gem executables" do
119
119
  describe "run from a random directory" do
120
120
  before(:each) do
121
121
  install_gemfile <<-G
@@ -118,7 +118,7 @@ describe "Bundler::GemHelper tasks" do
118
118
  `git config user.name "name"`
119
119
  `git remote add origin file://#{gem_repo1}`
120
120
  `git commit -a -m "initial commit"`
121
- Open3.popen3("git push origin master") # use popen3 to silence output...
121
+ sys_exec("git push origin master", true)
122
122
  `git commit -a -m "another commit"`
123
123
  }
124
124
  @helper.release_gem
@@ -214,7 +214,7 @@ describe "Bundler.setup" do
214
214
  out.should == "WIN"
215
215
  end
216
216
 
217
- it "version_requirement is now deprecated in rubygesm 1.4.0+ when the version is wrong" do
217
+ it "version_requirement is now deprecated in rubygems 1.4.0+ when the version is wrong" do
218
218
  run <<-R, :expect_err => true
219
219
  begin
220
220
  gem "rack", "1.0.0"
@@ -13,9 +13,9 @@ require 'sinatra/base'
13
13
  class Endpoint < Sinatra::Base
14
14
 
15
15
  helpers do
16
- def dependencies_for(gem_names)
16
+ def dependencies_for(gem_names, marshal = gem_repo1("Marshal.4.8"))
17
17
  require 'rubygems'
18
- Marshal.load(File.open(gem_repo1("Marshal.4.8")).read).map do |gem, spec|
18
+ Marshal.load(File.open(marshal).read).map do |gem, spec|
19
19
  if gem_names.include?(spec.name)
20
20
  {
21
21
  :name => spec.name,
@@ -0,0 +1,16 @@
1
+ require File.expand_path("../endpoint", __FILE__)
2
+
3
+ Artifice.deactivate
4
+
5
+ class EndpointApiMissing < Endpoint
6
+ get "/fetch/actual/gem/:id" do
7
+ $stderr.puts params[:id]
8
+ if params[:id] == 'rack-1.0.gemspec.rz'
9
+ halt 404
10
+ else
11
+ File.read("#{gem_repo2}/quick/Marshal.4.8/#{params[:id]}")
12
+ end
13
+ end
14
+ end
15
+
16
+ Artifice.activate_with(EndpointApiMissing)
@@ -0,0 +1,27 @@
1
+ require File.expand_path("../endpoint", __FILE__)
2
+
3
+ Artifice.deactivate
4
+
5
+ class EndpointExtra < Endpoint
6
+ get "/extra/api/v1/dependencies" do
7
+ halt 404
8
+ end
9
+
10
+ get "/extra/specs.4.8.gz" do
11
+ File.read("#{gem_repo2}/specs.4.8.gz")
12
+ end
13
+
14
+ get "/extra/quick/Marshal.4.8/:id" do
15
+ redirect "/extra/fetch/actual/gem/#{params[:id]}"
16
+ end
17
+
18
+ get "/extra/fetch/actual/gem/:id" do
19
+ File.read("#{gem_repo2}/quick/Marshal.4.8/#{params[:id]}")
20
+ end
21
+
22
+ get "/extra/gems/:id" do
23
+ File.read("#{gem_repo2}/gems/#{params[:id]}")
24
+ end
25
+ end
26
+
27
+ Artifice.activate_with(EndpointExtra)
@@ -0,0 +1,15 @@
1
+ require File.expand_path("../endpoint_extra", __FILE__)
2
+
3
+ Artifice.deactivate
4
+
5
+ class EndpointExtraMissing < EndpointExtra
6
+ get "/extra/fetch/actual/gem/:id" do
7
+ if params[:id] == 'missing-1.0.gemspec.rz'
8
+ halt 404
9
+ else
10
+ File.read("#{gem_repo2}/quick/Marshal.4.8/#{params[:id]}")
11
+ end
12
+ end
13
+ end
14
+
15
+ Artifice.activate_with(EndpointExtraMissing)
@@ -13,7 +13,7 @@ module Spec
13
13
  FileUtils.mkdir_p(tmp)
14
14
  FileUtils.mkdir_p(home)
15
15
  Gem.sources = ["file://#{gem_repo1}/"]
16
- Gem.configuration.write
16
+ # Gem.configuration.write
17
17
  end
18
18
 
19
19
  attr_reader :out, :err, :exitstatus
@@ -45,17 +45,18 @@ module Spec
45
45
  options["no-color"] = true unless options.key?("no-color") || cmd.to_s[0..3] == "exec"
46
46
 
47
47
  bundle_bin = File.expand_path('../../../bin/bundle', __FILE__)
48
- fake_file = options.delete(:fakeweb)
49
- fakeweb = fake_file ? "-r#{File.expand_path('../fakeweb/'+fake_file+'.rb', __FILE__)}" : nil
50
- artifice_file = options.delete(:artifice)
51
- artifice = artifice_file ? "-r#{File.expand_path('../artifice/'+artifice_file+'.rb', __FILE__)}" : nil
48
+
49
+ requires = options.delete(:requires) || []
50
+ requires << File.expand_path('../fakeweb/'+options.delete(:fakeweb)+'.rb', __FILE__) if options.key?(:fakeweb)
51
+ requires << File.expand_path('../artifice/'+options.delete(:artifice)+'.rb', __FILE__) if options.key?(:artifice)
52
+ requires_str = requires.map{|r| "-r#{r}"}.join(" ")
52
53
 
53
54
  env = (options.delete(:env) || {}).map{|k,v| "#{k}='#{v}' "}.join
54
55
  args = options.map do |k,v|
55
56
  v == true ? " --#{k}" : " --#{k} #{v}" if v
56
57
  end.join
57
58
 
58
- cmd = "#{env}#{Gem.ruby} -I#{lib} #{fakeweb} #{artifice} #{bundle_bin} #{cmd}#{args}"
59
+ cmd = "#{env}#{Gem.ruby} -I#{lib} #{requires_str} #{bundle_bin} #{cmd}#{args}"
59
60
 
60
61
  if exitstatus
61
62
  sys_status(cmd)
metadata CHANGED
@@ -1,51 +1,66 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: bundler
3
- version: !ruby/object:Gem::Version
4
- version: 1.1.pre.5
5
- prerelease: 4
3
+ version: !ruby/object:Gem::Version
4
+ hash: 1923831887
5
+ prerelease: true
6
+ segments:
7
+ - 1
8
+ - 1
9
+ - pre
10
+ - 7
11
+ version: 1.1.pre.7
6
12
  platform: ruby
7
- authors:
8
- - André Arko
13
+ authors:
14
+ - "Andr\xC3\xA9 Arko"
9
15
  - Terence Lee
10
16
  - Carl Lerche
11
17
  - Yehuda Katz
12
18
  autorequire:
13
19
  bindir: bin
14
20
  cert_chain: []
15
- date: 2011-06-11 00:00:00.000000000 -05:00
21
+
22
+ date: 2011-08-08 00:00:00 -05:00
16
23
  default_executable:
17
- dependencies:
18
- - !ruby/object:Gem::Dependency
24
+ dependencies:
25
+ - !ruby/object:Gem::Dependency
19
26
  name: ronn
20
- requirement: &19160300 !ruby/object:Gem::Requirement
27
+ prerelease: false
28
+ requirement: &id001 !ruby/object:Gem::Requirement
21
29
  none: false
22
- requirements:
23
- - - ! '>='
24
- - !ruby/object:Gem::Version
25
- version: '0'
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ hash: 3
34
+ segments:
35
+ - 0
36
+ version: "0"
26
37
  type: :development
27
- prerelease: false
28
- version_requirements: *19160300
29
- - !ruby/object:Gem::Dependency
38
+ version_requirements: *id001
39
+ - !ruby/object:Gem::Dependency
30
40
  name: rspec
31
- requirement: &19192600 !ruby/object:Gem::Requirement
41
+ prerelease: false
42
+ requirement: &id002 !ruby/object:Gem::Requirement
32
43
  none: false
33
- requirements:
44
+ requirements:
34
45
  - - ~>
35
- - !ruby/object:Gem::Version
36
- version: '2.0'
46
+ - !ruby/object:Gem::Version
47
+ hash: 3
48
+ segments:
49
+ - 2
50
+ - 0
51
+ version: "2.0"
37
52
  type: :development
38
- prerelease: false
39
- version_requirements: *19192600
40
- description: Bundler manages an application's dependencies through its entire life,
41
- across many machines, systematically and repeatably
42
- email:
53
+ version_requirements: *id002
54
+ description: Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably
55
+ email:
43
56
  - andre@arko.net
44
- executables:
57
+ executables:
45
58
  - bundle
46
59
  extensions: []
60
+
47
61
  extra_rdoc_files: []
48
- files:
62
+
63
+ files:
49
64
  - .gitignore
50
65
  - .travis.yml
51
66
  - CHANGELOG.md
@@ -98,6 +113,7 @@ files:
98
113
  - lib/bundler/vendor/thor.rb
99
114
  - lib/bundler/vendor/thor/actions.rb
100
115
  - lib/bundler/vendor/thor/actions/create_file.rb
116
+ - lib/bundler/vendor/thor/actions/create_link.rb
101
117
  - lib/bundler/vendor/thor/actions/directory.rb
102
118
  - lib/bundler/vendor/thor/actions/empty_directory.rb
103
119
  - lib/bundler/vendor/thor/actions/file_manipulation.rb
@@ -107,12 +123,15 @@ files:
107
123
  - lib/bundler/vendor/thor/core_ext/hash_with_indifferent_access.rb
108
124
  - lib/bundler/vendor/thor/core_ext/ordered_hash.rb
109
125
  - lib/bundler/vendor/thor/error.rb
126
+ - lib/bundler/vendor/thor/group.rb
110
127
  - lib/bundler/vendor/thor/invocation.rb
111
128
  - lib/bundler/vendor/thor/parser.rb
112
129
  - lib/bundler/vendor/thor/parser/argument.rb
113
130
  - lib/bundler/vendor/thor/parser/arguments.rb
114
131
  - lib/bundler/vendor/thor/parser/option.rb
115
132
  - lib/bundler/vendor/thor/parser/options.rb
133
+ - lib/bundler/vendor/thor/rake_compat.rb
134
+ - lib/bundler/vendor/thor/runner.rb
116
135
  - lib/bundler/vendor/thor/shell.rb
117
136
  - lib/bundler/vendor/thor/shell/basic.rb
118
137
  - lib/bundler/vendor/thor/shell/color.rb
@@ -171,7 +190,6 @@ files:
171
190
  - spec/other/open_spec.rb
172
191
  - spec/other/outdated_spec.rb
173
192
  - spec/other/show_spec.rb
174
- - spec/pack/gems_spec.rb
175
193
  - spec/quality_spec.rb
176
194
  - spec/resolver/basic_spec.rb
177
195
  - spec/resolver/platform_spec.rb
@@ -183,7 +201,10 @@ files:
183
201
  - spec/runtime/with_clean_env_spec.rb
184
202
  - spec/spec_helper.rb
185
203
  - spec/support/artifice/endpoint.rb
204
+ - spec/support/artifice/endpoint_api_missing.rb
186
205
  - spec/support/artifice/endpoint_basic_authentication.rb
206
+ - spec/support/artifice/endpoint_extra.rb
207
+ - spec/support/artifice/endpoint_extra_missing.rb
187
208
  - spec/support/artifice/endpoint_fallback.rb
188
209
  - spec/support/artifice/endpoint_marshal_fail.rb
189
210
  - spec/support/artifice/endpoint_redirect.rb
@@ -221,26 +242,38 @@ files:
221
242
  has_rdoc: true
222
243
  homepage: http://gembundler.com
223
244
  licenses: []
245
+
224
246
  post_install_message:
225
247
  rdoc_options: []
226
- require_paths:
248
+
249
+ require_paths:
227
250
  - lib
228
- required_ruby_version: !ruby/object:Gem::Requirement
251
+ required_ruby_version: !ruby/object:Gem::Requirement
229
252
  none: false
230
- requirements:
231
- - - ! '>='
232
- - !ruby/object:Gem::Version
233
- version: '0'
234
- required_rubygems_version: !ruby/object:Gem::Requirement
253
+ requirements:
254
+ - - ">="
255
+ - !ruby/object:Gem::Version
256
+ hash: 3
257
+ segments:
258
+ - 0
259
+ version: "0"
260
+ required_rubygems_version: !ruby/object:Gem::Requirement
235
261
  none: false
236
- requirements:
237
- - - ! '>='
238
- - !ruby/object:Gem::Version
262
+ requirements:
263
+ - - ">="
264
+ - !ruby/object:Gem::Version
265
+ hash: 23
266
+ segments:
267
+ - 1
268
+ - 3
269
+ - 6
239
270
  version: 1.3.6
240
271
  requirements: []
272
+
241
273
  rubyforge_project: bundler
242
- rubygems_version: 1.6.2
274
+ rubygems_version: 1.3.7
243
275
  signing_key:
244
276
  specification_version: 3
245
277
  summary: The best way to manage your application's dependencies
246
278
  test_files: []
279
+
@@ -1,22 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe "bundle pack with gems" do
4
- describe "when there are only gemsources" do
5
- before :each do
6
- gemfile <<-G
7
- gem 'rack'
8
- G
9
-
10
- system_gems "rack-1.0.0"
11
- bundle :pack
12
- end
13
-
14
- it "locks the gemfile" do
15
- bundled_app("Gemfile.lock").should exist
16
- end
17
-
18
- it "caches the gems" do
19
- bundled_app("vendor/cache/rack-1.0.0.gem").should exist
20
- end
21
- end
22
- end