[rubygem-exception_notification] Remove dot files in %prep

Ken Dreyer ktdreyer at fedoraproject.org
Wed Jun 11 19:17:15 UTC 2014


commit 1ba5f398ef829c0d6fdf8ca0b8d68f2d2d95a41c
Author: Ken Dreyer <ktdreyer at ktdreyer.com>
Date:   Fri Dec 13 16:32:07 2013 -0700

    Remove dot files in %prep
    
    - Move README to main package
    - Exclude more files from -doc
    - Drop hipchat patch and BR: rubygem(hipchat)
    - Remove gem2rpm comment
    - Update URL
    - Update for Minitest 5 (RHBZ #1107105)

 rubygem-exception_notification-4.0.1-hipchat.patch |   37 -------------
 rubygem-exception_notification.spec                |   54 +++++++++++---------
 2 files changed, 29 insertions(+), 62 deletions(-)
---
diff --git a/rubygem-exception_notification.spec b/rubygem-exception_notification.spec
index 80c0a62..022391c 100644
--- a/rubygem-exception_notification.spec
+++ b/rubygem-exception_notification.spec
@@ -1,13 +1,12 @@
-# Generated from exception_notification-4.0.0.gem by gem2rpm -*- rpm-spec -*-
 %global gem_name exception_notification
 
 Name: rubygem-%{gem_name}
 Version: 4.0.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 Summary: Exception notification for Rails apps
 Group: Development/Languages
 License: MIT
-URL: http://smartinez87.github.com/exception_notification
+URL: https://smartinez87.github.io/exception_notification/3.x/
 Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
 # Remove bundler dependency from Rakefile. Probably cannot go upstream, because
 # upstream prefers bundler.
@@ -15,9 +14,6 @@ Patch0: rubygem-exception_notification-4.0.0-rake-nobundler.patch
 # Remove hard dependency on tinder. Unknown if upstream will be receptive to
 # this.
 Patch1: rubygem-exception_notification-4.0.0-tinder.patch
-# Remove hard dependency on hipchat. Unknown if upstream will be receptive to
-# this.
-Patch2: rubygem-exception_notification-4.0.1-hipchat.patch
 Requires: ruby(release)
 Requires: ruby(rubygems)
 Requires: rubygem(actionmailer) >= 3.0.4
@@ -26,6 +22,7 @@ BuildRequires: ruby(release)
 BuildRequires: rubygems-devel
 BuildRequires: rubygem(actionmailer) >= 3.0.4
 BuildRequires: rubygem(activesupport) >= 3.0.4
+BuildRequires: rubygem(hipchat)
 BuildRequires: rubygem(httparty)
 BuildRequires: rubygem(minitest)
 BuildRequires: rubygem(mocha)
@@ -62,8 +59,9 @@ gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
 %patch0 -p1
 # Remove tinder dependency from tests
 %patch1 -p1
-# Remove hipchat dependency from tests
-%patch2 -p1
+
+# Update for Minitest 5
+sed -i -e 's/test\/unit/minitest\/autorun/' test/test_helper.rb
 
 # Remove unnecessary bundler dependency from dummy Rails in test suite
 sed -i '/bundler/d' test/dummy/config/boot.rb
@@ -73,20 +71,21 @@ echo "require 'exception_notification'" >> test/dummy/config/boot.rb
 # Remove /usr/bin/env from shebang so RPM doesn't consider this a dependency
 sed -i 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' test/dummy/script/rails
 
-# Remove developer-only files
-rm test/dummy/.gitignore
-rm test/dummy/lib/tasks/.gitkeep
-rm test/dummy/public/stylesheets/.gitkeep
-sed -i 's|"test/dummy/.gitignore",||' %{gem_name}.gemspec
-sed -i 's|"test/dummy/lib/tasks/.gitkeep",||' %{gem_name}.gemspec
-sed -i 's|"test/dummy/public/stylesheets/.gitkeep",||' %{gem_name}.gemspec
+# Remove developer-only files.
+# https://github.com/smartinez87/exception_notification/pull/202
+for f in .gemtest .gitignore .travis.yml \
+Appraisals Gemfile Gemfile.lock \
+test/dummy/.gitignore \
+test/dummy/lib/tasks/.gitkeep \
+test/dummy/public/stylesheets/.gitkeep ; do
+  rm $f
+  sed -i "s|\"$f\",||g" %{gem_name}.gemspec
+done
 
 %build
 # Create the gem as gem install only works on a gem file
 gem build %{gem_name}.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
 
 # remove unecessary gemspec
@@ -112,7 +111,7 @@ popd
 %files
 %dir %{gem_instdir}
 %doc %{gem_instdir}/MIT-LICENSE
-%exclude %{gem_instdir}/.*
+%doc %{gem_instdir}/README.md
 %{gem_libdir}
 %exclude %{gem_cache}
 %{gem_spec}
@@ -121,17 +120,22 @@ popd
 %doc %{gem_docdir}
 %doc %{gem_instdir}/CHANGELOG.rdoc
 %doc %{gem_instdir}/CONTRIBUTING.md
-%doc %{gem_instdir}/README.md
-%{gem_instdir}/test
 %{gem_instdir}/examples
-%{gem_instdir}/gemfiles
-%{gem_instdir}/Appraisals
-%{gem_instdir}/Gemfile
-%{gem_instdir}/Gemfile.lock
-%{gem_instdir}/Rakefile
+%exclude %{gem_instdir}/test
+%exclude %{gem_instdir}/gemfiles
+%exclude %{gem_instdir}/Rakefile
 
 
 %changelog
+* Wed Jun 11 2014 Ken Dreyer <ktdreyer at ktdreyer.com> - 4.0.1-3
+- Remove dot files in %%prep
+- Move README to main package
+- Exclude more files from -doc
+- Drop hipchat patch and BR: rubygem(hipchat)
+- Remove gem2rpm comment
+- Update URL
+- Update for Minitest 5 (RHBZ #1107105)
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.0.1-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list