2020-08-28 15:52:02 +08:00
|
|
|
%global gem_name activemodel-serializers-xml
|
|
|
|
|
Name: rubygem-%{gem_name}
|
2023-11-10 15:14:28 +08:00
|
|
|
Version: 1.0.2
|
|
|
|
|
Release: 1
|
2020-08-28 15:52:02 +08:00
|
|
|
Summary: XML serialization for Active Model objects and Active Record models
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: http://github.com/rails/activemodel-serializers-xml
|
2023-11-10 15:14:28 +08:00
|
|
|
Source0: https://rubygems.org/gems/activemodel-serializers-xml-%{version}.gem
|
|
|
|
|
Source1: http://github.com/rails/activemodel-serializers-xml/archive/v%{version}.tar.gz
|
2020-08-31 19:51:17 +08:00
|
|
|
# https://github.com/rails/activemodel-serializers-xml/pull/18
|
|
|
|
|
Patch0: rubygem-activemodel-serializers-xml-1.0.1-timestamps-creates-created_at-field.patch
|
2020-08-28 15:52:02 +08:00
|
|
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(activesupport) rubygem(activerecord)
|
2020-08-31 19:51:17 +08:00
|
|
|
BuildRequires: rubygem(builder) rubygem(sqlite3) rubygem(rexml)
|
2020-08-28 15:52:02 +08:00
|
|
|
BuildArch: noarch
|
|
|
|
|
%description
|
|
|
|
|
XML serialization for your Active Model objects and Active Record models -
|
|
|
|
|
extracted from Rails.
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
Requires: %{name} = %{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
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
gem build %{gem_name}.gemspec
|
|
|
|
|
%gem_install
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
|
|
|
cp -a .%{gem_dir}/* \
|
|
|
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
pushd .%{gem_instdir}
|
|
|
|
|
tar xzvf %{SOURCE1}
|
|
|
|
|
cd %{gem_name}-%{version}
|
2020-08-31 19:51:17 +08:00
|
|
|
patch -p1< %_sourcedir/rubygem-activemodel-serializers-xml-1.0.1-timestamps-creates-created_at-field.patch
|
2020-08-28 15:52:02 +08:00
|
|
|
sed -i "s/ActiveModel::TestCase/ActiveSupport::TestCase/" test/active_model/xml_serialization_test.rb
|
|
|
|
|
ruby -Itest -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%dir %{gem_instdir}
|
|
|
|
|
%exclude %{gem_instdir}/.*
|
|
|
|
|
%license %{gem_instdir}/MIT-LICENSE
|
|
|
|
|
%{gem_libdir}
|
|
|
|
|
%exclude %{gem_cache}
|
|
|
|
|
%{gem_spec}
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
|
%doc %{gem_docdir}
|
|
|
|
|
%doc %{gem_instdir}/CONTRIBUTING.md
|
|
|
|
|
%{gem_instdir}/Gemfile
|
|
|
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
|
%{gem_instdir}/Rakefile
|
|
|
|
|
%exclude %{gem_instdir}/activemodel-serializers-xml.gemspec
|
|
|
|
|
|
|
|
|
|
%changelog
|
2023-11-10 15:14:28 +08:00
|
|
|
* Thu Nov 09 2023 wangkai <13474090681@163.com> - 1.0.2-1
|
|
|
|
|
- Update to 1.0.2
|
|
|
|
|
|
2020-08-31 19:51:17 +08:00
|
|
|
* Thu Mar 3 2022 liyanan <liyanan32@huawei.com> - 1.0.1-2
|
|
|
|
|
- fix build error
|
|
|
|
|
|
2020-08-28 15:52:02 +08:00
|
|
|
* Wed Aug 12 2020 chengzihan <chengzihan2@huawei.com> - 1.0.1-1
|
|
|
|
|
- Package init
|