Class: Berkshelf::Formatters::HumanReadable

Inherits:
Object
  • Object
show all
Includes:
AbstractFormatter
Defined in:
lib/berkshelf/formatters/human_readable.rb

Overview

Author:

Instance Method Summary collapse

Methods included from AbstractFormatter

#cleanup_hook

Instance Method Details

#deprecation(message) ⇒ Object

Output a deprecation warning

Parameters:



53
54
55
# File 'lib/berkshelf/formatters/human_readable.rb', line 53

def deprecation(message)
  Berkshelf.ui.info "DEPRECATED: #{message}"
end

#error(message) ⇒ Object

Output an error message using Berkshelf.ui

Parameters:



46
47
48
# File 'lib/berkshelf/formatters/human_readable.rb', line 46

def error(message)
  Berkshelf.ui.error message
end

#install(cookbook, version, location) ⇒ Object

Output a Cookbook installation message using Berkshelf.ui

Parameters:



14
15
16
# File 'lib/berkshelf/formatters/human_readable.rb', line 14

def install(cookbook, version, location)
  Berkshelf.ui.info "Installing #{cookbook} (#{version}) from #{location}"
end

#msg(message) ⇒ Object

Output a generic message using Berkshelf.ui

Parameters:



39
40
41
# File 'lib/berkshelf/formatters/human_readable.rb', line 39

def msg(message)
  Berkshelf.ui.info message
end

#upload(cookbook, version, chef_api_url) ⇒ Object

Output a Cookbook upload message using Berkshelf.ui

Parameters:



32
33
34
# File 'lib/berkshelf/formatters/human_readable.rb', line 32

def upload(cookbook, version, chef_api_url)
  Berkshelf.ui.info "Uploading #{cookbook} (#{version}) to: '#{chef_api_url}'"
end

#use(cookbook, version, path = nil) ⇒ Object

Output a Cookbook use message using Berkshelf.ui

Parameters:



23
24
25
# File 'lib/berkshelf/formatters/human_readable.rb', line 23

def use(cookbook, version, path = nil)
  Berkshelf.ui.info "Using #{cookbook} (#{version})#{' at '+path if path}"
end