diff --git a/UnicodePlot.html b/UnicodePlot.html index c355ce3..861771a 100644 --- a/UnicodePlot.html +++ b/UnicodePlot.html @@ -241,7 +241,7 @@
diff --git a/YouPlot.html b/YouPlot.html index 7bd82f9..f6a9d05 100644 --- a/YouPlot.html +++ b/YouPlot.html @@ -296,7 +296,7 @@ diff --git a/YouPlot/Backends.html b/YouPlot/Backends.html index 9caf701..c4351a5 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 f81144f..37567e5 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 d4bba36..50a8e7b 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 f91d840..d904a29 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 d047234..8903dd2 100644 --- a/YouPlot/Command.html +++ b/YouPlot/Command.html @@ -803,7 +803,7 @@ diff --git a/YouPlot/DSV.html b/YouPlot/DSV.html index 3ef8b36..08e4143 100644 --- a/YouPlot/DSV.html +++ b/YouPlot/DSV.html @@ -460,7 +460,7 @@ diff --git a/YouPlot/Data.html b/YouPlot/Data.html index 06c70e4..759bab3 100644 --- a/YouPlot/Data.html +++ b/YouPlot/Data.html @@ -300,7 +300,7 @@ diff --git a/YouPlot/Options.html b/YouPlot/Options.html index 9c22884..247f289 100644 --- a/YouPlot/Options.html +++ b/YouPlot/Options.html @@ -1103,7 +1103,7 @@ diff --git a/YouPlot/Parameters.html b/YouPlot/Parameters.html index 5a161de..d23f67c 100644 --- a/YouPlot/Parameters.html +++ b/YouPlot/Parameters.html @@ -1881,7 +1881,7 @@ diff --git a/YouPlot/Parser.html b/YouPlot/Parser.html index 37ebd96..7a8340b 100644 --- a/YouPlot/Parser.html +++ b/YouPlot/Parser.html @@ -346,7 +346,7 @@# File 'lib/youplot/parser.rb', line 15 @@ -799,10 +798,9 @@ @params = Parameters.new - if @config_file = find_config_file - ENV['MYYOUPLOTRC'] = @config_file - @config = read_config_file(config_file) - configure(config) + if find_config_file + read_config_file + configure end end
+39 40 41 42 @@ -1149,10 +1148,11 @@ 48
# File 'lib/youplot/parser.rb', line 40 +# File 'lib/youplot/parser.rb', line 39 -def candidate_paths - paths = [] +def config_file_candidate_paths + # keep the order of the paths + paths = [] paths << ENV['MYYOUPLOTRC'] if ENV['MYYOUPLOTRC'] paths << '.youplot.yml' paths << '.youplotrc' @@ -1168,7 +1168,7 @@diff --git a/_index.html b/_index.html index 7d9998f..0686661 100644 --- a/_index.html +++ b/_index.html @@ -238,7 +238,7 @@ diff --git a/file.README.html b/file.README.html index 6cdebb6..701b32c 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 c7404f8..d0fcb84 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 decb822..2734049 100644 --- a/method_list.html +++ b/method_list.html @@ -69,14 +69,6 @@- #configure(config) ⇒ Object + #configure ⇒ Object @@ -1199,7 +1199,7 @@
@@ -1804,7 +1804,7 @@ # File 'lib/youplot/parser.rb', line 67 -def configure(config) +def configure option_members = @options.members param_members = @params.members # It would be more useful to be able to configure by plot type @@ -1728,15 +1728,15 @@# File 'lib/youplot/parser.rb', line 50 def find_config_file - config_file_path = nil - candidate_paths.each do |file| + config_file_candidate_paths.each do |file| path = File.(file) if File.exist?(path) - config_file_path = path - break + @config_file = path + ENV['MYYOUPLOTRC'] = path + return @config_file end end - config_file_path + nil enddiff --git a/YouPlot/Parser/Error.html b/YouPlot/Parser/Error.html index dec0f64..ce4b4d8 100644 --- a/YouPlot/Parser/Error.html +++ b/YouPlot/Parser/Error.html @@ -114,7 +114,7 @@- #read_config_file(path) ⇒ Object + #read_config_file ⇒ Object @@ -1824,9 +1824,9 @@
@@ -2122,7 +2122,7 @@ # File 'lib/youplot/parser.rb', line 62 -def read_config_file(path) +def read_config_file require 'yaml' - YAML.load_file(path) + @config = YAML.load_file(config_file) end