!6 Fix jr_jackson removed due to tests error and Modify the test file to correct version 1.14.1

From: @wu-leilei 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2022-02-24 11:20:18 +00:00 committed by Gitee
commit d22f6e81a7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 27 additions and 24 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,22 +1,23 @@
%global pkg_name %{name}
%global gem_name multi_json
Summary: A gem to provide swappable JSON backends
Name: rubygem-%{gem_name}
Version: 1.14.1
Release: 1
Group: Development/Languages
License: MIT
URL: https://github.com/intridea/multi_json
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: %{gem_name}-%{version}-tests.tgz
Source2: https://github.com/intridea/%{gem_name}/archive/refs/tags/%{gem_name}-%{version}.tar.gz
Summary: A gem to provide swappable JSON backends
Name: rubygem-%{gem_name}
Version: 1.14.1
Release: 2
Group: Development/Languages
License: MIT
URL: https://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 archive -v -o multi_json-1.14.1-tests.tgz v1.14.1 spec/
Source1: %{gem_name}-%{version}-tests.tgz
Requires: ruby(release)
Requires: ruby(release)
BuildRequires: ruby(release)
Requires: ruby(rubygems)
Requires: ruby
Requires: ruby(rubygems)
Requires: ruby
BuildRequires: rubygems-devel
BuildRequires: ruby
@ -24,11 +25,11 @@ BuildRequires: rubygem(rspec)
BuildRequires: rubygem(json_pure)
BuildRequires: ruby(rubygems)
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}
# OkJson is allowed to be bundled:
Provides: bundled(okjson) = 20110719
Provides: bundled(okjson) = 20110719
%description
A gem to provide swappable JSON backends utilizing Yajl::Ruby, the JSON gem,
@ -36,10 +37,10 @@ JSON pure, or a vendored version of okjson.
%package doc
Summary: Documentation for %{pkg_name}
Group: Documentation
Requires: %{pkg_name} = %{version}-%{release}
BuildArch: noarch
Summary: Documentation for %{pkg_name}
Group: Documentation
Requires: %{pkg_name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{pkg_name}
@ -59,12 +60,10 @@ cp -a .%{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
SKIP_ADAPTERS=jr_jackson rspec spec/{multi_json,options_cache}_spec.rb
for adapter in spec/*_adapter_spec.rb; do
rspec $adapter
SKIP_ADAPTERS=gson,jr_jackson,nsjsonserialization,oj,yajl rspec $adapter
done
popd
@ -85,6 +84,10 @@ popd
%changelog
* Mon Feb 14 2022 xu_ping <xuping33@huawei.com> - 1.14.1-2
- Modify the tests file to correct version 1.14.1
- Fix jr_jackson remove due to tests failed
* Mon Jun 07 2021 jiangxinyu <jiangxinyu@kylinos.cn> - 1.14.1-1
- Update version to 1.14.1