]> git.pld-linux.org Git - packages/ruby-safe_yaml.git/commitdiff
package docs, add tests
authorElan Ruusamäe <glen@delfi.ee>
Wed, 25 Sep 2013 17:31:06 +0000 (20:31 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 25 Sep 2013 17:31:06 +0000 (20:31 +0300)
ruby-safe_yaml.spec

index e8c85618d76adc81ef298fb9b1740f890be42d79..cc7238945df38b08b4f04d0717da3c3a5aef4f47 100644 (file)
@@ -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
This page took 0.093047 seconds and 4 git commands to generate.