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

(FM-7963) Yard doc for serverspec #99

Merged
merged 1 commit into from
Apr 30, 2019

Conversation

tphoney
Copy link
Contributor

@tphoney tphoney commented Apr 29, 2019

No description provided.

@ghoneycutt
Copy link

I don't see a rake task for this. How do the docs get generated?

@tphoney tphoney changed the title (FM-7963) Yard doc for serverspec {WIP} (FM-7963) Yard doc for serverspec Apr 29, 2019
@tphoney
Copy link
Contributor Author

tphoney commented Apr 29, 2019

working on it :)

@tphoney
Copy link
Contributor Author

tphoney commented Apr 30, 2019

image
Its a start, inventory needs to be documented. So do the rake tasks. And outputting to markdown would mean we could update the wiki.
Its a start.

@tphoney tphoney changed the title {WIP} (FM-7963) Yard doc for serverspec (FM-7963) Yard doc for serverspec Apr 30, 2019
lib/puppet_litmus/serverspec.rb Outdated Show resolved Hide resolved
@tphoney
Copy link
Contributor Author

tphoney commented Apr 30, 2019

comments are a pain, rubocop and yard fighting.
image
It works now

def idempotent_apply(manifest)
manifest_file_location = create_manifest_file(manifest)
apply_manifest(nil, catch_failures: true, manifest_file_location: manifest_file_location)
apply_manifest(nil, catch_changes: true, manifest_file_location: manifest_file_location)
end

# rubocop:disable Layout/TrailingWhitespace
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the trailing whitespace needed? I think that in Puppet Strings (which is also Yard based) it isn't needed. Or is it to force a newline?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is to force the newline, to make it easier to read.

# Applies a manifest. returning the result of that apply. Mimics the apply_manifest from beaker
#
# @param manifest [String] puppet manifest code to be applied.
# @param opts [Hash] Alters the behaviour of the command. Valid options are:
Copy link
Contributor

Choose a reason for hiding this comment

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

Long term it'd be nice to change the API to explicitly accept these parameters rather than squashing them in opts, but let's at least document them :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was to provide some backwards compatibility for the beaker helper. i agree with you

@florindragos florindragos merged commit 8790d09 into puppetlabs:master Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants