diff options
author | Elan Ruusamäe | 2013-11-20 12:33:33 (GMT) |
---|---|---|
committer | Elan Ruusamäe | 2013-11-20 12:33:33 (GMT) |
commit | 2273cb27f2c2d7f87ec997d757714c96edb6ba40 (patch) | |
tree | efd9b7f98999fb254db65b734abbeb5e3191cfce | |
download | ruby-diffy-2273cb27f2c2d7f87ec997d757714c96edb6ba40.zip ruby-diffy-2273cb27f2c2d7f87ec997d757714c96edb6ba40.tar.gz |
created with gem2rpm
-rw-r--r-- | diff-path.patch | 11 | ||||
-rw-r--r-- | ruby-diffy.spec | 61 |
2 files changed, 72 insertions, 0 deletions
diff --git a/diff-path.patch b/diff-path.patch new file mode 100644 index 0000000..e40431b --- /dev/null +++ b/diff-path.patch @@ -0,0 +1,11 @@ +--- diffy-3.0.1/lib/diffy/diff.rb~ 2013-11-20 14:29:33.000000000 +0200 ++++ diffy-3.0.1/lib/diffy/diff.rb 2013-11-20 14:31:57.975996472 +0200 +@@ -123,7 +123,7 @@ + end + private + +- @@bin = nil ++ @@bin = "/usr/bin/diff" + def diff_bin + return @@bin if @@bin + diff --git a/ruby-diffy.spec b/ruby-diffy.spec new file mode 100644 index 0000000..141a740 --- /dev/null +++ b/ruby-diffy.spec @@ -0,0 +1,61 @@ +# +# Conditional build: +%bcond_with tests # build without tests + +%define pkgname diffy +Summary: Easy Diffing in Ruby +Name: ruby-%{pkgname} +Version: 3.0.1 +Release: 1 +License: MIT +Group: Development/Languages +Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem +# Source0-md5: 073f71cb2d294e03235ecbe527ec43a3 +Patch0: diff-path.patch +URL: https://github.com/samg/diffy +BuildRequires: rpm-rubyprov +BuildRequires: rpmbuild(macros) >= 1.656 +%if %{with tests} +BuildRequires: ruby-rake < 0.10 +BuildRequires: ruby-rake >= 0.9.2 +BuildRequires: ruby-rspec < 3 +BuildRequires: ruby-rspec >= 2.0 +%endif +Requires: diffutils +BuildArch: noarch +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +A convenient way to diff string in Ruby. + +Provides a convenient way to generate a diff from two strings or +files. Instead of reimplementing the LCS diff algorithm Diffy uses +battle tested Unix diff to generate diffs, and focuses on providing a +convenient interface, and getting out of your way. + +Supported Formats +- text - Plain text output +- color - ANSI colorized text suitable for use in a terminal +- html - HTML output. Since version 2.0 this format does inline + highlighting of the character changes between lines. +- html_simple - HTML output without inline highlighting. This may be + useful in situations where high performance is required or simpler + output is desired. + +%prep +%setup -q -n %{pkgname}-%{version} +%patch0 -p1 + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT%{ruby_vendorlibdir} +cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%doc README.md CHANGELOG CONTRIBUTORS LICENSE +%{ruby_vendorlibdir}/%{pkgname}.rb +%{ruby_vendorlibdir}/%{pkgname} |