bundler 1.7.8 → 1.7.9
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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/bundler/resolver.rb +33 -14
- data/lib/bundler/version.rb +1 -1
- data/spec/realworld/edgecases_spec.rb +35 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1c6635aa6f9381865c09e22712c65eb6ce6df71
|
4
|
+
data.tar.gz: f7e85da257a62822115cb5450a4a77a538499bae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6effd53e12307044062ea6905c96f7435c8cb986d657483707e6c44daff0360f0cee0d3083d8b5939dec53b79e91282adbca66abe3484ebd20d87676c4d8a6da
|
7
|
+
data.tar.gz: 3e46d038f7c07fbc627766dd87e2e120d79bbd303c0168de029c73f3b90cb91596ec9eb9249c34903aa5ad93a3a8a4862365ffec82f4031430c205dacb581a62
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 1.7.9 (2014-12-09)
|
2
|
+
|
3
|
+
Bugfixes:
|
4
|
+
|
5
|
+
- Fix an issue where bundler sometime spams one gem in Gemfile.lock (#3216, @Who828)
|
6
|
+
- Ensure bundle update installs the newer version of the gem (#3089, @Who828)
|
7
|
+
- Fix an regression which stopped Bundler from resolving some Gemfiles (#3059, #3248, @Who828)
|
8
|
+
|
1
9
|
## 1.7.8 (2014-12-06)
|
2
10
|
|
3
11
|
Bugfixes:
|
data/lib/bundler/resolver.rb
CHANGED
@@ -110,7 +110,7 @@ module Bundler
|
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
113
|
-
attr_reader :errors, :started_at, :iteration_rate, :iteration_counter
|
113
|
+
attr_reader :errors, :started_at, :iteration_rate, :iteration_counter, :initial_reqs
|
114
114
|
|
115
115
|
# Figures out the best possible configuration of gems that satisfies
|
116
116
|
# the list of passed dependencies and any child dependencies without
|
@@ -135,6 +135,7 @@ module Bundler
|
|
135
135
|
end
|
136
136
|
|
137
137
|
def initialize(index, source_requirements, base)
|
138
|
+
@initial_reqs = []
|
138
139
|
@errors = {}
|
139
140
|
@base = base
|
140
141
|
@index = index
|
@@ -157,11 +158,12 @@ module Bundler
|
|
157
158
|
activated.values.map { |s| s.to_specs }.flatten.compact
|
158
159
|
end
|
159
160
|
|
160
|
-
def start(reqs)
|
161
|
+
def start(reqs, current_traversal=false)
|
162
|
+
@initial_reqs = reqs.dup unless current_traversal
|
161
163
|
activated = {}
|
162
164
|
@gems_size = Hash[reqs.map { |r| [r, gems_size(r)] }]
|
163
165
|
|
164
|
-
resolve(reqs, activated)
|
166
|
+
resolve(reqs, activated, current_traversal)
|
165
167
|
end
|
166
168
|
|
167
169
|
class State < Struct.new(:reqs, :activated, :requirement, :possibles, :depth, :conflicts)
|
@@ -171,13 +173,16 @@ module Bundler
|
|
171
173
|
end
|
172
174
|
|
173
175
|
def handle_conflict(current, states, existing=nil)
|
174
|
-
until current.nil?
|
176
|
+
until current.nil?
|
175
177
|
current_state = find_state(current, states)
|
176
|
-
existing_state = find_state(existing, states)
|
177
178
|
return current if state_any?(current_state)
|
179
|
+
current = current.required_by.last if current
|
180
|
+
end
|
181
|
+
|
182
|
+
until existing.nil?
|
183
|
+
existing_state = find_state(existing, states)
|
178
184
|
return existing if state_any?(existing_state)
|
179
185
|
existing = existing.required_by.last if existing
|
180
|
-
current = current.required_by.last if current
|
181
186
|
end
|
182
187
|
end
|
183
188
|
|
@@ -224,7 +229,7 @@ module Bundler
|
|
224
229
|
end
|
225
230
|
|
226
231
|
def resolve_for_conflict(state)
|
227
|
-
|
232
|
+
return version_conflict if state.nil? || state.possibles.empty?
|
228
233
|
reqs, activated, depth, conflicts = state.reqs.dup, state.activated.dup, state.depth, state.conflicts.dup
|
229
234
|
requirement = state.requirement
|
230
235
|
possible = state.possibles.pop
|
@@ -251,7 +256,7 @@ module Bundler
|
|
251
256
|
return reqs, activated, depth, conflicts
|
252
257
|
end
|
253
258
|
|
254
|
-
def resolve(reqs, activated)
|
259
|
+
def resolve(reqs, activated, current_traversal)
|
255
260
|
states = []
|
256
261
|
depth = 0
|
257
262
|
conflicts = Set.new
|
@@ -310,17 +315,23 @@ module Bundler
|
|
310
315
|
conflicts << current.name
|
311
316
|
|
312
317
|
parent = current.required_by.last
|
313
|
-
|
314
|
-
|
318
|
+
|
319
|
+
if current_traversal
|
320
|
+
parent = handle_conflict(current, states)
|
315
321
|
else
|
316
|
-
parent = handle_conflict(
|
322
|
+
parent = handle_conflict(parent, states)
|
317
323
|
end
|
318
324
|
|
325
|
+
|
319
326
|
if parent.nil? && !conflicts.empty?
|
320
327
|
parent = states.reverse.detect { |i| conflicts.include?(i.name) && state_any?(i)}
|
321
328
|
end
|
322
329
|
|
323
|
-
|
330
|
+
if existing.respond_to?(:required_by)
|
331
|
+
parent = handle_conflict(parent, states, existing.required_by[-2]) unless other_possible?(parent, states)
|
332
|
+
end
|
333
|
+
|
334
|
+
return version_conflict(current_traversal) if parent.nil? || parent.name == 'bundler'
|
324
335
|
|
325
336
|
reqs, activated, depth, conflicts = resolve_conflict(parent, states)
|
326
337
|
end
|
@@ -364,6 +375,7 @@ module Bundler
|
|
364
375
|
end
|
365
376
|
end
|
366
377
|
|
378
|
+
|
367
379
|
state = State.new(reqs.dup, activated.dup, current, matching_versions, depth, conflicts)
|
368
380
|
states << state
|
369
381
|
requirement = state.possibles.pop
|
@@ -418,8 +430,15 @@ module Bundler
|
|
418
430
|
end
|
419
431
|
end
|
420
432
|
|
421
|
-
def version_conflict
|
422
|
-
VersionConflict.new(errors.keys, error_message)
|
433
|
+
def version_conflict(current_traversal=true)
|
434
|
+
raise VersionConflict.new(errors.keys, error_message) if current_traversal
|
435
|
+
reset_state
|
436
|
+
start(initial_reqs, true)
|
437
|
+
end
|
438
|
+
|
439
|
+
def reset_state
|
440
|
+
clear_search_cache
|
441
|
+
@errors = {}
|
423
442
|
end
|
424
443
|
|
425
444
|
# For a given conflicted requirement, print out what exactly went wrong
|
data/lib/bundler/version.rb
CHANGED
@@ -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.
|
5
|
+
VERSION = "1.7.9" unless defined?(::Bundler::VERSION)
|
6
6
|
end
|
@@ -35,6 +35,41 @@ describe "real world edgecases", :realworld => true do
|
|
35
35
|
expect(out).to include("activemodel 3.0.5")
|
36
36
|
end
|
37
37
|
|
38
|
+
it "resolves dependencies correctly", :ruby => "1.9" do
|
39
|
+
install_gemfile <<-G
|
40
|
+
source "https://rubygems.org"
|
41
|
+
|
42
|
+
gem 'rails', '~> 3.0'
|
43
|
+
gem 'capybara', '~> 2.2.0'
|
44
|
+
G
|
45
|
+
expect(out).to include("rails 3.2.21")
|
46
|
+
expect(out).to include("capybara 2.2.1")
|
47
|
+
end
|
48
|
+
|
49
|
+
it "installs the latest version of gxapi_rails", :ruby => "1.9" do
|
50
|
+
install_gemfile <<-G
|
51
|
+
source "https://rubygems.org"
|
52
|
+
|
53
|
+
gem "sass-rails"
|
54
|
+
gem "rails", "~> 3"
|
55
|
+
gem "gxapi_rails"
|
56
|
+
G
|
57
|
+
expect(out).to include("gxapi_rails 0.0.6")
|
58
|
+
end
|
59
|
+
|
60
|
+
it "installs the latest version of i18n" do
|
61
|
+
install_gemfile <<-G
|
62
|
+
source "https://rubygems.org"
|
63
|
+
|
64
|
+
gem "i18n", "~> 0.4"
|
65
|
+
gem "activesupport", "~> 3.0"
|
66
|
+
gem "activerecord", "~> 3.0"
|
67
|
+
gem "builder", "~> 2.1.2"
|
68
|
+
G
|
69
|
+
expect(out).to include("i18n 0.6.11")
|
70
|
+
expect(out).to include("activesupport 3.0.5")
|
71
|
+
end
|
72
|
+
|
38
73
|
# https://github.com/bundler/bundler/issues/1500
|
39
74
|
it "does not fail install because of gem plugins" do
|
40
75
|
realworld_system_gems("open_gem --version 1.4.2", "rake --version 0.9.2")
|
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.
|
4
|
+
version: 1.7.9
|
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: 2014-12-
|
14
|
+
date: 2014-12-10 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: mustache
|