Skip to content

Commit 2955aa7

Browse files
committed
Modernize gemspec & remove unnecessary files to reduce size
1 parent ff863c9 commit 2955aa7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

rails-footnotes.gemspec

+8-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ require_relative "./lib/rails-footnotes/version"
33
Gem::Specification.new do |s|
44
s.name = "rails-footnotes"
55
s.version = Footnotes::VERSION
6-
s.platform = Gem::Platform::RUBY
76
s.authors = ["Roman V. Babenko", "José Valim", "Keenan Brock", "Duane Johnson", "Adrien Siami", "André Arko"]
87
s.email = ["[email protected]"]
98
s.homepage = "https://github.com/indirect/rails-footnotes"
@@ -13,7 +12,13 @@ Gem::Specification.new do |s|
1312
s.add_dependency "rails", "~> 7.0"
1413
s.required_ruby_version = ">= 3.0"
1514

16-
s.files = `git ls-files`.split("\n")
17-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
15+
# Specify which files should be added to the gem when it is released.
16+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
17+
s.files =
18+
IO.popen(["git", "-C", __dir__, "ls-files", "-z", "--", "exe/", "lib/", "*.md", "*.txt", "CHANGELOG", "*LICENSE"], &:read).split("\x0")
19+
.reject do |f|
20+
(File.expand_path(f) == __FILE__) ||
21+
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile Rakefile tasks/])
22+
end
1823
s.require_paths = ["lib"]
1924
end

0 commit comments

Comments
 (0)