class RBT::Action::Cookbooks::SuggestCookbookFor

Public Class Methods

[](i = ARGV) click to toggle source
#

RBT::Action::Cookbooks::SuggestCookbookFor[]

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 789
def self.[](i = ARGV)
  new(i)
end
new( commandline_arguments = nil, run_already = true ) { || ... } click to toggle source
#

initialize

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 37
def initialize(
    commandline_arguments = nil,
    run_already           = true
  )
  reset
  set_commandline_arguments(
    commandline_arguments
  )
  # ======================================================================= #
  # Next, we infer the program name at once.
  # ======================================================================= #
  infer_program_name_from(
    first_argument?
  )
  if block_given?
    yielded = yield
    case yielded
    when :do_not_report
      @report_the_result = false 
    end
  end
  run if run_already
end

Public Instance Methods

add(i, append_newline = true) click to toggle source
#

add (add tag)

This method will simply add (aka append) onto the @result variable.

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 175
def add(i, append_newline = true)
  if append_newline
    i = i.dup if i.frozen?
    i << "\n"
  end
  @result << i
end
binaries?() click to toggle source
#

binaries?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 118
def binaries?
  @binaries
end
blfs_entry?() click to toggle source
#

blfs_entry?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 278
def blfs_entry?
  @dataset_from_the_expanded_cookbooks_directory[:blfs]
end
configure_base_dir?() click to toggle source
#

configure_base_dir?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 318
def configure_base_dir?
  @dataset_from_the_expanded_cookbooks_directory[:configure_base_dir]
end
configure_options?() click to toggle source
#

configure_options?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 292
def configure_options?
  @dataset_from_the_expanded_cookbooks_directory and
  @dataset_from_the_expanded_cookbooks_directory[:configure_options]
end
dataset_from_the_expanded_cookbooks_directory?() click to toggle source
#

dataset_from_the_expanded_cookbooks_directory?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 125
def dataset_from_the_expanded_cookbooks_directory?
  @dataset_from_the_expanded_cookbooks_directory
end
description?(pad_so_that_the_lines_are_all_equal = true) click to toggle source
#

description?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 300
def description?(pad_so_that_the_lines_are_all_equal = true)
  _ = @dataset_from_the_expanded_cookbooks_directory[:description].to_s
  _ = word_wrap(_, 74).strip
  if pad_so_that_the_lines_are_all_equal
    splitted = _.split("\n").map {|entry|
      unless entry.start_with? '  '
        entry.prepend('  ')
      end
      entry
    }
    _ = splitted.join("\n")
  end
  _.strip
end
expanded_cookbooks?()
expanded_dataset?()
has_blfs_entry?( use_this_key = 'blfs' ) click to toggle source
#

has_blfs_entry?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 204
def has_blfs_entry?(
    use_this_key = 'blfs'
  )
  use_this_key = use_this_key.to_sym if use_symbols?
  expanded_dataset? and
  expanded_dataset?.has_key?(use_this_key) and
 !expanded_dataset?[use_this_key].empty? # ← We only care about non-empty Arrays here.
end
has_configure_base_directory_entry?() click to toggle source
#

has_configure_base_directory_entry?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 226
def has_configure_base_directory_entry?
  expanded_dataset? and
  expanded_dataset?.has_key?('configure_base_dir')
end
has_homepage_entry?( use_this_key = 'homepage' ) click to toggle source
#

has_homepage_entry?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 216
def has_homepage_entry?(
    use_this_key = 'homepage'
  )
  use_this_key = use_this_key.to_sym if use_symbols?
  expanded_dataset?.has_key?(use_this_key)
end
has_required_deps?( use_this_key = 'required_deps_on' ) click to toggle source
#

has_required_deps?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 193
def has_required_deps?(
    use_this_key = 'required_deps_on'
  )
  use_this_key = use_this_key.to_sym if use_symbols?
  expanded_dataset?.has_key?(use_this_key) and
 !expanded_dataset?[use_this_key].empty?
end
has_sed_entry?( use_this_key = 'sed' ) click to toggle source
#

has_sed_entry?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 750
def has_sed_entry?(
    use_this_key = 'sed'
  )
  use_this_key = use_this_key.to_sym if use_symbols?
  expanded_dataset? and
  expanded_dataset?.has_key?(use_this_key) and
  expanded_dataset?[use_this_key] and
 !expanded_dataset?[use_this_key].empty?
end
has_url1_entry?( use_this_key = 'url1' ) click to toggle source
#

