packsaddle / ruby-git_diff_parser

Parse `git diff` into patches and lines.
http://packsaddle.org
MIT License
33 stars 14 forks source link

Reduce shipped files #340

Open sanemat opened 2 years ago

sanemat commented 2 years ago

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"]
sanemat commented 2 years ago

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"]