----- Original Message -----
From: "Ken Dreyer" <ktdreyer(a)ktdreyer.com>
To: "Ruby SIG mailing list" <ruby-sig(a)lists.fedoraproject.org>
Cc: "David Davis" <daviddavis(a)redhat.com>
Sent: Wednesday, December 11, 2013 1:46:47 PM
Subject: excluding dot files from gems
Lots of gems ship dot files, like .gitignore or .travis.yml. These are
basically useless to users, and in our RPMs, we have to exclude these
files by hand.
The problem is that a lot of gems do something like this in the gemspec:
s.files = `git ls-files`.split("\n")
I end up repeating the same exclusions over and over in the RPM
packaging. I've been brainstorming about the best way to push the dot
file exclusions upstream.
I'm not sure about the official policies on shipping dotfiles that are often included
in gems, but a pattern I've been using recently is to ship dotfiles as %doc.
What do you think about something like this?
Generally fine IMO, but I don't see much a reason to patch the gemspec for something
like this TBH.
--- a/pkgwat.gemspec
+++ b/pkgwat.gemspec
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
s.add_development_dependency("debugger")
s.files = `git ls-files`.split("\n")
+ s.files -= `git ls-files -- .??*`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f|
File.basename(
s.require_paths = ["lib"]
It seems like this would be a good pattern to propose to the various
upstreams, but I wanted to get others' opinions first.
- Ken
_______________________________________________
ruby-sig mailing list
ruby-sig(a)lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/ruby-sig