has_url1_entry?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 234
def has_url1_entry?(
    use_this_key = 'url1'
  )
  use_this_key = use_this_key.to_sym if use_symbols?
  expanded_dataset?.has_key?(use_this_key)
end
has_url2_entry?( use_this_key = 'url2' ) click to toggle source
#

has_url2_entry?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 244
def has_url2_entry?(
    use_this_key = 'url2'
  )
  use_this_key = use_this_key.to_sym if use_symbols?
  expanded_dataset?.has_key?(use_this_key)
end
homepage_entry?() click to toggle source
#

homepage_entry?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 271
def homepage_entry?
  @dataset_from_the_expanded_cookbooks_directory[:homepage]
end
infer_program_name_from(i) click to toggle source
#

infer_program_name_from

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 148
def infer_program_name_from(i)
  # ======================================================================= #
  # Note that @program_name is not allowed to have a trailing '.yml'
  # component.
  # ======================================================================= #
  @program_name = i.to_s.downcase.delete('-').
                                  delete_suffix('.yml')
  @name_of_the_cookbook_file = "#{@program_name}.yml"
  # ======================================================================= #
  # We have to check whether an expanded cookbook dataset exists. If
  # so then we can infer information from this file.
  # ======================================================================= #
  if expanded_cookbooks_directory_exists?
    this_file = directory_expanded_cookbooks?+@name_of_the_cookbook_file
    if File.exist? this_file
      @dataset_from_the_expanded_cookbooks_directory = load_yaml(
        this_file
      )
    end
  end
end
input?()
Alias for: program_name?
libraries?() click to toggle source
#

libraries?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 111
def libraries?
  @libraries
end
menu( i = return_commandline_arguments_with_leading_hyphens ) click to toggle source
#

menu (menu tag)

#
program_name?() click to toggle source
#

program_name?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 141
def program_name?
  @program_name
end
Also aliased as: input?
program_version?() click to toggle source
#

program_version?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 254
def program_version?
  @dataset_from_the_expanded_cookbooks_directory[:program_version]
end
report_something?() click to toggle source
#

report_something?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 134
def report_something?
  @report_the_result
end
report_whether_there_exists_an_expanded_cookbook_dataset_for(i) click to toggle source
#

report_whether_there_exists_an_expanded_cookbook_dataset_for

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 621
def report_whether_there_exists_an_expanded_cookbook_dataset_for(i)
  i = i.dup
  i << '.yml' unless i.end_with? '.yml'
  _ = directory_expanded_cookbooks?+i
  if report_something?
    if File.exist?(_)
      opne "#{rev}We will additionally make use of the expanded cookbook"
      opne "#{rev}dataset for `#{sfancy(i)}#{rev}`."
    else
      # ===================================================================== #
      # We will report if we are on roebe.
      # ===================================================================== #
      if is_on_roebe?
        opne "#{rev}There is no expanded cookbook dataset for `"\
             "#{sfile(@program_name)}#{rev}`."
        opne 'A new one can be generated via:'
        e
        e "  expand_cookbooks #{sfile(@program_name)}"
        e
      end
    end
  end
end
required_deps_on?() click to toggle source
#

required_deps_on?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 285
def required_deps_on?
  @dataset_from_the_expanded_cookbooks_directory[:required_deps_on]
end
reset() click to toggle source
#

reset (reset tag)

#
Calls superclass method RBT::Action#reset
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 64
def reset
  super()
  infer_the_namespace
  # ======================================================================= #
  # === @dataset_from_the_expanded_cookbooks_directory
  # ======================================================================= #
  @dataset_from_the_expanded_cookbooks_directory = nil
  # ======================================================================= #
  # === @program_name
  # ======================================================================= #
  @program_name = nil
  # ======================================================================= #
  # === @result
  # ======================================================================= #
  @result = ''.dup
  # ======================================================================= #
  # === @report_the_result
  # ======================================================================= #
  @report_the_result = true
  # ======================================================================= #
  # === @libraries
  #
  # We store found libraries in this Array here.
  # ======================================================================= #
  @libraries = []
  # ======================================================================= #
  # === @binaries
  #
  # We store found binaries in this Array here.
  # ======================================================================= #
  @binaries  = []
  # ======================================================================= #
  # === @use_symbols_or_strings_for_the_key
  # ======================================================================= #
  @use_symbols_or_strings_for_the_key = :symbols
end
result?() click to toggle source
#

result?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 186
def result?
  @result
end
return_licence( use_this_key = 'licence' ) click to toggle source
#

