class Cookbooks::UpdateKdeApplications
Constants
- NAMESPACE
#¶ ↑
NAMESPACE¶ ↑
#¶ ↑
- REMOTE_DOWNLOAD_URL
#¶ ↑
REMOTE_DOWNLOAD_URL¶ ↑
#¶ ↑
Public Class Methods
[](i = '')
click to toggle source
Public Instance Methods
decide_what_to_do_next()
click to toggle source
#¶ ↑
#decide_what_to_do_next¶ ↑
The first variant can be invoked via:
KDE_Applications --size
#¶ ↑
# File lib/cookbooks/check_for_updates/update_kde_applications.rb, line 131 def decide_what_to_do_next if commandline_size_query_was_issued? opnn; e "There are #{sfancy(@scanned_results.size)} remote "\ "KDE Applications programs." else # else, enter the default "modus operandi". iterate_through_the_results_and_update_old_cookbooks_entries end end
iterate_through_the_results_and_update_old_cookbooks_entries()
click to toggle source
#¶ ↑
#iterate_through_the_results_and_update_old_cookbooks_entries¶ ↑
#¶ ↑
# File lib/cookbooks/check_for_updates/update_kde_applications.rb, line 67 def iterate_through_the_results_and_update_old_cookbooks_entries unless Cookbooks.const_defined? :Cookbook require 'cookbooks/class/class.rb' end @scanned_results.each {|this_program| # <- That variable is e. g. 'plasma-vault-5.11.0' name_of_the_program, program_version = ::ProgramInformation.return_array_program_name_and_program_version(this_program) # ===================================================================== # # Next, we must compare it to the local dataset. # ===================================================================== # local_dataset = ::Cookbooks::Cookbook.new(name_of_the_program) local_program_version = local_dataset.program_version? if local_program_version < program_version # =================================================================== # # In this case, we have to updated. # =================================================================== # @downloaded_n_programs += 1 opnn; e "There is a more recent program version "\ "available for `#{sfancy(name_of_the_program)}`." full_remote_url = "#{remote_download_url?}#{this_program}.tar.xz" opnn; e 'That remote URL should be at: '+ sfancy(full_remote_url) colourized_result = slateblue( "class Cookbooks::UpdateEntry.new(#{full_remote_url})" ) opnn; e "Now delegating towards #{colourized_result}." Cookbooks::UpdateEntry.new(full_remote_url) { :do_not_ftp_upload } end } if @downloaded_n_programs == 0 opnn; e 'No downloads occurred. This usually means that all '\ 'local programs are up to date!' end end
main_url?()
click to toggle source
opnn()
click to toggle source
remote_download_url?()
click to toggle source
reset()
click to toggle source
run()
click to toggle source
scan_for_all_results()
click to toggle source