In Files

Parent

Included Modules

Class/Module Index [+]

Quicksearch

Shef::Options

Public Class Methods

setup!() click to toggle source
# File lib/chef/shef.rb, line 284
def self.setup!
  self.new.parse_opts
end

Public Instance Methods

parse_opts() click to toggle source
# File lib/chef/shef.rb, line 288
def parse_opts
  remainder = parse_options
  environment = remainder.first
  # We have to nuke ARGV to make sure irb's option parser never sees it.
  # otherwise, IRB complains about command line switches it doesn't recognize.
  ARGV.clear
  config[:config_file] = config_file_for_shef_mode(environment)
  config_msg = config[:config_file] || "none (standalone shef session)"
  puts "loading configuration: #{config_msg}"
  Chef::Config.from_file(config[:config_file]) if !config[:config_file].nil? && File.exists?(config[:config_file]) && File.readable?(config[:config_file])
  Chef::Config.merge!(config)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.