atheiman / better-chef-rundeck

A Sinatra app for integrating Chef and Rundeck
MIT License
13 stars 8 forks source link

adds tags merge feature #40

Closed thlacroix closed 5 years ago

thlacroix commented 5 years ago

Attempt to implement https://github.com/atheiman/better-chef-rundeck/issues/37

As described in the README, attributes can be merged (+flattened) into the tags attribute by listing them joined by $$$ in the tags GET parameter, eg: tags=environment$$$roles$$$run_list$$$tags.

The $$$ is mainly a placeholder for now, we can discuss here what would be the ideal separator to use. I wanted something with + but these characters looked discarded somehow, so I moved to something else that should not conflict too much with real attribute names.

thlacroix commented 5 years ago

Hi @atheiman, what do you think of the change ?

Do you have a preference for the separator ?

atheiman commented 5 years ago

Id rather see the syntax in the issue, either of these:

?tags=platform&tags=platform_version
?tags=platform&tags+=platform_version

But looking thru sinatra, I don't see a way to handle GET params specified twice so I think what you're doing is fine.

I'm gonna try to get Travis CI builds on this repo again, I guess they got removed when GitHub switched to the new "Checks" feature

atheiman commented 5 years ago

@thlacroix can you try pushing another commit to see if Travis builds and posts back to this PR?

looks like the last build succeeded in travis, just didnt post back to the PR

thlacroix commented 5 years ago

Thanks for your feedback. Indeed the syntax proposed in the issue didn't seem straightforward with sinatra, so I went another way.

I'm not a big fan of the $$$ but I don't have a good replacement idea.

I've re-pushed my commit to trigger travis, looks green.

atheiman commented 5 years ago

cool, can you bump up the version to 1.2.0 https://github.com/atheiman/better-chef-rundeck/blob/master/lib/better_chef_rundeck.rb#L7

thlacroix commented 5 years ago

Done, version bumped to 1.2.0