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

(PDOC-127) Strip whitespace from type feature docstrings #112

Merged

Conversation

whopper
Copy link
Contributor

@whopper whopper commented Oct 11, 2016

No description provided.

@@ -78,7 +78,7 @@ class Feature
# @param [String] docstring The docstring of the feature.
def initialize(name, docstring)
@name = name
@docstring = docstring
@docstring = Puppet::Util::Docs.scrub(docstring).gsub("\n", ' ')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: Puppet::Util::Doc.scrub doesn't strip newlines, so it seems we have to do it ourselves.

@whopper
Copy link
Contributor Author

whopper commented Oct 11, 2016

Here are the user type features without whitespace:

      "features": [
        {
          "name": "allows_duplicates",
          "description": "The provider supports duplicate users with the same UID."
        },
        {
          "name": "manages_homedir",
          "description": "The provider can create and remove home directories."
        },
        {
          "name": "manages_passwords",
          "description": "The provider can modify user passwords, by accepting a password hash."
        },
        {
          "name": "manages_password_age",
          "description": "The provider can set age requirements and restrictions for passwords."
        },
        {
          "name": "manages_password_salt",
          "description": "The provider can set a password salt. This is for providers that implement PBKDF2 passwords with salt properties."
        },
        {
          "name": "manages_solaris_rbac",
          "description": "The provider can manage roles and normal users"
        },
        {
          "name": "manages_expiry",
          "description": "The provider can manage the expiry date for a user."
        },
        {
          "name": "system_users",
          "description": "The provider allows you to create system users with lower UIDs."
        },
        {
          "name": "manages_aix_lam",
          "description": "The provider can manage AIX Loadable Authentication Module (LAM) system."
        },
        {
          "name": "libuser",
          "description": "Allows local users to be managed on systems that also use some other remote NSS method of managing accounts."
        },
        {
          "name": "manages_shell",
          "description": "The provider allows for setting shell and validates if possible"
        },
        {
          "name": "manages_loginclass",
          "description": "The provider can manage the login class for a user."
        }
      ]
    }
  ],

@peterhuene peterhuene merged commit 8e911af into puppetlabs:master Oct 11, 2016
@chelnak chelnak added the bugfix label Oct 13, 2022
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.

3 participants