File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff 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"
You can’t perform that action at this time.
0 commit comments