Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
diff --git a/rubygem-actiontext.spec b/rubygem-actiontext.spec
index 80d15ce..2fe4ca1 100644
--- a/rubygem-actiontext.spec
+++ b/rubygem-actiontext.spec
@@ -1,35 +1,16 @@
-# Generated from actiontext- by gem2rpm -*- rpm-spec -*-
+# Generated from actiontext- by gem2rpm -*- rpm-spec -*-
%global gem_name actiontext
-# Circular dependency with rubygem-railties.
-%bcond_with bootstrap
Name: rubygem-%{gem_name}
-Release: 2%{?dist}
+Release: 1%{?dist}
Summary: Rich text framework
License: MIT
-# Tests are not shipped with the gem
-# git clone --no-checkout
-# cd rails/actiontext && git archive -v -o actiontext- v6.0.3.1 test/
-Source1: %{gem_name}-%{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
-%if %{without bootstrap}
-BuildRequires: rubygem(railties) = %{version}
-BuildRequires: rubygem(activestorage) = %{version}
-BuildRequires: rubygem(actionmailer) = %{version}
-BuildRequires: rubygem(sqlite3)
BuildArch: noarch
@@ -45,10 +26,14 @@ BuildArch: noarch
Documentation for %{name}.
-%setup -q -n %{gem_name}-%{version}%{?prerelease} -b1 -b2
+%setup -q -n %{gem_name}-%{version}
-gem build ../%{gem_name}-%{version}%{?prerelease}.gemspec
+# Create the gem as gem install only works on a gem file
+gem build ../%{gem_name}-%{version}.gemspec
+# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
+# by default, so that we can move it into the buildroot in %%install
@@ -56,21 +41,12 @@ mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
-%if %{without bootstrap}
-pushd .%{gem_instdir}
-ln -s %{_builddir}/tools ..
-mv %{_builddir}/test .
-# Remove bundler usage
-sed -i '/Bundler.require/ s/^/#/' test/dummy/config/application.rb
-# Remove asset pipeline initializer
-echo > test/dummy/config/initializers/assets.rb
-ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
+pushd .%{gem_instdir}
+# Run the test suite.
%dir %{gem_instdir}
@@ -88,5 +64,5 @@ popd
%doc %{gem_instdir}/
-* Mon Aug 03 07:01:37 GMT 2020 Pavel Valena <> -
-- Initial package Action Text
+* Tue Aug 11 2020 Pavel Valena <> -
+- Initial package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.