From 1817ab3e1668e80caaa3d86faf5559e1402cf94b Mon Sep 17 00:00:00 2001 From: Jumpei Matsuda Date: Fri, 27 Jul 2018 17:23:33 +0900 Subject: [PATCH 1/2] Fixed a message of comparision --- lib/apkstats/command/apk_analyzer.rb | 2 +- lib/apkstats/plugin.rb | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/apkstats/command/apk_analyzer.rb b/lib/apkstats/command/apk_analyzer.rb index ad366c5..f025635 100644 --- a/lib/apkstats/command/apk_analyzer.rb +++ b/lib/apkstats/command/apk_analyzer.rb @@ -6,7 +6,7 @@ def compare_with(apk_filepath, other_apk_filepath) out, err = run_command('apk', 'compare', '--different-only', apk_filepath, other_apk_filepath) if out - return out.partition("\n").first, nil + return out.partition("\n").first.strip, nil else return nil, err end diff --git a/lib/apkstats/plugin.rb b/lib/apkstats/plugin.rb index 9c49e61..bc02145 100644 --- a/lib/apkstats/plugin.rb +++ b/lib/apkstats/plugin.rb @@ -44,9 +44,11 @@ def compare_with(other_apk_filepath, opts={}) out, err = command.compare_with(apk_filepath, other_apk_filepath) if opts[:do_report] - if out + if out&.empty? + message("Apk file size was not changed") + elsif out left, right, diff, = out.split("\s") - message("Apk file size was changed by #{diff} : from #{right} to #{left}") + message("Apk file size was changed by #{diff} : from #{left} to #{right}") else warn(err) end From dd9277cb7be47c9099ca23f5f80fbe22c404efcd Mon Sep 17 00:00:00 2001 From: Jumpei Matsuda Date: Fri, 27 Jul 2018 17:28:41 +0900 Subject: [PATCH 2/2] Bump up version --- lib/apkstats/gem_version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/apkstats/gem_version.rb b/lib/apkstats/gem_version.rb index a5ede70..1da3c00 100644 --- a/lib/apkstats/gem_version.rb +++ b/lib/apkstats/gem_version.rb @@ -1,3 +1,3 @@ module Apkstats - VERSION = "0.0.1".freeze + VERSION = "0.0.2".freeze end