# class Puppet::ModuleTool::Applications::Builder

### Public Class Methods

new(path, options = {}) click to toggle source
Calls superclass method Puppet::ModuleTool::Applications::Application.new

    # File lib/puppet/module_tool/applications/builder.rb, line 7
    def initialize(path, options = {})
      @path = File.expand_path(path)
      @pkg_path = File.join(@path, 'pkg')
      super(options)
    end

### Public Instance Methods

run() click to toggle source

    # File lib/puppet/module_tool/applications/builder.rb, line 13
    def run
      load_modulefile!
      create_directory
      copy_contents
      add_metadata
      Puppet.notice "Building #{@path} for release"
      tar
      gzip
      relative = Pathname.new(File.join(@pkg_path, filename('tar.gz'))).relative_path_from(Pathname.new(Dir.pwd))

      # Return the Pathname object representing the path to the release
      # archive just created. This return value is used by the module_tool
      # face build action, and displayed to on the console using the to_s
      # method.
      #
      # Example return value:
      #
      #   <Pathname:puppetlabs-apache/pkg/puppetlabs-apache-0.0.1.tar.gz>
      #
      relative
    end