|
|
358d24 |
%{!?scl:%global pkg_name %{name}}
|
|
|
358d24 |
%{?scl:%scl_package rubygem-%{gem_name}}
|
|
|
358d24 |
# Generated from multi_json-1.0.3.gem by gem2rpm -*- rpm-spec -*-
|
|
|
358d24 |
%global gem_name multi_json
|
|
|
358d24 |
|
|
|
358d24 |
Summary: A common interface to multiple JSON libraries
|
|
|
358d24 |
Name: %{?scl_prefix}rubygem-%{gem_name}
|
|
|
358d24 |
Version: 1.8.4
|
|
|
358d24 |
Release: 2%{?dist}
|
|
|
358d24 |
Group: Development/Languages
|
|
|
358d24 |
License: MIT
|
|
|
358d24 |
URL: http://github.com/intridea/multi_json
|
|
|
358d24 |
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
|
358d24 |
Requires: %{?scl_prefix_ruby}ruby(release)
|
|
|
358d24 |
Requires: %{?scl_prefix_ruby}ruby(rubygems)
|
|
|
358d24 |
Requires: %{?scl_prefix_ruby}ruby
|
|
|
358d24 |
BuildRequires: %{?scl_prefix_ruby}ruby(release)
|
|
|
358d24 |
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
|
|
|
358d24 |
BuildRequires: %{?scl_prefix_ruby}ruby
|
|
|
358d24 |
BuildRequires: %{?scl_prefix_ruby}rubygem(json)
|
|
|
358d24 |
# json_pure won't be in the collection
|
|
|
358d24 |
#BuildRequires: %%{?scl_prefix}rubygem(json_pure)
|
|
|
358d24 |
BuildRequires: %{?scl_prefix}rubygem(rspec)
|
|
|
358d24 |
BuildArch: noarch
|
|
|
358d24 |
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
|
|
|
358d24 |
# OkJson is allowed to be bundled:
|
|
|
358d24 |
# https://fedorahosted.org/fpc/ticket/113
|
|
|
358d24 |
Provides: bundled(okjson) = 43
|
|
|
358d24 |
|
|
|
358d24 |
%description
|
|
|
358d24 |
A common interface to multiple JSON libraries, including Oj, Yajl, the JSON
|
|
|
358d24 |
gem (with C-extensions), the pure-Ruby JSON gem, NSJSONSerialization, gson.rb,
|
|
|
358d24 |
JrJackson, and OkJson.
|
|
|
358d24 |
|
|
|
358d24 |
%package doc
|
|
|
358d24 |
Summary: Documentation for %{pkg_name}
|
|
|
358d24 |
Group: Documentation
|
|
|
358d24 |
Requires: %{?scl:%scl_prefix}%{pkg_name} = %{version}-%{release}
|
|
|
358d24 |
BuildArch: noarch
|
|
|
358d24 |
|
|
|
358d24 |
%description doc
|
|
|
358d24 |
Documentation for %{pkg_name}
|
|
|
358d24 |
|
|
|
358d24 |
|
|
|
358d24 |
%prep
|
|
|
358d24 |
%setup -q -c -T
|
|
|
358d24 |
%{?scl:scl enable %{scl} - << \EOF}
|
|
|
358d24 |
%gem_install -n %{SOURCE0}
|
|
|
358d24 |
%{?scl:EOF}
|
|
|
358d24 |
|
|
|
358d24 |
%build
|
|
|
358d24 |
|
|
|
358d24 |
%install
|
|
|
358d24 |
mkdir -p %{buildroot}%{gem_dir}
|
|
|
358d24 |
cp -a .%{gem_dir}/* \
|
|
|
358d24 |
%{buildroot}%{gem_dir}/
|
|
|
358d24 |
|
|
|
358d24 |
%check
|
|
|
358d24 |
pushd ./%{gem_instdir}
|
|
|
358d24 |
# We don't care about coverage.
|
|
|
358d24 |
sed -i "/require 'simplecov'/,/end$/{s/^/#/}" spec/spec_helper.rb
|
|
|
358d24 |
|
|
|
358d24 |
## oj is not available on Fedora.
|
|
|
358d24 |
sed -i '131,158 s/^/#/' spec/multi_json_spec.rb
|
|
|
358d24 |
sed -i "/expect(MultiJson.adapter.to_s).to eq('MultiJson::Adapters::Oj')/ s/Oj/JsonGem/" spec/multi_json_spec.rb
|
|
|
358d24 |
|
|
|
358d24 |
%{?scl:scl enable %{scl} - << \EOF}
|
|
|
358d24 |
# ruby-yajl is not availabln test suite.
|
|
|
358d24 |
# Two failures due to json_pure missing from SCL
|
|
|
358d24 |
rspec spec/multi_json_spec.rb | grep '2 failures'
|
|
|
358d24 |
%{?scl:EOF}
|
|
|
358d24 |
|
|
|
358d24 |
# Disable test of engines unsupported on Fedora (they may cause test suite to
|
|
|
358d24 |
# exit).
|
|
|
358d24 |
rm spec/{gson,jr_jackson,nsjsonserialization,oj,yajl,json_pure}_adapter_spec.rb
|
|
|
358d24 |
|
|
|
358d24 |
%{?scl:scl enable %{scl} - << \EOF}
|
|
|
358d24 |
# Adapters have to be tested separately.
|
|
|
358d24 |
for adapter in spec/*_adapter_spec.rb; do
|
|
|
358d24 |
# Prevents "dump encoding" testsuite error.
|
|
|
358d24 |
# https://github.com/intridea/multi_json/issues/126
|
|
|
358d24 |
LANG=en_US.utf8 rspec $adapter || exit
|
|
|
358d24 |
done
|
|
|
358d24 |
%{?scl:EOF}
|
|
|
358d24 |
|
|
|
358d24 |
popd
|
|
|
358d24 |
|
|
|
358d24 |
%files
|
|
|
358d24 |
%dir %{gem_instdir}
|
|
|
358d24 |
%exclude %{gem_instdir}/.*
|
|
|
358d24 |
%exclude %{gem_instdir}/Gemfile
|
|
|
358d24 |
%exclude %{gem_instdir}/%{gem_name}.gemspec
|
|
|
358d24 |
%doc %{gem_instdir}/LICENSE.md
|
|
|
358d24 |
%{gem_libdir}
|
|
|
358d24 |
%exclude %{gem_cache}
|
|
|
358d24 |
%{gem_spec}
|
|
|
358d24 |
|
|
|
358d24 |
%files doc
|
|
|
358d24 |
%doc %{gem_docdir}
|
|
|
358d24 |
%doc %{gem_instdir}/CHANGELOG.md
|
|
|
358d24 |
%doc %{gem_instdir}/CONTRIBUTING.md
|
|
|
358d24 |
%doc %{gem_instdir}/README.md
|
|
|
358d24 |
%{gem_instdir}/Rakefile
|
|
|
358d24 |
%{gem_instdir}/spec
|
|
|
358d24 |
|
|
|
358d24 |
|
|
|
358d24 |
%changelog
|
|
|
358d24 |
* Thu Feb 05 2015 Vít Ondruch <vondruch@redhat.com> - 1.8.4-2
|
|
|
358d24 |
- Remove slc_prefix from bundled(okjson) provide.
|
|
|
358d24 |
|
|
|
358d24 |
* Tue Jan 27 2015 Josef Stribny <jstribny@redhat.com> - 1.8.4-1
|
|
|
358d24 |
- Update to 1.8.4
|
|
|
358d24 |
|
|
|
358d24 |
* Fri Mar 21 2014 Vít Ondruch <vondruch@redhat.com> - 1.7.7-2
|
|
|
358d24 |
- Rebuid against new scl-utils to depend on -runtime package.
|
|
|
358d24 |
Resolves: rhbz#1069109
|
|
|
358d24 |
|
|
|
358d24 |
* Thu Oct 03 2013 Josef Stribny <jstribny@redhat.com> - 1.7.7-2
|
|
|
358d24 |
- Remove requirement on json_pure
|
|
|
358d24 |
|
|
|
358d24 |
* Fri Jun 07 2013 Josef Stribny <jstribny@redhat.com> - 1.7.7-1
|
|
|
358d24 |
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
|
|
|
358d24 |
- Update to multi_json 1.7.7
|
|
|
358d24 |
|
|
|
358d24 |
* Wed Jul 25 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.3.6-1
|
|
|
358d24 |
- Updated to Multi_Json 1.3.6.
|
|
|
358d24 |
- Specfile cleanup
|
|
|
358d24 |
|
|
|
358d24 |
* Mon Apr 02 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2.0-1
|
|
|
358d24 |
- Rebuilt for scl.
|
|
|
358d24 |
- Updated to 1.2.0.
|
|
|
358d24 |
|
|
|
358d24 |
* Tue Jan 24 2012 Vít Ondruch <vondruch@redhat.com> - 1.0.3-5
|
|
|
358d24 |
- Rebuilt for Ruby 1.9.3.
|
|
|
358d24 |
|
|
|
358d24 |
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-4
|
|
|
358d24 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
358d24 |
|
|
|
358d24 |
* Fri Nov 11 2011 Vít Ondruch <vondruch@redhat.com> - 1.0.3-3
|
|
|
358d24 |
- Removed useless shebang.
|
|
|
358d24 |
|
|
|
358d24 |
* Fri Nov 11 2011 Vít Ondruch <vondruch@redhat.com> - 1.0.3-2
|
|
|
358d24 |
- Review fixes.
|
|
|
358d24 |
|
|
|
358d24 |
* Fri Jul 08 2011 Vít Ondruch <vondruch@redhat.com> - 1.0.3-1
|
|
|
358d24 |
- Initial package
|