bundler 1.5.1 → 1.5.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.

Files changed (58) hide show
  1. data/CHANGELOG.md +26 -2
  2. data/bin/bundle +1 -3
  3. data/bundler.gemspec +1 -1
  4. data/lib/bundler/cli.rb +2 -4
  5. data/lib/bundler/fetcher.rb +13 -12
  6. data/lib/bundler/installer.rb +9 -36
  7. data/lib/bundler/parallel_workers/unix_worker.rb +12 -4
  8. data/lib/bundler/parallel_workers/worker.rb +1 -0
  9. data/lib/bundler/rubygems_ext.rb +1 -1
  10. data/lib/bundler/rubygems_integration.rb +15 -8
  11. data/lib/bundler/templates/newgem/newgem.gemspec.tt +1 -1
  12. data/lib/bundler/vendor/thor.rb +63 -56
  13. data/lib/bundler/vendor/thor/actions.rb +52 -51
  14. data/lib/bundler/vendor/thor/actions/create_file.rb +35 -37
  15. data/lib/bundler/vendor/thor/actions/create_link.rb +1 -2
  16. data/lib/bundler/vendor/thor/actions/directory.rb +36 -37
  17. data/lib/bundler/vendor/thor/actions/empty_directory.rb +67 -69
  18. data/lib/bundler/vendor/thor/actions/file_manipulation.rb +11 -12
  19. data/lib/bundler/vendor/thor/actions/inject_into_file.rb +41 -43
  20. data/lib/bundler/vendor/thor/base.rb +180 -178
  21. data/lib/bundler/vendor/thor/command.rb +22 -25
  22. data/lib/bundler/vendor/thor/core_ext/hash_with_indifferent_access.rb +21 -24
  23. data/lib/bundler/vendor/thor/core_ext/io_binary_read.rb +1 -3
  24. data/lib/bundler/vendor/thor/core_ext/ordered_hash.rb +8 -10
  25. data/lib/bundler/vendor/thor/error.rb +2 -2
  26. data/lib/bundler/vendor/thor/group.rb +59 -60
  27. data/lib/bundler/vendor/thor/invocation.rb +39 -38
  28. data/lib/bundler/vendor/thor/line_editor.rb +17 -0
  29. data/lib/bundler/vendor/thor/line_editor/basic.rb +35 -0
  30. data/lib/bundler/vendor/thor/line_editor/readline.rb +88 -0
  31. data/lib/bundler/vendor/thor/parser/argument.rb +29 -30
  32. data/lib/bundler/vendor/thor/parser/arguments.rb +102 -98
  33. data/lib/bundler/vendor/thor/parser/option.rb +25 -25
  34. data/lib/bundler/vendor/thor/parser/options.rb +85 -85
  35. data/lib/bundler/vendor/thor/rake_compat.rb +6 -7
  36. data/lib/bundler/vendor/thor/runner.rb +154 -154
  37. data/lib/bundler/vendor/thor/shell.rb +23 -30
  38. data/lib/bundler/vendor/thor/shell/basic.rb +66 -57
  39. data/lib/bundler/vendor/thor/shell/color.rb +44 -43
  40. data/lib/bundler/vendor/thor/shell/html.rb +43 -44
  41. data/lib/bundler/vendor/thor/util.rb +37 -40
  42. data/lib/bundler/vendor/thor/version.rb +1 -1
  43. data/lib/bundler/version.rb +1 -1
  44. data/man/bundle-install.ronn +1 -1
  45. data/man/gemfile.5.ronn +1 -2
  46. data/spec/commands/binstubs_spec.rb +13 -0
  47. data/spec/install/gemfile/git_spec.rb +2 -2
  48. data/spec/install/gems/dependency_api_spec.rb +34 -0
  49. data/spec/install/gems/packed_spec.rb +2 -4
  50. data/spec/quality_spec.rb +2 -2
  51. data/spec/realworld/parallel_spec.rb +69 -0
  52. data/spec/runtime/setup_spec.rb +3 -2
  53. data/spec/spec_helper.rb +1 -0
  54. data/spec/support/artifice/endpoint_host_redirect.rb +15 -0
  55. data/spec/support/permissions.rb +11 -0
  56. metadata +11 -6
  57. data/spec/realworld/parallel_install_spec.rb +0 -23
  58. data/spec/realworld/parallel_update_spec.rb +0 -31
