bundler 1.7.14 → 1.7.15

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: 746df673800f5d41fe2d1291b907039aba505909
4
- data.tar.gz: 85c28b901946ef92a7ffbf9ead8fad33974d563f
3
+ metadata.gz: 87c0e0f8a86277370e75de2355fc489fcafc1cc5
4
+ data.tar.gz: db0d05676f078159a3387ea000fe20ef755603b7
5
5
  SHA512:
6
- metadata.gz: f72f1fd05fb6525b87302286252357f7f48cab2f59d30a65fb85ad366ea869f752937077165a78e7bdd1b9461cd9bc7323d9bff45f1fe78f014dd5d4b6675e72
7
- data.tar.gz: e3e476266759921138364b64d9f7b2e096b5d87ea8329c15c166c1192c96ee34450dd78817847c9dd19e649f92ac6ffe3af894cdd3004aefd3e00929e1336b64
6
+ metadata.gz: 918b79b442b84c1ea8b128dc3ac1016d31402e17fe5e083c5cc923f4adea219abc1b8eb3485fcba2bef465f68ff0cf19d89fa1a2a213e437ec8583743a161e2a
7
+ data.tar.gz: 74ca32121adf3f19442d2815deec3186dca5ecc434ca9337df4445a0107b59e8c8516f768f50551554b4011b81a0d057eb9fc1566b9693611d8816cd0ab52683
@@ -1,3 +1,9 @@
1
+ ## 1.7.15 (2015-04-29)
2
+
3
+ Bugfixes:
4
+
5
+ - Respect Gemfile sources when installing a gem present in two sources (#3585, @tmoore)
6
+
1
7
  ## 1.7.14 (2015-03-30)
2
8
 
3
9
  Bugfixes:
@@ -184,11 +184,10 @@ module Bundler
184
184
  # @return [SpecSet] resolved dependencies
185
185
  def resolve
186
186
  @resolve ||= begin
187
+ last_resolve = converge_locked_specs
187
188
  if Bundler.settings[:frozen] || (!@unlocking && nothing_changed?)
188
- @locked_specs
189
+ last_resolve
189
190
  else
190
- last_resolve = converge_locked_specs
191
-
192
191
  # Run a resolve against the locally available gems
193
192
  last_resolve.merge Resolver.resolve(expanded_dependencies, index, source_requirements, last_resolve)
194
193
  end
@@ -518,7 +517,9 @@ module Bundler
518
517
 
519
518
  converged = []
520
519
  @locked_specs.each do |s|
521
- s.source = sources.get(s.source)
520
+ # Replace the locked dependency's source with the equivalent source from the Gemfile
521
+ dep = @dependencies.find { |dep| s.satisfies?(dep) }
522
+ s.source = (dep && dep.source) || sources.get(s.source)
522
523
 
523
524
  # Don't add a spec to the list if its source is expired. For example,
524
525
  # if you change a Git gem to Rubygems.
@@ -566,7 +567,7 @@ module Bundler
566
567
  end
567
568
 
568
569
  def satisfies_locked_spec?(dep)
569
- @locked_specs.any? { |s| s.satisfies?(dep) && (!dep.source || s.source == dep.source) }
570
+ @locked_specs.any? { |s| s.satisfies?(dep) && (!dep.source || s.source.include?(dep.source)) }
570
571
  end
571
572
 
572
573
  def expanded_dependencies
@@ -3,6 +3,8 @@ module Bundler
3
3
  class Path
4
4
 
5
5
  class Installer < Bundler::GemInstaller
6
+ attr_reader :spec
7
+
6
8
  def initialize(spec, options = {})
7
9
  @spec = spec
8
10
  @tmp_bin_dir = "#{Bundler.tmp(spec.full_name)}/bin"
@@ -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.7.14" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.7.15" unless defined?(::Bundler::VERSION)
6
6
  end
@@ -219,6 +219,40 @@ describe "bundle install with gems on multiple sources" do
219
219
  should_be_installed("depends_on_rack 1.0.1", "rack 1.0.0")
220
220
  end
221
221
  end
222
+
223
+ context "and only the dependency is pinned" do
224
+ before do
225
+ # need this to be broken to check for correct source ordering
226
+ build_repo gem_repo2 do
227
+ build_gem "rack", "1.0.0" do |s|
228
+ s.write "lib/rack.rb", "RACK = 'FAIL'"
229
+ end
230
+ end
231
+
232
+ gemfile <<-G
233
+ source "file://#{gem_repo3}" # contains depends_on_rack
234
+ source "file://#{gem_repo2}" # contains broken rack
235
+
236
+ gem "depends_on_rack" # installed from gem_repo3
237
+ gem "rack", :source => "file://#{gem_repo1}"
238
+ G
239
+ end
240
+
241
+ it "installs the dependency from the pinned source without warning" do
242
+ bundle :install
243
+
244
+ expect(out).not_to include("Warning: the gem 'rack' was found in multiple sources.")
245
+ should_be_installed("depends_on_rack 1.0.1", "rack 1.0.0")
246
+
247
+ # In https://github.com/bundler/bundler/issues/3585 this failed
248
+ # when there is already a lock file, and the gems are missing, so try again
249
+ system_gems []
250
+ bundle :install
251
+
252
+ expect(out).not_to include("Warning: the gem 'rack' was found in multiple sources.")
253
+ should_be_installed("depends_on_rack 1.0.1", "rack 1.0.0")
254
+ end
255
+ end
222
256
  end
223
257
  end
224
258
 
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.7.14
4
+ version: 1.7.15
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-30 00:00:00.000000000 Z
14
+ date: 2015-04-30 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: mustache