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 <frank.taillandier@gmail.com>
This commit is contained in:
parent
3b32fa27d1
commit
d0b79bb3bb
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue