diff --git a/.gitignore b/.gitignore index bc37627..8cdcc1f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /multi_json-1.3.6.gem /multi_json-1.7.1.gem /multi_json-1.7.7.gem +/multi_json-1.8.4.gem diff --git a/rubygem-multi_json.spec b/rubygem-multi_json.spec index 30034f4..863e1b8 100644 --- a/rubygem-multi_json.spec +++ b/rubygem-multi_json.spec @@ -1,32 +1,32 @@ # Generated from multi_json-1.0.3.gem by gem2rpm -*- rpm-spec -*- %global gem_name multi_json - -Summary: A gem to provide swappable JSON backends Name: rubygem-%{gem_name} -Version: 1.7.7 -Release: 2%{?dist} +Version: 1.8.4 +Release: 1%{?dist} +Summary: A common interface to multiple JSON libraries Group: Development/Languages License: MIT URL: http://github.com/intridea/multi_json -Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Requires: ruby(release) Requires: ruby(rubygems) >= 1.3.6 BuildRequires: ruby(release) BuildRequires: rubygems-devel >= 1.3.6 -BuildRequires: ruby +#BuildRequires: ruby BuildRequires: rubygem(rspec) -BuildRequires: rubygem(json) +#BuildRequires: rubygem(json) BuildRequires: rubygem(json_pure) BuildArch: noarch Provides: rubygem(%{gem_name}) = %{version} # OkJson is allowed to be bundled: # https://fedorahosted.org/fpc/ticket/113 -Provides: bundled(okjson) = 42 +Provides: bundled(okjson) = 43 %description -A gem to provide swappable JSON backends utilizing Yajl::Ruby, the JSON gem, -JSON pure, or a vendored version of okjson. +A common interface to multiple JSON libraries, including Oj, Yajl, the JSON +gem (with C-extensions), the pure-Ruby JSON gem, NSJSONSerialization, gson.rb, +JrJackson, and OkJson. %package doc @@ -47,26 +47,32 @@ Documentation for %{name} %install mkdir -p %{buildroot}%{gem_dir} -cp -a .%{gem_dir}/* \ +cp -pa .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check pushd .%{gem_instdir} -# simplecov gem is not available in Fedora so remove its usage -sed -i "/require 'simplecov'/,/end$/{s/^/#/}" spec/helper.rb +# We don't care about coverage. +sed -i "/require 'simplecov'/,/end$/{s/^/#/}" spec/spec_helper.rb + +## oj is not available on Fedora. +sed -i '131,158 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 -# oj is not available on Fedora. -sed -i '148,174 s/^/#/' spec/multi_json_spec.rb -sed -i '/expect(MultiJson.adapter).to eq MultiJson::Adapters::Oj/{s/Oj/JsonGem/}' spec/multi_json_spec.rb -sed -i 's/oj / /' spec/multi_json_spec.rb +# Execute main test suite. +rspec spec/multi_json_spec.rb -# ruby-yajl is not available on Fedora yet. -# https://bugzilla.redhat.com/show_bug.cgi?id=823351 -sed -i 's/ yajl//' spec/multi_json_spec.rb +# Disable test of engines unsupported on Fedora (they may cause test suite to +# exit). +rm spec/{gson,jr_jackson,nsjsonserialization,oj,yajl}_adapter_spec.rb + +# Adapters have to be tested separately. +for adapter in spec/*_adapter_spec.rb; do + # Prevents "dump encoding" testsuite error. + # https://github.com/intridea/multi_json/issues/126 + LANG=en_US.utf8 rspec $adapter || exit +done -# Prevents "dump encoding" testsuite error. -# https://github.com/intridea/multi_json/issues/126 -LANG=en_US.utf8 rspec spec popd %files @@ -89,6 +95,9 @@ popd %changelog +* Wed Feb 12 2014 Vít Ondruch - 1.8.4-1 +- Update to multi_json 1.8.4. + * Sun Aug 04 2013 Fedora Release Engineering - 1.7.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild diff --git a/sources b/sources index 4a22fbb..c7369f4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5a4c477d522fe376cead96d855779c73 multi_json-1.7.7.gem +5040903eb3f0c338c4d6b46fdc66ea7a multi_json-1.8.4.gem