Module: KnifeUploader::BaseCommandMixin

Included in:
UploaderDataBagDiff, UploaderDataBagUpload, UploaderRunListDiff, UploaderRunListUpload
Defined in:
lib/chef/knife/uploader_base.rb

Class Method Summary collapse

Class Method Details

.included(includer) ⇒ Object



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/chef/knife/uploader_base.rb', line 97

def self.included(includer)
  includer.class_eval do
    deps do
      require 'ridley'
      Celluloid.logger.level = Logger::ERROR
      require 'diffy'
    end

    option :pattern,
      :short => '-p PATTERN',
      :long => '--pattern PATTERN',
      :description => 'A regular expression pattern to restrict the set of objects to ' +
                      'manipulate',
      :proc => Proc.new { |value| Chef::Config[:knife][:pattern] = value }

    option :debug,
      :long => '--debug',
      :description => 'Turn on debug messages',
      :proc => Proc.new { |value| Chef::Config[:knife][:debug] = value }
  end
end