ktdreyer pushed to rubygem-geoip (master). "Update to 1.5.0 (RHBZ #1201073) (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Wed Mar 25 12:32:39 UTC 2015
>From cb92ac4ec0dce882c6828034ed382d4ce408cc7a Mon Sep 17 00:00:00 2001
From: Ken Dreyer <ktdreyer at ktdreyer.com>
Date: Wed, 25 Mar 2015 06:31:54 -0600
Subject: Update to 1.5.0 (RHBZ #1201073)
- Adjustments for https://fedoraproject.org/wiki/Changes/Ruby_2.1
- Use %license macro
- Remove macro in %changelog to satisfy rpmlint
diff --git a/rubygem-geoip-1.4.0-minitest.patch b/rubygem-geoip-1.4.0-minitest.patch
deleted file mode 100644
index 49f00ff..0000000
--- a/rubygem-geoip-1.4.0-minitest.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 45f252c6e50879a62d67ff98312245e21b7ac0bf Mon Sep 17 00:00:00 2001
-From: Ken Dreyer <ktdreyer at ktdreyer.com>
-Date: Fri, 4 Apr 2014 09:03:23 -0500
-Subject: [PATCH] Fedora: tests: switch to minitest
-
-Ruby 1.9+ uses Minitest as the backend for Test::Unit. As of Minitest 5,
-the shim no longer supports Test::Unit::TestCase.
-
-Adjust the geoip test suite to support Minitest 5's syntax.
-
-This is a cherry-pick from https://github.com/cjheath/geoip/pull/46 for
-Fedora, along with a conditional for backwards compatibility with
-Minitest 4.
----
- test/test_geoip.rb | 2 +-
- test/test_helper.rb | 9 ++++++++-
- 2 files changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/test/test_geoip.rb b/test/test_geoip.rb
-index a959d25..543e909 100644
---- a/test/test_geoip.rb
-+++ b/test/test_geoip.rb
-@@ -1,6 +1,6 @@
- require File.dirname(__FILE__) + '/test_helper.rb'
-
--class TestGeoip < Test::Unit::TestCase
-+class TestGeoip < Minitest::Test
-
- def setup
- end
-diff --git a/test/test_helper.rb b/test/test_helper.rb
-index 90ce49d..b3cd038 100644
---- a/test/test_helper.rb
-+++ b/test/test_helper.rb
-@@ -1,3 +1,10 @@
- require 'stringio'
--require 'test/unit'
-+require 'minitest/autorun'
- require File.dirname(__FILE__) + '/../lib/geoip'
-+
-+if Minitest.const_defined?('Test')
-+ # We're on Minitest 5+
-+else
-+ # Minitest 4 doesn't have Minitest::Test yet.
-+ Minitest::Test = MiniTest::Unit::TestCase
-+end
---
-1.8.5.3
-
diff --git a/rubygem-geoip.spec b/rubygem-geoip.spec
index 1036ec8..19be80d 100644
--- a/rubygem-geoip.spec
+++ b/rubygem-geoip.spec
@@ -1,22 +1,23 @@
%global gem_name geoip
Name: rubygem-%{gem_name}
-Version: 1.4.0
-Release: 3%{?dist}
+Version: 1.5.0
+Release: 1%{?dist}
Summary: Search a GeoIP database for an IP address
Group: Development/Languages
License: LGPLv2+
URL: https://github.com/cjheath/geoip
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
-# Tests fail with Minitest 5.
-# https://github.com/cjheath/geoip/pull/46
-Patch0: rubygem-geoip-1.4.0-minitest.patch
+%if 0%{?fc20} || 0%{?el7}
Requires: ruby(release)
Requires: ruby(rubygems)
+%endif
BuildRequires: rubygems-devel
BuildRequires: rubygem(minitest)
BuildArch: noarch
+%if 0%{?fc20} || 0%{?el7}
Provides: rubygem(%{gem_name}) = %{version}
+%endif
# The ruby(release) package already provides a usable Ruby interpreter.
# Filter the extra /usr/bin/ruby requirement here.
@@ -35,7 +36,7 @@ Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
-Documentation for %{name}
+Documentation for %{name}.
%prep
gem unpack %{SOURCE0}
@@ -51,10 +52,6 @@ sed -i -e 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' bin/%{gem_name}
rm Rakefile
sed -i "s|\"Rakefile\",||g" %{gem_name}.gemspec
-# Tests fail with Minitest 5.
-# https://github.com/cjheath/geoip/pull/46
-%patch0 -p1
-
%build
# Create the gem as gem install only works on a gem file
gem build %{gem_name}.gemspec
@@ -66,7 +63,7 @@ rm .%{gem_instdir}/%{gem_name}.gemspec
%install
mkdir -p %{buildroot}%{gem_dir}
-cp -pa .%{gem_dir}/* \
+cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
mkdir -p %{buildroot}%{_bindir}
@@ -81,8 +78,9 @@ pushd .%{gem_instdir}
popd
%files
+%{!?_licensedir:%global license %%doc}
%dir %{gem_instdir}
-%doc %{gem_instdir}/LICENSE
+%license %{gem_instdir}/LICENSE
%doc %{gem_instdir}/README.rdoc
%{_bindir}/%{gem_name}
%{gem_instdir}/bin
@@ -97,6 +95,12 @@ popd
%exclude %{gem_instdir}/test
%changelog
+* Wed Mar 25 2015 Ken Dreyer <ktdreyer at ktdreyer.com> - 1.5.0-1
+- Update to 1.5.0 (RHBZ #1201073)
+- Adjustments for https://fedoraproject.org/wiki/Changes/Ruby_2.1
+- Use %%license macro
+- Remove macro in %%changelog to satisfy rpmlint
+
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
@@ -109,7 +113,7 @@ popd
* Sat Dec 28 2013 Ken Dreyer <ktdreyer at ktdreyer.com> - 1.3.5-1
- Update to 1.3.5
- Remove obsolete comments
-- Remove Rakefile during %prep
+- Remove Rakefile during %%prep
- Move README to the main package
- Exclude tests from the binary packages
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/rubygem-geoip.git/commit/?h=master&id=cb92ac4ec0dce882c6828034ed382d4ce408cc7a
--
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