From 362aae0b66108e800cb23d7e67d379794d39ce70 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 25 Sep 2013 20:31:06 +0300 Subject: [PATCH] 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 -- 2.44.0