Skip to content

Commit

Permalink
Update file list to package
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Dec 29, 2023
1 parent 65159e4 commit 647e5f0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions securerandom.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ Gem::Specification.new do |spec|
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage

spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(__dir__) do
`git ls-files -z`.split("\x0").reject do |f|
(File.expand_path(f) == __FILE__) ||
f.start_with?(*%w[bin/ test/ spec/ features/ docs/ rakelib/ .document .git Gemfile Rakefile])
end
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
Expand Down

0 comments on commit 647e5f0

Please sign in to comment.