summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Dreyer <ktdreyer@ktdreyer.com>2014-05-27 15:24:32 -0600
committerKen Dreyer <ktdreyer@ktdreyer.com>2014-05-27 15:24:32 -0600
commit6ed5da9da3cfa53765719e5106b2f8b9dd36035b (patch)
tree6ad32a0cf75ee2e72d5cfebdecd1d92a7a432940
parentfb380ab4adba25257e4f528e6709ff078cc3f4f6 (diff)
downloadrubygem-resque-job-stats-6ed5da9da3cfa53765719e5106b2f8b9dd36035b.zip
rubygem-resque-job-stats-6ed5da9da3cfa53765719e5106b2f8b9dd36035b.tar.gz
rubygem-resque-job-stats-6ed5da9da3cfa53765719e5106b2f8b9dd36035b.tar.xz
Adjustments for https://fedoraproject.org/wiki/Changes/Ruby_2.1
- Drop patch0 in favor of a more future-proof Bundler-removal solution
-rw-r--r--rubygem-resque-job-stats-0.3.0-rm-bundler.patch29
-rw-r--r--rubygem-resque-job-stats.spec16
2 files changed, 12 insertions, 33 deletions
diff --git a/rubygem-resque-job-stats-0.3.0-rm-bundler.patch b/rubygem-resque-job-stats-0.3.0-rm-bundler.patch
deleted file mode 100644
index 51f6253..0000000
--- a/rubygem-resque-job-stats-0.3.0-rm-bundler.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From c2c707bc977a716c1b089c2772c3c6940d69a8a3 Mon Sep 17 00:00:00 2001
-From: Ken Dreyer <ktdreyer@ktdreyer.com>
-Date: Mon, 2 Dec 2013 21:43:14 -0700
-Subject: [PATCH] Fedora only: remove test suite dependency on bundler
-
----
- test/helper.rb | 8 --------
- 1 file changed, 8 deletions(-)
-
-diff --git a/test/helper.rb b/test/helper.rb
-index 5974035..53d4ea8 100644
---- a/test/helper.rb
-+++ b/test/helper.rb
-@@ -1,12 +1,4 @@
- require 'rubygems'
--require 'bundler'
--begin
-- Bundler.setup(:default, :development)
--rescue Bundler::BundlerError => e
-- $stderr.puts e.message
-- $stderr.puts "Run `bundle install` to install missing gems"
-- exit e.status_code
--end
- require 'minitest/unit'
- require 'minitest/mock'
- require 'rack/test'
---
-1.8.3.1
-
diff --git a/rubygem-resque-job-stats.spec b/rubygem-resque-job-stats.spec
index 85fca18..4b3221d 100644
--- a/rubygem-resque-job-stats.spec
+++ b/rubygem-resque-job-stats.spec
@@ -2,18 +2,19 @@
Name: rubygem-%{gem_name}
Version: 0.3.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Job-centric stats for Resque
Group: Development/Languages
License: MIT
URL: https://github.com/alanpeabody/resque-job-stats
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: %{name}-test.conf
-Patch0: rubygem-resque-job-stats-0.3.0-rm-bundler.patch
+%if 0%{?fc19} || 0%{?fc20} || 0%{?el7}
Requires: ruby(release)
Requires: ruby(rubygems)
Requires: rubygem(resque) => 1.17
Requires: rubygem(resque) < 2
+%endif
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: rubygem(minitest)
@@ -23,7 +24,9 @@ BuildRequires: rubygem(rack-test)
BuildRequires: rubygem(timecop)
BuildRequires: redis
BuildArch: noarch
+%if 0%{?fc19} || 0%{?fc20} || 0%{?el7}
Provides: rubygem(%{gem_name}) = %{version}
+%endif
%description
Tracks jobs performed, failed, and the duration of the last 100 jobs for each
@@ -53,7 +56,8 @@ for f in .document .travis.yml .rvmrc Gemfile Rakefile VERSION; do
done
# Remove dependency on bundler.
-%patch0 -p1
+sed -i -e "/require 'bundler'/d" test/helper.rb
+sed -i -e "/Bundler.setup/d" test/helper.rb
# Remove dependency on redgreen.
sed -i "/require 'redgreen'/d" test/helper.rb
@@ -82,7 +86,7 @@ pushd .%{gem_instdir}
/usr/sbin/redis-server test/test.conf
# Run resque tests
- testrb -Ilib test
+ ruby -Ilib -e 'Dir.glob "./test/**/test_*.rb", &method(:require)'
# Kill redis-server
kill -INT `cat test/db/redis.pid`
@@ -102,5 +106,9 @@ popd
%exclude %{gem_instdir}/test
%changelog
+* Tue May 27 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.3.0-2
+- Adjustments for https://fedoraproject.org/wiki/Changes/Ruby_2.1
+- Drop patch0 in favor of a more future-proof Bundler-removal solution
+
* Mon Dec 02 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.3.0-1
- Initial package