{P: rooto:"YARD::CodeObjects::RootObject:@childrenIC:&YARD::CodeObjects::CodeObjectList[ o:$YARD::CodeObjects::ModuleObject;IC;[ o:#YARD::CodeObjects::ClassObject;IC;[ o:$YARD::CodeObjects::MethodObject:@module_functionF: @scope: instance:@visibility: public: @pathI"CLIUtils::Prefs#answers:EF:@parameters[: @files[[I"lib/cliutils/prefs.rb;Ti :@current_file_has_commentsF: @name: answers:@source_type: ruby: @tags[:@docstrings{:@docstringIC:YARD::Docstring"+Returns the value of attribute answers ;T: @object@ : @summary0:@hash_flagF:@ref_tags[;[: @allI"+Returns the value of attribute answers;T:@unresolved_reference0:@namespace@ : @sourceI"def answers @answers end;T:@signatureI"def answers;T: @dynamicTo; ; F; ;;;;I" CLIUtils::Prefs#config_path;F;[;[[@i ;F;:config_path;;;[;{;IC;"/Returns the value of attribute config_path ;T;@;0; F;![;[;"I"/Returns the value of attribute config_path;T;#0;$@ ;%I"'def config_path @config_path end;T;&I"def config_path;T;'To; ; F; ;;;;I"CLIUtils::Prefs#prompts;F;[;[[@i ;F;: prompts;;;[;{;IC;"+Returns the value of attribute prompts ;T;@';0; F;![;[;"I"+Returns the value of attribute prompts;T;#0;$@ ;%I"def prompts @prompts end;T;&I"def prompts;T;'To; ; F; ;;;;I"CLIUtils::Prefs#initialize;F;[[I" data;T0;[[@i;T;:initialize;;;[;{;IC;"*Reads prompt data from and stores it. ;T;![;[o:YARD::Tags::Tag :@tag_nameI" param;F: @textI""Either a filepath or an array;T;I" data;T: @types[I";T;@4o;+ ;,I" return;F;-I";T;0;.[I" void;T;@4;"I"uReads prompt data from and stores it. @param [] data Either a filepath or an array @return [void];T;#0;@4; F:@line_rangeo: Range: exclF: begini :endi;$@ ;%I"def initialize(data) @answers = [] @prompts = {} case data when String if File.exists?(data) @config_path = data prompts = YAML::load_file(data) @prompts.deep_merge!(prompts).deep_symbolize_keys! else fail "Invalid configuration file: #{ yaml_path }" end when Array @config_path = nil prompts = {:prompts => data} @prompts.deep_merge!(prompts).deep_symbolize_keys! else fail 'Invalid configuration data' end end;T;&I"def initialize(data);T;'T:@explicitTo; ; F; ;;;;I"CLIUtils::Prefs#ask;F;[;[[@i-;T;:ask;;;[;{;IC;"Runs through all of the prompt questions and collects answers from the user. Note that all questions w/o requirements are examined first; once those are complete, questions w/ requirements are examined. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" void;T;@O;"I"Runs through all of the prompt questions and collects answers from the user. Note that all questions w/o requirements are examined first; once those are complete, questions w/ requirements are examined. @return [void];T;#0;@O; F;/o;0;1F;2i(;3i,;$@ ;%I"def ask @prompts[:prompts].reject { |p| p[:requirements] }.each do |p| _deliver_prompt(p) end @prompts[:prompts].find_all { |p| p[:requirements] }.each do |p| _deliver_prompt(p) if _requirements_fulfilled?(p) end end;T;&I" def ask;T;'T;4To; ; F; ;;: private;I"$CLIUtils::Prefs#_deliver_prompt;F;[[I"p;T0;[[@i=;T;:_deliver_prompt;;;[;{;IC;"dUtility method for prompting the user to answer the question (taking into account any options). ;T;![;[o;+ ;,I" param;F;-I"The prompt;T;I"p;T;.[I" Hash;T;@bo;+ ;,I" return;F;-I";T;0;.[I" void;T;@b;"I"Utility method for prompting the user to answer the question (taking into account any options). @param [Hash] p The prompt @return [void];T;#0;@b; F;/o;0;1F;2i9;3i<;$@ ;%I"def _deliver_prompt(p) if p[:options].nil? pref = prompt(p[:prompt], p[:default]) else valid_option_chosen = false until valid_option_chosen pref = prompt(p[:prompt], p[:default]) if p[:options].include?(pref) valid_option_chosen = true else error("Invalid option chosen: #{ pref }") end end end p[:answer] = pref @answers << p end;T;&I"def _deliver_prompt(p);T;'T;4To; ; F; ;;;6;I"-CLIUtils::Prefs#_requirements_fulfilled?;F;[[I"p;T0;[[@iT;T;:_requirements_fulfilled?;;;[;{;IC;"`Utility method for determining whether a prompt's requirements have already been fulfilled. ;T;![;[o;+ ;,I" param;F;-I"The prompt;T;I"p;T;.[I" Hash;T;@}o;+ ;,I" return;F;-I";T;0;.[I" void;T;@};"I"Utility method for determining whether a prompt's requirements have already been fulfilled. @param [Hash] p The prompt @return [void];T;#0;@}; F;/o;0;1F;2iP;3iS;$@ ;%I"def _requirements_fulfilled?(p) ret = true p[:requirements].each do |req| a = @answers.detect do |answer| answer[:key] == req[:key] && answer[:answer] == req[:value] end ret = false if a.nil? end ret end;T;&I"$def _requirements_fulfilled?(p);T;'T;4T: @owner@ :@class_mixinsIC;[;9@ :@instance_mixinsIC;[o:YARD::CodeObjects::Proxy : @imethod0:@origname0:@orignamespace0;: PrettyIO;$@: @objo; ;IC;[o:+YARD::CodeObjects::ClassVariableObject;[[I"lib/cliutils/pretty-io.rb;Ti;F;: @@wrap;;;;;[;{;IC;" ;T;@;0; F;![;[;"I";T;#0;$@;I"CLIUtils::PrettyIO::@@wrap;F;&I"@@wrap = true;T;%I"@@wrap = true;T: @valueI" true;T;'To;B;[[@i;F;:@@wrap_char_limit;;;;;[;{;IC;" ;T;@;0; F;![;[;"I";T;#0;$@;I"*CLIUtils::PrettyIO::@@wrap_char_limit;F;&I"@@wrap_char_limit = 40;T;%I"@@wrap_char_limit = 40;T;DI"40;T;'To; ; F; : class;;;I" CLIUtils::PrettyIO.included;F;[[I"k;T0;[[@i;T;: included;;;[;{;IC;"5Hook that triggers when this module is included. ;T;![;[o;+ ;,I" param;F;-I"The includer object;T;I"k;T;.[I" Object;T;@o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"jHook that triggers when this module is included. @param [Object] k The includer object @return [void];T;#0;@; F;/o;0;1F;2i;3i;$@;%I".def self.included(k) k.extend(self) end;T;&I"def self.included(k);T;'T;4To; ; F; ;;;;I"#CLIUtils::PrettyIO#color_chart;F;[;[[@i;T;:color_chart;;;[;{;IC;"\Displays a chart of all the possible ANSI foreground and background color combinations. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"kDisplays a chart of all the possible ANSI foreground and background color combinations. @return [void];T;#0;@; F;/o;0;1F;2i;3i;$@;%I"Bdef color_chart [0, 1, 4, 5, 7].each do |attr| puts '----------------------------------------------------------------' puts "ESC[#{attr};Foreground;Background" 30.upto(37) do |fg| 40.upto(47) do |bg| print "\033[#{attr};#{fg};#{bg}m #{fg};#{bg} " end puts "\033[0m" end end end;T;&I"def color_chart;T;'T;4To; ; F; ;;;;I"CLIUtils::PrettyIO#debug;F;[[I"m;T0;[[@i/;T;: debug;;;[;{;IC;"SEmpty method so that Messenging doesn't freak out when passed a debug message. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"bEmpty method so that Messenging doesn't freak out when passed a debug message. @return [void];T;#0;@; F;/o;0;1F;2i,;3i.;$@;%I"def debug(m); end;T;&I"def debug(m); end;T;'T;4To; ; F; ;;;;I"CLIUtils::PrettyIO#error;F;[[I"m;T0;[[@i4;T;: error;;;[;{;IC;"+Outputs a formatted-red error message. ;T;![;[o;+ ;,I" param;F;-I"The message to output;T;I"m;T;.[I" String;T;@o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"bOutputs a formatted-red error message. @param [String] m The message to output @return [void];T;#0;@; F;/o;0;1F;2i1;3i3;$@;%I"4def error(m) puts _word_wrap(m, '# ').red end;T;&I"def error(m);T;'T;4To; ; F; ;;;;I"CLIUtils::PrettyIO#info;F;[[I"m;T0;[[@i;;T;: info;;;[;{;IC;"4Outputs a formatted-blue informational message. ;T;![;[o;+ ;,I" param;F;-I"The message to output;T;I"m;T;.[I" String;T;@o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"kOutputs a formatted-blue informational message. @param [String] m The message to output @return [void];T;#0;@; F;/o;0;1F;2i8;3i:;$@;%I"4def info(m) puts _word_wrap(m, '# ').blue end;T;&I"def info(m);T;'T;4To; ; F; ;;;;I""CLIUtils::PrettyIO#info_block;F;[[I"m1;T0[I"m2;TI" 'Done.';T[I"multiline;TI" false;T;[[@iE;T;:info_block;;;[;{;IC;":Wraps a block in an opening and closing info message. ;T;![;[ o;+ ;,I" param;F;-I""The opening message to output;T;I"m1;T;.[I" String;T;@,o;+ ;,I" param;F;-I""The closing message to output;T;I"m2;T;.[I" String;T;@,o;+ ;,I" param;F;-I",Whether the message should be multiline;T;I"multiline;T;.[I";T;@,o;+ ;,I" yield;F;-I";T;0;.0;@,o;+ ;,I" return;F;-I";T;0;.[I" void;T;@,;"I"Wraps a block in an opening and closing info message. @param [String] m1 The opening message to output @param [String] m2 The closing message to output @param [] multiline Whether the message should be multiline @yield @return [void];T;#0;@,; F;/o;0;1F;2i?;3iD;$@;%I"8def info_block(m1, m2 = 'Done.', multiline = false) if block_given? if multiline info(m1) else print _word_wrap(m1, '# ').blue end yield if multiline info(m2) else puts _word_wrap(m2, '# ').blue end else fail 'Did not specify a valid block' end end;T;&I"8def info_block(m1, m2 = 'Done.', multiline = false);T;'T;4To; ; F; ;;;;I"CLIUtils::PrettyIO#log;F;[[I"m;T0;[[@i\;T;:log;;;[;{;IC;"SEmpty method so that Messenging doesn't freak out when passed a debug message. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" void;T;@\;"I"bEmpty method so that Messenging doesn't freak out when passed a debug message. @return [void];T;#0;@\; F;/o;0;1F;2iY;3i[;$@;%I"def log(m); end;T;&I"def log(m); end;T;'T;4To; ; F; ;;;;I"CLIUtils::PrettyIO#prompt;F;[[I" prompt;T0[I" default;TI"nil;T[I"start_dir;TI"'';T;[[@id;T;: prompt;;;[;{;IC;"DOutputs a prompt, collects the user's response, and returns it. ;T;![;[ o;+ ;,I" param;F;-I"The prompt to output;T;I" prompt;T;.[I" String;T;@qo;+ ;,I" param;F;-I"The default option;T;I" default;T;.[I" String;T;@qo;+ ;,I" param;F;-I"3The directory to start from for autocompletion;T;I"start_dir;T;.[I" String;T;@qo;+ ;,I" return;F;-I";T;0;.[I" String;T;@q;"I"Outputs a prompt, collects the user's response, and returns it. @param [String] prompt The prompt to output @param [String] default The default option @param [String] start_dir The directory to start from for autocompletion @return [String];T;#0;@q; F;/o;0;1F;2i^;3ic;$@;%I"def prompt(prompt, default = nil, start_dir = '') Readline.completion_append_character = nil Readline.completion_proc = lambda do |prefix| files = Dir["#{start_dir}#{prefix}*"] files. map { |f| File.expand_path(f) }. map { |f| File.directory?(f) ? f + "/" : f } end choice = Readline.readline("# #{ prompt }#{ default.nil? ? ':' : " [default: #{ default }]:" } ".cyan) if choice.empty? default else choice end end;T;&I"6def prompt(prompt, default = nil, start_dir = '');T;'T;4To; ; F; ;;;;I"CLIUtils::PrettyIO#section;F;[[I"m;T0;[[@iw;T;: section;;;[;{;IC;"0Outputs a formatted-purple section message. ;T;![;[o;+ ;,I" param;F;-I"The message to output;T;I"m;T;.[I" String;T;@o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"gOutputs a formatted-purple section message. @param [String] m The message to output @return [void];T;#0;@; F;/o;0;1F;2it;3iv;$@;%I" ').purple end;T;&I"def section(m);T;'T;4To; ; F; ;;;;I"%CLIUtils::PrettyIO#section_block;F;[[I"m;T0[I"multiline;TI" true;T;[[@i{;T;:section_block;;;[;{;IC;"=Wraps a block in an opening and closing section message. ;T;![;[ o;+ ;,I" param;F;-I""The opening message to output;T;I"m;T;.[I" String;T;@o;+ ;,I" param;F;-I",Whether the message should be multiline;T;I"multiline;T;.[I";T;@o;+ ;,I" yield;F;-I";T;0;.0;@o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"Wraps a block in an opening and closing section message. @param [String] m The opening message to output @param [] multiline Whether the message should be multiline @yield @return [void];T;#0;@; F;/o;0;1F;2i{;3i;$@;%I"def section_block(m, multiline = true) if block_given? if multiline section(m) else print _word_wrap(m, '---> ').purple end yield else fail 'Did not specify a valid block' end end;T;&I"+def section_block(m, multiline = true);T;'T;4To; ; F; ;;;;I"CLIUtils::PrettyIO#success;F;[[I"m;T0;[[@i;T;: success;;;[;{;IC;"/Outputs a formatted-green success message. ;T;![;[o;+ ;,I" param;F;-I"The message to output;T;I"m;T;.[I" String;T;@o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"fOutputs a formatted-green success message. @param [String] m The message to output @return [void];T;#0;@; F;/o;0;1F;2i;3i;$@;%I"8def success(m) puts _word_wrap(m, '# ').green end;T;&I"def success(m);T;'T;4To; ; F; ;;;;I"CLIUtils::PrettyIO#warn;F;[[I"m;T0;[[@i;T;: warn;;;[;{;IC;"0Outputs a formatted-yellow warning message. ;T;![;[o;+ ;,I" param;F;-I"The message to output;T;I"m;T;.[I" String;T;@o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"gOutputs a formatted-yellow warning message. @param [String] m The message to output @return [void];T;#0;@; F;/o;0;1F;2i;3i;$@;%I"6def warn(m) puts _word_wrap(m, '# ').yellow end;T;&I"def warn(m);T;'T;4To; ; F; ;F;;;I"CLIUtils::PrettyIO.wrap;F;[[I"on;T0;[[@i;T;: wrap;;;[;{;IC;"Toggles wrapping on or off ;T;![;[o;+ ;,I" param;F;-0;I"on;T;.[I";T;@o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"HToggles wrapping on or off @param [] on @return [void];T;#0;@; F;/o;0;1F;2i;3i;$@;%I"(def self.wrap(on) @@wrap = on end;T;&I"def self.wrap(on);T;'T;4To; ; F; ;F;;;I""CLIUtils::PrettyIO.wrap_limit;F;[;[[@i;T;:wrap_limit;;;[;{;IC;".Returns the current character wrap amount ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" Integer;T;@0;"I"@Returns the current character wrap amount @return [Integer];T;#0;@0; F;/o;0;1F;2i;3i;$@;%I"0def self.wrap_limit @@wrap_char_limit end;T;&I"def self.wrap_limit;T;'T;4To; ; F; ;F;;;I"CLIUtils::PrettyIO.wrap_at;F;[[I" chars;T0;[[@i;T;: wrap_at;;;[;{;IC;"3Sets the number of characters at which to wrap ;T;![;[o;+ ;,I" param;F;-I"2The number of chars to output before wrapping;T;I" chars;T;.[I" Integer;T;@Co;+ ;,I" return;F;-I";T;0;.[I" void;T;@C;"I"Sets the number of characters at which to wrap @param [Integer] chars The number of chars to output before wrapping @return [void];T;#0;@C; F;/o;0;1F;2i;3i;$@;%I"0;?0;: Object;$@;A0;\;F;'To:&YARD::CodeObjects::ConstantObject;[[I"lib/cliutils/version.rb;Ti;T;: VERSION;;;;;[;{;IC;"#The current version of the gem ;T;![;[;"I"#The current version of the gem;T;#0;@; F;/o;0;1F;2i;3i;$@;I"CLIUtils::VERSION;F;&I"VERSION = "1.0.2";T;%I"VERSION = "1.0.2";T;DI" "1.0.2";T;'T@o; ;IC;[o; ; F; ;F;;;I""CLIUtils::Messenging.included;F;[[I"k;T0;[[I"lib/cliutils/messenging.rb;Ti;T;;G;;;[;{;IC;"5Hook that triggers when this module is included. ;T;![;[o;+ ;,I" param;F;-I"The includer object;T;I"k;T;.[I" Object;T;@o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"jHook that triggers when this module is included. @param [Object] k The includer object @return [void];T;#0;@; F;/o;0;1F;2i ;3i;$@;%I".def self.included(k) k.extend(self) end;T;&I"def self.included(k);T;'T;4To; ; F; ;;;;I"*CLIUtils::Messenging#default_instance;F;[;[[@i;T;:default_instance;;;[;{;IC;"QReturns a default instance of LoggerDelegator that delegates to STDOUT only. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I"LoggerDelegator;T;@;"I"kReturns a default instance of LoggerDelegator that delegates to STDOUT only. @return [LoggerDelegator];T;#0;@; F;/o;0;1F;2i;3i;$@;%I"def default_instance stdout_logger = Logger.new(STDOUT) stdout_logger.formatter = proc do |severity, datetime, progname, msg| send(severity.downcase, msg) end LoggerDelegator.new(stdout_logger) end;T;&I"def default_instance;T;'T;4To; ; F; ;;;;I"#CLIUtils::Messenging#messenger;F;[;[[@i";T;:messenger;;;[;{;IC;"MSingleton method to return (or initialize, if needed) a LoggerDelegator. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I"LoggerDelegator;T;@;"I"gSingleton method to return (or initialize, if needed) a LoggerDelegator. @return [LoggerDelegator];T;#0;@; F;/o;0;1F;2i;3i!;$@;%I"8def messenger @messenger ||= default_instance end;T;&I"def messenger;T;'T;4T;9@;:IC;[;9@;;IC;[o;< ;=0;>I"CLIUtils::PrettyIO;T;?@;;@;$@;A@;\;];9@;WIC;X{;FIC;X{;YT;IC;X{;YT;YT;Z{;[[;[[@i ;T;:Messenging;;;;;[;{;IC;"OCLIMessenger Module Outputs coordinated messages to a variety of targets. ;T;![;[;"I"P CLIMessenger Module Outputs coordinated messages to a variety of targets.;T;#0;@; F;/o;0;1F;2i;3i;$@;I"CLIUtils::Messenging;F;'To; ;IC;[o; ; F; ;;;;I"'CLIUtils::Configurator#config_path;F;[;[[I"!lib/cliutils/configurator.rb;Ti ;F;;(;;;[;{;IC;"/Returns the value of attribute config_path ;T;@ ;0; F;![;[;"I"/Returns the value of attribute config_path;T;#0;$@ ;%I"'def config_path @config_path end;T;&I"def config_path;T;'To; ; F; ;;;;I" CLIUtils::Configurator#data;F;[;[[@i ;F;: data;;;[;{;IC;"(Returns the value of attribute data ;T;@;0; F;![;[;"I"(Returns the value of attribute data;T;#0;$@ ;%I"def data @data end;T;&I" def data;T;'To; ; F; ;;;;I"&CLIUtils::Configurator#initialize;F;[[I" path;T0;[[@i;T;;*;;;[;{;IC;"0Initializes configuration from a flat file. ;T;![;[o;+ ;,I" param;F;-I"$The filepath to the config YAML;T;I" path;T;.[I" String;T;@(o;+ ;,I" return;F;-I";T;0;.[I" void;T;@(;"I"tInitializes configuration from a flat file. @param [String] path The filepath to the config YAML @return [void];T;#0;@(; F;/o;0;1F;2i;3i;$@ ;%I"def initialize(path) _path = File.expand_path(path) @config_path = _path @data = {} if File.exists?(_path) data = YAML::load_file(_path) @data.deep_merge!(data).deep_symbolize_keys! end end;T;&I"def initialize(path);T;'T;4To; ; F; ;;;;I"'CLIUtils::Configurator#add_section;F;[[I"section_name;T0;[[@i!;T;:add_section;;;[;{;IC;"IAdds a new section to the config file (if it doesn't already exist). ;T;![;[o;+ ;,I" param;F;-I"The section to add;T;I"section_name;T;.[I" String;T;@Co;+ ;,I" return;F;-I";T;0;.[I" void;T;@C;"I"Adds a new section to the config file (if it doesn't already exist). @param [String] section_name The section to add @return [void];T;#0;@C; F;/o;0;1F;2i;3i ;$@ ;%I"def add_section(section_name) if !@data.key?(section_name) @data[section_name] = {} else fail "Section already exists: #{ section_name }" end end;T;&I""def add_section(section_name);T;'T;4To; ; F; ;;;;I"*CLIUtils::Configurator#delete_section;F;[[I"section_name;T0;[[@i,;T;:delete_section;;;[;{;IC;"9Removes a section to the config file (if it exists). ;T;![;[o;+ ;,I" param;F;-I"The section to remove;T;I"section_name;T;.[I" String;T;@^o;+ ;,I" return;F;-I";T;0;.[I" void;T;@^;"I"{Removes a section to the config file (if it exists). @param [String] section_name The section to remove @return [void];T;#0;@^; F;/o;0;1F;2i);3i+;$@ ;%I"def delete_section(section_name) if @data.key?(section_name) @data.delete(section_name) else fail "Cannot delete nonexistent section: #{ section_name }" end end;T;&I"%def delete_section(section_name);T;'T;4To; ; F; ;;;;I"(CLIUtils::Configurator#ingest_prefs;F;[[I" prefs;T0;[[@i8;T;:ingest_prefs;;;[;{;IC;"JIngests a Prefs class and adds its answers to the configuration data. ;T;![;[o;+ ;,I" param;F;-I"The Prefs class to examine;T;I" prefs;T;.[I" Prefs;T;@yo;+ ;,I" return;F;-I";T;0;.[I" void;T;@y;"I"Ingests a Prefs class and adds its answers to the configuration data. @param [Prefs] prefs The Prefs class to examine @return [void];T;#0;@y; F;/o;0;1F;2i4;3i7;$@ ;%I"def ingest_prefs(prefs) fail 'Invaid Prefs class' if !prefs.kind_of?(Prefs) || prefs.answers.nil? prefs.answers.each do |p| add_section(p[:section]) unless @data.key?(p[:section]) @data[p[:section]].merge!(p[:key] => p[:answer]) end end;T;&I"def ingest_prefs(prefs);T;'T;4To; ; F; ;;;;I"*CLIUtils::Configurator#method_missing;F;[[I" name;T0[I" *args;T0[I" &block;T0;[[@iD;T;:method_missing;;;[;{;IC;"Hook that fires when a non-existent method is called. Allows this module to return data from the config Hash when given a method name that matches a key. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" Hash;T;@;"I"Hook that fires when a non-existent method is called. Allows this module to return data from the config Hash when given a method name that matches a key. @return [Hash];T;#0;@; F;/o;0;1F;2i@;3iC;$@ ;%I"hdef method_missing(name, *args, &block) @data[name.to_sym] || @data.merge!(name.to_sym => {}) end;T;&I",def method_missing(name, *args, &block);T;'T;4To; ; F; ;;;;I"!CLIUtils::Configurator#reset;F;[;[[@iJ;T;: reset;;;[;{;IC;"#Clears the configuration data. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"2Clears the configuration data. @return [void];T;#0;@; F;/o;0;1F;2iH;3iI;$@ ;%I"def reset @data = {} end;T;&I"def reset;T;'T;4To; ; F; ;;;;I" CLIUtils::Configurator#save;F;[;[[@iQ;T;: save;;;[;{;IC;"ESaves the configuration data to the previously stored flat file. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"TSaves the configuration data to the previously stored flat file. @return [void];T;#0;@; F;/o;0;1F;2iN;3iP;$@ ;%I"cdef save File.open(@config_path, 'w') { |f| f.write(@data.deep_stringify_keys.to_yaml) } end;T;&I" def save;T;'T;4T;9@ ;:IC;[;9@ ;;IC;[;9@ ;WIC;X{;FIC;X{;YT;IC;X{;(IC;X{;^@ ;_0;YT;hIC;X{;^@;_0;YT;YT;YT;Z{;[[;[[@i ;T;:Configurator;;;;;[;{;IC;"nConfiguration Class Manages any configuration values and the flat YAML file into which they get stored. ;T;![;[;"I"o Configuration Class Manages any configuration values and the flat YAML file into which they get stored.;T;#0;@ ; F;/o;0;1F;2i ;3i ;$@;I"CLIUtils::Configurator;F;ao;< ;=0;>0;?0;;b;$@;A0;\;F;'To; ;IC;[o; ; F; ;F;;;I"%CLIUtils::Configuration.included;F;[[I"k;T0;[[I""lib/cliutils/configuration.rb;Ti;T;;G;;;[;{;IC;"5Hook that triggers when this module is included. ;T;![;[o;+ ;,I" param;F;-I"The includer object;T;I"k;T;.[I" Object;T;@o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"jHook that triggers when this module is included. @param [Object] k The includer object @return [void];T;#0;@; F;/o;0;1F;2i ;3i;$@;%I".def self.included(k) k.extend(self) end;T;&I"def self.included(k);T;'T;4To; ; F; ;;;;I"*CLIUtils::Configuration#configuration;F;[;[[@i;T;:configuration;;;[;{;IC;"JSingleton method to return (or initialize, if needed) a Configurator. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I"Configurator;T;@;"I"aSingleton method to return (or initialize, if needed) a Configurator. @return [Configurator];T;#0;@; F;/o;0;1F;2i;3i;$@;%I"Wdef configuration @configuration ||= Configurator.new('~/.default-cliutils') end;T;&I"def configuration;T;'T;4To; ; F; ;;;;I"/CLIUtils::Configuration#load_configuration;F;[[I" path;T0;[[@i;T;:load_configuration;;;[;{;IC;"JSingleton method to return (or initialize, if needed) a Configurator. ;T;![;[o;+ ;,I" param;F;-I"The filepath to use;T;I" path;T;.[I" String;T;@o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"}Singleton method to return (or initialize, if needed) a Configurator. @param [String] path The filepath to use @return [void];T;#0;@; F;/o;0;1F;2i;3i;$@;%I"Odef load_configuration(path) @configuration = Configurator.new(path) end;T;&I"!def load_configuration(path);T;'T;4T;9@;:IC;[;9@;;IC;[;9@;WIC;X{;FIC;X{;YT;IC;X{;YT;YT;Z{;[[;[[@i ;T;:Configuration;;;;;[;{;IC;"mConfiguration Module Manages any configuration values and the flat YAML file into which they get stored. ;T;![;[;"I"mConfiguration Module Manages any configuration values and the flat YAML file into which they get stored.;T;#0;@; F;/o;0;1F;2i ;3i ;$@;I"CLIUtils::Configuration;F;'To; ;IC;[ o; ; F; ;;;;I"&CLIUtils::LoggerDelegator#targets;F;[;[[I"%lib/cliutils/logger-delegator.rb;Ti ;F;: targets;;;[;{;IC;"+Returns the value of attribute targets ;T;@F;0; F;![;[;"I"+Returns the value of attribute targets;T;#0;$@D;%I"def targets @targets end;T;&I"def targets;T;'To; ; F; ;;;;I")CLIUtils::LoggerDelegator#initialize;F;[[I" *targets;T0;[[@Ki;T;;*;;;[;{;IC;"0;?0;;b;$@;A0;\;F;'T;9@;:IC;[;9@;;IC;[;9@;WIC;X{;FIC;X{;YT;IC;X{;YT;YT;Z{;[[;[ [I"lib/cliutils.rb;Ti[@i[@i[@i[@i[@i[@i[@Ki;T;: CLIUtils;;;;;[;{;IC;"=The CLIUtils module, which wraps everything in this gem. ;T;![;[;"I"=The CLIUtils module, which wraps everything in this gem.;T;#0;@; F;/o;0;1F;2i;3i;$@;I" CLIUtils;Fo; ;IC;[o; ; F; ;;;;I"Hash#deep_merge!;F;[[I"other_hash;T0[I" &block;T0;[[I"(lib/cliutils/ext/Hash+Extensions.rb;Ti;T;:deep_merge!;;;[;{;IC;"-Deep merges a hash into the current one. ;T;![;[o;+ ;,I" param;F;-I"The hash to merge in;T;I"other_hash;T;.[I" Hash;T;@o;+ ;,I" yield;F;-I" &block;T;0;.0;@o;+ ;,I" return;F;-I";T;0;.[I" Hash;T;@;"I"xDeep merges a hash into the current one. @param [Hash] other_hash The hash to merge in @yield &block @return [Hash];T;#0;@; F;/o;0;1F;2i ;3i;$@;%I"def deep_merge!(other_hash, &block) other_hash.each_pair do |k,v| tv = self[k] if tv.is_a?(Hash) && v.is_a?(Hash) self[k] = tv.deep_merge(v, &block) else self[k] = block && tv ? block.call(k, tv, v) : v end end self end;T;&I"(def deep_merge!(other_hash, &block);T;'T;4To; ; F; ;;;;I"Hash#deep_stringify_keys;F;[;[[@i;T;:deep_stringify_keys;;;[;{;IC;"KRecursively turns all Hash keys into strings and returns the new Hash. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" Hash;T;@;"I"ZRecursively turns all Hash keys into strings and returns the new Hash. @return [Hash];T;#0;@; F;/o;0;1F;2i;3i;$@;%I"Hdef deep_stringify_keys deep_transform_keys{ |key| key.to_s } end;T;&I"def deep_stringify_keys;T;'T;4To; ; F; ;;;;I"Hash#deep_stringify_keys!;F;[;[[@i%;T;:deep_stringify_keys!;;;[;{;IC;"MSame as deep_stringify_keys, but destructively alters the original Hash. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" Hash;T;@;"I"\Same as deep_stringify_keys, but destructively alters the original Hash. @return [Hash];T;#0;@; F;/o;0;1F;2i";3i$;$@;%I"Jdef deep_stringify_keys! deep_transform_keys!{ |key| key.to_s } end;T;&I"def deep_stringify_keys!;T;'T;4To; ; F; ;;;;I"Hash#deep_symbolize_keys;F;[;[[@i,;T;:deep_symbolize_keys;;;[;{;IC;"KRecursively turns all Hash keys into symbols and returns the new Hash. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" Hash;T;@';"I"ZRecursively turns all Hash keys into symbols and returns the new Hash. @return [Hash];T;#0;@'; F;/o;0;1F;2i);3i+;$@;%I"Udef deep_symbolize_keys deep_transform_keys{ |key| key.to_sym rescue key } end;T;&I"def deep_symbolize_keys;T;'T;4To; ; F; ;;;;I"Hash#deep_symbolize_keys!;F;[;[[@i3;T;:deep_symbolize_keys!;;;[;{;IC;"MSame as deep_symbolize_keys, but destructively alters the original Hash. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" Hash;T;@:;"I"\Same as deep_symbolize_keys, but destructively alters the original Hash. @return [Hash];T;#0;@:; F;/o;0;1F;2i0;3i2;$@;%I"Wdef deep_symbolize_keys! deep_transform_keys!{ |key| key.to_sym rescue key } end;T;&I"def deep_symbolize_keys!;T;'T;4To; ; F; ;;;;I"Hash#deep_transform_keys;F;[[I" &block;T0;[[@i;;T;:deep_transform_keys;;;[;{;IC;">Generic method to perform recursive operations on a Hash. ;T;![;[o;+ ;,I" yield;F;-I" &block;T;0;.0;@Mo;+ ;,I" return;F;-I";T;0;.[I" Hash;T;@M;"I"[Generic method to perform recursive operations on a Hash. @yield &block @return [Hash];T;#0;@M; F;/o;0;1F;2i7;3i:;$@;%I"Wdef deep_transform_keys(&block) _deep_transform_keys_in_object(self, &block) end;T;&I"$def deep_transform_keys(&block);T;'T;4To; ; F; ;;;;I"Hash#deep_transform_keys!;F;[[I" &block;T0;[[@iC;T;:deep_transform_keys!;;;[;{;IC;"MSame as deep_transform_keys, but destructively alters the original Hash. ;T;![;[o;+ ;,I" yield;F;-I" &block;T;0;.0;@eo;+ ;,I" return;F;-I";T;0;.[I" Hash;T;@e;"I"jSame as deep_transform_keys, but destructively alters the original Hash. @yield &block @return [Hash];T;#0;@e; F;/o;0;1F;2i?;3iB;$@;%I"Ydef deep_transform_keys!(&block) _deep_transform_keys_in_object!(self, &block) end;T;&I"%def deep_transform_keys!(&block);T;'T;4To; ; F; ;;;6;I"(Hash#_deep_transform_keys_in_object;F;[[I" object;T0[I" &block;T0;[[@iO;T;:#_deep_transform_keys_in_object;;;[;{;IC;"Modification to deep_transform_keys that allows for the existence of arrays. https://github.com/rails/rails/pull/9720/files?short_path=4be3c90 ;T;![;[o;+ ;,I" param;F;-I"The object to examine;T;I" object;T;.[I" Object;T;@}o;+ ;,I" yield;F;-I" &block;T;0;.0;@}o;+ ;,I" return;F;-I";T;0;.[I" Object;T;@};"I"Modification to deep_transform_keys that allows for the existence of arrays. https://github.com/rails/rails/pull/9720/files?short_path=4be3c90 @param [Object] object The object to examine @yield &block @return [Object];T;#0;@}; F;/o;0;1F;2iI;3iN;$@;%I"@def _deep_transform_keys_in_object(object, &block) case object when Hash object.each_with_object({}) do |(key, value), result| result[yield(key)] = _deep_transform_keys_in_object(value, &block) end when Array object.map {|e| _deep_transform_keys_in_object(e, &block) } else object end end;T;&I"7def _deep_transform_keys_in_object(object, &block);T;'T;4To; ; F; ;;;6;I")Hash#_deep_transform_keys_in_object!;F;[[I" object;T0[I" &block;T0;[[@ia;T;:$_deep_transform_keys_in_object!;;;[;{;IC;"ZSame as _deep_transform_keys_in_object, but destructively alters the original Object. ;T;![;[o;+ ;,I" param;F;-I"object to examine;T;I"The;T;.[I" Object;T;@o;+ ;,I" yield;F;-I" &block;T;0;.0;@o;+ ;,I" return;F;-I";T;0;.[I" Object;T;@;"I"Same as _deep_transform_keys_in_object, but destructively alters the original Object. @param [Object] The object to examine @yield &block @return [Object];T;#0;@; F;/o;0;1F;2i\;3i`;$@;%I"Sdef _deep_transform_keys_in_object!(object, &block) case object when Hash object.keys.each do |key| value = object.delete(key) object[yield(key)] = _deep_transform_keys_in_object!(value, &block) end object when Array object.map! {|e| _deep_transform_keys_in_object!(e, &block)} else object end end;T;&I"8def _deep_transform_keys_in_object!(object, &block);T;'T;4T;9@;:IC;[;9@;;IC;[;9@;WIC;X{;FIC;X{;YT;IC;X{;YT;YT;Z{;[[;[[@i ;T;: Hash;;;;;[;{;IC;"qHash Class Contains many convenient methods borrowed from Rails http://api.rubyonrails.org/classes/Hash.html ;T;![;[;"I"qHash Class Contains many convenient methods borrowed from Rails http://api.rubyonrails.org/classes/Hash.html;T;#0;@; F;/o;0;1F;2i;3i;$@;I" Hash;F;ao;< ;=0;>0;?0;;b;$@;A0;\;Fo; ;IC;[o; ; F; ;F;;;I"Logger.custom_level;F;[[I"tag;T0;[[I"*lib/cliutils/ext/Logger+Extensions.rb;Ti;T;:custom_level;;;[;{;IC;";Creates a custom Logger level based on the passed tag. ;T;![;[o;+ ;,I" param;F;-I"The Logger level to create;T;I"tag;T;.[I" String;T;@o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"yCreates a custom Logger level based on the passed tag. @param [String] tag The Logger level to create @return [void];T;#0;@; F;/o;0;1F;2i ;3i;$@;%I"def self.custom_level(tag) SEV_LABEL << tag idx = SEV_LABEL.size - 1 define_method(tag.downcase.gsub(/\W+/, '_').to_sym) do |progname, &block| add(idx, nil, progname, &block) end end;T;&I"def self.custom_level(tag);T;'T;4T;9@;:IC;[;9@;;IC;[;9@;WIC;X{;FIC;X{;YT;IC;X{;YT;YT;Z{;[[;[[@i ;T;: Logger;;;;;[;{;IC;"Logger Class extensions ;T;![;[;"I" Logger Class extensions;T;#0;@; F;/o;0;1F;2i;3i;$@;I" Logger;F;ao;< ;=0;>0;?0;;b;$@;A0;\;Fo; ;IC;[ o; ; F; ;;;;I"String#colorize;F;[[I"color_code;T0;[[I"*lib/cliutils/ext/String+Extensions.rb;Ti ;T;: colorize;;;[;{;IC;"+Outputs a string in a formatted color. ;T;![;[o;+ ;,I" param;F;-I"The code to use;T;I"color_code;T;.[I";T;@o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"pOutputs a string in a formatted color. @param [] color_code The code to use @return [void];T;#0;@; F;/o;0;1F;2i ;3i ;$@;%I"Kdef colorize(color_code) "\033[#{ color_code }m#{ self }\033[0m" end;T;&I"def colorize(color_code);T;'T;4To; ; F; ;;;;I"String#blue;F;[;[[@i;T;: blue;;;[;{;IC;"&Makes the associated string blue. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"5Makes the associated string blue. @return [void];T;#0;@; F;/o;0;1F;2i;3i;$@;%I"def blue; colorize(34) end;T;&I"def blue; colorize(34) end;T;'T;4To; ; F; ;;;;I"String#cyan;F;[;[[@i;T;: cyan;;;[;{;IC;"&Makes the associated string cyan. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" void;T;@0;"I"5Makes the associated string cyan. @return [void];T;#0;@0; F;/o;0;1F;2i;3i;$@;%I"def cyan; colorize(36) end;T;&I"def cyan; colorize(36) end;T;'T;4To; ; F; ;;;;I"String#green;F;[;[[@i;T;: green;;;[;{;IC;"'Makes the associated string green. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" void;T;@C;"I"6Makes the associated string green. @return [void];T;#0;@C; F;/o;0;1F;2i;3i;$@;%I" def green; colorize(32) end;T;&I" def green; colorize(32) end;T;'T;4To; ; F; ;;;;I"String#purple;F;[;[[@i;T;: purple;;;[;{;IC;"(Makes the associated string purple. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" void;T;@V;"I"7Makes the associated string purple. @return [void];T;#0;@V; F;/o;0;1F;2i;3i;$@;%I"!def purple; colorize(35) end;T;&I"!def purple; colorize(35) end;T;'T;4To; ; F; ;;;;I"String#red;F;[;[[@i";T;:red;;;[;{;IC;"%Makes the associated string red. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" void;T;@i;"I"4Makes the associated string red. @return [void];T;#0;@i; F;/o;0;1F;2i ;3i!;$@;%I"def red; colorize(31) end;T;&I"def red; colorize(31) end;T;'T;4To; ; F; ;;;;I"String#white;F;[;[[@i&;T;: white;;;[;{;IC;"'Makes the associated string white. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" void;T;@|;"I"6Makes the associated string white. @return [void];T;#0;@|; F;/o;0;1F;2i$;3i%;$@;%I" def white; colorize(37) end;T;&I" def white; colorize(37) end;T;'T;4To; ; F; ;;;;I"String#yellow;F;[;[[@i*;T;: yellow;;;[;{;IC;"(Makes the associated string yellow. ;T;![;[o;+ ;,I" return;F;-I";T;0;.[I" void;T;@;"I"7Makes the associated string yellow. @return [void];T;#0;@; F;/o;0;1F;2i(;3i);$@;%I"!def yellow; colorize(33) end;T;&I"!def yellow; colorize(33) end;T;'T;4T;9@;:IC;[;9@;;IC;[;9@;WIC;X{;FIC;X{;YT;IC;X{;YT;YT;Z{;[[;[[@i;T;: String;;;;;[;{;IC;"String Class extensions ;T;![;[;"I" String Class extensions;T;#0;@; F;/o;0;1F;2i;3i;$@;I" String;F;ao;< ;=0;>0;?0;;b;$@;A0;\;F;9@;:IC;[;9@;;IC;[;9@;WIC;X{;FIC;X{;YT;IC;X{;YT;YT;Z{;[[;[;F;;;;;;;[;{;IC;" ;T;@;0; F;![;[;"I";T;#0;$0;I";T;x@:CLIUtils::Prefs@ :CLIUtils::Prefs#answers@ : CLIUtils::Prefs#config_path@:CLIUtils::Prefs#prompts@':CLIUtils::Prefs#initialize@4:CLIUtils::Prefs#ask@O:$CLIUtils::Prefs#_deliver_prompt@b:-CLIUtils::Prefs#_requirements_fulfilled?@}:CLIUtils::VERSION@:CLIUtils::PrettyIO@:CLIUtils::PrettyIO::@@wrap@:*CLIUtils::PrettyIO::@@wrap_char_limit@: CLIUtils::PrettyIO.included@:#CLIUtils::PrettyIO#color_chart@:CLIUtils::PrettyIO#debug@:CLIUtils::PrettyIO#error@:CLIUtils::PrettyIO#info@:"CLIUtils::PrettyIO#info_block@,:CLIUtils::PrettyIO#log@\:CLIUtils::PrettyIO#prompt@q:CLIUtils::PrettyIO#section@:%CLIUtils::PrettyIO#section_block@:CLIUtils::PrettyIO#success@:CLIUtils::PrettyIO#warn@:CLIUtils::PrettyIO.wrap@:"CLIUtils::PrettyIO.wrap_limit@0:CLIUtils::PrettyIO.wrap_at@C:"CLIUtils::PrettyIO#_word_wrap@^:CLIUtils::Messenging@:"CLIUtils::Messenging.included@:*CLIUtils::Messenging#default_instance@:#CLIUtils::Messenging#messenger@:CLIUtils::Configurator@ :'CLIUtils::Configurator#config_path@ : CLIUtils::Configurator#data@:&CLIUtils::Configurator#initialize@(:'CLIUtils::Configurator#add_section@C:*CLIUtils::Configurator#delete_section@^:(CLIUtils::Configurator#ingest_prefs@y:*CLIUtils::Configurator#method_missing@:!CLIUtils::Configurator#reset@: CLIUtils::Configurator#save@:CLIUtils::Configuration@:%CLIUtils::Configuration.included@:*CLIUtils::Configuration#configuration@:/CLIUtils::Configuration#load_configuration@:CLIUtils::LoggerDelegator@D:&CLIUtils::LoggerDelegator#targets@F:)CLIUtils::LoggerDelegator#initialize@T:%CLIUtils::LoggerDelegator#attach@o:'CLIUtils::LoggerDelegator.delegate@:%CLIUtils::LoggerDelegator#detach@;}@:Hash#deep_merge!@:Hash#deep_stringify_keys@:Hash#deep_stringify_keys!@:Hash#deep_symbolize_keys@':Hash#deep_symbolize_keys!@::Hash#deep_transform_keys@M:Hash#deep_transform_keys!@e:(Hash#_deep_transform_keys_in_object@}:)Hash#_deep_transform_keys_in_object!@;@:Logger.custom_level@;@:String#colorize@:String#blue@:String#cyan@0:String#green@C:String#purple@V:String#red@i:String#white@|:String#yellow@