Skip to content

Commit e0eed2f

Browse files
committed
Specify files field in gemspec.
1 parent 3ab0d60 commit e0eed2f

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

gettextpo.gemspec

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# You should have received a copy of the GNU General Public License
1616
# along with this program. If not, see <https://www.gnu.org/licenses/>.
1717

18+
require 'rake'
1819
require_relative "lib/gettextpo/version"
1920

2021
Gem::Specification.new do |spec|
@@ -33,15 +34,14 @@ Gem::Specification.new do |spec|
3334
spec.metadata["homepage_uri"] = spec.homepage
3435
spec.metadata["source_code_uri"] = "https://git.disroot.org/gemmaro/ruby-gettextpo.git"
3536

36-
# Specify which files should be added to the gem when it is released.
37-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
38-
gemspec = File.basename(__FILE__)
39-
spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
40-
ls.readlines("\x0", chomp: true).reject do |f|
41-
(f == gemspec) ||
42-
f.start_with?(*%w[bin/ test/ spec/ features/ .git appveyor Gemfile])
43-
end
44-
end
37+
spec.files = FileList[
38+
'*.md', 'COPYING', 'Gemfile', 'Rakefile',
39+
'ext/**/*.rb',
40+
'ext/**/*.c',
41+
'ext/**/*.h',
42+
'lib/**/*.rb',
43+
'mrblib/mrb_gettextpo_common.rb',
44+
]
4545
spec.require_paths = ["lib"]
4646
spec.extensions = ["ext/gettextpo/extconf.rb"]
4747
spec.metadata = {

0 commit comments

Comments
 (0)