ktdreyer pushed to rubygem-thread_safe (master). "Update to 0.3.5 (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Mar 25 11:15:58 UTC 2015


>From 4180aa364f760f11b1c2759bab523eaa6a73b459 Mon Sep 17 00:00:00 2001
From: Ken Dreyer <ktdreyer at ktdreyer.com>
Date: Wed, 25 Mar 2015 05:14:18 -0600
Subject: Update to 0.3.5

- New upstream URL.
- Remove extraneous BR: ruby. This is covered by BR: ruby(release).
- Patch to make simplecov and coveralls optional dependencies.
- Remove optional minitest/reporters dependency.
- Drop Rakefile shebang removal. This is fixed upstream.
- Use %license macro.

diff --git a/.gitignore b/.gitignore
index 99c5841..0e18c94 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 /thread_safe-0.1.3.gem
 /thread_safe-0.3.3.gem
 /thread_safe-0.3.4.gem
+/thread_safe-0.3.5.gem
diff --git a/rubygem-thread_safe-0.3.5-optional-deps.patch b/rubygem-thread_safe-0.3.5-optional-deps.patch
new file mode 100644
index 0000000..acab08e
--- /dev/null
+++ b/rubygem-thread_safe-0.3.5-optional-deps.patch
@@ -0,0 +1,68 @@
+From cfd0933a6b784ac6bdca867777600137ff49ba5e Mon Sep 17 00:00:00 2001
+From: Ken Dreyer <ktdreyer at ktdreyer.com>
+Date: Tue, 24 Mar 2015 16:38:37 -0600
+Subject: [PATCH] tests: make simplecov/coveralls optional
+
+If we do not have SimpleCov or Coveralls installed, we should be able to
+continue with the rest of the test suite.
+
+This allows the tests to run outside of Bundler if SimpleCov or
+Coveralls are not installed.
+---
+ test/test_helper.rb | 42 +++++++++++++++++++++++-------------------
+ 1 file changed, 23 insertions(+), 19 deletions(-)
+
+diff --git a/test/test_helper.rb b/test/test_helper.rb
+index 443aaae..3ddfce7 100644
+--- a/test/test_helper.rb
++++ b/test/test_helper.rb
+@@ -1,23 +1,27 @@
+ unless defined?(JRUBY_VERSION)
+-  require 'simplecov'
+-  require 'coveralls'
+-
+-  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
+-    SimpleCov::Formatter::HTMLFormatter,
+-    Coveralls::SimpleCov::Formatter
+-  ]
+-
+-  SimpleCov.start do
+-    project_name 'thread_safe'
+-
+-    add_filter '/examples/'
+-    add_filter '/pkg/'
+-    add_filter '/test/'
+-    add_filter '/tasks/'
+-    add_filter '/yard-template/'
+-    add_filter '/yardoc/'
+-
+-    command_name 'Mintest'
++  begin
++    require 'simplecov'
++    require 'coveralls'
++
++    SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
++      SimpleCov::Formatter::HTMLFormatter,
++      Coveralls::SimpleCov::Formatter
++    ]
++
++    SimpleCov.start do
++      project_name 'thread_safe'
++
++      add_filter '/examples/'
++      add_filter '/pkg/'
++      add_filter '/test/'
++      add_filter '/tasks/'
++      add_filter '/yard-template/'
++      add_filter '/yardoc/'
++
++      command_name 'Mintest'
++    end
++  rescue LoadError
++    warn "warning: simplecov/coveralls gems not found; skipping coverage"
+   end
+ end
+ 
+-- 
+1.9.3
+
diff --git a/rubygem-thread_safe.spec b/rubygem-thread_safe.spec
index d5ba433..d949102 100644
--- a/rubygem-thread_safe.spec
+++ b/rubygem-thread_safe.spec
@@ -2,19 +2,21 @@
 %global gem_name thread_safe
 
 Name: rubygem-%{gem_name}
