From 4548e6bec72161f320e2dfd5394a9ac1b533f3d7 Mon Sep 17 00:00:00 2001 From: Josef Stribny Date: Jul 30 2013 13:54:44 +0000 Subject: Initial commit --- diff --git a/.gitignore b/.gitignore index e69de29..bbd5b50 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/thread_safe-0.1.2.gem diff --git a/rubygem-thread_safe.spec b/rubygem-thread_safe.spec new file mode 100644 index 0000000..5aeadcf --- /dev/null +++ b/rubygem-thread_safe.spec @@ -0,0 +1,105 @@ +# Generated from thread_safe-0.1.0.gem by gem2rpm -*- rpm-spec -*- +%global gem_name thread_safe + +Name: rubygem-%{gem_name} +Version: 0.1.2 +Release: 3%{?dist} +Summary: Thread-safe collections and utilities for Ruby +Group: Development/Languages +License: MIT +URL: https://github.com/headius/thread_safe +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +Requires: ruby(release) +Requires: ruby(rubygems) +Requires: rubygem(atomic) +BuildRequires: ruby(release) +BuildRequires: ruby +BuildRequires: rubygems-devel +BuildRequires: rubygem(minitest) +BuildRequires: rubygem(atomic) +BuildArch: noarch +Provides: rubygem(%{gem_name}) = %{version} + +%description +A collection of data structures and utilities to make thread-safe +programming in Ruby easier. + + +%package doc +Summary: Documentation for %{name} +Group: Documentation +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name} + +%prep +gem unpack %{SOURCE0} + +%setup -q -D -T -n %{gem_name}-%{version} + +gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec + +# No inclusion of pre-built binaries or libraries +# http://fedoraproject.org/wiki/Packaging:Guidelines +rm ./lib/thread_safe/jruby_cache_backend.jar +sed -i 's\, "lib/thread_safe/jruby_cache_backend.jar"\\' %{gem_name}.gemspec + +# Remove shebang from non-executable Rakefile +sed -i '1d' Rakefile + +%build +gem build %{gem_name}.gemspec +%gem_install + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -pa .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +%check +pushd ./%{gem_instdir} +# Skip test_cache_loops.rb for MRI +# Apparantly still an issue on Ruby 2.0.0p247 (2013-06-27 revision 41674) +# http://bugs.ruby-lang.org/issues/8305 +# +# Skip test_hash.rb for MRI +# MRI issue/behaviour since thread_safe doesn't really modify MRI's Hash +# https://github.com/headius/thread_safe/issues/10 +testrb -Ilib test/test_{array,cache,helper,synchronized_delegator}.rb + +%files +%dir %{gem_instdir} +%{gem_libdir} +%{gem_spec} +%doc %{gem_instdir}/LICENSE +%exclude %{gem_cache} +%exclude %{gem_instdir}/.gitignore +%exclude %{gem_instdir}/ext + +%files doc +%doc %{gem_docdir} +%doc %{gem_instdir}/README.md +%{gem_instdir}/examples +%{gem_instdir}/Rakefile +%{gem_instdir}/Gemfile +%{gem_instdir}/%{gem_name}.gemspec +%{gem_instdir}/test + + + +%changelog +* Tue Jul 30 2013 Josef Stribny - 0.1.2-3 +- Remove shebang from Rakefile +- Add BR: rubygem(atomic) + +* Mon Jul 29 2013 Josef Stribny - 0.1.2-2 +- Remove JRuby for now + +* Fri Jul 26 2013 Josef Stribny - 0.1.2-1 +- Update to 0.1.2 +- Add JRuby support + +* Thu May 09 2013 Josef Stribny - 0.1.0-1 +- Initial package diff --git a/sources b/sources index e69de29..d4c2238 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +917fd0ee75a70c4c8abe24528622f89a thread_safe-0.1.2.gem