diff --git a/globalid-0.4.2.gem b/globalid-0.4.2.gem new file mode 100644 index 0000000..8dcf8e3 Binary files /dev/null and b/globalid-0.4.2.gem differ diff --git a/rubygen-globalid.spec b/rubygen-globalid.spec new file mode 100644 index 0000000..3b72d33 --- /dev/null +++ b/rubygen-globalid.spec @@ -0,0 +1,65 @@ +%global gem_name globalid +%{?_with_bootstrap: %global bootstrap 1} +Name: rubygem-%{gem_name} +Version: 0.4.2 +Release: 1 +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}/ +%if ! 0%{?bootstrap} + +%check +pushd .%{gem_instdir} +ln -s %{_builddir}/globalid-0.4.2/test test +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 +* Fri Aug 21 2020 tuShenmei - 0.4.2-1 +- package init diff --git a/rubygen-globalid.yaml b/rubygen-globalid.yaml new file mode 100644 index 0000000..30472f7 --- /dev/null +++ b/rubygen-globalid.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: rails/globalid +tag_prefix: "globalid-" +separator: "." diff --git a/v0.4.2.tar.gz b/v0.4.2.tar.gz new file mode 100644 index 0000000..ef558e8 Binary files /dev/null and b/v0.4.2.tar.gz differ