[rubygem-formatador] Updated to 0.2.1
Bohuslav Kabrda
bkabrda at fedoraproject.org
Thu Oct 20 11:23:51 UTC 2011
commit e1206908aaa66adbe62a7da9b53783a824832f3e
Author: Bohuslav Kabrda <bkabrda at redhat.com>
Date: Thu Oct 20 13:23:05 2011 +0200
Updated to 0.2.1
.gitignore | 1 +
...atador-fix-tests-when-redirecting-to-file.patch | 59 ++++++++++++++++++++
rubygem-formatador.spec | 40 ++++++++++++-
sources | 2 +-
4 files changed, 97 insertions(+), 5 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0bc5df9..edacf19 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/formatador-0.1.4.gem
+/formatador-0.2.1.gem
diff --git a/formatador-fix-tests-when-redirecting-to-file.patch b/formatador-fix-tests-when-redirecting-to-file.patch
new file mode 100644
index 0000000..918fcb3
--- /dev/null
+++ b/formatador-fix-tests-when-redirecting-to-file.patch
@@ -0,0 +1,59 @@
+diff -ru ../rubygem-formatador-0.2.1.orig/usr/lib/ruby/gems/1.8/gems/formatador-0.2.1/tests/basic_tests.rb ./usr/lib/ruby/gems/1.8/gems/formatador-0.2.1/tests/basic_tests.rb
+--- ../rubygem-formatador-0.2.1.orig/usr/lib/ruby/gems/1.8/gems/formatador-0.2.1/tests/basic_tests.rb 2011-10-17 08:23:00.000000000 +0200
++++ ./usr/lib/ruby/gems/1.8/gems/formatador-0.2.1/tests/basic_tests.rb 2011-10-20 12:57:31.810397680 +0200
+@@ -10,6 +10,7 @@
+ one
+ two
+ OUTPUT
++output = Formatador.parse(output)
+
+ tests("#display_lines(['one', 'two']").returns(output) do
+ capture_stdout do
+Only in ./usr/lib/ruby/gems/1.8/gems/formatador-0.2.1/tests: basic_tests.rb~
+diff -ru ../rubygem-formatador-0.2.1.orig/usr/lib/ruby/gems/1.8/gems/formatador-0.2.1/tests/table_tests.rb ./usr/lib/ruby/gems/1.8/gems/formatador-0.2.1/tests/table_tests.rb
+--- ../rubygem-formatador-0.2.1.orig/usr/lib/ruby/gems/1.8/gems/formatador-0.2.1/tests/table_tests.rb 2011-10-17 08:23:00.000000000 +0200
++++ ./usr/lib/ruby/gems/1.8/gems/formatador-0.2.1/tests/table_tests.rb 2011-10-20 12:58:33.930398612 +0200
+@@ -2,13 +2,14 @@
+
+ output = <<-OUTPUT
+ +---+
+- | \e[1ma\e[0m |
++ | [bold]a[/] |
+ +---+
+ | 1 |
+ +---+
+ | 2 |
+ +---+
+ OUTPUT
++output = Formatador.parse(output)
+
+ tests("#display_table([{:a => 1}, {:a => 2}])").returns(output) do
+ capture_stdout do
+@@ -18,10 +19,11 @@
+
+ output = <<-OUTPUT
+ +--------+
+- | \e[1mheader\e[0m |
++ | [bold]header[/] |
+ +--------+
+ +--------+
+ OUTPUT
++output = Formatador.parse(output)
+
+ tests("#display_table([], [:header])").returns(output) do
+ capture_stdout do
+@@ -31,11 +33,12 @@
+
+ output = <<-OUTPUT
+ +--------+
+- | \e[1mheader\e[0m |
++ | [bold]header[/] |
+ +--------+
+ | |
+ +--------+
+ OUTPUT
++output = Formatador.parse(output)
+
+ tests("#display_table([{:a => 1}], [:header])").returns(output) do
+ capture_stdout do
+Only in ./usr/lib/ruby/gems/1.8/gems/formatador-0.2.1/tests: table_tests.rb~
diff --git a/rubygem-formatador.spec b/rubygem-formatador.spec
index 5089d5c..1a98be2 100644
--- a/rubygem-formatador.spec
+++ b/rubygem-formatador.spec
@@ -4,20 +4,32 @@
Summary: Ruby STDOUT text formatting
Name: rubygem-%{gemname}
-Version: 0.1.4
-Release: 2%{?dist}
+Version: 0.2.1
+Release: 1%{?dist}
Group: Development/Languages
License: MIT
URL: http://github.com/geemus/%{gemname}
Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem
+# TODO: Fix tests failing when redirected to a file, reported at
+# https://github.com/geemus/formatador/commit/a874311f52a34b9a1f1d0fe9fef20a095b79f941
+Patch0: formatador-fix-tests-when-redirecting-to-file.patch
Requires: rubygems
BuildRequires: rubygems
+BuildRequires: rubygem(shindo)
BuildArch: noarch
Provides: rubygem(%{gemname}) = %{version}
%description
STDOUT text formatting
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+
+%description doc
+Documentation for %{name}
+
%prep
%setup -q -c -T
@@ -25,6 +37,8 @@ mkdir -p .%{gemdir}
gem install --local --install-dir .%{gemdir} \
--force --rdoc %{SOURCE0}
+%patch0
+
%build
%install
@@ -32,16 +46,34 @@ rm -rf %{buildroot}
mkdir -p %{buildroot}%{gemdir}
cp -a .%{gemdir}/* %{buildroot}%{gemdir}/
+%check
+pushd .%{geminstdir}
+# fix "uninitialized constant StringIO" until its in the gem, as reported in https://github.com/geemus/formatador/issues/5
+sed -i "1i\require 'stringio'" tests/tests_helper.rb
+shindo
+popd
%files
-%{gemdir}/gems/%{gemname}-%{version}/
-%doc %{gemdir}/doc/%{gemname}-%{version}
+%dir %{geminstdir}
%doc %{geminstdir}/README.rdoc
+%{geminstdir}/lib
%{gemdir}/cache/%{gemname}-%{version}.gem
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+%files doc
+%doc %{gemdir}/doc/%{gemname}-%{version}
+%{geminstdir}/Gemfile
+%{geminstdir}/Rakefile
+%{geminstdir}/tests
+%{geminstdir}/formatador.gemspec
%changelog
+* Wed Oct 12 2011 Bohuslav Kabrda <bkabrda at redhat.com> - 0.2.1-1
+- Update to 0.2.1
+- Added check section
+- Introduced doc subpackage
+- Added tests patch for the case when output is redirected to a file (would fail in mock and koji)
+
* Thu Jul 21 2011 Chris Lalancette <clalance at redhat.com> - 0.1.4-2
- Remove bogus shindo and rake dependencies
diff --git a/sources b/sources
index dd48cae..c0cb067 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-e963ca8942024970437d09b70aca7595 formatador-0.1.4.gem
+50e9fd2e7b31a2e6e0f77e8f041fe2f1 formatador-0.2.1.gem
More information about the scm-commits
mailing list