This commit is contained in:
Mamoru TASAKA 2017-03-13 15:35:28 +09:00
commit d5e24621d6
4 changed files with 36 additions and 7 deletions

2
.gitignore vendored
View file

@ -2,3 +2,5 @@ parseconfig-0.5.2.gem
/parseconfig-1.0.2.gem
/rubygem-parseconfig-1.0.2-tests.tgz
/parseconfig-1.0.4.gem
/parseconfig-1.0.8.gem
/rubygem-parseconfig-1.0.8-tests.tar.gz

View file

@ -0,0 +1,20 @@
#!/bin/bash
set -x
set -e
ORIGDIR=$(pwd)
TMPDIR=$(mktemp -d /var/tmp/parseconfig-XXXXXX)
pushd $TMPDIR
git clone https://github.com/datafolklabs/ruby-parseconfig.git
pushd ruby-parseconfig
VERSION=$(cat lib/parseconfig.rb | sed -n -e "s|^.*Version.*=.*'\(.*\)'|\1|p")
TARGZ=rubygem-parseconfig-${VERSION}-tests.tar.gz
tar czf $TARGZ tests/
mv $TARGZ $ORIGDIR
popd
rm -rf $TMPDIR

View file

@ -1,13 +1,16 @@
%global gem_name parseconfig
Name: rubygem-%{gem_name}
Version: 1.0.4
Release: 6%{?dist}
Version: 1.0.8
Release: 1%{?dist}
Summary: Config File Parser for Standard Unix/Linux Type Config Files
License: MIT
URL: http://github.com/datafolklabs/ruby-parseconfig/
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: rubygem-parseconfig-%{version}-tests.tar.gz
# Source1 is created by Source2
Source2: parseconfig-create-test-suite.sh
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
@ -28,7 +31,7 @@ Documentation for %{name}.
%prep
gem unpack %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version}
%setup -q -D -T -n %{gem_name}-%{version} -a 1
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%build
@ -46,9 +49,9 @@ rm -rf \
%{nil}
%check
pushd .%{gem_instdir}
popd
cd tests
ruby ./test_parseconfig.rb
cd ..
%files
%dir %{gem_instdir}
@ -62,6 +65,9 @@ popd
%doc %{gem_docdir}
%changelog
* Mon Mar 13 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.0.8-1
- 1.0.8
* Mon Mar 13 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.0.4-6
- Rewrite spec, update to the modern style

View file

@ -1 +1,2 @@
e0d058cf3d28058cb07b7f951279c80c parseconfig-1.0.4.gem
SHA512 (parseconfig-1.0.8.gem) = 81180248b992288b6223bee6cbc04bd6d8f740e31e79b8fbb643e3ad296dc0a11e8acc523dea8097a9d1e4c25c46087d8780609e0e4916f90cbdf0132a31c1ae
SHA512 (rubygem-parseconfig-1.0.8-tests.tar.gz) = bb2a7393574289c0422cd1c518fdc43e0958d5f2db9b3d6ce273375dc6afc745fe1e22357981f38436bc2717d2f7876257bd8e6a7890c3381dedc87c11cada9e