dep_selector 1.0.1 → 1.0.2

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: 77c9006f9e3303d1eb35a9d058e6d334f0dfe7de
4
- data.tar.gz: addce036cfb150fff7fadba70e42e6f7f57d1d36
3
+ metadata.gz: a88c054c230ac9cd8c865c8d472e261540f95a7b
4
+ data.tar.gz: cd0c15522d2f07bb2fdad89303aaa262d0f9ac95
5
5
  SHA512:
6
- metadata.gz: 68df688802cd9e4d8de9444ef4967fbb92ebe5a2e7851048523264a023553e50a656585fd0340397a92e16e0f885cf29e099325f5983934c719bcb567eea8e38
7
- data.tar.gz: 1deb7f95f7fdb35e510038ba4949a5feaecc2e056f980c7517a652b94357fa14ee26ba9be5599b6f4ab093e7c74e2dc720f0bac9187a6acb41f868f436ef62a3
6
+ metadata.gz: 9e2460fff1a9c57fe68f1b3a9477d12961d20971ccfbe4cd0c2b1c4806d0df56b9bda4ef9c8a2c71ba2ebd4e4ccfc5806208f3246938303a0356e3fb69d0dcb4
7
+ data.tar.gz: c08199238f23ee78a3f7f0a2291da65bafde6b328807ed66d95aa8e519150ec84d055feef98d9c3c7aca43b4c73c55d57106269ea5ec3c4cd57970f7da2d40bc
@@ -1,3 +1,3 @@
1
1
  module DepSelector
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -42,5 +42,9 @@ module DepSelector
42
42
  self.class == o.class && self == o
43
43
  end
44
44
 
45
+ def hash
46
+ @hashcode ||= to_s.hash
47
+ end
48
+
45
49
  end
46
50
  end
@@ -80,13 +80,14 @@ module DepSelector
80
80
  # version_constraint and recurse into them
81
81
  seen_dep_trees = {}
82
82
  curr_pkg[version_constraint].each do |curr_pkg_ver|
83
- next if seen_dep_trees.has_key?(curr_pkg_ver.dependencies.to_s)
83
+ dep_key = curr_pkg_ver.dependencies
84
+ next if seen_dep_trees.has_key?(dep_key)
84
85
  curr_path.push(curr_pkg_ver)
85
86
  curr_pkg_ver.dependencies.each do |dep|
86
87
  next if curr_pkg.name == dep.package.name
87
88
  paths_to_pkg(dep_graph, dep.package, dep.constraint, target_pkg, curr_path, all_paths)
88
89
  end
89
- seen_dep_trees[curr_pkg_ver.dependencies.to_s] = true
90
+ seen_dep_trees[dep_key] = true
90
91
  curr_path.pop
91
92
  end
92
93
  end
@@ -96,7 +96,7 @@ module DepSelector
96
96
  acc
97
97
  end
98
98
  # disambiguate between packages disabled becuase they
99
- # don't exist and those that have otherwise problematic
99
+ # don't exist and those that have otherwise problematic
100
100
  # constraints
101
101
  disabled_non_existent_packages = []
102
102
  disabled_most_constrained_packages = []
@@ -44,7 +44,10 @@ module DepSelector
44
44
  end
45
45
 
46
46
  def include?(v)
47
- version = if v.respond_to? :version
47
+ version = if v.kind_of?(Version)
48
+ v
49
+ elsif
50
+ v.respond_to? :version
48
51
  Version.new(v.version.to_s)
49
52
  else
50
53
  Version.new(v.to_s)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dep_selector
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Walters
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-15 00:00:00.000000000 Z
12
+ date: 2014-04-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi