Blame SPECS/rubygem-activejob.spec

343c7e
%{?scl:%scl_package rubygem-%{gem_name}}
343c7e
%{!?scl:%global pkg_name %{name}}
343c7e
343c7e
# Generated from activejob-4.2.0.gem by gem2rpm -*- rpm-spec -*-
343c7e
%global gem_name activejob
343c7e
343c7e
Name: %{?scl_prefix}rubygem-%{gem_name}
343c7e
Version: 5.0.1
343c7e
Release: 1%{?dist}
343c7e
Summary: Job framework with pluggable queues
343c7e
Group: Development/Languages
343c7e
License: MIT
343c7e
URL: http://rubyonrails.org
343c7e
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
343c7e
# git clone https://github.com/rails/rails.git && cd rails/activejob && git checkout v5.0.1
343c7e
# tar czvf activejob-5.0.1-tests.tgz test/
343c7e
Source1: %{gem_name}-%{version}-tests.tgz
343c7e
343c7e
# Fixnum and Bignum are deprecated in Ruby trunk
343c7e
# https://github.com/rails/rails/pull/26732
343c7e
Patch0: rubygem-activejob-5.0.1-Fixnum-and-Bignum-are-deprecated-in-Ruby-trunk.patch
343c7e
343c7e
Requires: %{?scl_prefix_ruby}ruby(release)
343c7e
Requires: %{?scl_prefix_ruby}ruby(rubygems)
343c7e
Requires: %{?scl_prefix}rubygem(activesupport) = %{version}
343c7e
Requires: %{?scl_prefix}rubygem(globalid) >= 0.3.0
343c7e
BuildRequires: %{?scl_prefix_ruby}ruby(release)
343c7e
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
343c7e
BuildRequires: %{?scl_prefix_ruby}ruby >= 2.2.2
343c7e
BuildRequires: %{?scl_prefix}rubygem(activesupport) >= 5.0.0
343c7e
BuildRequires: %{?scl_prefix}rubygem(globalid)
343c7e
BuildArch: noarch
343c7e
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
343c7e
343c7e
# Explicitly require runtime subpackage, as long as older scl-utils do not generate it
343c7e
%{?scl:Requires: %{?scl_prefix}runtime}
343c7e
343c7e
%description
343c7e
Declare job classes that can be run by a variety of queueing backends.
343c7e
343c7e
%package doc
343c7e
Summary: Documentation for %{pkg_name}
343c7e
Group: Documentation
343c7e
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
343c7e
BuildArch: noarch
343c7e
343c7e
%description doc
343c7e
Documentation for %{pkg_name}.
343c7e
343c7e
%prep
343c7e
%{?scl:scl enable %{scl} - << \EOF}
343c7e
set -e
343c7e
gem unpack %{SOURCE0}
343c7e
343c7e
%setup -q -D -T -n  %{gem_name}-%{version}
343c7e
343c7e
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
343c7e
343c7e
%patch0 -p2
343c7e
%{?scl:EOF}
343c7e
343c7e
%build
343c7e
# Create the gem as gem install only works on a gem file
343c7e
%{?scl:scl enable %{scl} - << \EOF}
343c7e
set -e
343c7e
gem build %{gem_name}.gemspec
343c7e
343c7e
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
343c7e
# by default, so that we can move it into the buildroot in %%install
343c7e
%gem_install
343c7e
%{?scl:EOF}
343c7e
343c7e
%install
343c7e
mkdir -p %{buildroot}%{gem_dir}
343c7e
cp -a .%{gem_dir}/* \
343c7e
        %{buildroot}%{gem_dir}/
343c7e
343c7e
343c7e
# Run the test suite
343c7e
%check
343c7e
pushd .%{gem_instdir}
343c7e
tar xzvf %{SOURCE1}
343c7e
343c7e
# Do not execute integration tests, otherwise Rails's generators are required.
343c7e
%{?scl:scl enable %{scl} - << \EOF}
343c7e
set -e
343c7e
ADAPTERS='async inline test'
343c7e
for ADAPTER in ${ADAPTERS}; do
343c7e
    AJ_ADAPTER=${ADAPTER} ruby -Ilib:test \
343c7e
        -e 'Dir.glob "./test/cases/**/*_test.rb", &method(:require)'
343c7e
done
343c7e
%{?scl:EOF}
343c7e
popd
343c7e
343c7e
%files
343c7e
%{gem_instdir}/MIT-LICENSE
343c7e
%dir %{gem_instdir}
343c7e
%{gem_libdir}
343c7e
%exclude %{gem_cache}
343c7e
%{gem_spec}
343c7e
343c7e
%files doc
343c7e
%doc %{gem_docdir}
343c7e
%doc %{gem_instdir}/CHANGELOG.md
343c7e
%doc %{gem_instdir}/README.md
343c7e
343c7e
%changelog
343c7e
* Thu Jan 12 2017 Jun Aruga <jaruga@redhat.com> - 5.0.1-1
343c7e
- Update to Active Job 5.0.1.
343c7e
- Fix warnings: Fixnum and Bignum are deprecated in Ruby trunk
343c7e
343c7e
* Mon Apr 04 2016 Pavel Valena <pvalena@redhat.com> - 4.2.6-1
343c7e
- Update to 4.2.6
343c7e
343c7e
* Wed Feb 17 2016 Pavel Valena <pvalena@redhat.com> - 4.2.5.1-3
343c7e
- Add scl macros
343c7e
343c7e
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.5.1-2
343c7e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
343c7e
343c7e
* Tue Jan 26 2016 Pavel Valena <pvalena@redhat.com> - 4.2.5.1-1
343c7e
- Update to activejob 4.2.5.1
343c7e
343c7e
* Wed Nov 18 2015 Pavel Valena <pvalena@redhat.com> - 4.2.5-1
343c7e
- Update to activejob 4.2.5
343c7e
343c7e
* Wed Aug 26 2015 Josef Stribny <jstribny@redhat.com> - 4.2.4-1
343c7e
- Update to activejob 4.2.4
343c7e
343c7e
* Tue Jun 30 2015 Josef Stribny <jstribny@redhat.com> - 4.2.3-1
343c7e
- Update to activejob 4.2.3
343c7e
343c7e
* Mon Jun 22 2015 Josef Stribny <jstribny@redhat.com> - 4.2.2-1
343c7e
- Update to activejob 4.2.2
343c7e
343c7e
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.1-2
343c7e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
343c7e
343c7e
* Fri Mar 20 2015 Josef Stribny <jstribny@redhat.com> - 4.2.1-1
343c7e
- Update to activejob 4.2.1
343c7e
343c7e
* Thu Jan 22 2015 Vít Ondruch <vondruch@redhat.com> - 4.2.0-1
343c7e
- Initial package