[rubygem-comp_tree] Import rubygem-comp_tree-1.1.3-2.el7.src.rpm

Lubomir Rintel lkundrak at fedoraproject.org
Fri May 16 18:34:05 UTC 2014


commit 6e1d7f8c5292f0997d56716b7ab61548dcce371a
Author: Lubomir Rintel <lkundrak at v3.sk>
Date:   Fri May 16 20:33:51 2014 +0200

    Import rubygem-comp_tree-1.1.3-2.el7.src.rpm

 .gitignore                              |    1 +
 0001-Make-it-work-with-Minitest-5.patch |   33 ++++++++++++
 0002-Make-tests-work-with-Rake-10.patch |   30 +++++++++++
 0003-Fix-throw_test-test.patch          |   34 ++++++++++++
 0004-Fix-run-with-Minitest-5.patch      |   50 ++++++++++++++++++
 rubygem-comp_tree.spec                  |   85 +++++++++++++++++++++++++++++++
 sources                                 |    1 +
 7 files changed, 234 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..df65f67 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/comp_tree-1.1.3.gem
diff --git a/0001-Make-it-work-with-Minitest-5.patch b/0001-Make-it-work-with-Minitest-5.patch
new file mode 100644
index 0000000..cc154ad
--- /dev/null
+++ b/0001-Make-it-work-with-Minitest-5.patch
@@ -0,0 +1,33 @@
+From ae75e3ef0a252ef3560f117d07fd9196a901db0a Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak at v3.sk>
+Date: Mon, 12 May 2014 15:49:27 +0200
+Subject: [PATCH 1/4] Make it work with Minitest 5
+
+Deal with stuff that got deprecated with Minitest 4:
+
+NOTE: MiniTest::Unit::TestCase#assert_block is deprecated, use assert.
+  It will be removed on 2013-01-01. Called from
+  src/comp_tree/test/exception_test.rb:50:in `block (3 levels) in test_exception'
+---
+ test/exception_test.rb | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/test/exception_test.rb b/test/exception_test.rb
+index ccc73a5..5d30bd1 100644
+--- a/test/exception_test.rb
++++ b/test/exception_test.rb
+@@ -47,9 +47,9 @@ class ExceptionTest < CompTreeTest
+           )
+     
+           if define_all
+-            assert_block { error.is_a? test_error }
++            assert ( error.is_a? test_error )
+           else
+-            assert_block { error.is_a? CompTree::NoFunctionError }
++            assert ( error.is_a? CompTree::NoFunctionError )
+             assert_equal(
+               "no function was defined for node `:border'",
+               error.message
+-- 
+1.8.3.1
+
diff --git a/0002-Make-tests-work-with-Rake-10.patch b/0002-Make-tests-work-with-Rake-10.patch
new file mode 100644
index 0000000..1693c96
--- /dev/null
+++ b/0002-Make-tests-work-with-Rake-10.patch
@@ -0,0 +1,30 @@
+From 7dadbfa8bfc9b4d99b4272d0e0a9777a5fb0b768 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak at v3.sk>
+Date: Mon, 12 May 2014 15:49:27 +0200
+Subject: [PATCH 2/4] Make tests work with Rake 10
+
+Deal with stuff that got deprecated with Rake 9:
+
+WARNING: Global access to Rake DSL methods is deprecated.  Please include
+    ...  Rake::DSL into classes and modules which use the Rake DSL methods.
+WARNING: DSL method Levitate#task called at src/comp_tree/devel/levitate.rb:507:in `define_changes'
+WARNING: DSL method Levitate#desc called at src/comp_tree/devel/levitate.rb:389:in `define_doc'
+---
+ devel/levitate.rb | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/devel/levitate.rb b/devel/levitate.rb
+index 38712df..745b6e6 100644
+--- a/devel/levitate.rb
++++ b/devel/levitate.rb
+@@ -1,5 +1,7 @@
+ 
+ class Levitate
++  include Rake::DSL
++
+   def initialize(gem_name)
+     @gem_name = gem_name
+ 
+-- 
+1.8.3.1
+
diff --git a/0003-Fix-throw_test-test.patch b/0003-Fix-throw_test-test.patch
new file mode 100644
index 0000000..63fcfc7
--- /dev/null
+++ b/0003-Fix-throw_test-test.patch
@@ -0,0 +1,34 @@
+From d4e8a4727c305b61e20ea2ee3f137be2245f7744 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak at v3.sk>
+Date: Mon, 12 May 2014 15:49:55 +0200
+Subject: [PATCH 3/4] Fix throw_test test
+
+Make no assumption about initial Thread.list size.
+---
+ test/throw_test.rb | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/test/throw_test.rb b/test/throw_test.rb
+index e8192f7..c6198ec 100644
+--- a/test/throw_test.rb
++++ b/test/throw_test.rb
+@@ -4,7 +4,7 @@ class ThrowTest < CompTreeTest
+   EXPECTED = RUBY_VERSION >= "1.9.0" ? ArgumentError : ThreadError
+ 
+   def test_throw
+-    assert_equal 1, Thread.list.size
++    init_size = Thread.list.size
+     exception = assert_raises(EXPECTED) {
+       CompTree.build do |driver|
+         driver.define(:root, :a) {
+@@ -17,6 +17,6 @@ class ThrowTest < CompTreeTest
+       end
+     }
+     assert_match "uncaught", exception.message
+-    assert_equal 1, Thread.list.size
++    assert_equal init_size, Thread.list.size
+   end
+ end
+-- 
+1.8.3.1
+
diff --git a/0004-Fix-run-with-Minitest-5.patch b/0004-Fix-run-with-Minitest-5.patch
new file mode 100644
index 0000000..50b1543
--- /dev/null
+++ b/0004-Fix-run-with-Minitest-5.patch
@@ -0,0 +1,50 @@
+From 83924426b3da6d2e366452c143b6819fa6b0f41e Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak at v3.sk>
+Date: Mon, 12 May 2014 15:50:08 +0200
+Subject: [PATCH 4/4] Fix run with Minitest 5
+
+There's a warning due to the weird way we avoid autorun, but at least it works
+with both minitest 4 (present in enterprise linux 7) and minitest 5 (shipped
+with fedora 20):
+
+Warning: you should require 'minitest/autorun' instead.
+Warning: or add 'gem "minitest"' before 'require "minitest/autorun"'
+---
+ devel/levitate.rb           | 8 +++++++-
+ test/comp_tree_test_base.rb | 1 +
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/devel/levitate.rb b/devel/levitate.rb
+index 745b6e6..e425fcf 100644
+--- a/devel/levitate.rb
++++ b/devel/levitate.rb
+@@ -338,7 +338,13 @@ class Levitate
+         test_files.each { |file| require file }
+ 
+         # if we use at_exit hook instead, it won't run before :release
+-        MiniTest::Unit.new.run ARGV
++        if MiniTest::Unit.method_defined? :run
++          # minitest 4
++          MiniTest::Unit.new.run ARGV
++        else
++          # minitest 5
++          Minitest.run ARGV
++        end
+       end
+       
+       desc "run tests with coverage"
+diff --git a/test/comp_tree_test_base.rb b/test/comp_tree_test_base.rb
+index 2affe6f..55a0fa9 100644
+--- a/test/comp_tree_test_base.rb
++++ b/test/comp_tree_test_base.rb
+@@ -1,6 +1,7 @@
+ $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
+ $LOAD_PATH.unshift File.dirname(__FILE__) + '/../devel'
+ 
++gem 'minitest'
+ require 'minitest/unit'
+ require 'minitest/autorun' unless defined? Rake
+ require 'comp_tree'
+-- 
+1.8.3.1
+
diff --git a/rubygem-comp_tree.spec b/rubygem-comp_tree.spec
new file mode 100644
index 0000000..f162fc2
--- /dev/null
+++ b/rubygem-comp_tree.spec
@@ -0,0 +1,85 @@
+%global gem_name comp_tree
+
+Name:           rubygem-%{gem_name}
+Version:        1.1.3
+Release:        2%{?dist}
+Summary:        A simple framework for automatic parallelism
+
+Group:          Development/Libraries
+License:        MIT
+URL:            http://quix.github.io/comp_tree/
+Source0:        http://rubygems.org/downloads/%{gem_name}-%{version}.gem
+# https://github.com/quix/comp_tree/pull/1
+Patch1:         0001-Make-it-work-with-Minitest-5.patch
+Patch2:         0002-Make-tests-work-with-Rake-10.patch
+Patch3:         0003-Fix-throw_test-test.patch
+Patch4:         0004-Fix-run-with-Minitest-5.patch
+BuildArch:      noarch
+
+BuildRequires:  rubygems-devel
+BuildRequires:  rubygem(minitest)
+BuildRequires:  rubygem(rake)
+Requires:       ruby(release) >= 1.8
+Requires:       rubygems
+Provides:       rubygem(%{gem_name}) = %{version}-%{release}
+
+%description
+CompTree is a parallel computation tree structure based upon concepts from
+pure functional programming.
+
+
+%package doc
+Summary:        Documentation for %{name}
+Group:          Documentation
+Requires:       %{name} = %{version}-%{release}
+
+%description doc
+Documentation for %{name}
+
+
+%prep
+gem unpack %{SOURCE0}
+%setup -q -D -T -n  %{gem_name}-%{version}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+gem spec %{SOURCE0} -l --ruby >%{gem_name}.gemspec
+
+
+%build
+gem build %{gem_name}.gemspec
+%gem_install
+
+
+%install
+mkdir -p %{buildroot}%{gem_dir}
+cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}/
+
+
+%check
+rake test
+
+
+%files
+%dir %{gem_instdir}
+%{gem_libdir}
+%{gem_instdir}/devel
+%exclude %{gem_cache}
+%exclude %{gem_instdir}/*.rdoc
+%exclude %{gem_instdir}/test
+%exclude %{gem_instdir}/Rakefile
+%{gem_spec}
+%doc *.rdoc
+
+
+%files doc
+%{gem_docdir}
+
+
+%changelog
+* Mon May 12 2014 Lubomir Rintel <lkundrak at v3.sk> - 1.1.3-2
+- Fix test run
+
+* Mon Apr 28 2014 Lubomir Rintel <lkundrak at v3.sk> - 1.1.3-1
+- Initial packaging
diff --git a/sources b/sources
index e69de29..f87ad5f 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+0331f0efd8de1ed24edf49b2f72353c0  comp_tree-1.1.3.gem


More information about the scm-commits mailing list