Update to diff-lcs 1.3.

This commit is contained in:
Vít Ondruch 2017-01-19 09:53:23 +01:00
parent 584ba335e8
commit 98554b58eb
4 changed files with 35 additions and 173 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
diff-lcs-1.1.2.gem
/diff-lcs-1.1.3.gem
/diff-lcs-1.2.5.gem
/diff-lcs-1.3.gem

View File

@ -1,129 +0,0 @@
From 0c945d34a2449143a0baf95e55dbcdc15a1b862a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Wed, 18 Feb 2015 18:59:22 +0100
Subject: [PATCH] Fix RSpec 3.x compatibility.
---
spec/issues_spec.rb | 4 ++--
spec/patch_spec.rb | 24 ++++++++++++------------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/spec/issues_spec.rb b/spec/issues_spec.rb
index c3d8f87..3b07e89 100644
--- a/spec/issues_spec.rb
+++ b/spec/issues_spec.rb
@@ -16,9 +16,9 @@ describe "Diff::LCS Issues" do
change_diff(correct_forward_diff).should == diff_s1_s2
expect do
Diff::LCS.patch(s1, diff_s1_s2).should == s2
- end.to_not raise_error(RuntimeError, /provided patchset/)
+ end.to_not raise_error
expect do
Diff::LCS.patch(s2, diff_s1_s2).should == s1
- end.to_not raise_error(RuntimeError, /provided patchset/)
+ end.to_not raise_error
end
end
diff --git a/spec/patch_spec.rb b/spec/patch_spec.rb
index 0fc9160..baf2388 100644
--- a/spec/patch_spec.rb
+++ b/spec/patch_spec.rb
@@ -192,13 +192,13 @@ describe "Diff::LCS.patch" do
it "should autodiscover s1 to s2 patches" do
expect do
Diff::LCS.patch(@s1, @patch_set_s1_s2).should == @s2
- end.to_not raise_error(RuntimeError, /provided patchset/)
+ end.to_not raise_error
end
it "should autodiscover s2 to s1 patches" do
expect do
Diff::LCS.patch(@s1, @patch_set_s2_s1).should == @s2
- end.to_not raise_error(RuntimeError, /provided patchset/)
+ end.to_not raise_error
end
it "should autodiscover s2 to s1 the left-to-right patches" do
@@ -230,13 +230,13 @@ describe "Diff::LCS.patch" do
it "should autodiscover s1 to s2 patches" do
expect do
Diff::LCS.patch(@s1, @patch_set_s1_s2).should == @s2
- end.to_not raise_error(RuntimeError, /provided patchset/)
+ end.to_not raise_error
end
it "should autodiscover s2 to s1 patches" do
expect do
Diff::LCS.patch(@s1, @patch_set_s2_s1).should == @s2
- end.to_not raise_error(RuntimeError, /provided patchset/)
+ end.to_not raise_error
end
it "should autodiscover s2 to s1 the left-to-right patches" do
@@ -268,13 +268,13 @@ describe "Diff::LCS.patch" do
it "should autodiscover s1 to s2 patches" do
expect do
Diff::LCS.patch(@s1, @patch_set_s1_s2).should == @s2
- end.to_not raise_error(RuntimeError, /provided patchset/)
+ end.to_not raise_error
end
it "should autodiscover s2 to s1 patches" do
expect do
Diff::LCS.patch(@s1, @patch_set_s2_s1).should == @s2
- end.to_not raise_error(RuntimeError, /provided patchset/)
+ end.to_not raise_error
end
it "should autodiscover s2 to s1 the left-to-right patches" do
@@ -306,13 +306,13 @@ describe "Diff::LCS.patch" do
it "should autodiscover s1 to s2 patches" do
expect do
Diff::LCS.patch(@s1, @patch_set_s1_s2).should == @s2
- end.to_not raise_error(RuntimeError, /provided patchset/)
+ end.to_not raise_error
end
it "should autodiscover s2 to s1 patches" do
expect do
Diff::LCS.patch(@s1, @patch_set_s2_s1).should == @s2
- end.to_not raise_error(RuntimeError, /provided patchset/)
+ end.to_not raise_error
end
it "should autodiscover s2 to s1 the left-to-right patches" do
@@ -344,13 +344,13 @@ describe "Diff::LCS.patch" do
it "should autodiscover s1 to s2 patches" do
expect do
Diff::LCS.patch(@s1, @patch_set_s1_s2).should == @s2
- end.to_not raise_error(RuntimeError, /provided patchset/)
+ end.to_not raise_error
end
it "should autodiscover s2 to s1 patches" do
expect do
Diff::LCS.patch(@s1, @patch_set_s2_s1).should == @s2
- end.to_not raise_error(RuntimeError, /provided patchset/)
+ end.to_not raise_error
end
it "should autodiscover s2 to s1 the left-to-right patches" do
@@ -382,13 +382,13 @@ describe "Diff::LCS.patch" do
it "should autodiscover s1 to s2 patches" do
expect do
Diff::LCS.patch(@s1, @patch_set_s1_s2).should == @s2
- end.to_not raise_error(RuntimeError, /provided patchset/)
+ end.to_not raise_error
end
it "should autodiscover s2 to s1 patches" do
expect do
Diff::LCS.patch(@s1, @patch_set_s2_s1).should == @s2
- end.to_not raise_error(RuntimeError, /provided patchset/)
+ end.to_not raise_error
end
it "should autodiscover s2 to s1 the left-to-right patches" do
--
2.1.0

