From d0b79bb3bb26af44d43e6d85939c205715959ff3 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 13 Apr 2020 19:56:59 +0530 Subject: [PATCH] Use Ruby's English module in gemspec * Can use `git ls-files` directly without the `-z` option. * Can consequently use a readable variable `$INPUT_RECORD_SEPARATOR` instead of cryptic string `"\x0"` to generate array of paths. Co-authored-by: Frank Taillandier --- jekyll.gemspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jekyll.gemspec b/jekyll.gemspec index e02bb29a..f9817371 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -1,5 +1,6 @@ # frozen_string_literal: true +require "English" require_relative "lib/jekyll/version" Gem::Specification.new do |s| @@ -12,7 +13,7 @@ Gem::Specification.new do |s| s.summary = "A simple, blog aware, static site generator." s.description = "Jekyll is a simple, blog aware, static site generator." - all_files = `git ls-files -z`.split("\x0") + all_files = `git ls-files`.split($INPUT_RECORD_SEPARATOR) s.files = all_files.grep(%r!^(exe|lib|rubocop)/|^.rubocop.yml$!) s.executables = all_files.grep(%r!^exe/!) { |f| File.basename(f) } s.bindir = "exe"