class RBT::Cookbooks::ValidateCookbookAliases
Constants
- COOKBOOK_ALIASES_FILE
#¶ ↑
COOKBOOK_ALIASES_FILE
¶ ↑#¶ ↑
- YAML_COOKBOOK_ALIASES
Public Class Methods
Public Instance Methods
feedback_debug()
click to toggle source
find_out_which_files_are_missing()
click to toggle source
#¶ ↑
find_out_which_files_are_missing
¶ ↑
This method will find out which cookbook-files are missing.
#¶ ↑
# File lib/rbt/checks_and_validations/validate_cookbook_aliases.rb, line 109 def find_out_which_files_are_missing return_sorted.each {|value| # ===================================================================== # # The variable value is not allowed to include any '_' character. # ===================================================================== # value.delete!('_') if value.include? '_' # ===================================================================== # # Simply do a File.exist? check next. # ===================================================================== # _ = individual_cookbooks_directory?+value+'.yml' if File.exist?(_) # e 'The key `'+key.to_s+'` is pointing at `'+value.to_s+'`. ' # e 'This is ok, it is a valid entry.' else # Does not exist. report_this_lateron(_) end } end
report_everything_now()
click to toggle source
#¶ ↑
report_everything_now
¶ ↑
#¶ ↑
# File lib/rbt/checks_and_validations/validate_cookbook_aliases.rb, line 150 def report_everything_now @array_this_file.each { |file| value = File.basename(file).gsub(/\.yml/,'') opnwarn 'Nope, `'+sfile(file)+swarn('` does not exist.') opnwarn 'Consider fixing `'+sfancy(value)+swarn('` in order to '\ 'have a valid cookbook-aliases file.') } if @array_this_file.empty? e cyan('Everything is fine, all entries are correct! ')+ yellow(cheering_person?) end end
reset()
click to toggle source
#¶ ↑
reset¶ ↑
#¶ ↑
Calls superclass method
RBT::Base#reset
# File lib/rbt/checks_and_validations/validate_cookbook_aliases.rb, line 53 def reset super() infer_the_namespace # ======================================================================= # # === @array_this_file # ======================================================================= # @array_this_file = [] do_not_debug end
return_sorted()
click to toggle source
run()
click to toggle source
#¶ ↑
run (run tag)¶ ↑
#¶ ↑
# File lib/rbt/checks_and_validations/validate_cookbook_aliases.rb, line 166 def run inform_the_user_what_will_happen # We inform the user that we validate the cookbook-aliases file. find_out_which_files_are_missing report_everything_now feedback_debug if debug? end
Also aliased as: check_integrity_of_cookbook_aliases
Private Instance Methods
inform_the_user_what_will_happen()
click to toggle source