summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2017-09-23 13:43:29 +0200
committerAzul <azul@riseup.net>2017-09-23 16:53:27 +0200
commitf40ef14010af08c49810c0a6a2349072948170e6 (patch)
tree19a2b13d35bb45b7d36c0c6f84fd483efbf55ece /Rakefile
parent40916407517f4bdb75a295caf29e02d4f403349b (diff)
style: more rubocop fixes
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile7
1 files changed, 3 insertions, 4 deletions
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"