return_licence

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 658
def return_licence(
    use_this_key = 'licence'
  )
  use_this_key = use_this_key.to_sym if use_symbols?
  return expanded_dataset?[use_this_key].to_s
end
run() click to toggle source
#

run (run tag)

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 778
def run
  menu(
    return_commandline_arguments_with_leading_hyphens
  )
  try_to_obtain_information_from_the_corresponding_appdir_subdirectory_of_the_program
  try_to_report if @report_the_result
end
sanitize_binaries_entries() click to toggle source
#

sanitize_binaries_entries

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 593
def sanitize_binaries_entries
  # ======================================================================= #
  # The following regex will get rid of the absolute path entries.
  # ======================================================================= #
  _ = appdir_location_of?(@program_name)
  quoted_regex_for_bin_entries  = Regexp.quote("#{_}/bin/")
  quoted_regex_for_sbin_entries = Regexp.quote("#{_}/sbin/")
  @binaries.flatten!
  @binaries.map! {|binary_file|
    binary_file.sub(quoted_regex_for_bin_entries,  '').
                sub(quoted_regex_for_sbin_entries, '')
  }
end
sanitize_libraries_entries() click to toggle source
#

sanitize_libraries_entries

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 716
def sanitize_libraries_entries
  # ======================================================================= #
  # We must deduct all entries that contain the word 'pkgconfig' from
  # this Array, as the pkgconfig entry will have its own separate
  # entry here.
  # ======================================================================= #
  @libraries.reject! {|line|
    # ===================================================================== #
    # Directories will also be skipped.
    # ===================================================================== #
    line.include? 'pkgconfig' or File.directory?(line) or
    line.end_with?('.dll')
  }
  _ = appdir_location_of?(@program_name)
  # ======================================================================= #
  # Check for broken symlinks.
  # ======================================================================= #
  if File.symlink?(_) and !File.exist?(_)
    opne 'A broken symlink was found at `'+steelblue(_)+'`.'
    opne 'Please fix this manually before this class can continue.'
    exit
  end
  # ======================================================================= #
  # The following regex will get rid of the absolute path entries.
  # ======================================================================= #
  quoted_regex = Regexp.quote("#{_}/lib/")
  @libraries.map! {|library_file|
    library_file.sub(quoted_regex, '')
  }
end
sed?( use_this_key = 'sed' ) click to toggle source
#

sed?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 763
def sed?(
    use_this_key = 'sed'
  )
  use_this_key = use_this_key.to_sym if use_symbols?
  result = expanded_dataset?[use_this_key].flatten
  if result.is_a? Array
    result = result.join("\n")
  end
  result = result.to_s.tr("\n",' ').squeeze(' ')
  result
end
short_desc?() click to toggle source
#

short_desc?

This method will only work if the expanded-cookbook dataset exits.

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 263
def short_desc?
  @dataset_from_the_expanded_cookbooks_directory and
  @dataset_from_the_expanded_cookbooks_directory[:short_description]
end
show_help() click to toggle source
#

show_help (help tag)

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 693
def show_help
  e
  e '  --do-not-truncate # do not truncate the result at all'
  e
end
try_to_obtain_information_from_the_corresponding_appdir_subdirectory_of_the_program() click to toggle source
#

try_to_obtain_information_from_the_corresponding_appdir_subdirectory_of_the_program

