mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 05:29:10 +02:00
parent
a9eed306aa
commit
f8e002a6b7
1 changed files with 7 additions and 2 deletions
|
@ -15,8 +15,13 @@ Gem::Specification.new do |spec|
|
|||
|
||||
# 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(File.expand_path('..', __FILE__)) do
|
||||
`git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
||||
excludes = %W[
|
||||
:^/test :^/spec :^/feature :^/bin
|
||||
:^/Rakefile :^/Gemfile\* :^/.git*
|
||||
:^/#{File.basename(__FILE__)}
|
||||
]
|
||||
spec.files = IO.popen(%W[git ls-files -z --] + excludes, err: IO::NULL) do |f|
|
||||
f.readlines("\x0", chomp: true)
|
||||
end
|
||||
spec.require_paths = ["lib"]
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue