class RBT::Cookbooks::CheckForCorrectDependencies
Constants
- NAMESPACE
#¶ ↑
NAMESPACE
¶ ↑#¶ ↑
Public Class Methods
[](i = '')
click to toggle source
new( commandline_arguments = ARGV, run_already = true )
click to toggle source
Public Instance Methods
check_for_every_entry()
click to toggle source
#¶ ↑
check_for_every_entry
¶ ↑
This method will check for every available (registered) program.
#¶ ↑
# File lib/rbt/validation/check_for_correct_dependencies.rb, line 85 def check_for_every_entry opnn; e 'Now checking every program. This may take a while.' available_programs?.each {|program| # ===================================================================== # # The next line is very verbose, so it may be best to enable it only # for debugging purposes really. # ===================================================================== # # opnn; e 'Working on the program `'+sfancy(program)+'` next.' # ===================================================================== # # We have two ways for the next line - we will either instantiate a # new Cookbooks object - or we will make use of an already existing, # expanded .yml file that holds the dataset for the program at hand. # ===================================================================== # if expanded_directory_exists? and File.exist?( path_to_this_expanded_cookbooks_dataset(program) ) dataset = YAML.load_file( path_to_this_expanded_cookbooks_dataset(program) ) deps = dataset['required_deps_on'] else dataset = RBT::Cookbooks::Cookbook.new(program) { :bypass_menu } deps = dataset.deps? end result = deps.all? {|entry| RBT.really_does_include?(entry) } if result # Ok, in this case all entries were found. else # else it was not found, so work on that. deps.each {|entry| if entry.include? ' ' entry = entry.split(' ').first.strip end unless RBT.really_does_include? entry opnn; e "#{format_program(program)}No "\ "entry for `#{simp(entry)}` was found." end } end } end
commandline_arguments?()
click to toggle source
#¶ ↑
commandline_arguments?¶ ↑
#¶ ↑
# File lib/rbt/validation/check_for_correct_dependencies.rb, line 64 def commandline_arguments? @commandline_arguments end
Also aliased as: input?
format_program(i)
click to toggle source
reset()
click to toggle source
run()
click to toggle source
set_commandline_arguments(i = nil)
click to toggle source