Blob Blame History Raw
%global gem_name actionmailbox

Name: rubygem-%{gem_name}

Release: 1%{?dist}
Summary: Inbound email handling framework
License: MIT
# Actionmailbox gem doesn't ship with the test suite.
# You may check it out like so
# git clone
# cd rails/actionmailbox && git archive -v -o actionmailbox- v6.0.3.1 test/
Source1: actionmailbox-%{version}%{?prerelease}-tests.txz
# The tools are needed for the test suite, are however unpackaged in gem file.
# You may get them like so
# git clone --no-checkout
# cd rails && git archive -v -o rails- v6.0.3.1 tools/
Source2: rails-%{version}%{?prerelease}-tools.txz

BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby >= 2.5.0
BuildRequires: rubygem(actionmailer) = %{version}
BuildRequires: rubygem(activestorage) = %{version}
BuildRequires: rubygem(bundler)
BuildRequires: rubygem(railties) = %{version}
BuildRequires: rubygem(sprockets-rails)
BuildRequires: rubygem(sqlite3)
BuildRequires: rubygem(webmock)
BuildArch: noarch

Receive and process incoming emails in Rails applications.

%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description doc
Documentation for %{name}.

%setup -q -n %{gem_name}-%{version}%{?prerelease} -b1 -b2

gem build ../%{gem_name}-%{version}%{?prerelease}.gemspec

mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \

pushd .%{gem_instdir}/
ln -s %{_builddir}/tools ..
cp -a %{_builddir}/test .

export BUNDLE_GEMFILE=${PWD}/../Gemfile

gem "railties"
gem "actionmailer"
gem "activestorage"
gem "sprockets-rails"
gem "sqlite3"
gem "webmock"

# Remove byebug dependency
sed -i '/^require..byebug./ s/^/#/' test/test_helper.rb

ruby -rbundler -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'

%dir %{gem_instdir}
%license %{gem_instdir}/MIT-LICENSE
%exclude %{gem_cache}

%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/
%doc %{gem_instdir}/

* Mon Aug 03 07:01:37 GMT 2020 Pavel Valena <> -
- Initial package: ActionMailbox