From f40ef14010af08c49810c0a6a2349072948170e6 Mon Sep 17 00:00:00 2001 From: Azul Date: Sat, 23 Sep 2017 13:43:29 +0200 Subject: style: more rubocop fixes --- Rakefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index a246c8e..576e54c 100644 --- a/Rakefile +++ b/Rakefile @@ -28,9 +28,7 @@ $gem_path = File.join($base_dir, 'pkg', "#{$spec.name}-#{$spec.version}.gem") def run(cmd) PTY.spawn(cmd) do |output, _input, _pid| begin - while line = output.gets - puts line - end + output.each { |line| puts line } rescue Errno::EIO end end @@ -38,7 +36,8 @@ rescue PTY::ChildExited end def built_gem_path - Dir[File.join($base_dir, "#{$spec.name}-*.gem")].sort_by { |f| File.mtime(f) }.last + Dir[File.join($base_dir, "#{$spec.name}-*.gem")] + .max_by { |f| File.mtime(f) } end desc "Build #{$spec.name}-#{$spec.version}.gem into the pkg directory" -- cgit v1.2.3