molinillo 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69f2c3781273e6f2e5c06758ed06c441691a9bcc
4
- data.tar.gz: e43917b29522495a4108ad810a8ddc6879585fc1
3
+ metadata.gz: a110136ef30be826a9e0ccbe5bf217e207db85a4
4
+ data.tar.gz: 34d167f2673c8bdf03bda56073a224dc81ffe72e
5
5
  SHA512:
6
- metadata.gz: 534b055dd96c322231c79e6624687764ad99bf67c8c15f0293320d695465b8041e7086f27bdff79b3378a568a5998b0ec2242a31043b52e1ee6f736839b0ebf8
7
- data.tar.gz: f9c29fb00c70d2638086404f91baa6d0fc9b0c837aa28bd0819fa6dfd44f6466d33941241438cb45b88f066ec97025cf79f611c5f6999b61fd56cd714eae215c
6
+ metadata.gz: ec56826cd3020c0ae87f8f657e0209d446296119c32bb8ce9337b8672bd8a3420048d50b3579e8c1888c08346f75d03549160aa7b24bf61c3c58cee986e01d8b
7
+ data.tar.gz: 4e941b7a924b71742108cec967d39702d16739ce4fec2e2b83d892eb7ed83575bf1a2e7a31b208dfabcd8bed9708c5ec1c1af70891622fdac1d18dffa0a133d7
@@ -1,3 +1,3 @@
1
1
  module Molinillo
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
@@ -12,13 +12,15 @@ module Molinillo
12
12
  # @attr [Object] locked_requirement the relevant locking requirement.
13
13
  # @attr [Array<Array<Object>>] requirement_trees the different requirement
14
14
  # trees that led to every requirement for the conflicting name.
15
+ # @attr [{String=>Object}] activated_by_name the already-activated specs.
15
16
  Conflict = Struct.new(
16
17
  :requirement,
17
18
  :requirements,
18
19
  :existing,
19
20
  :possibility,
20
21
  :locked_requirement,
21
- :requirement_trees
22
+ :requirement_trees,
23
+ :activated_by_name
22
24
  )
23
25
 
24
26
  # @return [SpecificationProvider] the provider that knows about
@@ -216,7 +218,7 @@ module Molinillo
216
218
  return nil unless requirement
217
219
  seen = false
218
220
  state = states.reverse_each.find do |s|
219
- seen ||= s.requirement == requirement
221
+ seen ||= s.requirement == requirement || s.requirements.include?(requirement)
220
222
  seen && s.requirement != requirement && !s.requirements.include?(requirement)
221
223
  end
222
224
  state && state.requirement
@@ -257,14 +259,16 @@ module Molinillo
257
259
  vertex.payload,
258
260
  possibility,
259
261
  locked_requirement_named(name),
260
- requirement_trees
262
+ requirement_trees,
263
+ Hash[activated.map { |v| [v.name, v.payload] }.select(&:last)]
261
264
  )
262
265
  end
263
266
 
264
267
  # @return [Array<Array<Object>>] The different requirement
265
268
  # trees that led to every requirement for the current spec.
266
269
  def requirement_trees
267
- activated.vertex_named(name).requirements.map { |r| requirement_tree_for(r) }
270
+ vertex = activated.vertex_named(name)
271
+ vertex.requirements.map { |r| requirement_tree_for(r) }
268
272
  end
269
273
 
270
274
  # @return [Array<Object>] the list of requirements that led to
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: molinillo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel E. Giddins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-29 00:00:00.000000000 Z
11
+ date: 2015-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler