Skip to content

Commit

Permalink
Merge pull request #2 from jmatsu/fix_order
Browse files Browse the repository at this point in the history
Fixed compare_with's message
  • Loading branch information
jmatsu authored Jul 27, 2018
2 parents 1ebfae5 + dd9277c commit 464f019
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/apkstats/command/apk_analyzer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/apkstats/gem_version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Apkstats
VERSION = "0.0.1".freeze
VERSION = "0.0.2".freeze
end
6 changes: 4 additions & 2 deletions lib/apkstats/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 464f019

Please sign in to comment.