rubygem-globalid/rubygem-globalid.spec

73 lines
2.0 KiB
RPMSpec
Raw Normal View History

2020-08-28 14:48:01 +08:00
%global gem_name globalid
%{?_with_bootstrap: %global bootstrap 1}
Name: rubygem-%{gem_name}
2023-01-17 10:57:24 +08:00
Version: 1.0.0
Release: 1
2020-08-28 14:48:01 +08:00
Summary: Refer to any model with a URI: gid://app/class/id
License: MIT
URL: https://github.com/rails/%{gem_name}
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: https://github.com/rails/%{gem_name}/archive/v%{version}.tar.gz
BuildRequires: ruby(release) rubygems-devel ruby >= 1.9.3
%if ! 0%{?bootstrap}
BuildRequires: rubygem(activesupport) >= 4.1 rubygem(activemodel) >= 4.1
BuildRequires: rubygem(railties) >= 4.1
%endif
BuildArch: noarch
%description
URIs for your models makes it easy to pass references around.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version} -b 1
%build
gem build ../%{gem_name}-%{version}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
2020-09-05 18:57:10 +08:00
%if 0%{?bootstrap}
2020-08-28 14:48:01 +08:00
%check
pushd .%{gem_instdir}
2023-01-17 10:57:24 +08:00
ln -s %{_builddir}/globalid-%{version}/test test
2020-08-28 14:48:01 +08:00
sed -i "/bundler\/setup/ s/^/#/" ./test/helper.rb
sed -i "/defaults to nil when secret_token is not present' do/a \\
skip 'Not compatible with Rails 5.2'" test/cases/railtie_test.rb
ruby -Ilib:test -rforwardable -e "Dir.glob './test/cases/*test.rb', &method(:require)"
popd
%endif
%files
%dir %{gem_instdir}
%license %{gem_instdir}/MIT-LICENSE
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/README.md
%changelog
2023-01-17 10:57:24 +08:00
* Tue Jan 17 2023 wangkai <wangkai385@h-partners.com> - 1.0.0-1
- Upgrade to version 1.0.0
2021-08-12 17:06:16 +08:00
* Thu Aug 12 2021 liyanan <liyanan32@huawei.com> - 0.4.2-3
- fix spec file name
2020-09-05 18:57:10 +08:00
* Sat Sep 5 2020 liyanan <liyanan32@huawei.com> - 0.4.2-2
- fix build fail
2020-08-28 14:48:01 +08:00
* Fri Aug 21 2020 tuShenmei <tushenmei@huawei.com> - 0.4.2-1
- package init