-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(#22) Added support for checkupdates and apt_checkupdates #9
Conversation
@@ -108,6 +110,9 @@ def main | |||
if ['count', 'md5'].include?(configuration[:action]) | |||
status = "%s" % [result[:data][:output]] | |||
puts(pattern % [result[:sender], status]) | |||
elsif ['yum_checkupdates', 'apt_update', 'checkupdates', 'apt_checkupdates'].include?(configuration[:action]) | |||
status = result[:data][:outdated_packages].map{ |package| package[:package] }.join(' ') | |||
puts(pattern % [result[:sender], status]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the 2 different formats? I think this is quite nice rather than the format above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tough having more information is good, but perhaps this went a bit to far with returning all information. Updated code to return name + version in verbose mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good apart from the syntax error, please squash the commits to one and change the commit message to (#8) Added support.....
application/package.rb
Outdated
puts(pattern % [result[:sender], result[:data][:ensure]]) | ||
elsif ['yum_checkupdates', 'apt_update', 'checkupdates', 'apt_checkupdates'].include?(configuration[:action]) | ||
status = result[:data][:outdated_packages].map{ |package| "%s-%s" % package[:package], package[:version] }.join(' ') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests failing here, should be "%s-%s" % [foo, bar]
make verbose return name+version fix failing test
Merge branch 'master' of https://github.com/KoenDierckx/package-agent
I fixed the tests |
Thanks :) I'll see if I can squash it for you, thanks a lot, will review soon |
No description provided.