bundler 1.8.5 → 1.8.6

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd9cd2a859f1af1500763f43966145161f3ae948
4
- data.tar.gz: 7c6e684d16889f20d8f23f957a22c90e0ee33c21
3
+ metadata.gz: 5b1227b5d5ac72022daeacb957ac0b39793e3e85
4
+ data.tar.gz: 8c60bd7af377c9a55f02857287bfd44064158377
5
5
  SHA512:
6
- metadata.gz: e35cce86ced240aaba9dea510d7960e5809020fa950cf72cf10c238f21199d262487cb8a1929db266ea722c356a2894417ca1ce007e972489dc4bd7684cd96df
7
- data.tar.gz: 5504d5b6d31351943f466cdc743202e68135de21309135a8f8ab6d074cba0aa125677e5c172525c571a13f5ac7484b70266ca12e0fdfdc45c9819b86fea1567d
6
+ metadata.gz: f7192edc58b72fb0ea2dd01f10d2c866491bf97e8749f51b8d9da01cb932c0fae30623ff2233031ba14bd6e8b85f5da33a91914509d9ffa9378f52d48bcde81f
7
+ data.tar.gz: 630b217c0df0a70ccc964f1b863f909ee80d02829c07bb4fdd7b3f76eb4ea7d21729ffa9be12eaf98dbb7304af2fbf38ffd123b78a784f61e321f5bfa854229b
@@ -1,3 +1,10 @@
1
+ ## 1.8.6 (2015-03-30)
2
+
3
+ Bugfixes:
4
+
5
+ - keep gems locked when updating another gem from the same source (#3250, @indirect)
6
+ - resolve race that could build gems without saved arguments (#3404, @indirect)
7
+
1
8
  ## 1.8.5 (2015-03-11)
2
9
 
3
10
  Bugfixes:
@@ -272,7 +272,7 @@ module Bundler
272
272
  each do |spec|
273
273
  next if spec.name == 'bundler'
274
274
  out << spec.to_lock
275
- end
275
+ end
276
276
  out << "\n"
277
277
  end
278
278
 
@@ -561,8 +561,11 @@ module Bundler
561
561
  resolve
562
562
  end
563
563
 
564
- def in_locked_deps?(dep, d)
565
- d && dep.source == d.source
564
+ def in_locked_deps?(dep, locked_dep)
565
+ # Because the lockfile can't link a dep to a specific remote, we need to
566
+ # treat sources as equivalent anytime the locked dep has all the remotes
567
+ # that the Gemfile dep does.
568
+ locked_dep && locked_dep.source && dep.source && locked_dep.source.include?(dep.source)
566
569
  end
567
570
 
568
571
  def satisfies_locked_spec?(dep)
@@ -96,20 +96,26 @@ module Bundler
96
96
 
97
97
  def install_gem_from_spec(spec, standalone = false, worker = 0)
98
98
  # Fetch the build settings, if there are any
99
- settings = Bundler.settings["build.#{spec.name}"]
100
- install_message = nil
101
- post_install_message = nil
102
- debug_message = nil
103
- Bundler.rubygems.with_build_args [settings] do
104
- install_message, post_install_message, debug_message = spec.source.install(spec)
105
- if install_message.include? 'Installing'
106
- Bundler.ui.confirm install_message
107
- else
108
- Bundler.ui.info install_message
99
+ settings = Bundler.settings["build.#{spec.name}"]
100
+ messages = nil
101
+
102
+ if settings
103
+ Bundler.rubygems.with_build_args [settings] do
104
+ messages = spec.source.install(spec)
109
105
  end
110
- Bundler.ui.debug debug_message if debug_message
111
- Bundler.ui.debug "#{worker}: #{spec.name} (#{spec.version}) from #{spec.loaded_from}"
106
+ else
107
+ messages = spec.source.install(spec)
108
+ end
109
+
110
+ install_message, post_install_message, debug_message = *messages
111
+
112
+ if install_message.include? 'Installing'
113
+ Bundler.ui.confirm install_message
114
+ else
115
+ Bundler.ui.info install_message
112
116
  end
117
+ Bundler.ui.debug debug_message if debug_message
118
+ Bundler.ui.debug "#{worker}: #{spec.name} (#{spec.version}) from #{spec.loaded_from}"
113
119
 
114
120
  if Bundler.settings[:bin] && standalone
115
121
  generate_standalone_bundler_executable_stubs(spec)
@@ -161,12 +161,14 @@ module Bundler
161
161
  end
162
162
 
163
163
  def with_build_args(args)
164
- old_args = self.build_args
165
- begin
166
- self.build_args = args
167
- yield
168
- ensure
169
- self.build_args = old_args
164
+ ext_lock.synchronize do
165
+ old_args = self.build_args
166
+ begin
167
+ self.build_args = args
168
+ yield
169
+ ensure
170
+ self.build_args = old_args
171
+ end
170
172
  end
171
173
  end
172
174
 
@@ -35,32 +35,27 @@ module Bundler
35
35
  end
36
36
 
37
37
  def default_bundle_dir
38
- global_bundle_dir = File.join(Bundler.rubygems.user_home, ".bundle")
39
38
  bundle_dir = find_directory(".bundle")
39
+ return nil unless bundle_dir
40
40
 
41
- if bundle_dir && bundle_dir != global_bundle_dir
42
- Pathname.new(bundle_dir)
43
- else
44
- nil
45
- end
41
+ global_bundle_dir = File.join(Bundler.rubygems.user_home, ".bundle")
42
+ return nil if bundle_dir == global_bundle_dir
43
+
44
+ Pathname.new(bundle_dir)
46
45
  end
47
46
 
48
47
  def in_bundle?
49
48
  find_gemfile
50
49
  end
51
50
 
52
- def chdir_monitor
53
- Bundler.rubygems.ext_lock
54
- end
55
-
56
51
  def chdir(dir, &blk)
57
- chdir_monitor.synchronize do
52
+ Bundler.rubygems.ext_lock.synchronize do
58
53
  Dir.chdir dir, &blk
59
54
  end
60
55
  end
61
56
 
62
57
  def pwd
63
- chdir_monitor.synchronize do
58
+ Bundler.rubygems.ext_lock.synchronize do
64
59
  Dir.pwd
65
60
  end
66
61
  end
@@ -37,5 +37,10 @@ module Bundler
37
37
  def can_lock?(spec)
38
38
  spec.source == self
39
39
  end
40
+
41
+ def include?(other)
42
+ other == self
43
+ end
44
+
40
45
  end
41
46
  end
@@ -36,11 +36,15 @@ module Bundler
36
36
  end
37
37
 
38
38
  def eql?(o)
39
- o.is_a?(Rubygems) && remotes_equal?(o.remotes)
39
+ o.is_a?(Rubygems) && o.credless_remotes == credless_remotes
40
40
  end
41
41
 
42
42
  alias == eql?
43
43
 
44
+ def include?(o)
45
+ o.is_a?(Rubygems) && (o.credless_remotes - credless_remotes).empty?
46
+ end
47
+
44
48
  def can_lock?(spec)
45
49
  spec.source.is_a?(Rubygems)
46
50
  end
@@ -200,6 +204,10 @@ module Bundler
200
204
 
201
205
  protected
202
206
 
207
+ def credless_remotes
208
+ remotes.map(&method(:suppress_configured_credentials))
209
+ end
210
+
203
211
  def source_uris_for_spec(spec)
204
212
  specs.search_all(spec.name).inject([]) do |uris, s|
205
213
  uris << s.source_uri.without_credentials if s.source_uri
@@ -368,10 +376,6 @@ module Bundler
368
376
  spec.loaded_from && spec.loaded_from.include?("specifications/default/")
369
377
  end
370
378
 
371
- def remotes_equal?(other_remotes)
372
- remotes.map(&method(:suppress_configured_credentials)) == other_remotes.map(&method(:suppress_configured_credentials))
373
- end
374
-
375
379
  end
376
380
  end
377
381
  end
@@ -2,5 +2,5 @@ module Bundler
2
2
  # We're doing this because we might write tests that deal
3
3
  # with other versions of bundler and we are unsure how to
4
4
  # handle this better.
5
- VERSION = "1.8.5" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.8.6" unless defined?(::Bundler::VERSION)
6
6
  end
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.8.5
4
+ version: 1.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-03-11 00:00:00.000000000 Z
14
+ date: 2015-03-30 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: mustache