class RBT::Cookbooks::ValidateBlfsEntries
Public Class Methods
[](i = '')
click to toggle source
new( commandline_arguments = ARGV, run_already = true )
click to toggle source
Public Instance Methods
do_notify_the_user_that_no_problems_were_encountered()
click to toggle source
#¶ ↑
do_notify_the_user_that_no_problems_were_encountered
¶ ↑
#¶ ↑
# File lib/rbt/checks_and_validations/validate_blfs_entries.rb, line 141 def do_notify_the_user_that_no_problems_were_encountered opne "No problems were encountered, thus indicating that all" opne "BLFS entries registered in the RBT project are correct. "+ gold(cheerful_person) end
report_all_programs_that_do_not_have_a_proper_BLFS_entry()
click to toggle source
#¶ ↑
report_all_programs_that_do_not_have_a_proper_BLFS_entry
(report tag)¶ ↑
#¶ ↑
# File lib/rbt/checks_and_validations/validate_blfs_entries.rb, line 94 def report_all_programs_that_do_not_have_a_proper_BLFS_entry all_programs = all_programs? opne "#{rev}Going over all "\ "#{steelblue(all_programs.size.to_s)} "\ "registered programs next, looking" opne "for incorrect BLFS entries - this may take a while." all_programs.each {|this_program| @raw_cookbook.find(this_program) dataset = @raw_cookbook.dataset if dataset.has_key? 'blfs' blfs_entry = dataset['blfs'] if blfs_entry.is_a? Array blfs_entry = blfs_entry.first end if blfs_entry.nil? e 'Odd BLFS entry for '\ '/home/x/programming/ruby/src/rbt/lib/rbt/yaml/cookbooks/'+this_program+'.yml' e 'Exiting now.' exit end if blfs_entry.start_with?('https') # Then all is fine. else @encountered_n_problems += 1 e tomato( 'The BLFS entry for '\ '/home/x/programming/ruby/src/rbt/lib/rbt/yaml/cookbooks/'+this_program+'.yml '\ 'does not start with https.' ) if is_on_roebe? Open.in_editor( '/home/x/programming/ruby/src/rbt/lib/rbt/yaml/cookbooks/'+this_program+'.yml' ) sleep 1 end end else # The next clause may be too verbose. # e 'No BLFS entry for `'+steelblue(this_program)+'`.' end } if @encountered_n_problems == 0 do_notify_the_user_that_no_problems_were_encountered end end
reset()
click to toggle source
#¶ ↑
reset (reset tag)¶ ↑
#¶ ↑
Calls superclass method
RBT::Base#reset
# File lib/rbt/checks_and_validations/validate_blfs_entries.rb, line 44 def reset super() infer_the_namespace # ======================================================================= # # === @raw_cookbook # ======================================================================= # @raw_cookbook = RBT.raw_cookbook # ======================================================================= # # === @encountered_n_problems # # Keep track how many problems we encountered. # ======================================================================= # @encountered_n_problems = 0 try_to_require_the_open_gem end