Skip to content
Ewoud Kohl van Wijngaarden edited this page Jul 4, 2017 · 2 revisions

Resource Reference

PuppetForge::User

Slug format: <username>

user = PuppetForge::User.find('puppetlabs')

Properties

Property Description Example
username Username
>> user.username
=> "puppetlabs"
display_name Preferred display name
>> user.display_name
=> "Puppet Labs"
module_count Number of modules owned by user
>> user.module_count
=> 78
release_count Total release for modules owned by user
>> user.release_count
=> 425
gravatar_id Unique identifier for user's Gravatar
>> user.gravatar_id
=> "fdd009b7c1ec96e088b389f773e87aec"
created_at Date and time user was created
>> user.created_at
=> "2010-05-19 05:46:26 -0700"
updated_at Date and time user was last updated
>> user.updated_at
=> "2014-02-26 12:30:59 -0800"

Associations

Association Description Example
modules Restricts the scope of queries to that of modules owned by this user
>> user.modules.total
=> 78

PuppetForge::Module

Slug format: <owner>-<name>

mod = PuppetForge::Module.find('puppetlabs-apache')

Properties

Property Description Example
name Module name
>> mod.name
=> "apache"
downloads Total download count for module
>> mod.downloads
=> 177029
supported Boolean indicating if the module has at least one release officially supported by Puppet Labs
>> mod.supported
=> true
homepage_url URL for module's homepage
>> mod.homepage_url
=> "https://github.com/puppetlabs/puppetlabs-apache"
issues_url URL for reporting issues/bugs for module
>> mod.issues_url
=> "https://tickets.puppetlabs.com"
created_at Date and time module was first published
>> mod.created_at
=> "2010-05-20 22:43:19 -0700"
updated_at Date and time module information was last updated
>> mod.updated_at
=> "2014-05-14 13:07:03 -0700"

Associations

Association Description Example
owner PuppetForge::User object representing module owner
>> mod.owner
=> #<PuppetForge::V3::User>
current_release PuppetForge::Release object representing the release of this module with the highest version number (according to Semantic Versioning specification)
>> mod.current_release
=> #<PuppetForge::V3::Release>
releases Array of PuppetForge::Release objects representing all the releases of this module, sorted in descending version order
>> mod.releases.size
=> 20

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
=> "1.0.1"
downloads Download count for release
>> release.downloads
=> 27431
supported Boolean indicating if release is officially supported by Puppet Labs
>> release.supported
=> true
file_size File size of release tarball in bytes
>> release.file_size
=> 100158
file_md5 MD5 hash of release tarball
>> release.file_md5
=> "2dae3bfc6ad74494414927ad21e79837"
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
=> ["apache", "web", "virtualhost",
"httpd", "centos", "rhel", "debian",
"ubuntu", "apache2", "ssl", "passenger",
"wsgi", "proxy", "virtual_host"]
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
=> "2014-03-04 16:26:19 -0800"
updated_at Date and time release information was last updated
>> release.updated_at
=> "2014-03-04 16:26:19 -0800"

Associations

Association Description Example
module PuppetForge::Module object representing the parent module of this release
>> release.module
=> #<PuppetForge::V3::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')