class RBT::ReportMateDesktopVersion
Constants
- ERROR_LINE
#¶ ↑
ERROR_LINE
¶ ↑#¶ ↑
- NAMESPACE
#¶ ↑
NAMESPACE
¶ ↑#¶ ↑
- N_LJUST
#¶ ↑
N_LJUST
¶ ↑#¶ ↑
Public Class Methods
[](i = '')
click to toggle source
new( commandline_arguments = nil, run_already = true ) { || ... }
click to toggle source
#¶ ↑
initialize¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/report_mate_desktop_version.rb, line 39 def initialize( commandline_arguments = nil, run_already = true ) reset set_commandline_arguments( commandline_arguments ) if block_given? yielded = yield case yielded when :do_not_report, :do_not_report_anything @do_report = false end end run if run_already end
Public Instance Methods
add( i = '', add_newline = true )
click to toggle source
add_newline()
click to toggle source
atrilv?()
click to toggle source
cajadropboxv?()
click to toggle source
cajav?()
click to toggle source
commandline_arguments?()
click to toggle source
engrampav?()
click to toggle source
eomv?()
click to toggle source
left_padded()
click to toggle source
marcov?()
click to toggle source
mate_applets?()
click to toggle source
mate_common?()
click to toggle source
mate_control_center?()
click to toggle source
mate_desktopv?()
click to toggle source
mate_keyboard?()
click to toggle source
mate_media?()
click to toggle source
mate_mixer?()
click to toggle source
mate_utils?()
click to toggle source
mate_weather?()
click to toggle source
plumav?()
click to toggle source
report()
click to toggle source
report_atril_version()
click to toggle source
report_caja_dropbox_version()
click to toggle source
report_caja_version()
click to toggle source
report_engrampa_version()
click to toggle source
report_eom_version()
click to toggle source
report_marco_version()
click to toggle source
report_mate_applets_version()
click to toggle source
report_mate_common_version()
click to toggle source
report_mate_control_center_version()
click to toggle source
report_mate_desktop_version()
click to toggle source
report_mate_keyboard_version()
click to toggle source
report_mate_media_version()
click to toggle source
report_mate_mixer_version()
click to toggle source
report_mate_utils_version()
click to toggle source
report_mate_weather_version()
click to toggle source
report_pluma_version()
click to toggle source
reset()
click to toggle source
return_mate_media_version()
click to toggle source
return_pkgconfig_result_for( i = :libmatekbd )
click to toggle source
#¶ ↑
return_pkgconfig_result_for
¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/report_mate_desktop_version.rb, line 339 def return_pkgconfig_result_for( i = :libmatekbd ) result = `pkg-config --modversion #{i} 2>&1`.strip if result.include?('No package ') and result.include?(' found') result = '' end return result end
return_sanitized_sys_command( i = :caja )
click to toggle source
#¶ ↑
return_sanitized_sys_command
¶ ↑
This method will return the proper version of an installed mate-desktop component.
#¶ ↑
# File lib/rbt/utility_scripts/report_mate_desktop_version.rb, line 355 def return_sanitized_sys_command( i = :caja ) case i # case tag when :mate_common i = :mate_doc_common when :mate_utils i = :mate_screenshot when :mate_desktop i = :mate_about end # ======================================================================= # # Next, some packages such as libmatekbd, only come with a .pc file # rather than a commandline way to query its version, which we will # determine first. # ======================================================================= # case i when :mate_media result = return_mate_media_version when :mate_keyboard result = return_pkgconfig_result_for(:libmatekbd) when :mate_mixer result = return_pkgconfig_result_for(:libmatemixer) when :mate_weather result = return_pkgconfig_result_for(:mateweather) when :mate_applets result = return_pkgconfig_result_for(:libmatepanelapplet) when :mate_control_center result = return_pkgconfig_result_for('mate-window-settings-2.0') else i = i.to_s.tr('_','-') result = `#{i} --version #{ERROR_LINE}`.split(N).first # system tag end result.to_s. sub(/MATE /,''). sub(/caja /,''). sub(/marco /,''). sub(/mate-screenshot /,''). sub(/mate-doc-common \(mate-common\) /,''). sub(/Desktop Environment /,''). sub(/Document Viewer /,''). sub(/Eye of Image Viewer /,''). sub(/pluma - Version /,''). strip end
run()
click to toggle source
#¶ ↑
run (run tag)¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/report_mate_desktop_version.rb, line 436 def run add grey, :no_newline add 'Reporting the installed versions of the '+ royalblue('mate-desktop components')+ grey(':') add_newline report_mate_desktop_version # === mate-desktop report_mate_utils_version # === mate-utils report_mate_common_version # === mate-common report_mate_keyboard_version # === libmatekbd report_mate_media_version # === mate-media report_mate_mixer_version # === libmatemixer report_mate_weather_version # === libmateweather report_mate_applets_version # === mate-applets report_mate_control_center_version # === mate-control-center report_marco_version # === marco report_atril_version # === atril report_eom_version # === eom report_pluma_version # === pluma # ======================================================================= # # Engrampa presently does not work via --version switch; and no other # work around either. We have to wait until support for --version is # added. # report_engrampa_version # === engrampa # ======================================================================= # report_caja_version # === caja # report_caja_dropbox_version # === caja-dropbox add_newline report end
set_commandline_arguments(i = '')
click to toggle source