2020-08-28 16:01:45 +08:00
|
|
|
%global gem_name activeresource
|
|
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
|
Epoch: 1
|
|
|
|
|
Version: 5.0.0
|
2021-10-08 15:11:12 +08:00
|
|
|
Release: 2
|
2020-08-28 16:01:45 +08:00
|
|
|
Summary: REST modeling framework (part of Rails)
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: http://www.rubyonrails.org
|
|
|
|
|
Source0: https://rubygems.org/gems/activeresource-5.0.0.gem
|
|
|
|
|
Source1: https://github.com/rails/activeresource/archive/v5.0.0.tar.gz
|
|
|
|
|
Patch0: rubygem-activeresource-5.0.0-Always-load-abstract_unit-on-the-top-of-test-file.patch
|
2021-10-08 15:11:12 +08:00
|
|
|
Patch1: CVE-2020-8151.patch
|
2020-08-28 16:01:45 +08:00
|
|
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(activemodel) >= 5.0
|
|
|
|
|
BuildRequires: rubygem(activesupport) >= 5.0 rubygem(activemodel-serializers-xml)
|
|
|
|
|
BuildRequires: rubygem(bundler) rubygem(mocha)
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%description
|
|
|
|
|
REST on Rails. Wrap your RESTful web app with Ruby classes and work with them
|
|
|
|
|
like Active Record models.
|
|
|
|
|
|
2021-10-08 15:11:12 +08:00
|
|
|
|
2020-08-28 16:01:45 +08:00
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
Requires: %{name} = %{epoch}:%{version}-%{release}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%description doc
|
|
|
|
|
Documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
gem unpack %{SOURCE0}
|
|
|
|
|
%setup -q -D -T -n %{gem_name}-%{version}
|
|
|
|
|
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
2021-10-08 15:11:12 +08:00
|
|
|
%patch1 -p1
|
2020-08-28 16:01:45 +08:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
gem build %{gem_name}.gemspec
|
|
|
|
|
%gem_install
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
|
|
|
cp -a .%{gem_dir}/* \
|
|
|
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
cp %{gem_name}.gemspec .%{gem_instdir}
|
|
|
|
|
pushd .%{gem_instdir}
|
|
|
|
|
tar xzvf %{SOURCE1}
|
|
|
|
|
cd %{gem_name}-%{version}
|
|
|
|
|
cat %{PATCH0} | patch -p1
|
|
|
|
|
echo 'gemspec' > Gemfile
|
|
|
|
|
sed -i '/rake/ s/^/#/' %{gem_name}.gemspec
|
|
|
|
|
ruby -Itest -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%dir %{gem_instdir}
|
|
|
|
|
%{gem_libdir}
|
|
|
|
|
%exclude %{gem_cache}
|
|
|
|
|
%{gem_spec}
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
|
%doc %{gem_docdir}
|
|
|
|
|
%doc %{gem_instdir}/README.rdoc
|
|
|
|
|
|
|
|
|
|
%changelog
|
2021-10-08 15:11:12 +08:00
|
|
|
* Fri Oct 8 2021 liwu <liwu13@huawei.com> - 5.0.0-2
|
|
|
|
|
- Fix CVE-2020-8151
|
|
|
|
|
|
2020-08-28 16:01:45 +08:00
|
|
|
* Wed Aug 12 2020 chengzihan <chengzihan2@huawei.com> - 5.0.0-1
|
|
|
|
|
- Package init
|