From 87ee3533653909f4d0a2317ee300ab4ea1ada9e0 Mon Sep 17 00:00:00 2001 From: John Manoogian III Date: Wed, 27 Dec 2017 20:39:09 -0800 Subject: [PATCH] silence rake warnings about unused vars --- lib/dashing/app.rb | 2 +- lib/dashing/cli.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/dashing/app.rb b/lib/dashing/app.rb index b5888aa..a2d0b2f 100644 --- a/lib/dashing/app.rb +++ b/lib/dashing/app.rb @@ -153,7 +153,7 @@ def format_event(body, name=nil) end def latest_events - settings.history.inject("") do |str, (id, body)| + settings.history.inject("") do |str, (_id, body)| str << body end end diff --git a/lib/dashing/cli.rb b/lib/dashing/cli.rb index 57d48d0..4a87fe1 100644 --- a/lib/dashing/cli.rb +++ b/lib/dashing/cli.rb @@ -34,7 +34,7 @@ def new(name) desc "generate (widget/dashboard/job) NAME", "Creates a new widget, dashboard, or job." def generate(type, name) public_send("generate_#{type}".to_sym, name) - rescue NoMethodError => e + rescue NoMethodError => _e puts "Invalid generator. Either use widget, dashboard, or job" end @@ -50,7 +50,7 @@ def install(gist_id, *args) print set_color("and run ", :yellow) print set_color("bundle install ", :yellow, :bold) say set_color("if needed. More information for this widget can be found at #{public_url}", :yellow) - rescue OpenURI::HTTPError => http_error + rescue OpenURI::HTTPError => _http_error say set_color("Could not find gist at #{public_url}"), :red end @@ -88,7 +88,7 @@ def job(name, auth_token = "") def run_command(command) begin system(command) - rescue Interrupt => e + rescue Interrupt => _e say "Exiting..." end end