diff --git a/multi_json-1.13.1-tests.tgz b/multi_json-1.13.1-tests.tgz new file mode 100644 index 0000000..f83dbe1 Binary files /dev/null and b/multi_json-1.13.1-tests.tgz differ diff --git a/multi_json-1.13.1.gem b/multi_json-1.13.1.gem new file mode 100644 index 0000000..82e9f91 Binary files /dev/null and b/multi_json-1.13.1.gem differ diff --git a/rubygem-multi_json.spec b/rubygem-multi_json.spec new file mode 100644 index 0000000..f800524 --- /dev/null +++ b/rubygem-multi_json.spec @@ -0,0 +1,65 @@ +%global gem_name multi_json +Name: rubygem-%{gem_name} +Version: 1.13.1 +Release: 1 +Summary: A common interface to multiple JSON libraries +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.13.1 && tar czvf multi_json-1.13.1-tests.tgz ./spec/ +Source1: %{gem_name}-%{version}-tests.tgz +BuildRequires: ruby(release) rubygems-devel >= 1.3.5 ruby rubygem(rspec) rubygem(json_pure) +BuildArch: noarch +Provides: bundled(okjson) = 45 +%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 %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch +%description doc +Documentation for %{name}. + +%prep +%setup -q -c -T +%gem_install -n %{SOURCE0} + +%build + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +%check +pushd .%{gem_instdir} +tar xf %{SOURCE1} +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 +rspec spec/{multi_json,options_cache}_spec.rb +rm spec/{oj,yajl}_adapter_spec.rb +for adapter in spec/*_adapter_spec.rb; do + rspec $adapter +done +popd + +%files +%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 + +%changelog +* Sat Aug 22 2020 Jeffery.Gao - 1.13.1-1 +- Package init diff --git a/rubygem-multi_json.yaml b/rubygem-multi_json.yaml new file mode 100644 index 0000000..d69069d --- /dev/null +++ b/rubygem-multi_json.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: intridea/multi_json +tag_prefix: "v" +seperator: "."