diff options
author | Ken Dreyer <ktdreyer@ktdreyer.com> | 2014-04-08 11:45:17 -0500 |
---|---|---|
committer | Ken Dreyer <ktdreyer@ktdreyer.com> | 2014-04-08 11:45:17 -0500 |
commit | 4e8b2b3ceb865e3ef4255749a83c9a47833bd662 (patch) | |
tree | 2669d5fa9fc8f34ee233eddb464e639ae112c4be | |
parent | 111d9bc1e08fcf8faf73cbdd53659897184b43a6 (diff) | |
download | svn2git-4e8b2b3ceb865e3ef4255749a83c9a47833bd662.tar.gz svn2git-4e8b2b3ceb865e3ef4255749a83c9a47833bd662.tar.xz svn2git-4e8b2b3ceb865e3ef4255749a83c9a47833bd662.zip |
Update to latest upstream version
- Patch for Minitest 5 support
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | rubygem-svn2git-2.2.5-minitest.patch | 58 | ||||
-rw-r--r-- | rubygem-svn2git.spec | 23 | ||||
-rw-r--r-- | sources | 2 |
4 files changed, 80 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..492f2e7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/svn2git-2.2.5.gem diff --git a/rubygem-svn2git-2.2.5-minitest.patch b/rubygem-svn2git-2.2.5-minitest.patch new file mode 100644 index 0000000..c8a68f1 --- /dev/null +++ b/rubygem-svn2git-2.2.5-minitest.patch @@ -0,0 +1,58 @@ +From dc6b1c55a14349ddc310242103f7f0710e6f1c73 Mon Sep 17 00:00:00 2001 +From: Ken Dreyer <ktdreyer@ktdreyer.com> +Date: Tue, 8 Apr 2014 11:07:20 -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 svn2git test suite to support Minitest 5's syntax. + +Minitest versions 4 and below do not support the newer Minitest::Test +class that arrived in version 5. For that case, use the +MiniTest::Unit::TestCase class as a fallback. + +This patch has been adjusted from the canonical submission upstream +https://github.com/nirvdrum/svn2git/pull/160 because we do not need or +want the gemspec change for Fedora. For Fedora's builds, we regenerate +the gemspec file dynamically, so a static gemspec patch is not +desirable. +--- + test/escape_quotes_test.rb | 2 +- + test/test_helper.rb | 9 ++++++++- + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/test/escape_quotes_test.rb b/test/escape_quotes_test.rb +index 56fe070..3f5150c 100644 +--- a/test/escape_quotes_test.rb ++++ b/test/escape_quotes_test.rb +@@ -1,6 +1,6 @@ + require File.expand_path(File.join(__FILE__, '..', 'test_helper')) + +-class EscapeQuotesTest < Test::Unit::TestCase ++class EscapeQuotesTest < Minitest::Test + def test_identity + expected = 'A string without any need to escape.' + actual = Svn2Git::Migration.escape_quotes(expected) +diff --git a/test/test_helper.rb b/test/test_helper.rb +index eac834b..9ae7650 100644 +--- a/test/test_helper.rb ++++ b/test/test_helper.rb +@@ -1,4 +1,11 @@ + $:.unshift "#{File.dirname(__FILE__)}/../lib" + + require 'svn2git' +-require 'test/unit' +\ No newline at end of file ++require 'minitest/autorun' ++ ++if Minitest.const_defined?('Test') ++ # We're on Minitest 5+. Nothing to do here. ++else ++ # Minitest 4 doesn't have Minitest::Test yet. ++ Minitest::Test = MiniTest::Unit::TestCase ++end +\ No newline at end of file +-- +1.8.5.3 + diff --git a/rubygem-svn2git.spec b/rubygem-svn2git.spec index 2e9d009..1b7e084 100644 --- a/rubygem-svn2git.spec +++ b/rubygem-svn2git.spec @@ -1,17 +1,21 @@ %global gem_name svn2git Name: rubygem-%{gem_name} -Version: 2.2.2 -Release: 2%{?dist} +Version: 2.2.5 +Release: 1%{?dist} Summary: A tool for migrating SVN projects to Git Group: Development/Languages License: MIT URL: https://github.com/nirvdrum/svn2git Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +# Minitest 5 support +# https://github.com/nirvdrum/svn2git/pull/160 +Patch0: rubygem-svn2git-2.2.5-minitest.patch Requires: ruby(release) Requires: ruby(rubygems) BuildRequires: ruby(release) BuildRequires: rubygems-devel +BuildRequires: rubygem(minitest) BuildArch: noarch Provides: rubygem(%{gem_name}) = %{version} @@ -48,6 +52,10 @@ rm VERSION.yml sed -i 's|"VERSION.yml",||' %{gem_name}.gemspec sed -i 's|"Rakefile",||' %{gem_name}.gemspec +# Minitest 5 support +# https://github.com/nirvdrum/svn2git/pull/160 +%patch0 -p1 + %build gem build %{gem_name}.gemspec @@ -63,13 +71,17 @@ mkdir -p %{buildroot}%{gem_dir} cp -pa .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ - mkdir -p %{buildroot}%{_bindir} cp -pa .%{_bindir}/* \ %{buildroot}%{_bindir}/ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x +%check +pushd .%{gem_instdir} + ruby -e 'Dir.glob "./test/*_test.rb", &method(:require)' +popd + %files %dir %{gem_instdir} %doc %{gem_instdir}/MIT-LICENSE @@ -83,8 +95,13 @@ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x %files doc %doc %{gem_docdir} %doc %{gem_instdir}/ChangeLog.markdown +%exclude %{gem_instdir}/test %changelog +* Tue Apr 08 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 2.2.5-1 +- Update to latest upstream version +- Patch for Minitest 5 support + * Sat Nov 23 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 2.2.2-2 - Remove Rakefile during %%prep - Move README to main binary package @@ -1 +1 @@ -dfcb2aca7b35d9a8f4b08e2b8dcbb0e7 svn2git-2.2.2.gem +2c13326098ac54df1c972564c5f646af svn2git-2.2.5.gem |