solve 1.2.0 → 1.2.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: 0e6a58fa44e65b31c0702901da1b090dca04b59a
4
- data.tar.gz: 12508f512d12eabaaf12f2d672267256d02da0fa
3
+ metadata.gz: f8183623942ab701e9117e2912fd2fb4fefdfc19
4
+ data.tar.gz: a001a2bb59751962e18719575d3b59ff3192a753
5
5
  SHA512:
6
- metadata.gz: 4758cf9a12c21aab78f46cfdf6f5e3fadedca7a4317036fea6243b192a51c28b85369d89b0d3f0358535eb5dc2cbb9345f28682137ab80353486f0f445c2348a
7
- data.tar.gz: 49cf75e3e9f95b168bdc7911229567543093b3efff4c7030ce43f5dab0af2882c4f5a43802de46f7e3adbfa133042a4003e5ee531741a194fdd6e1962053e2b6
6
+ metadata.gz: 548d9980b3b6e1f32922abcc0da8fd5146cf02f220453d6633a57a30eb982a18198fb7f4e21f7cab995c208a61a55af4417dc7b7161f36d6e48a7c1c0fe2e8ee
7
+ data.tar.gz: b0009f814da7354eea4a7c0fc90b378fd477cc14ab6207c94b6782c1fe48b4ce349ba84831d36a4886dcfb233026edc4c2fe435eba04e5a63b555ba10a0f2bcd
data/README.md CHANGED
@@ -15,7 +15,7 @@ A Ruby versioning constraint solver implementing [Semantic Versioning 2.0.0](htt
15
15
 
16
16
  Create a new graph
17
17
 
18
- graph = Graph.new
18
+ graph = Solve::Graph.new
19
19
 
20
20
  Add an artifact to the graph
21
21
 
@@ -31,20 +31,20 @@ Dependencies can be chained, too
31
31
 
32
32
  And now solve the graph with some demands
33
33
 
34
- Solve.it!(graph, ['nginx', '>= 0.100.0'])
34
+ Solve.it!(graph, [['nginx', '>= 0.100.0']])
35
35
 
36
36
  Or, if you want a topologically sorted solution
37
37
  NOTE: This will raise Solve::Errors::UnsortableSolutionError if the solution contains a cycle (which can happen with ruby packages)
38
38
 
39
- Solve.it!(graph, ['nginx', '>= 0.100.0'], sorted: true)
39
+ Solve.it!(graph, [['nginx', '>= 0.100.0']], sorted: true)
40
40
 
41
41
  ### Increasing the solver's timeout
42
42
 
43
- By default the solver will wait 10 seconds before giving up on finding a solution. Under certain conditions a graph may be too complicated to solve within the alotted time. To increase the timeout you can set the "SOLVE_TIMEOUT" environment variable to the amount of seconds desired.
43
+ By default the solver will wait 30 seconds before giving up on finding a solution. Under certain conditions a graph may be too complicated to solve within the alotted time. To increase the timeout you can set the "SOLVE_TIMEOUT" environment variable to the amount of seconds desired.
44
44
 
45
- $ export SOLVE_TIMEOUT=30
45
+ $ export SOLVE_TIMEOUT=60
46
46
 
47
- This will set the timeout to 30 seconds instead of 10 seconds.
47
+ This will set the timeout to 60 seconds instead of the default 30 seconds.
48
48
 
49
49
  ## Authors
50
50
 
@@ -43,7 +43,8 @@ module Solve
43
43
  s << "#{@message}\n"
44
44
  s << "Missing artifacts: #{missing_artifacts.join(',')}\n" unless missing_artifacts.empty?
45
45
  unless constraints_excluding_all_artifacts.empty?
46
- s << "Constraints that match no available version: #{constraints_excluding_all_artifacts.join(',')}\n"
46
+ pretty = constraints_excluding_all_artifacts.map { |constraint| "(#{constraint[0]} #{constraint[1]})" }.join(',')
47
+ s << "Constraints that match no available version: #{pretty}\n"
47
48
  end
48
49
  s << "Demand that cannot be met: #{unsatisfiable_demand}\n" if unsatisfiable_demand
49
50
  unless artifacts_with_no_satisfactory_version.empty?
@@ -10,7 +10,7 @@ module Solve
10
10
  #
11
11
  # @return [Integer]
12
12
  def timeout
13
- seconds = 10 unless seconds = ENV["SOLVE_TIMEOUT"]
13
+ seconds = 30 unless seconds = ENV["SOLVE_TIMEOUT"]
14
14
  seconds.to_i * 1_000
15
15
  end
16
16
  end
@@ -146,7 +146,7 @@ module Solve
146
146
  end
147
147
 
148
148
  constrained_to_no_versions = e.constrained_to_no_versions.inject([]) do |list, constraint|
149
- list << constraint.to_s
149
+ list << [constraint.package.name, constraint.constraint.to_s]
150
150
  end
151
151
 
152
152
  raise Solve::Errors::NoSolutionError.new(
@@ -1,3 +1,3 @@
1
1
  module Solve
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solve
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Winsor
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-04-18 00:00:00.000000000 Z
13
+ date: 2014-07-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: semverse