From 6e3f70428cb35e2140346fb081817c77ed9adde0 Mon Sep 17 00:00:00 2001 From: Nihad Abbasov Date: Tue, 23 Apr 2019 09:59:34 +0400 Subject: [PATCH] Fix rubocop offenses --- lib/gitlab/client/notes.rb | 2 +- lib/gitlab/shell_history.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/gitlab/client/notes.rb b/lib/gitlab/client/notes.rb index f6450e7fe..21d8702da 100644 --- a/lib/gitlab/client/notes.rb +++ b/lib/gitlab/client/notes.rb @@ -276,7 +276,7 @@ def edit_merge_request_note(project, merge_request, id, body) # in the 'else'. def note_content(body) if body.is_a?(Hash) - STDERR.puts 'Passing the note body as a Hash is deprecated. You should just pass the String.' + warn 'Passing the note body as a Hash is deprecated. You should just pass the String.' body else { body: body } diff --git a/lib/gitlab/shell_history.rb b/lib/gitlab/shell_history.rb index 62484c5a1..c14de31a1 100644 --- a/lib/gitlab/shell_history.rb +++ b/lib/gitlab/shell_history.rb @@ -50,8 +50,8 @@ def read_from_file path = history_file_path File.foreach(path) { |line| yield(line) } if File.exist?(path) - rescue StandardError => error - warn "History file not loaded: #{error.message}" + rescue StandardError => e + warn "History file not loaded: #{e.message}" end def max_lines