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

Acceptance for kb0286 (SUP-1355) #54

Merged
merged 3 commits into from
Sep 5, 2019
Merged

Acceptance for kb0286 (SUP-1355) #54

merged 3 commits into from
Sep 5, 2019

Conversation

MartyEwings
Copy link
Collaborator

PDX 1.13 update too

@MartyEwings
Copy link
Collaborator Author

Darn rubocop that's valid litmus syntax !

@MartyEwings
Copy link
Collaborator Author

@tphoney is the "Params ="not proper litmus syntax? Rubocop is flagging it, do I need to create an exception?

@MartyEwings MartyEwings added the enhancement New feature or request label Sep 4, 2019
@tphoney
Copy link

tphoney commented Sep 5, 2019

weeeeeee, ruby at its best
params = { 'puppet_mode' => 'disable', 'reason' => 'taskdisabled' }
so this is assigning the hash to a new variable called params. Generally you dont assign things inside a function call so you have 2 choices.
result = run_bolt_task('support_tasks::kb0286_change_puppet_daemon_runmode', { 'puppet_mode' => 'disable', 'reason' => 'taskdisabled' })
or
result = run_bolt_task('support_tasks::kb0286_change_puppet_daemon_runmode', params: { 'puppet_mode' => 'disable', 'reason' => 'taskdisabled' })

ala https://thoughtbot.com/blog/ruby-2-keyword-arguments

Copy link

@tphoney tphoney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my comment, pick one of the two options

@MartyEwings MartyEwings changed the title Acceptance for kb0286 Acceptance for kb0286 (SUP-1355) Sep 5, 2019
Copy link
Contributor

@pgrant87 pgrant87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@MartyEwings MartyEwings merged commit b23f114 into puppetlabs:master Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants