From f57a33394f0970cb89b852e03000456dc492c683 Mon Sep 17 00:00:00 2001 From: Felix Leipold Date: Wed, 22 Apr 2015 14:00:38 +0200 Subject: [PATCH] Reduce noise level Removing debug output and unnecessary output. --- bin/jira-format-issues | 3 --- lib/jirasync/syncer.rb | 12 ++++++++---- lib/jirasync/version.rb | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/bin/jira-format-issues b/bin/jira-format-issues index 8009600..5c4d14c 100755 --- a/bin/jira-format-issues +++ b/bin/jira-format-issues @@ -94,10 +94,7 @@ class IssueRenderer filename = attachment['filename'] content_url = find_attachment(attachment, issue) extension = File.extname(filename) - STDERR.puts("extension: " + extension) image_marker = [".png", ".jpg"].include?(extension) ? "!": "" - - STDERR.puts("marker: " + image_marker) "* #{image_marker}[#{filename}](#{content_url})" }.join("\n" * 2) end diff --git a/lib/jirasync/syncer.rb b/lib/jirasync/syncer.rb index 4c9aa2c..71310c7 100644 --- a/lib/jirasync/syncer.rb +++ b/lib/jirasync/syncer.rb @@ -49,7 +49,9 @@ def fetch(keys) end end keys_with_errors.sort! - STDERR.puts("Errors fetching these tickets: #{keys_with_errors.join(",")}") + if !keys_with_errors.empty? + STDERR.puts("Errors fetching these tickets: #{keys_with_errors.join(",")}") + end keys_with_errors end @@ -68,11 +70,13 @@ def update() state = @repo.load_state() start_time = DateTime.now since = DateTime.parse(state['time']).new_offset(0) - STDERR.puts("Fetching issues that have changes since #{since.to_s}") + STDERR.puts("Fetching issues that have been changed/ added since #{since.to_s}") issues = @client.changed_since(@project_key, since)['issues'].map { |issue| issue['key'] } STDERR.puts("Updated Issues: #{issues.empty? ? "None" : issues.join(",")}") - STDERR.print("Retrying issues with earlier errors: ") - STDERR.puts(state['errors'].empty? ? "None" : state['errors'].join(",")) + if !state['errors'].empty? + STDERR.print("Retrying issues with earlier errors: ") + STDERR.puts( state['errors'].join(",")) + end keys_with_errors = fetch(issues + state['errors']) @repo.save_state({"time" => start_time, "errors" => keys_with_errors}) end diff --git a/lib/jirasync/version.rb b/lib/jirasync/version.rb index 40bfb3f..4621a5f 100644 --- a/lib/jirasync/version.rb +++ b/lib/jirasync/version.rb @@ -1,3 +1,3 @@ module JiraSync - VERSION = "0.4.4" + VERSION = "0.4.5" end