Skip to content

Instantly share code, notes, and snippets.

@pvalena
Created September 17, 2021 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pvalena/56adbf8c402df94e0e42a968ecd82cce to your computer and use it in GitHub Desktop.
Save pvalena/56adbf8c402df94e0e42a968ecd82cce to your computer and use it in GitHub Desktop.
--- rubygem-bundler_ext/.generated.spec 2021-09-17 13:52:31.849177131 +0200
+++ rubygem-bundler_ext/rubygem-bundler_ext.spec 2021-09-17 13:39:35.560482800 +0200
@@ -1,23 +1,27 @@
-Downloaded bundler_ext-0.4.1
-# Generated from bundler_ext-0.4.1.gem by gem2rpm -*- rpm-spec -*-
+# Generated from bundler_ext-0.1.0.gem by gem2rpm -*- rpm-spec -*-
%global gem_name bundler_ext
+Summary: Load system gems via Bundler DSL
Name: rubygem-%{gem_name}
Version: 0.4.1
-Release: 1%{?dist}
-Summary: Load system gems via Bundler DSL
+Release: 14%{?dist}
License: MIT
URL: https://github.com/bundlerext/bundler_ext
-Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
+Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
+# Fix test failures due to Bundler 1.8.1+.
+# https://github.com/bundlerext/bundler_ext/pull/22
+Patch0: rubygem-bundler_ext-0.4.1-Fix-Bundler-1.8.1-test-failures.patch
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
-# BuildRequires: rubygem(rspec) >= 1.3.0
+BuildRequires: rubygem(rspec)
+BuildRequires: rubygem(bundler)
+BuildRequires: rubygem(rails)
BuildArch: noarch
%description
Simple library leveraging the Bundler Gemfile DSL to load gems already on the
-system and managed by the systems package manager (like yum/apt).
+system and managed by the systems package manager (like yum/apt)
%package doc
@@ -31,12 +35,10 @@
%prep
%setup -q -n %{gem_name}-%{version}
+%patch0 -p1
+
%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
@@ -44,15 +46,15 @@
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
-
-
%check
pushd .%{gem_instdir}
-# rspec spec
+# TODO: enable test suite
+rspec spec ||:
popd
%files
%dir %{gem_instdir}
+%exclude %{gem_instdir}/.*
%license %{gem_instdir}/MIT-LICENSE
%{gem_libdir}
%exclude %{gem_cache}
@@ -60,12 +62,83 @@
%files doc
%doc %{gem_docdir}
-%exclude %{gem_instdir}/.rspec
%doc %{gem_instdir}/CHANGELOG
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile
%{gem_instdir}/spec
%changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment