-
-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Background
While looking to see if my dependencies are out of date today, I decided it would be a good idea to check the CHANGELOGS before I blindly update things. It occurred to me that this is probably available in the puppetforge API already (it is). So all we need to do is parse/print it.
Proposal
The r10k:dependencies
should optionally attempt output a configurable number of changelog entries between the currently installed version and the newest available version.
Note: I am working on a patch already but I thought I'd solicit some feedback first.
Feedback Needed
Passing arguments or parameters to rake can be done in a few ways. There is precedent in ra10ke for using the "rake" way, but personally I dislike that way.
The options:
- The "rake" way -
rake r10k::dependencies[10]
(these arguments are positional which means remembering what goes where and using square brackets on the commandline can be troublesome) - Environment variables -
rake r10k::dependencies CHANGELOG=10
(in order to prevent environment variable name collisions I prefer prefixing variables with the project name or some sensible key, in this case 'RA10KE_' but that makes for unwieldy environment variable names) - ARGV -
rake r10k::dependencies 10
(still positional but at least the brackets are gone) - Ruby OptionParser -
rake r10k:dependencies --changelog=10
(this is nice, but not very "rake like")
See 4 Ways to Pass Arguments to a Rake Task for a full discussion.
I personally prefer the environment variable option because it "feels like rake", it is used by make and it is more clear to me than the "rake way".
Thoughts?