pub_grub 0.4.2 → 0.4.3

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
  SHA256:
3
- metadata.gz: 5b0b0a89dd31b84300d59b3a6d5b051136d0658cb7046d49412b6ad4518eeb30
4
- data.tar.gz: dabfb9a2e6b1d00657f41933b89b48909ce61683de37ca62601abfdaad0cc89c
3
+ metadata.gz: 3fb8a4eb75ab624c0460ae89a756058d8fc98747296d5b0422b63c0d915756e3
4
+ data.tar.gz: 99a4e76956dd0368acb67f87afe5f36357496fe1504bc4eb6f9670e10095cbf7
5
5
  SHA512:
6
- metadata.gz: 35b94b554e04473d65c9e81d6036b1dd76025901b86b2c06a2551e7b116e94b8da3e8a91dcbb9308f03b645eed32f2dac8d51ab484a6e34e5a360a62e382a459
7
- data.tar.gz: 4b38762754fc5226f034d5659ee62ac46ff22107038ac421d2823f3d2a54f146586ee0c6f321c1e3618b07fe3565130827bfc0fd94b355bb537a4108dc23e0c4
6
+ metadata.gz: d9977b304c9ca7f483d95cbc1c3a385a6bb553d780600f07b7669368afdb3d07cd86e5021df4e5f63f1e31dd2fb607ff9d8f427024828b26a82af38248e4cd37
7
+ data.tar.gz: 1545a55656626c8b0575dc4b058f6eed4bf63c40f58f8cf25268bcdd1623e72e6ea7df9914727ab262783579ff154463146da0cddf2ceafd3a719390ebab9ea4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pub_grub (0.4.2)
4
+ pub_grub (0.4.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -95,7 +95,7 @@ module PubGrub
95
95
 
96
96
  @cached_versions = Hash.new do |h,k|
97
97
  if k == @root_package
98
- h[k] = [0]
98
+ h[k] = [@root_version]
99
99
  else
100
100
  h[k] = all_versions_for(k)
101
101
  end
@@ -118,7 +118,14 @@ module PubGrub
118
118
 
119
119
  def versions_for(package, range=VersionRange.any)
120
120
  versions = range.select_versions(@sorted_versions[package])
121
- sort_versions_by_preferred(package, versions)
121
+
122
+ # Conditional avoids (among other things) calling
123
+ # sort_versions_by_preferred with the root package
124
+ if versions.size > 1
125
+ sort_versions_by_preferred(package, versions)
126
+ else
127
+ versions
128
+ end
122
129
  end
123
130
 
124
131
  def incompatibilities_for(package, version)
@@ -0,0 +1,3 @@
1
+ module PubGrub
2
+ VERSION = "0.4.3"
3
+ end
data/pub_grub.gemspec CHANGED
@@ -2,9 +2,11 @@
2
2
  lib = File.expand_path("../lib", __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
+ require "pub_grub/version"
6
+
5
7
  Gem::Specification.new do |spec|
6
8
  spec.name = "pub_grub"
7
- spec.version = "0.4.2"
9
+ spec.version = PubGrub::VERSION
8
10
  spec.authors = ["John Hawthorn"]
9
11
  spec.email = ["john@hawthorn.email"]
10
12
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pub_grub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Hawthorn
@@ -109,6 +109,7 @@ files:
109
109
  - lib/pub_grub/solve_failure.rb
110
110
  - lib/pub_grub/static_package_source.rb
111
111
  - lib/pub_grub/term.rb
112
+ - lib/pub_grub/version.rb
112
113
  - lib/pub_grub/version_constraint.rb
113
114
  - lib/pub_grub/version_range.rb
114
115
  - lib/pub_grub/version_solver.rb