Skip to content
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

Include Changelog entries in r10k:dependencies output #47

Open
alanwevans opened this issue Jan 22, 2020 · 1 comment
Open

Include Changelog entries in r10k:dependencies output #47

alanwevans opened this issue Jan 22, 2020 · 1 comment

Comments

@alanwevans
Copy link

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:

  1. 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)
  2. 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)
  3. ARGV - rake r10k::dependencies 10 (still positional but at least the brackets are gone)
  4. 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?

@logicminds
Copy link
Contributor

The rake way does not work in my opinion. Additionally, all arguments will become strings so if booleans or numbers are created they will need to be casted in the code. I prefer the optionparser or ARGV.

I have opened #72 which changed a bunch of that code for the better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants