Created
February 1, 2023 13:39
-
-
Save pvalena/1f9b68e82e3e629752ae1aefe1f058cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- rubygem-sprockets-rails/.generated.spec 2023-02-01 14:31:06.588244952 +0100 | |
+++ rubygem-sprockets-rails/rubygem-sprockets-rails.spec 2023-02-01 14:21:54.137051910 +0100 | |
@@ -1,5 +1,4 @@ | |
-Downloaded sprockets-rails-3.4.2 | |
-# Generated from sprockets-rails-3.4.2.gem by gem2rpm -*- rpm-spec -*- | |
+# Generated from sprockets-rails-2.0.0.gem by gem2rpm -*- rpm-spec -*- | |
%global gem_name sprockets-rails | |
Name: rubygem-%{gem_name} | |
@@ -9,16 +8,21 @@ | |
License: MIT | |
URL: https://github.com/rails/sprockets-rails | |
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem | |
+# Get the tests | |
+# git clone --no-checkout https://github.com/rails/sprockets-rails.git | |
+# cd sprockets-rails && git archive -v -o sprockets-rails-3.4.2-tests.txz v3.4.2 test/ | |
+Source1: sprockets-rails-%{version}-tests.txz | |
BuildRequires: ruby(release) | |
BuildRequires: rubygems-devel | |
-BuildRequires: ruby >= 2.5 | |
-# BuildRequires: rubygem(railties) >= 5.2 | |
-# BuildRequires: rubygem(sass) | |
-# BuildRequires: rubygem(uglifier) | |
+BuildRequires: ruby | |
+BuildRequires: rubygem(minitest) | |
+BuildRequires: rubygem(railties) >= 3.0 | |
+BuildRequires: rubygem(rake) | |
+BuildRequires: rubygem(sprockets) | |
BuildArch: noarch | |
%description | |
-Sprockets Rails integration. | |
+Provides Sprockets implementation for Rails 4.x (and beyond) Asset Pipeline. | |
%package doc | |
@@ -30,14 +34,13 @@ | |
Documentation for %{name}. | |
%prep | |
-%setup -q -n %{gem_name}-%{version} | |
+%setup -q -n %{gem_name}-%{version} -b 1 | |
+ | |
+pushd %{_builddir} | |
+popd | |
%build | |
-# 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 | |
%gem_install | |
%install | |
@@ -45,11 +48,11 @@ | |
cp -a .%{gem_dir}/* \ | |
%{buildroot}%{gem_dir}/ | |
- | |
- | |
%check | |
pushd .%{gem_instdir} | |
-# Run the test suite. | |
+ln -s %{_builddir}/test . | |
+ | |
+ruby -Ilib -e 'Dir.glob "./test/**/test_*.rb", &method(:require)' | |
popd | |
%files | |
@@ -65,4 +68,102 @@ | |
%changelog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment