-
Notifications
You must be signed in to change notification settings - Fork 30
Resource Reference
Jesse Scott edited this page May 15, 2014
·
2 revisions
##Resource Reference
###PuppetForge::User
Slug format: <username>
user = PuppetForge::User.find('puppetlabs')
####Properties
Property | Description | Example |
---|---|---|
username | Username | >> user.username |
display_name | Preferred display name | >> user.display_name |
module_count | Number of modules owned by user | >> user.module_count |
release_count | Total release for modules owned by user | >> user.release_count |
gravatar_id | Unique identifier for user's Gravatar | >> user.gravatar_id |
created_at | Date and time user was created | >> user.created_at |
updated_at | Date and time user was last updated | >> user.updated_at |
####Associations
Association | Description | Example |
---|---|---|
modules | Restricts the scope of queries to that of modules owned by this user | >> user.modules.total |
###PuppetForge::Module
Slug format: <owner>-<name>
mod = PuppetForge::Module.find('puppetlabs-apache')
####Properties
Property | Description | Example |
---|---|---|
name | Module name | >> mod.name |
downloads | Total download count for module | >> mod.downloads |
supported | Boolean indicating if the module has at least one release officially supported by Puppet Labs | >> mod.supported |
homepage_url | URL for module's homepage | >> mod.homepage_url |
issues_url | URL for reporting issues/bugs for module | >> mod.issues_url |
created_at | Date and time module was first published | >> mod.created_at |
updated_at | Date and time module information was last updated | >> mod.updated_at |
####Associations
Association | Description | Example |
---|---|---|
owner | PuppetForge::User object representing module owner | >> mod.owner |
current_release | PuppetForge::Release object representing the release of this module with the highest version number (according to Semantic Versioning specification) | >> mod.current_release |
releases | Array of PuppetForge::Release objects representing all the releases of this module, sorted in descending version order | >> mod.releases.size |
###PuppetForge::Release
Slug format: <owner>-<module_name>-<version>
release = PuppetForge::Release.find('puppetlabs-apache-1.0.1')
####Properties
Property | Description | Example |
---|---|---|
version | Version number of release | >> release.version |
downloads | Download count for release | >> release.downloads |
supported | Boolean indicating if release is officially supported by Puppet Labs | >> release.supported |
file_size | File size of release tarball in bytes | >> release.file_size |
file_md5 | MD5 hash of release tarball | >> release.file_md5 |
readme | HTML version of release README | >> release.readme |
changelog | HTML version of release CHANGELOG | >> release.changelog |
license | HTML version of release LICENSE | >> release.license |
tags | Array of tags applied to this release | >> release.tags |
metadata | ActiveSupport::HashWithIndifferentAccess representing the contents of this release's metadata.json | >> release.metadata |
download_url | URL for downloading release tarball | >> release.download_url |
created_at | Date and time release was first published | >> release.created_at |
updated_at | Date and time release information was last updated | >> release.updated_at |
####Associations
Association | Description | Example |
---|---|---|
module | PuppetForge::Module object representing the parent module of this release | >> release.module |
####Methods
Method | Description | Example |
---|---|---|
download(file) | Download release tarball and save it to the passed-in filename | >> release.download('/tmp/puppetlabs-apache-1.0.1.tar.gz') |