Skip to content

Commit

Permalink
Drop git ls-files in gemspec
Browse files Browse the repository at this point in the history
Using `git` in gemspec, in general, is problematic.
cf: https://docs.rubocop.org/rubocop-packaging/cops_packaging.html#gemspec-git-rationale

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
  • Loading branch information
utkarsh2102 committed Sep 25, 2020
1 parent 32784d8 commit 9008df7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -7,7 +7,7 @@ Gemfile.lock
InstalledFiles
_yardoc
coverage
lib/bundler/man
lib/bundler/man/*
pkg
rdoc
yardoc
Expand Down
21 changes: 1 addition & 20 deletions parser.gemspec
Expand Up @@ -20,27 +20,8 @@ Gem::Specification.new do |spec|
'source_code_uri' => "https://github.com/whitequark/parser/tree/v#{spec.version}"
}

spec.files = `git ls-files`.split + %w(
lib/parser/lexer.rb
lib/parser/ruby18.rb
lib/parser/ruby19.rb
lib/parser/ruby20.rb
lib/parser/ruby21.rb
lib/parser/ruby22.rb
lib/parser/ruby23.rb
lib/parser/ruby24.rb
lib/parser/ruby25.rb
lib/parser/ruby26.rb
lib/parser/ruby27.rb
lib/parser/ruby30.rb
lib/parser/macruby.rb
lib/parser/rubymotion.rb
) - %w(
.gitignore
)

spec.files = Dir['bin/*', 'lib/**/*.rb', 'parser.gemspec']
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^test/})
spec.require_paths = ['lib']

spec.required_ruby_version = '>= 2.0.0'
Expand Down

0 comments on commit 9008df7

Please sign in to comment.