@@ -0,0 +1,69 @@
1
+ require 'spec_helper'
2
+
3
+ describe "parallel", :realworld => true do
4
+ it "installs", :ruby => "1.8" do
5
+ gemfile <<-G
6
+ source "https://rubygems.org"
7
+ gem 'activesupport', '~> 3.2.13'
8
+ gem 'faker', '~> 1.1.2'
9
+ G
10
+
11
+ bundle :install, :jobs => 4, :env => {"DEBUG" => "1"}
12
+ expect(out).to match(/[1-3]: /)
13
+
14
+ bundle "show activesupport"
15
+ expect(out).to match(/activesupport/)
16
+
17
+ bundle "show faker"
18
+ expect(out).to match(/faker/)
19
+
20
+ bundle "config jobs"
21
+ expect(out).to match(/: "4"/)
22
+ end
23
+
24
+ it "installs even with circular dependency", :ruby => "1.9" do
25
+ gemfile <<-G
26
+ source 'https://rubygems.org'
27
+ gem 'activesupport', '~> 3.2.13'
28
+ gem 'mongoid_auto_increment', "0.1.1"
29
+ G
30
+
31
+ bundle :install, :jobs => 4, :env => {"DEBUG" => "1"}
32
+ expect(out).to match(/[1-3]: /)
33
+
34
+ bundle "show activesupport"
35
+ expect(out).to match(/activesupport/)
36
+
37
+ bundle "show mongoid_auto_increment"
38
+ expect(out).to match(%r{gems/mongoid_auto_increment})
39
+
40
+ bundle "config jobs"
41
+ expect(out).to match(/: "4"/)
42
+ end
43
+
44
+ it "updates" do
45
+ install_gemfile <<-G
46
+ source "https://rubygems.org"
47
+ gem 'activesupport', '3.2.12'
48
+ gem 'faker', '~> 1.1.2'
49
+ G
50
+
51
+ gemfile <<-G
52
+ source "https://rubygems.org"
53
+ gem 'activesupport', '~> 3.2.12'
54
+ gem 'faker', '~> 1.1.2'
55
+ G
56
+
57
+ bundle :update, :jobs => 4, :env => {"DEBUG" => "1"}
58
+ expect(out).to match(/[1-3]: /)
59
+
60
+ bundle "show activesupport"
61
+ expect(out).to match(/activesupport-3\.2\.1[3-9]/)
62
+
63
+ bundle "show faker"
64
+ expect(out).to match(/faker/)
65
+
66
+ bundle "config jobs"
67
+ expect(out).to match(/: "4"/)
68
+ end
69
+ end
@@ -631,7 +631,7 @@ describe "Bundler.setup" do
631
631
  expect(out).to eq("yay")
632
632
  end
633
633
 
634
- it "ignores Gem.refresh" do
634
+ it "stubs out Gem.refresh so it does not reveal system gems" do
635
635
  system_gems "rack-1.0.0"
636
636
 
637
637
  install_gemfile <<-G
@@ -640,11 +640,12 @@ describe "Bundler.setup" do
640
640
  G
641
641
 
642
642
  run <<-R
643
+ puts Bundler.rubygems.find_name("rack").inspect
643
644
  Gem.refresh
644
645
  puts Bundler.rubygems.find_name("rack").inspect
645
646
  R
646
647
 
647
- expect(out).to eq("[]")
648
+ expect(out).to eq("[]\n[]")
648
649
  end
649
650
 
650
651
  describe "when a vendored gem specification uses the :path option" do
@@ -43,6 +43,7 @@ RSpec.configure do |config|
43
43
  config.include Spec::Rubygems
44
44
  config.include Spec::Platforms
45
45
  config.include Spec::Sudo
46
+ config.include Spec::Permissions
46
47
 
47
48
  if Spec::Sudo.test_sudo?
48
49
  config.filter_run :sudo => true
@@ -0,0 +1,15 @@
1
+ require File.expand_path("../endpoint", __FILE__)
2
+
3
+ Artifice.deactivate
4
+
5
+ class EndpointHostRedirect < Endpoint
6
+ get "/fetch/actual/gem/:id", :host_name => 'localgemserver.test' do
7
+ redirect "http://bundler.localgemserver.test#{request.path_info}"
8
+ end
9
+
10
+ get "/api/v1/dependencies" do
11
+ status 404
12
+ end
13
+ end
14
+
15
+ Artifice.activate_with(EndpointHostRedirect)
@@ -0,0 +1,11 @@
1
+ module Spec
2
+ module Permissions
3
+ def with_umask(new_umask)
4
+ old_umask = File.umask(new_umask)
5
+ yield if block_given?
6
+ ensure
7
+ File.umask(old_umask)
8
+ end
9
+ end
10
+ end
11
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-12-28 00:00:00.000000000 Z
15
+ date: 2014-01-11 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: ronn
@@ -168,6 +168,9 @@ files:
168
168
  - lib/bundler/vendor/thor/error.rb
169
169
  - lib/bundler/vendor/thor/group.rb
170
170
  - lib/bundler/vendor/thor/invocation.rb
171
+ - lib/bundler/vendor/thor/line_editor.rb
172
+ - lib/bundler/vendor/thor/line_editor/basic.rb
173
+ - lib/bundler/vendor/thor/line_editor/readline.rb
171
174
  - lib/bundler/vendor/thor/parser.rb
172
175
  - lib/bundler/vendor/thor/parser/argument.rb
173
176
  - lib/bundler/vendor/thor/parser/arguments.rb
@@ -258,8 +261,7 @@ files:
258
261
  - spec/quality_spec.rb
259
262
  - spec/realworld/dependency_api_spec.rb
260
263
  - spec/realworld/edgecases_spec.rb
261
- - spec/realworld/parallel_install_spec.rb
262
- - spec/realworld/parallel_update_spec.rb
264
+ - spec/realworld/parallel_spec.rb
263
265
  - spec/resolver/basic_spec.rb
264
266
  - spec/resolver/platform_spec.rb
265
267
  - spec/runtime/executable_spec.rb
@@ -278,6 +280,7 @@ files:
278
280
  - spec/support/artifice/endpoint_extra.rb
279
281
  - spec/support/artifice/endpoint_extra_missing.rb
280
282
  - spec/support/artifice/endpoint_fallback.rb
283
+ - spec/support/artifice/endpoint_host_redirect.rb
281
284
  - spec/support/artifice/endpoint_marshal_fail.rb
282
285
  - spec/support/artifice/endpoint_redirect.rb
283
286
  - spec/support/artifice/endpoint_timeout.rb
@@ -289,6 +292,7 @@ files:
289
292
  - spec/support/indexes.rb
290
293
  - spec/support/matchers.rb
291
294
  - spec/support/path.rb
295
+ - spec/support/permissions.rb
292
296
  - spec/support/platforms.rb
293
297
  - spec/support/ruby_ext.rb
294
298
  - spec/support/rubygems_ext.rb
@@ -403,8 +407,7 @@ test_files:
403
407
  - spec/quality_spec.rb
404
408
  - spec/realworld/dependency_api_spec.rb
405
409
  - spec/realworld/edgecases_spec.rb
406
- - spec/realworld/parallel_install_spec.rb
407
- - spec/realworld/parallel_update_spec.rb
410
+ - spec/realworld/parallel_spec.rb
408
411
  - spec/resolver/basic_spec.rb
409
412
  - spec/resolver/platform_spec.rb
410
413
  - spec/runtime/executable_spec.rb
@@ -423,6 +426,7 @@ test_files:
423
426
  - spec/support/artifice/endpoint_extra.rb
424
427
  - spec/support/artifice/endpoint_extra_missing.rb
425
428
  - spec/support/artifice/endpoint_fallback.rb
429
+ - spec/support/artifice/endpoint_host_redirect.rb
426
430
  - spec/support/artifice/endpoint_marshal_fail.rb
427
431
  - spec/support/artifice/endpoint_redirect.rb
428
432
  - spec/support/artifice/endpoint_timeout.rb
@@ -434,6 +438,7 @@ test_files:
434
438
  - spec/support/indexes.rb
435
439
  - spec/support/matchers.rb
436
440
  - spec/support/path.rb
441
+ - spec/support/permissions.rb
437
442
  - spec/support/platforms.rb
438
443
  - spec/support/ruby_ext.rb
439
444
  - spec/support/rubygems_ext.rb
@@ -1,23 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "installing dependencies parallely", :realworld => true do
4
- it "installs gems parallely" do
5
- gemfile <<-G
6
- source "https://rubygems.org"
7
- gem 'activesupport', '~> 3.2.13'
8
- gem 'faker', '~> 1.1.2'
9
- G
10
-
11
- bundle :install, :jobs => 4, :env => {"DEBUG" => "1"}
12
- (0..3).each {|i| expect(out).to include("#{i}: ") }
13
-
14
- bundle "show activesupport"
15
- expect(out).to match(/activesupport/)
16
-
17
- bundle "show faker"
18
- expect(out).to match(/faker/)
19
-
20
- bundle "config jobs"
21
- expect(out).to match(/: "4"/)
22
- end
23
- end
@@ -1,31 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "updating dependencies parallely", :realworld => true do
4
- before :each do
5
- install_gemfile <<-G
6
- source "https://rubygems.org"
7
- gem 'activesupport', '~> 3.2.12'
8
- gem 'faker', '~> 1.1.2'
9
- G
10
- end
11
-
12
- it "installs gems parallely" do
13
- gemfile <<-G
14
- source "https://rubygems.org"
15
- gem 'activesupport', '3.2.13'
16
- gem 'faker', '~> 1.1.2'
17
- G
18
-
19
- bundle :update, :jobs => 4, :env => {"DEBUG" => "1"}
20
- (0..3).each {|i| expect(out).to include("#{i}: ") }
21
-
22
- bundle "show activesupport"
23
- expect(out).to match(/activesupport-3\.2\.13/)
24
-
25
- bundle "show faker"
26
- expect(out).to match(/faker/)
27
-
28
- bundle "config jobs"
29
- expect(out).to match(/: "4"/)
30
- end
31
- end