class Cookbooks::ValidateCookbookAliases
Constants
- COOKBOOK_ALIASES_FILE
#¶ ↑
COOKBOOK_ALIASES_FILE¶ ↑
#¶ ↑
- NAMESPACE
#¶ ↑
NAMESPACE¶ ↑
#¶ ↑
- 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/cookbooks/validation/validate_cookbook_aliases.rb, line 113 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. # ===================================================================== # _ = 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
opnn()
click to toggle source
report_everything_now()
click to toggle source
#¶ ↑
#report_everything_now¶ ↑
#¶ ↑
# File lib/cookbooks/validation/validate_cookbook_aliases.rb, line 80 def report_everything_now @array_this_file.each { |file| value = File.basename(file).gsub(/\.yml/,'') opnn; ewarn 'Nope, `'+sfile(file)+swarn('` does not exist.') opnn; ewarn 'Consider fixing `'+sfancy(value)+swarn('` in order to have a valid '\ 'cookbook-aliases file.') } if @array_this_file.empty? opnn; e cyan('Everything is fine, all entries are correct!') end end
reset()
click to toggle source
return_sorted()
click to toggle source
run()
click to toggle source
#¶ ↑
run (run tag)¶ ↑
#¶ ↑
# File lib/cookbooks/validation/validate_cookbook_aliases.rb, line 160 def run inform_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_user_what_will_happen()
click to toggle source