[packages/ruby-safe_yaml] package docs, add tests

glen glen at pld-linux.org
Wed Sep 25 19:31:18 CEST 2013


commit 362aae0b66108e800cb23d7e67d379794d39ce70
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Sep 25 20:31:06 2013 +0300

    package docs, add tests

 ruby-safe_yaml.spec | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
---
diff --git a/ruby-safe_yaml.spec b/ruby-safe_yaml.spec
index e8c8561..cc72389 100644
--- a/ruby-safe_yaml.spec
+++ b/ruby-safe_yaml.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_with	tests		# build without tests
+
 %define	pkgname	safe_yaml
 Summary:	Parse YAML safely
 Name:		ruby-%{pkgname}
@@ -10,6 +14,13 @@ Source0:	http://rubygems.org/downloads/%{pkgname}-%{version}.gem
 URL:		http://dtao.github.com/safe_yaml/
 BuildRequires:	rpm-rubyprov
 BuildRequires:	rpmbuild(macros) >= 1.656
+%if %{with tests}
+BuildRequires:	ruby-hashie
+BuildRequires:	ruby-heredoc_unindent
+BuildRequires:	ruby-ostruct
+BuildRequires:	ruby-rspec
+BuildRequires:	ruby-yaml
+%endif
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -20,6 +31,11 @@ vulnerability
 %prep
 %setup -q -n %{pkgname}-%{version}
 
+%build
+%if %{with tests}
+rspec -Ilib spec
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{ruby_vendorlibdir}
@@ -30,5 +46,6 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
+%doc README.md CHANGES.md LICENSE.txt
 %{ruby_vendorlibdir}/safe_yaml.rb
 %{ruby_vendorlibdir}/safe_yaml
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ruby-safe_yaml.git/commitdiff/362aae0b66108e800cb23d7e67d379794d39ce70



More information about the pld-cvs-commit mailing list