Skip to content

Commit d0db933

Browse files
joshcoopercthorn42
authored andcommitted
Modify files in facter gem
This commit adds the following files to the built gem. It also removes directories from the list of "files" to include in the gemspec. ``` $ gem fetch facter --version 4.13.0 $ gem build facter.gemspec $ diff \ <(tar xOf facter-4.13.0.gem data.tar.gz | tar zt | sort) \ <(tar xOf facter-4.14.0.gem data.tar.gz | tar zt | sort) 1a2,3 > facter.gemspec > Gemfile 949a953 > README.md ``` This reverts absolute path dir globbing added in commit 61564e2. That issue will be fixed in PA-7583.
1 parent 8917a46 commit d0db933

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

facter.gemspec

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,9 @@ Gem::Specification.new do |spec|
1414
spec.description = 'You can prove anything with facts!'
1515
spec.license = 'Apache-2.0'
1616

17-
dirs =
18-
Dir[File.join(__dir__, 'bin/facter')] +
19-
Dir[File.join(__dir__, 'LICENSE')] +
20-
Dir[File.join(__dir__, 'lib/**/*.rb')] +
21-
Dir[File.join(__dir__, 'lib/**/*.json')] +
22-
Dir[File.join(__dir__, 'lib/**/*.conf')] +
23-
Dir[File.join(__dir__, 'lib/**/*.erb')]
24-
base = "#{__dir__}#{File::SEPARATOR}"
25-
spec.files = dirs.map { |path| path.sub(base, '') }
17+
spec.files =
18+
%w[LICENSE README.md Gemfile facter.gemspec] +
19+
Dir['{bin,lib}/**/*'].reject { |f| File.directory?(f) || f.end_with?('.dox') || f.end_with?('.yaml') }
2620

2721
spec.required_ruby_version = '>= 2.5', '< 4.0'
2822
spec.bindir = 'bin'

0 commit comments

Comments
 (0)