Skip to content

Commit 517f372

Browse files
committed
don't require git for gemspec
1 parent b0a08b9 commit 517f372

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

CHANGELOG.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Use `Etc.nprocessors` for default number of threads with fallback to manual way [@toy](https://github.com/toy)
66
* Correct environment variable to specify `jpeg-recompress` location [@toy](https://github.com/toy)
77
* Added --benchmark, to compare performance of each tool [#217](https://github.com/toy/image_optim/issues/217) [#218](https://github.com/toy/image_optim/pull/218) [@gurgeous](https://github.com/gurgeous)
8+
* Don't require presence of `git` in gemspec [@toy](https://github.com/toy)
89

910
## v0.31.4 (2024-11-19)
1011

image_optim.gemspec

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,19 @@ Gem::Specification.new do |s|
1717
'source_code_uri' => "https://github.com/toy/#{s.name}",
1818
} if s.respond_to?(:metadata=)
1919

20-
s.files = `git ls-files`.split("\n")
21-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
22-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20+
s.files = Dir[*%w[
21+
.gitignore
22+
.pre-commit-hooks.yaml
23+
.rubocop.yml
24+
Dockerfile.test
25+
Gemfile
26+
LICENSE.txt
27+
*.markdown
28+
*.gemspec
29+
{.github,bin,lib,script,spec,vendor}/**/*
30+
]].reject(&File.method(:directory?))
31+
s.test_files = Dir['spec/**/*'].reject(&File.method(:directory?))
32+
s.executables = Dir['bin/*'].map(&File.method(:basename))
2333
s.require_paths = %w[lib]
2434

2535
s.post_install_message = <<-EOF

0 commit comments

Comments
 (0)