Blame SPECS/rubygem-multi_json.spec

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