diff --git a/UnicodePlot.html b/UnicodePlot.html index 2aac0db..7e4eea8 100644 --- a/UnicodePlot.html +++ b/UnicodePlot.html @@ -241,7 +241,7 @@
diff --git a/YouPlot.html b/YouPlot.html index e3e6512..e5a8beb 100644 --- a/YouPlot.html +++ b/YouPlot.html @@ -296,7 +296,7 @@ diff --git a/YouPlot/Backends.html b/YouPlot/Backends.html index c9ae393..b79155f 100644 --- a/YouPlot/Backends.html +++ b/YouPlot/Backends.html @@ -118,7 +118,7 @@ diff --git a/YouPlot/Backends/Processing.html b/YouPlot/Backends/Processing.html index 3fde3f6..ed0ef0d 100644 --- a/YouPlot/Backends/Processing.html +++ b/YouPlot/Backends/Processing.html @@ -208,7 +208,7 @@ diff --git a/YouPlot/Backends/UnicodePlot.html b/YouPlot/Backends/UnicodePlot.html index 17af7e4..d1fa403 100644 --- a/YouPlot/Backends/UnicodePlot.html +++ b/YouPlot/Backends/UnicodePlot.html @@ -1070,7 +1070,7 @@ diff --git a/YouPlot/Backends/UnicodePlot/Error.html b/YouPlot/Backends/UnicodePlot/Error.html index 19db539..a7cccc0 100644 --- a/YouPlot/Backends/UnicodePlot/Error.html +++ b/YouPlot/Backends/UnicodePlot/Error.html @@ -114,7 +114,7 @@ diff --git a/YouPlot/Command.html b/YouPlot/Command.html index c3807b7..1d062b8 100644 --- a/YouPlot/Command.html +++ b/YouPlot/Command.html @@ -803,7 +803,7 @@ diff --git a/YouPlot/DSV.html b/YouPlot/DSV.html index 75ecb43..cc005a0 100644 --- a/YouPlot/DSV.html +++ b/YouPlot/DSV.html @@ -460,7 +460,7 @@ diff --git a/YouPlot/Data.html b/YouPlot/Data.html index 28b8632..4cc77a5 100644 --- a/YouPlot/Data.html +++ b/YouPlot/Data.html @@ -300,7 +300,7 @@ diff --git a/YouPlot/Options.html b/YouPlot/Options.html index 6445608..c0380b2 100644 --- a/YouPlot/Options.html +++ b/YouPlot/Options.html @@ -1103,7 +1103,7 @@ diff --git a/YouPlot/Parameters.html b/YouPlot/Parameters.html index 6ccc5ff..9755adb 100644 --- a/YouPlot/Parameters.html +++ b/YouPlot/Parameters.html @@ -1881,7 +1881,7 @@ diff --git a/YouPlot/Parser.html b/YouPlot/Parser.html index 3358e86..2898041 100644 --- a/YouPlot/Parser.html +++ b/YouPlot/Parser.html @@ -346,6 +346,28 @@# File 'lib/youplot/parser.rb', line 15 @@ -820,10 +839,7 @@ @params = Parameters.new - if find_config_file - read_config_file - configure - end + apply_config_file end
+ + + +36 +37 +38 +39 +40 +41+ |
+
+ # File 'lib/youplot/parser.rb', line 36 + +def apply_config_file + return unless find_config_file + + read_config_file + configure +end+ |
+
-39 -40 -41 -42 43 44 45 46 47 -48+48 +49 +50 +51 +52
# File 'lib/youplot/parser.rb', line 39 +# File 'lib/youplot/parser.rb', line 43 def config_file_candidate_paths # keep the order of the paths @@ -1202,10 +1254,6 @@-67 -68 -69 -70 71 72 73 @@ -1216,10 +1264,14 @@ 78 79 80 -81+81 +82 +83 +84 +85
# File 'lib/youplot/parser.rb', line 67 +# File 'lib/youplot/parser.rb', line 71 def configure option_members = @options.members @@ -1256,10 +1308,6 @@-83 -84 -85 -86 87 88 89 @@ -1335,10 +1383,14 @@ 159 160 161 -162+162 +163 +164 +165 +166
# File 'lib/youplot/parser.rb', line 83 +# File 'lib/youplot/parser.rb', line 87 def create_base_parser OptionParser.new do |parser| @@ -1440,10 +1492,6 @@-164 -165 -166 -167 168 169 170 @@ -1473,10 +1521,14 @@ 194 195 196 -197+197 +198 +199 +200 +201
# File 'lib/youplot/parser.rb', line 164 +# File 'lib/youplot/parser.rb', line 168 def create_main_parser @main_parser = create_base_parser @@ -1532,10 +1584,6 @@-259 -260 -261 -262 263 264 265 @@ -1621,10 +1669,13 @@ 345 346 347 -348+348 +349 +350 +351
# File 'lib/youplot/parser.rb', line 259 +# File 'lib/youplot/parser.rb', line 263 def create_sub_parser @sub_parser = create_base_parser @@ -1708,12 +1759,11 @@ else = "uplot: unrecognized command '#{command}'" - if YouPlot.run_as_executable? - warn - exit 1 - else - raise Error, - end + raise Error, unless YouPlot.run_as_executable? + + warn + exit 1 + end end
-50 -51 -52 -53 54 55 56 57 58 59 -60+60 +61 +62 +63 +64
# File 'lib/youplot/parser.rb', line 50 +# File 'lib/youplot/parser.rb', line 54 def find_config_file config_file_candidate_paths.each do |file| @@ -1782,9 +1832,6 @@-350 -351 -352 353 354 355 @@ -1798,10 +1845,13 @@ 363 364 365 -366+366 +367 +368 +369
# File 'lib/youplot/parser.rb', line 350 +# File 'lib/youplot/parser.rb', line 353 def (argv = ARGV) begin @@ -1840,13 +1890,13 @@-62 -63 -64 -65+66 +67 +68 +69
# File 'lib/youplot/parser.rb', line 62 +# File 'lib/youplot/parser.rb', line 66 def read_config_file require 'yaml' @@ -1872,14 +1922,14 @@-199 -200 -201 -202 -203+203 +204 +205 +206 +207
# File 'lib/youplot/parser.rb', line 199 +# File 'lib/youplot/parser.rb', line 203 def show_main_help(out = $stdout) out.puts main_parser. @@ -1906,15 +1956,15 @@-218 -219 -220 -221 222 -223+223 +224 +225 +226 +227
# File 'lib/youplot/parser.rb', line 218 +# File 'lib/youplot/parser.rb', line 222 def sub_parser_add_canvas canvas_types = UnicodePlot::Canvas::CANVAS_CLASS_MAP.keys.join(', ') @@ -1942,16 +1992,16 @@-243 -244 -245 -246 247 248 -249+249 +250 +251 +252 +253
# File 'lib/youplot/parser.rb', line 243 +# File 'lib/youplot/parser.rb', line 247 def sub_parser_add_fmt_xyxy sub_parser.on_head('--fmt STR', String, @@ -1980,16 +2030,16 @@-251 -252 -253 -254 255 256 -257+257 +258 +259 +260 +261
# File 'lib/youplot/parser.rb', line 251 +# File 'lib/youplot/parser.rb', line 255 def sub_parser_add_fmt_yx sub_parser.on_head('--fmt STR', String, @@ -2018,14 +2068,14 @@-237 -238 -239 -240 -241+241 +242 +243 +244 +245
# File 'lib/youplot/parser.rb', line 237 +# File 'lib/youplot/parser.rb', line 241 def sub_parser_add_grid sub_parser.on_head('--[no-]grid', TrueClass, 'draws grid-lines at the origin') do |v| @@ -2052,14 +2102,14 @@-205 -206 -207 -208 -209+209 +210 +211 +212 +213
# File 'lib/youplot/parser.rb', line 205 +# File 'lib/youplot/parser.rb', line 209 def sub_parser_add_symbol sub_parser.on_head('--symbol STR', String, 'character to be used to plot the bars') do |v| @@ -2086,14 +2136,14 @@-225 -226 -227 -228 -229+229 +230 +231 +232 +233
# File 'lib/youplot/parser.rb', line 225 +# File 'lib/youplot/parser.rb', line 229 def sub_parser_add_xlim sub_parser.on_head('--xlim FLOAT,FLOAT', Array, 'plotting range for the x coordinate') do |v| @@ -2120,15 +2170,15 @@-211 -212 -213 -214 215 -216+216 +217 +218 +219 +220
# File 'lib/youplot/parser.rb', line 211 +# File 'lib/youplot/parser.rb', line 215 def sub_parser_add_xscale = UnicodePlot::ValueTransformer::PREDEFINED_TRANSFORM_FUNCTIONS.keys.join(', ') @@ -2156,14 +2206,14 @@-231 -232 -233 -234 -235+235 +236 +237 +238 +239
# File 'lib/youplot/parser.rb', line 231 +# File 'lib/youplot/parser.rb', line 235 def sub_parser_add_ylim sub_parser.on_head('--ylim FLOAT,FLOAT', Array, 'plotting range for the y coordinate') do |v| @@ -2180,7 +2230,7 @@ diff --git a/YouPlot/Parser/Error.html b/YouPlot/Parser/Error.html index b6a2f88..534b917 100644 --- a/YouPlot/Parser/Error.html +++ b/YouPlot/Parser/Error.html @@ -114,7 +114,7 @@ diff --git a/_index.html b/_index.html index f3674ce..f3bd917 100644 --- a/_index.html +++ b/_index.html @@ -238,7 +238,7 @@ diff --git a/file.README.html b/file.README.html index 0f20590..180639b 100644 --- a/file.README.html +++ b/file.README.html @@ -397,7 +397,7 @@ If so, please feel free to contact us. diff --git a/index.html b/index.html index c71d220..1a62064 100644 --- a/index.html +++ b/index.html @@ -397,7 +397,7 @@ If so, please feel free to contact us. diff --git a/method_list.html b/method_list.html index 02949fe..4c1b721 100644 --- a/method_list.html +++ b/method_list.html @@ -45,6 +45,14 @@