Sha256: 278983c3f95213db43099cacd321c8f651eb5c6375c07160e726bd18cc0935da

Contents?: true

Size: 1.1 KB

Versions: 24

Compression:

Stored size: 1.1 KB

Contents

Puppet::Face.define(:module, '1.0.0') do
  action(:changes) do
    summary "Show modified files of an installed module."
    description <<-EOT
      Shows any files in a module that have been modified since it was
      installed. This action compares the files on disk to the md5 checksums
      included in the module's metadata.
    EOT

    returns "Array of strings representing paths of modified files."

    examples <<-EOT
      Show modified files of an installed module:

      $ puppet module changes /etc/puppet/modules/vcsrepo/
      warning: 1 files modified
      lib/puppet/provider/vcsrepo.rb
    EOT

    arguments "<path>"

    when_invoked do |path, options|
      root_path = Puppet::ModuleTool.find_module_root(path)
      Puppet::ModuleTool::Applications::Checksummer.run(root_path, options)
    end

    when_rendering :console do |return_value|
      if return_value.empty?
        Puppet.notice "No modified files"
      else
        Puppet.warning "#{return_value.size} files modified"
      end
      return_value.map do |changed_file|
        "#{changed_file}"
      end.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/changes.rb
puppet-parse-0.1.3 lib/vendor/puppet/face/module/changes.rb
puppet-parse-0.1.2 lib/vendor/puppet/face/module/changes.rb
puppet-parse-0.1.1 lib/vendor/puppet/face/module/changes.rb
puppet-2.7.26 lib/puppet/face/module/changes.rb
puppet-2.7.25 lib/puppet/face/module/changes.rb
puppet-2.7.24 lib/puppet/face/module/changes.rb
puppet-2.7.23 lib/puppet/face/module/changes.rb
puppet-2.7.22 lib/puppet/face/module/changes.rb
puppet-parse-0.1.0 lib/vendor/puppet/face/module/changes.rb
puppet-parse-0.0.6 lib/vendor/puppet/face/module/changes.rb
puppet-2.7.21 lib/puppet/face/module/changes.rb
puppet-parse-0.0.5 lib/vendor/puppet/face/module/changes.rb
puppet-parse-0.0.4 lib/vendor/puppet/face/module/changes.rb
puppet-parse-0.0.2 lib/vendor/puppet/face/module/changes.rb
puppet-2.7.20 lib/puppet/face/module/changes.rb
puppet-2.7.20.rc1 lib/puppet/face/module/changes.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/puppet-2.7.18/lib/puppet/face/module/changes.rb
puppet-2.7.19 lib/puppet/face/module/changes.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/puppet-2.7.18/lib/puppet/face/module/changes.rb