Sha256: a122a102893345b922c50b410c79b3cc299ab746b9e83df287cd0f929aff3c45

Contents?: true

Size: 851 Bytes

Versions: 5

Compression:

Stored size: 851 Bytes

Contents

require 'r10k/module'
require 'r10k/logging'

# 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.
class R10K::Module::Local < R10K::Module::Base

  R10K::Module.register(self)

  def self.implement?(name, args)
    args.is_a?(Hash) && (args[:local] || args[:type].to_s == 'local')
  end

  include R10K::Logging

  def version
    "0.0.0"
  end

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

  def status
    :insync
  end

  # @param [Hash] opts Deprecated
  def sync(opts={})
    logger.debug1 _("Module %{title} is a local module, always indicating synced.") % {title: title}
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
r10k-3.11.0 lib/r10k/module/local.rb
r10k-3.10.0 lib/r10k/module/local.rb
r10k-3.9.3 lib/r10k/module/local.rb
r10k-3.9.2 lib/r10k/module/local.rb
r10k-3.9.1 lib/r10k/module/local.rb