Class: R10K::Module::Local

Inherits:
Base
  • Object
show all
Includes:
Logging
Defined in:
lib/r10k/module/local.rb

Overview

A dummy module type that can be used to “protect” Puppet modules that exist inside of the Puppetfile “moduledir” location. Local modules will not be modified, and will not be purged when r10k removes unmanaged modules.

Constant Summary

Constants included from Logging

Logging::LOG_LEVELS

Instance Attribute Summary

Attributes inherited from Base

#dirname, #environment, #name, #origin, #owner, #path, #title

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Logging

debug_formatter, default_formatter, default_outputter, #logger, #logger_name, parse_level

Methods inherited from Base

#accept, #full_path, #initialize

Constructor Details

This class inherits a constructor from R10K::Module::Base

Class Method Details

.implement?(name, args) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/r10k/module/local.rb', line 11

def self.implement?(name, args)
  args.is_a?(Hash) && args[:local]
end

Instance Method Details

#propertiesObject



21
22
23
24
25
26
27
# File 'lib/r10k/module/local.rb', line 21

def properties
  {
    :expected => "0.0.0 (local)",
    :actual   => "0.0.0 (local)",
    :type     => :forge,
  }
end

#statusObject



29
30
31
# File 'lib/r10k/module/local.rb', line 29

def status
  :insync
end

#sync(opts = {}) ⇒ Object



33
34
35
# File 'lib/r10k/module/local.rb', line 33

def sync(opts={})
  logger.debug1 _("Module %{title} is a local module, always indicating synced.") % {title: title}
end

#versionObject



17
18
19
# File 'lib/r10k/module/local.rb', line 17

def version
  "0.0.0"
end