Module: Stove

Defined in:
lib/stove.rb,
lib/stove/cli.rb,
lib/stove/mash.rb,
lib/stove/util.rb,
lib/stove/error.rb,
lib/stove/config.rb,
lib/stove/filter.rb,
lib/stove/runner.rb,
lib/stove/version.rb,
lib/stove/cookbook.rb,
lib/stove/packager.rb,
lib/stove/community.rb,
lib/stove/rake_task.rb,
lib/stove/validator.rb,
lib/stove/plugins/git.rb,
lib/stove/plugins/base.rb,
lib/stove/cookbook/metadata.rb,
lib/stove/mixins/insideable.rb,
lib/stove/mixins/optionable.rb,
lib/stove/plugins/community.rb,
lib/stove/mixins/validatable.rb,
lib/stove/mixins/instanceable.rb

Defined Under Namespace

Modules: Error, Middleware, Mixin, Plugin, Util Classes: Cli, Community, Config, Cookbook, Filter, Mash, Packager, RakeTask, Runner, Validator

Constant Summary collapse

UNSET_VALUE =

A constant to represent an unset value. nil is too generic and doesn’t allow users to specify a value as nil. Using this constant, we can safely create set_or_return-style methods.

Returns:

  • (Object)
Object.new
USER_AGENT =

The User-Agent to use for HTTP requests

Returns:

  • (String)
"Stove #{VERSION}"
VERSION =
'5.1.0'

Class Method Summary collapse

Class Method Details

.log_levelSymbol

Get the current log level.

Returns:

  • (Symbol)


81
82
83
# File 'lib/stove.rb', line 81

def log_level
  Logify.level
end

.log_level=(level) ⇒ Object

Set the log level.

Examples:

Set the log level to :info

ChefAPI.log_level = :info

Parameters:

  • level (#to_sym)

    the log level to set



72
73
74
# File 'lib/stove.rb', line 72

def log_level=(level)
  Logify.level = level.to_sym
end

.rootPathname

The source root of the ChefAPI gem. This is useful when requiring files that are relative to the root of the project.

Returns:

  • (Pathname)


59
60
61
# File 'lib/stove.rb', line 59

def root
  @root ||= Pathname.new(File.expand_path('../../', __FILE__))
end