diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eb08b78 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/multi_json-1.12.1-tests.tgz +SOURCES/multi_json-1.12.1.gem diff --git a/.rh-ror50-rubygem-multi_json.metadata b/.rh-ror50-rubygem-multi_json.metadata new file mode 100644 index 0000000..59839fa --- /dev/null +++ b/.rh-ror50-rubygem-multi_json.metadata @@ -0,0 +1,2 @@ +910080bb6a2f926f282d7d47ac7753c4b461c108 SOURCES/multi_json-1.12.1-tests.tgz +b418d7b93e99a6f7d1acb70453470aace4599d1a SOURCES/multi_json-1.12.1.gem diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SPECS/rubygem-multi_json.spec b/SPECS/rubygem-multi_json.spec new file mode 100644 index 0000000..c8c66f7 --- /dev/null +++ b/SPECS/rubygem-multi_json.spec @@ -0,0 +1,169 @@ +%{?scl:%scl_package rubygem-%{gem_name}} +%{!?scl:%global pkg_name %{name}} + +# Generated from multi_json-1.0.3.gem by gem2rpm -*- rpm-spec -*- +%global gem_name multi_json + +Name: %{?scl_prefix}rubygem-%{gem_name} +Version: 1.12.1 +Release: 4%{?dist} +Summary: A common interface to multiple JSON libraries +Group: Development/Languages +License: MIT +URL: http://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.12.1 && tar czvf multi_json-1.12.1-tests.tgz ./spec/ +Source1: %{gem_name}-%{version}-tests.tgz + +Requires: %{?scl_prefix_ruby}ruby(release) +Requires: %{?scl_prefix_ruby}ruby(rubygems) +BuildRequires: %{?scl_prefix_ruby}ruby(release) +BuildRequires: %{?scl_prefix_ruby}rubygems-devel >= 1.3.5 +BuildRequires: %{?scl_prefix_ruby}ruby +BuildRequires: %{?scl_prefix}rubygem(rspec) +BuildRequires: %{?scl_prefix_ruby}rubygem(json) +#BuildRequires: %{?scl_prefix}rubygem(json_pure) +BuildArch: noarch +# OkJson is allowed to be bundled: +# https://fedorahosted.org/fpc/ticket/113 +Provides: bundled(okjson) = 45 +Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version} + +# Explicitly require runtime subpackage, as long as older scl-utils do not generate it +%{?scl:Requires: %{?scl_prefix}runtime} + +%description +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 +Summary: Documentation for %{pkg_name} +Group: Documentation +Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{pkg_name}. + +%prep +%setup -n %{pkg_name}-%{version} -q -c -T +%{?scl:scl enable %{scl} - << \EOF} +set -e +%gem_install -n %{SOURCE0} +%{?scl:EOF} + +%build + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +%check +pushd .%{gem_instdir} +tar xf %{SOURCE1} + +# oj is not available on Fedora. +sed -i '139,164 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 + +# pure-json is not available on SCL. +sed -i '/can set adapter for a block/,/^ end$/ s/^/#/' \ + spec/multi_json_spec.rb +sed -i '/using one-shot parser/,/^ end$/ s/^/#/' \ + spec/multi_json_spec.rb + +# Execute main test suite. +%{?scl:scl enable %{scl} - << \EOF} +rspec spec/{multi_json,options_cache}_spec.rb +%{?scl:EOF} + +# Disable test of engines unsupported on Fedora (they may cause test suite to +# exit). +rm spec/{oj,yajl}_adapter_spec.rb + +# pure-json is not available on SCL. +rm spec/json_pure_adapter_spec.rb + +# Adapters have to be tested separately. +%{?scl:scl enable %{scl} - << \EOF} +set -e +for adapter in spec/*_adapter_spec.rb; do + rspec "$adapter" +done +%{?scl:EOF} + +popd + +%files +# There is no %%license macro on RHEL6. +# https://bugzilla.redhat.com/show_bug.cgi?id=1386246 +%{!?_licensedir:%global license %%doc} + +%dir %{gem_instdir} +%license %{gem_instdir}/LICENSE.md +%{gem_libdir} +%exclude %{gem_cache} +%{gem_spec} + +%files doc +%doc %{gem_docdir} +%doc %{gem_instdir}/CHANGELOG.md +%doc %{gem_instdir}/CONTRIBUTING.md +%doc %{gem_instdir}/README.md +%{gem_instdir}/multi_json.gemspec + +%changelog +* Wed Feb 15 2017 Jun Aruga - 1.12.1-4 +- Add "set -e". + +* Mon Jan 09 2017 Jun Aruga - 1.12.1-3 +- Update to MultiJSON 1.12.1. + +* Wed Apr 06 2016 Pavel Valena - 1.10.1-5 +- Add rubygem-json to BuildReqires + +* Wed Feb 24 2016 Pavel Valena - 1.10.1-4 +- Update to 1.10.1 + +* Thu Feb 05 2015 Vít Ondruch - 1.8.4-2 +- Remove slc_prefix from bundled(okjson) provide. + +* Tue Jan 27 2015 Josef Stribny - 1.8.4-1 +- Update to 1.8.4 + +* Fri Mar 21 2014 Vít Ondruch - 1.7.7-2 +- Rebuid against new scl-utils to depend on -runtime package. + Resolves: rhbz#1069109 + +* Thu Oct 03 2013 Josef Stribny - 1.7.7-2 +- Remove requirement on json_pure + +* Fri Jun 07 2013 Josef Stribny - 1.7.7-1 +- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 +- Update to multi_json 1.7.7 + +* Wed Jul 25 2012 Bohuslav Kabrda - 1.3.6-1 +- Updated to Multi_Json 1.3.6. +- Specfile cleanup + +* Mon Apr 02 2012 Bohuslav Kabrda - 1.2.0-1 +- Rebuilt for scl. +- Updated to 1.2.0. + +* Tue Jan 24 2012 Vít Ondruch - 1.0.3-5 +- Rebuilt for Ruby 1.9.3. + +* Sat Jan 14 2012 Fedora Release Engineering - 1.0.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Nov 11 2011 Vít Ondruch - 1.0.3-3 +- Removed useless shebang. + +* Fri Nov 11 2011 Vít Ondruch - 1.0.3-2 +- Review fixes. + +* Fri Jul 08 2011 Vít Ondruch - 1.0.3-1 +- Initial package