From c3b3f810b04dc0ccf32835740fa3eb9398a08f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 15 Apr 2020 19:57:25 +0200 Subject: [PATCH] Update to MultiJSON 1.14.1. --- .gitignore | 2 ++ rubygem-multi_json.spec | 37 +++++++++++++++++++++---------------- sources | 4 ++-- 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index 34e7c2f..550f39d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ /multi_json-1.12.1.gem /multi_json-1.13.1-tests.tgz /multi_json-1.13.1.gem +/multi_json-1.14.1-spec.tar.gz +/multi_json-1.14.1.gem diff --git a/rubygem-multi_json.spec b/rubygem-multi_json.spec index ed49ada..2ec37b9 100644 --- a/rubygem-multi_json.spec +++ b/rubygem-multi_json.spec @@ -2,15 +2,15 @@ %global gem_name multi_json Name: rubygem-%{gem_name} -Version: 1.13.1 -Release: 5%{?dist} +Version: 1.14.1 +Release: 1%{?dist} Summary: A common interface to multiple JSON libraries 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 # 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/ -Source1: %{gem_name}-%{version}-tests.tgz +# git archive -v -o multi_json-1.14.1-spec.tar.gz v1.14.1 spec/ +Source1: %{gem_name}-%{version}-spec.tar.gz BuildRequires: ruby(release) BuildRequires: rubygems-devel >= 1.3.5 BuildRequires: ruby @@ -35,12 +35,16 @@ BuildArch: noarch %description doc Documentation for %{name}. - %prep -%setup -q -c -T -%gem_install -n %{SOURCE0} +%setup -q -n %{gem_name}-%{version} -b 1 %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 mkdir -p %{buildroot}%{gem_dir} @@ -49,22 +53,20 @@ cp -a .%{gem_dir}/* \ %check pushd .%{gem_instdir} -tar xf %{SOURCE1} +ln -s %{_builddir}/spec spec # 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 # 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 -# exit). -rm spec/{oj,yajl}_adapter_spec.rb +#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 - rspec $adapter + SKIP_ADAPTERS=gson,jr_jackson,nsjsonserialization,oj,yajl rspec $adapter done popd @@ -83,6 +85,9 @@ popd %doc %{gem_instdir}/README.md %changelog +* Wed Apr 15 2020 Vít Ondruch - 1.14.1-1 +- Update to MultiJSON 1.14.1. + * Thu Jan 30 2020 Fedora Release Engineering - 1.13.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index 091c2cb..379d830 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (multi_json-1.13.1-tests.tgz) = 1dfb322eff32fbac9c5d9ec063cd02c76626a9b4259223c5323618273dd64905ae930bcc5751fbca7f5e123482347eddae6dca95fa9e96518fdfbb3b02cb03ff -SHA512 (multi_json-1.13.1.gem) = 9fbb4cbbd462528eb1d8f361615a4106c29fa7125a15edae9ce5873da2b34396522e3ad4272ec8bef87cb0ea946d2d4a1f2c863dae3806388880ac7c83b1fb63 +SHA512 (multi_json-1.14.1-spec.tar.gz) = 55012bfa41601309cad423d350f65a407cbe6fb213530f62ee37b3546f4c90584cf29d2fd450e9d57811fee67421ea7a5027a0985c3d203cee35aca39b642112 +SHA512 (multi_json-1.14.1.gem) = 9d9ccc2876f6b3191241d14e556c463fbf273ad3831921fde43107810c03a6623929711fcf48acd7b4b5758286d1fb8b4b6be8ece6d1f137f6c3d64db58a7927