Skip to content

Commit 7a8aa4a

Browse files
authored
Merge pull request #852 from varvet/kbs/new-release
Exclude unwanted files from packaged gem
2 parents be91242 + beaf029 commit 7a8aa4a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pundit.gemspec

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@ Gem::Specification.new do |gem|
1414
gem.homepage = "https://github.com/varvet/pundit"
1515
gem.license = "MIT"
1616

17-
gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
18-
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
17+
Dir.chdir(__dir__) do
18+
gem.files = `git ls-files -z`.split("\x0").select do |f|
19+
f.start_with?("lib/", "README", "SECURITY", "LICENSE", "CHANGELOG")
20+
end
21+
end
1922
gem.require_paths = ["lib"]
2023

21-
gem.metadata = {
24+
gem.metadata = {
2225
"rubygems_mfa_required" => "true",
2326
"bug_tracker_uri" => "https://github.com/varvet/pundit/issues",
2427
"changelog_uri" => "https://github.com/varvet/pundit/blob/main/CHANGELOG.md",

0 commit comments

Comments
 (0)