Sha256: a513516407254d2152af5bcd82b62cb14eadd7ee48c5d59e628a681c6c549e4a

Contents?: true

Size: 1.28 KB

Versions: 24

Compression:

Stored size: 1.28 KB

Contents

Puppet::Face.define(:module, '1.0.0') do
  action(:generate) do
    summary "Generate boilerplate for a new module."
    description <<-EOT
      Generates boilerplate for a new module by creating the directory
      structure and files recommended for the Puppet community's best practices.

      A module may need additional directories beyond this boilerplate
      if it provides plugins, files, or templates.
    EOT

    returns "Array of Pathname objects representing paths of generated files."

    examples <<-EOT
      Generate a new module in the current directory:

      $ puppet module generate puppetlabs-ssh
      notice: Generating module at /Users/kelseyhightower/puppetlabs-ssh
      puppetlabs-ssh
      puppetlabs-ssh/tests
      puppetlabs-ssh/tests/init.pp
      puppetlabs-ssh/spec
      puppetlabs-ssh/spec/spec_helper.rb
      puppetlabs-ssh/spec/spec.opts
      puppetlabs-ssh/README
      puppetlabs-ssh/Modulefile
      puppetlabs-ssh/metadata.json
      puppetlabs-ssh/manifests
      puppetlabs-ssh/manifests/init.pp
    EOT

    arguments "<name>"

    when_invoked do |name, options|
      Puppet::ModuleTool::Applications::Generator.run(name, options)
    end

    when_rendering :console do |return_value|
      return_value.map {|f| f.to_s }.join("\n")
    end
  end
end

Version data entries

24 entries across 24 versions & 3 rubygems

Version Path
puppet-parse-0.1.4 lib/vendor/puppet/face/module/generate.rb
puppet-parse-0.1.3 lib/vendor/puppet/face/module/generate.rb
puppet-parse-0.1.2 lib/vendor/puppet/face/module/generate.rb
puppet-parse-0.1.1 lib/vendor/puppet/face/module/generate.rb
puppet-2.7.26 lib/puppet/face/module/generate.rb
puppet-2.7.25 lib/puppet/face/module/generate.rb
puppet-2.7.24 lib/puppet/face/module/generate.rb
puppet-2.7.23 lib/puppet/face/module/generate.rb
puppet-2.7.22 lib/puppet/face/module/generate.rb
puppet-parse-0.1.0 lib/vendor/puppet/face/module/generate.rb
puppet-parse-0.0.6 lib/vendor/puppet/face/module/generate.rb
puppet-2.7.21 lib/puppet/face/module/generate.rb
puppet-parse-0.0.5 lib/vendor/puppet/face/module/generate.rb
puppet-parse-0.0.4 lib/vendor/puppet/face/module/generate.rb
puppet-parse-0.0.2 lib/vendor/puppet/face/module/generate.rb
puppet-2.7.20 lib/puppet/face/module/generate.rb
puppet-2.7.20.rc1 lib/puppet/face/module/generate.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/puppet-2.7.18/lib/puppet/face/module/generate.rb
puppet-2.7.19 lib/puppet/face/module/generate.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/puppet-2.7.18/lib/puppet/face/module/generate.rb