-Version: 0.3.4
+Version: 0.3.5
 Release: 1%{?dist}
 Summary: Thread-safe collections and utilities for Ruby
 Group: Development/Languages
 # jsr166e.LondAdder, jsr166e.Striped64, jsr166e.ConcurrentHashMapV8
 # and their Ruby ports are Public Domain
 License: ASL 2.0 and Public Domain
-URL: https://github.com/headius/thread_safe
+URL: https://github.com/ruby-concurrency/thread_safe
 Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
+# Patch0 sent upstream at
+# https://github.com/ruby-concurrency/thread_safe/pull/13
+Patch0: rubygem-thread_safe-0.3.5-optional-deps.patch
 Requires: ruby(release)
 Requires: ruby(rubygems)
 BuildRequires: ruby(release)
-BuildRequires: ruby
 BuildRequires: rubygems-devel
 BuildRequires: rubygem(minitest)
 BuildRequires: rubygem(atomic)
@@ -33,7 +35,7 @@ Requires: %{name} = %{version}-%{release}
 BuildArch: noarch
 
 %description doc
-Documentation for %{name}
+Documentation for %{name}.
 
 %prep
 gem unpack %{SOURCE0}
@@ -42,8 +44,12 @@ gem unpack %{SOURCE0}
 
 gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
 
-# Remove shebang from non-executable Rakefile
-sed -i '1d' Rakefile
+# Remove dependency on simplecov and coveralls:
+%patch0 -p1
+
+# Remove dependency on minitest-reporters:
+sed -i -e "/minitest\/reporters/d" test/test_helper.rb
+sed -i -e "/Minitest::Reporters/d" test/test_helper.rb
 
 %build
 gem build %{gem_name}.gemspec
@@ -67,10 +73,11 @@ ruby -Ilib -e \
   'Dir.glob "./test/test_{array,cache,helper,synchronized_delegator}.rb", &method(:require)'
 
 %files
+%{!?_licensedir:%global license %%doc}
 %dir %{gem_instdir}
 %{gem_libdir}
 %{gem_spec}
-%doc %{gem_instdir}/LICENSE
+%license %{gem_instdir}/LICENSE
 %exclude %{gem_cache}
 %exclude %{gem_instdir}/ext
 %exclude %{gem_instdir}/.travis.yml
@@ -82,10 +89,22 @@ ruby -Ilib -e \
 %{gem_instdir}/Rakefile
 %{gem_instdir}/Gemfile
 %{gem_instdir}/%{gem_name}.gemspec
+%{gem_instdir}/tasks
 %{gem_instdir}/test
+%{gem_instdir}/yard-template
+%exclude %{gem_instdir}/.yardopts
 
 
 %changelog
+* Tue Mar 24 2015 Ken Dreyer <ktdreyer at ktdreyer.com> - 0.3.5-1
+- Update to 0.3.5
+- New upstream URL.
+- Remove extraneous BR: ruby. This is covered by BR: ruby(release).
+- Patch to make simplecov and coveralls optional dependencies.
+- Remove optional minitest/reporters dependency.
+- Drop Rakefile shebang removal. This is fixed upstream.
+- Use %%license macro.
+
 * Mon Aug 18 2014 Josef Stribny <jstribny at redhat.com> - 0.3.4-1
 - Update to 0.3.4
 
diff --git a/sources b/sources
index 158a4ae..ba7c446 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-7da4dd3fbb12c9fe504a9f885703761a  thread_safe-0.3.4.gem
+366f12f1ef0a0ec746658fa8d1c4ef65  thread_safe-0.3.5.gem
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/rubygem-thread_safe.git/commit/?h=master&id=4180aa364f760f11b1c2759bab523eaa6a73b459

--
You received this message due to your preference settings at
https://apps.fedoraproject.org/notifications//fmnscmcommits.id.fedoraproject.org/email/29390


More information about the scm-commits mailing list