This is the method that will try to obtain as much information as necessary in order to display the result on the commandline.

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 328
def try_to_obtain_information_from_the_corresponding_appdir_subdirectory_of_the_program
  if report_something?
    opne "Next trying to display the guessed content for `"\
         "#{sfile(@name_of_the_cookbook_file)}`."
  end
  report_whether_there_exists_an_expanded_cookbook_dataset_for(
    @program_name
  )
  _ = appdir_location_of?(@program_name)
  is_a_symlink = File.symlink?(_)
  # ======================================================================= #
  # ^^^ This variable may be a String such as "/Programs/Cluttergtk/Current".
  # This may not exist, though, if it is a symlink and has been deleted
  # or not (yet) created. So we will try to do an additional check if we
  # are on roebe - we will check if there is any directory that starts
  # with a number, such as '18.0.2'.
  # ======================================================================= #
  if is_on_roebe? and !File.exist?(_)
    dirname = "#{File.dirname(_)}/"
    subdirectories_in_that_directory = Dir[dirname+'*'].select {|entry|
      File.directory?(entry)
    }
    # ===================================================================== #
    # Must check whether we have found any subdirectories or not:
    # ===================================================================== #
    unless subdirectories_in_that_directory.empty?
      subdirectories_in_that_directory.select! {|entry|
        File.basename(entry).start_with?(/\d+/)
      }
      unless subdirectories_in_that_directory.empty?
        _ = subdirectories_in_that_directory.first # Grab the first entry.
        is_a_symlink = true # This is hackish but we need it to continue, below.
      end
    end
  end
  # ======================================================================= #
  # Obtain a "pointer" towards the main dataset.
  # ======================================================================= #
  main_dataset = main_dataset?
  if File.exist?(_) and is_a_symlink
    # ===================================================================== #
    # Headers are typically .h files, but also .hpp for C++. This
    # explains the next line of code.
    # On 05.12.2019 this was changed - .hpp are not so useful, so let's
    # not include them.
    # ===================================================================== #
    # headers         = Dir["#{_}/include/**/**.{h,hpp}"].sort
    headers         = Dir["#{_}/include/**/**.{h}"].sort
    @libraries      = Dir["#{_}/lib/**/**"].sort
    sanitize_libraries_entries
    @binaries       = Dir["#{_}/bin/**"].sort
    # ===================================================================== #
    # We will also append entries found under sbin/, if this directory
    # exists.
    # ===================================================================== #
    if File.directory? "#{_}/sbin/"
      @binaries       << Dir["#{_}/sbin/**"].sort
    end
    sanitize_binaries_entries
    # ===================================================================== #
    # We first have to add the program name - this one comes ALWAYS on top.
    # ===================================================================== #
    add @program_name+':'
    # ===================================================================== #
    # Next we will consider adding a blfs entry, but this has to be
    # optional because not every program has a registered blfs entry.
    # ===================================================================== #
    if expanded_cookbooks_directory_exists? and
       has_blfs_entry?
      add ' blfs:'
      blfs_entry = blfs_entry?
      blfs_entry = blfs_entry.first if blfs_entry.is_a? Array
      add " - #{blfs_entry}"
    else
      # ===================================================================== #
      # else we will add a stub towards linuxfromscratch.org
      # ===================================================================== #
      add ' # blfs:'
      add ' # - https://www.linuxfromscratch.org/blfs/view/cvs/general/glib2.html'
    end
    # ===================================================================== #
    # Next, consider adding binaries entries, if these exist.
    # ===================================================================== #
    if @binaries.empty?
      add ' # binaries:'
    else
      add ' binaries:'
      quoted_regex = Regexp.quote(_+'/bin/')
      @binaries.each {|this_binary|
        add ' - '+this_binary.sub(quoted_regex, '')
      }
    end
    # ===================================================================== #
    # We have to check whether the expanded cookbooks-dataset also
    # contains an entry called configure_base_dir. If it does we
    # will make use of it.
    # ===================================================================== #
    if expanded_cookbooks_directory_exists? and
       has_configure_base_directory_entry? and
       main_dataset
       add ' configure_base_dir: '+configure_base_dir?
    end
    # ===================================================================== #
    # Next, add the configure options:
    # ===================================================================== #
    add ' configure_options: |'
    if expanded_cookbooks_directory_exists? and
       main_dataset # Must check that we have found something here.
      the_configure_options = configure_options?.dup.to_s
      # ===================================================================== #
      # We can modify/simplify the configure options a bit, if they
      # contain at the least one '--' set.
      # ===================================================================== #
      if the_configure_options.include? '--'
        the_configure_options.gsub!(/--/, "\n  ")
        the_configure_options << "\n"
      end
      add "  #{the_configure_options}" unless the_configure_options.empty?
    end
    # ===================================================================== #
    # Now we will add the short_description tag.
    # ===================================================================== #
    add " short_description: |\n"
    if expanded_cookbooks_directory_exists? and
       main_dataset
      add "  #{short_desc?}\n" if short_desc?
    end
    add " description: |\n"
    if expanded_cookbooks_directory_exists? and
       main_dataset
      add "  #{description?}\n"
    end
    add " extra_information: |\n"
    add ' licence: '+return_licence.to_s
    # ===================================================================== #
    # Next add the url1 entry:
    # ===================================================================== #
    if expanded_cookbooks_directory_exists? and
       main_dataset and
       has_url1_entry?
      add " url1: #{url1?}"
    else
      add ' url1: '
    end
    if expanded_cookbooks_directory_exists? and
       main_dataset and
       has_url2_entry?
      add " url2: #{url2?}"
    else
      add ' url2: '
    end
    if expanded_cookbooks_directory_exists? and
       main_dataset and
       has_homepage_entry?
      add " homepage: #{homepage_entry?}"
    else 
      add ' homepage: '
    end
    # ===================================================================== #
    # === .gir files
    #
    # Next, consider adding .gir files - if they exist.
    # ===================================================================== #
    gir_files = Dir["#{_}/share/gir-1.0/**.{gir}"].sort
    unless gir_files.empty?
      add ' gir_files:'
      gir_files.each {|gir_file|
        gir_file = gir_file.dup if gir_file.frozen?
        gir_file.strip!
        gir_file.sub!("#{_}/share/gir-1.0/", '')
        add " - #{gir_file}"
      }
    end
    # ===================================================================== #
    # === Headers
    #
    # Next, consider adding headers - if they exist.
    # ===================================================================== #
    unless headers.empty?
      add ' symlink_headers: yes'
      add ' headers:'
      quoted_regex = Regexp.quote("#{_}/include/")
      headers.each {|header_file|
        add " - #{header_file.sub(quoted_regex, '')}"
      }
    end
    # ===================================================================== #
    # Next, consider adding the libraries-section:
    # ===================================================================== #
    unless @libraries.empty?
      add ' libraries:'
      @libraries.each {|library_file|
        add ' - '+library_file
      }
    end
    # ===================================================================== #
    # Add the pkg-config .pc files next, if they exist.
    # ===================================================================== #
    pkgconfig_files = Dir["#{_}/lib/pkgconfig/**"].sort.select {|file|
      file.end_with? '.pc' # ← Only use .pc files.
    }
    unless pkgconfig_files.empty?
      add ' symlink_pkgconfig_files: yes'
      add ' pkgconfig_files:'
      quoted_regex = Regexp.quote(_+'/lib/pkgconfig/')
      pkgconfig_files.each {|pkgconfig_file|
        add ' - '+pkgconfig_file.sub(quoted_regex, '')
      }
    end
    # ===================================================================== #
    # Add the .m4 files next, if they exist.
    # ===================================================================== #
    m4_files = Dir["#{_}/share/aclocal/*.m4"].sort.select {|file|
      file.end_with? '.m4' # ← Only use .pc files.
    }
    unless m4_files.empty?
      add ' m4_files:'
      quoted_regex = Regexp.quote(_+'/share/aclocal/')
      m4_files.each {|m4_file|
        add ' - '+m4_file.sub(quoted_regex, '')
      }
    end
    # ===================================================================== #
    # Consider adding sed-instructions if they exist:
    # ===================================================================== #
    if has_sed_entry?
      # =================================================================== #
      # Ok, this program has a sed entry, so show it:'
      # =================================================================== #
      add ' sed:'
      add ' - '+sed?
    end
    # ===================================================================== #
    # Add the prefix variable next.
    # ===================================================================== #
    add ' prefix: t'
    add ' keep_extracted: no'
    add ' use_build_directory: '+
        yes_or_no(
          use_build_directory?.to_s,
          :minimalistic
        )
    add ' required_deps_on:'
    if expanded_cookbooks_directory_exists? and
       main_dataset and
       has_required_deps?
      required_deps_on?.each {|dep|
        add " - #{dep}"
      }
    else
      add ' - '
    end
    # ===================================================================== #
    # Next add a last_update entry, in a format like "18 Dec 2018".
    # ===================================================================== #
    add " last_update: "\
        "#{get_date}"
  else
    opnn; no_file_exists_at(_)
  end
end
try_to_report() click to toggle source
#

try_to_report (report tag)

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 610
def try_to_report
  if @result.empty?
    # Do nothing in this case.
  else
    e @result
  end
end
url1?() click to toggle source
#

url1?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 702
def url1?
  @dataset_from_the_expanded_cookbooks_directory[:url1]
end
url2?() click to toggle source
#

url2?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 709
def url2?
  @dataset_from_the_expanded_cookbooks_directory[:url2]
end
use_build_directory?( use_this_key = 'use_build_directory' ) click to toggle source
#

use_build_directory?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 648
def use_build_directory?(
    use_this_key = 'use_build_directory'
  )
  use_this_key = use_this_key.to_sym if use_symbols?
  return expanded_dataset?[use_this_key].to_s
end
use_symbols?() click to toggle source
#

use_symbols?

#
# File lib/rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb, line 104
def use_symbols?
  @use_symbols_or_strings_for_the_key == :symbols
end