ruby-git_diff_parser
ruby-git_diff_parser copied to clipboard
Reduce shipped files
we have a lot of unnecessary files. https://my.diffend.io/gems/git_diff_parser/3.2.0/4.0.0
irb(main):003:0> `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
=> [".conventional-changelog.context.js", ".github/workflows/ci.yaml", ".gitignore", ".rspec", ".rubocop.yml", "CODE_OF_CONDUCT.md", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "changelog.md", "git_diff_parser.gemspec", "lib/git_diff_parser.rb", "lib/git_diff_parser/diff_parser.rb", "lib/git_diff_parser/line.rb", "lib/git_diff_parser/patch.rb", "lib/git_diff_parser/patches.rb", "lib/git_diff_parser/version.rb", "package.json", "thoughtbot-hound/LICENSE"]
NOTE:
Dir.glob('lib/**/*').select { |f| File.file?(f) } +
['thoughtbot-hound/LICENSE', 'changelog.md', 'CODE_OF_CONDUCT.md', 'LICENSE.txt', 'README.md']
=> ["lib/git_diff_parser/diff_parser.rb", "lib/git_diff_parser/patches.rb", "lib/git_diff_parser/version.rb", "lib/git_diff_parser/line.rb", "lib/git_diff_parser/patch.rb", "lib/git_diff_parser.rb", "thoughtbot-hound/LICENSE", "changelog.md", "CODE_OF_CONDUCT.md", "LICENSE.txt", "README.md"]