[DRE-commits] [ruby-dep-selector] 15/17: Patch: make package solve >=2.0 compatible

Hleb Valoshka tsfgnu-guest at moszumanska.debian.org
Thu Jun 25 21:36:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

tsfgnu-guest pushed a commit to branch master
in repository ruby-dep-selector.

commit 0fe2b561e45b3c24965af4af22386cb25008ddc1
Author: Hleb Valoshka <375gnu at gmail.com>
Date:   Thu Jun 25 23:59:00 2015 +0300

    Patch: make package solve >=2.0 compatible
---
 .../0004-Make-it-solve-2.0-compatible.patch        | 70 ++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/debian/patches/0004-Make-it-solve-2.0-compatible.patch b/debian/patches/0004-Make-it-solve-2.0-compatible.patch
new file mode 100644
index 0000000..6bc7aea
--- /dev/null
+++ b/debian/patches/0004-Make-it-solve-2.0-compatible.patch
@@ -0,0 +1,70 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Thu, 25 Jun 2015 21:13:11 +0300
+Subject: Make it solve 2.0 compatible
+
+---
+ spec/solve_integration_spec.rb | 24 +++++++-----------------
+ 1 file changed, 7 insertions(+), 17 deletions(-)
+
+diff --git a/spec/solve_integration_spec.rb b/spec/solve_integration_spec.rb
+index eeac5b2..0cb7553 100644
+--- a/spec/solve_integration_spec.rb
++++ b/spec/solve_integration_spec.rb
+@@ -1,16 +1,6 @@
+ require 'spec_helper'
+ require 'solve'
+-
+-# The current version of solve (0.8.2) doesn't quite match the API we require.
+-# This will be remedied in a future release.
+-module Solve
+-  class Constraint
+-
+-    def include?(v)
+-      satisfies?(v)
+-    end
+-  end
+-end
++require 'solve/constraint'
+ 
+ # Test that we can use duck typing to pass Solve's version and constraint
+ # types to dep-selector
+@@ -19,10 +9,10 @@ describe "Integration with berkshelf solve" do
+   let(:solve_graph) do
+     graph = Solve::Graph.new
+ 
+-    graph.artifacts("top-level", "1.0.0")
++    graph.artifact("top-level", "1.0.0")
+       .depends("dep-package", ">= 0.0.0")
+ 
+-    graph.artifacts("dep-package", "1.0.0-beta")
++    graph.artifact("dep-package", "1.0.0-beta")
+     graph
+   end
+ 
+@@ -30,14 +20,14 @@ describe "Integration with berkshelf solve" do
+ 
+   let(:graph) { DepSelector::DependencyGraph.new }
+ 
+-  let(:solve_artifact_top_level) { solve_graph.artifacts("top-level", "1.0.0") }
+-  let(:solve_artifact_dep_package) { solve_graph.artifacts("dep-package", "1.0.0") }
++  let(:solve_artifact_top_level) { solve_graph.artifact("top-level", "1.0.0") }
++  let(:solve_artifact_dep_package) { solve_graph.artifact("dep-package", "1.0.0") }
+ 
+   it "uses solve's artifact objects to describe the problem" do
+     artifact = solve_artifact_top_level
+ 
+     package_version = graph.package(artifact.name).add_version(artifact.version)
+-    package_version.version.should == Solve::Version.new("1.0.0")
++    package_version.version.should == Semverse::Version.new("1.0.0")
+   end
+ 
+   it "uses solve's constraints to find matching packages" do
+@@ -63,7 +53,7 @@ describe "Integration with berkshelf solve" do
+ 
+     selector = DepSelector::Selector.new(graph, (1.0))
+     solution = selector.find_solution(gecode_demands, gecode_all_versions)
+-    solution.should == { "top-level" => Solve::Version.new("1.0.0") }
++    solution.should == { "top-level" => Semverse::Version.new("1.0.0") }
+   end
+ 
+ end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-dep-selector.git



More information about the Pkg-ruby-extras-commits mailing list