View File

@ -2,87 +2,75 @@
# %%check section needs rspec-expectations, however rspec-expectations depends
# on diff-lcs.
%{!?need_bootstrap: %global need_bootstrap 0}
%{!?_with_bootstrap: %global bootstrap 0}
Summary: Provide a list of changes between two sequenced collections
Name: rubygem-%{gem_name}
Version: 1.2.5
Release: 5%{?dist}
Version: 1.3
Release: 1%{?dist}
Summary: Provide a list of changes between two sequenced collections
Group: Development/Languages
#lib/diff/lcs.rb is Artistic or Ruby or BSD
#lib/diff/lcs/*.rb is GPLv2+ or Artistic or Ruby or BSD
#License.rdoc states GPLv2+ or Artistic or MIT
License: (GPLv2+ or Artistic or MIT) and (GPLv2+ or Artistic or Ruby or BSD) and (Artistic or Ruby or BSD)
License: GPLv2+ or Artistic or MIT
URL: https://github.com/halostatue/diff-lcs
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# Make test suite RSpec 3.x compatible.
# https://github.com/halostatue/diff-lcs/pull/32
Patch0: rubygem-diff-lcs-1.2.5-Fix-RSpec-3.x-compatibility.patch
BuildRequires: rubygems-devel
%if 0%{?need_bootstrap} < 1
%if ! 0%{?bootstrap}
BuildRequires: rubygem(rspec)
%endif
BuildRequires: ruby(release)
BuildArch: noarch
%description
Diff::LCS is a port of Algorithm::Diff that uses the McIlroy-Hunt longest
common subsequence (LCS) algorithm to compute intelligent differences between
two sequenced enumerable containers. The implementation is based on Mario I.
Wolczko's Smalltalk version (1.2, 1993) and Ned Konz's Perl version
(Algorithm::Diff).
Diff::LCS computes the difference between two Enumerable sequences using the
McIlroy-Hunt longest common subsequence (LCS) algorithm. It includes utilities
to create a simple HTML diff output format and a standard diff-like tool.
%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
This package contains documentation for %{name}.
Documentation for %{name}.
%prep
%setup -q -c -T
%gem_install -n %{SOURCE0}
pushd .%{gem_instdir}
%patch0 -p1
popd
%build
%install
mkdir -p %{buildroot}%{gem_dir}
mkdir -p %{buildroot}/%{_bindir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}
cp -a .%{_bindir}/* %{buildroot}/%{_bindir}
find %{buildroot}%{gem_instdir}/bin -type f |xargs chmod a+x
mkdir -p %{buildroot}%{_bindir}
cp -pa .%{_bindir}/* \
%{buildroot}%{_bindir}/
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
# Fix shebangs.
sed -i 's|^#!.*|#!/usr/bin/ruby|' %{buildroot}%{gem_instdir}/bin/{htmldiff,ldiff}
%if 0%{?need_bootstrap} < 1
%if ! 0%{?bootstrap}
%check
pushd .%{gem_instdir}
# https://github.com/halostatue/diff-lcs/issues/1
sed -i '/Diff::LCS.patch(s1, diff_s1_s2).should == s2/ s/^/#/' spec/issues_spec.rb
# https://github.com/halostatue/diff-lcs/issues/33
rspec -rdiff/lcs -rdiff/lcs/hunk spec
rspec spec
popd
%endif
%files
%{_bindir}/ldiff
%{_bindir}/htmldiff
%dir %{gem_instdir}
%{_bindir}/htmldiff
%{_bindir}/ldiff
%exclude %{gem_instdir}/.*
%doc %{gem_instdir}/License.rdoc
%doc %{gem_instdir}/docs
%license %{gem_instdir}/License.md
%license %{gem_instdir}/docs
%{gem_instdir}/bin
%{gem_libdir}
%exclude %{gem_cache}
@ -90,17 +78,19 @@ popd
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/Contributing.rdoc
%doc %{gem_instdir}/History.rdoc
%doc %{gem_instdir}/Code-of-Conduct.md
%doc %{gem_instdir}/Contributing.md
%doc %{gem_instdir}/History.md
%doc %{gem_instdir}/Manifest.txt
%{gem_instdir}/Gemfile
%{gem_instdir}/Rakefile
%doc %{gem_instdir}/README.rdoc
%{gem_instdir}/autotest
%doc %{gem_instdir}/README.rdoc
%{gem_instdir}/Rakefile
%{gem_instdir}/spec
%changelog
* Thu Jan 19 2017 Vít Ondruch <vondruch@redhat.com> - 1.3-1
- Update to diff-lcs 1.3.
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

View File

@ -1 +1 @@
7172cb271324fa944d9fbea5fe1f7344 diff-lcs-1.2.5.gem
SHA512 (diff-lcs-1.3.gem) = b82de390d22e0c1337ddca923621b1cc842f583a93953ef07a303b428fe3a389f8a4a1a63617a58136c8d6215aff025a3bbec2a2f618e9ea81f471964f93b078