|
|
@ -2,15 +2,15 @@
|
|
|
|
%global gem_name multi_json
|
|
|
|
%global gem_name multi_json
|
|
|
|
|
|
|
|
|
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
Version: 1.13.1
|
|
|
|
Version: 1.14.1
|
|
|
|
Release: 5%{?dist}
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: A common interface to multiple JSON libraries
|
|
|
|
Summary: A common interface to multiple JSON libraries
|
|
|
|
License: MIT
|
|
|
|
License: MIT
|
|
|
|
URL: http://github.com/intridea/multi_json
|
|
|
|
URL: https://github.com/intridea/multi_json
|
|
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
|
|
# git clone https://github.com/intridea/multi_json.git && cd multi_json
|
|
|
|
# git clone https://github.com/intridea/multi_json.git && cd multi_json
|
|
|
|
# git checkout v1.13.1 && tar czvf multi_json-1.13.1-tests.tgz ./spec/
|
|
|
|
# git archive -v -o multi_json-1.14.1-spec.tar.gz v1.14.1 spec/
|
|
|
|
Source1: %{gem_name}-%{version}-tests.tgz
|
|
|
|
Source1: %{gem_name}-%{version}-spec.tar.gz
|
|
|
|
BuildRequires: ruby(release)
|
|
|
|
BuildRequires: ruby(release)
|
|
|
|
BuildRequires: rubygems-devel >= 1.3.5
|
|
|
|
BuildRequires: rubygems-devel >= 1.3.5
|
|
|
|
BuildRequires: ruby
|
|
|
|
BuildRequires: ruby
|
|
|
@ -35,12 +35,16 @@ BuildArch: noarch
|
|
|
|
%description doc
|
|
|
|
%description doc
|
|
|
|
Documentation for %{name}.
|
|
|
|
Documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%setup -q -c -T
|
|
|
|
%setup -q -n %{gem_name}-%{version} -b 1
|
|
|
|
%gem_install -n %{SOURCE0}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|
|
|
|
|
# Create the gem as gem install only works on a gem file
|
|
|
|
|
|
|
|
gem build ../%{gem_name}-%{version}.gemspec
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
|
|
|
|
|
|
|
|
# by default, so that we can move it into the buildroot in %%install
|
|
|
|
|
|
|
|
%gem_install
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
|
@ -49,22 +53,20 @@ cp -a .%{gem_dir}/* \
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
%check
|
|
|
|
pushd .%{gem_instdir}
|
|
|
|
pushd .%{gem_instdir}
|
|
|
|
tar xf %{SOURCE1}
|
|
|
|
ln -s %{_builddir}/spec spec
|
|
|
|
|
|
|
|
|
|
|
|
# oj is not available on Fedora.
|
|
|
|
# oj is not available on Fedora.
|
|
|
|
sed -i '138,165 s/^/#/' spec/multi_json_spec.rb
|
|
|
|
|
|
|
|
sed -i "/expect(MultiJson.adapter.to_s).to eq('MultiJson::Adapters::Oj')/ s/Oj/JsonGem/" spec/multi_json_spec.rb
|
|
|
|
sed -i "/expect(MultiJson.adapter.to_s).to eq('MultiJson::Adapters::Oj')/ s/Oj/JsonGem/" spec/multi_json_spec.rb
|
|
|
|
|
|
|
|
|
|
|
|
# Execute main test suite.
|
|
|
|
# Execute main test suite.
|
|
|
|
rspec spec/{multi_json,options_cache}_spec.rb
|
|
|
|
SKIP_ADAPTERS=jr_jackson rspec spec/{multi_json,options_cache}_spec.rb
|
|
|
|
|
|
|
|
|
|
|
|
# Disable test of engines unsupported on Fedora (they may cause test suite to
|
|
|
|
#rm spec/{oj,yajl}_adapter_spec.rb
|
|
|
|
# exit).
|
|
|
|
|
|
|
|
rm spec/{oj,yajl}_adapter_spec.rb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Adapters have to be tested separately.
|
|
|
|
# Adapters have to be tested separately, but disable test of engines
|
|
|
|
|
|
|
|
# unsupported on Fedora (they may cause test suite to fail).
|
|
|
|
for adapter in spec/*_adapter_spec.rb; do
|
|
|
|
for adapter in spec/*_adapter_spec.rb; do
|
|
|
|
rspec $adapter
|
|
|
|
SKIP_ADAPTERS=gson,jr_jackson,nsjsonserialization,oj,yajl rspec $adapter
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
popd
|
|
|
|
popd
|
|
|
@ -83,6 +85,9 @@ popd
|
|
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
|
|
|
|
* Wed Apr 15 2020 Vít Ondruch <vondruch@redhat.com> - 1.14.1-1
|
|
|
|
|
|
|
|
- Update to MultiJSON 1.14.1.
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.1-5
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.1-5
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|