Skip to content

Commit c952668

Browse files
committed
Cleanup
1 parent 2281879 commit c952668

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

errbit_github_plugin.gemspec

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,15 @@ Gem::Specification.new do |spec|
1717
spec.metadata["homepage_uri"] = spec.homepage
1818
spec.metadata["source_code_uri"] = spec.homepage
1919

20-
spec.files = `git ls-files`.split($/)
21-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20+
# Specify which files should be added to the gem when it is released.
21+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22+
gemspec = File.basename(__FILE__)
23+
spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
24+
ls.readlines("\x0", chomp: true).reject do |f|
25+
(f == gemspec) ||
26+
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile])
27+
end
28+
end
2229
spec.require_paths = ["lib"]
2330

2431
spec.add_dependency "errbit_plugin"

0 commit comments

Comments
 (0)