diff --git a/lib/uplot/command.rb b/lib/uplot/command.rb index 292bde0..2571b89 100644 --- a/lib/uplot/command.rb +++ b/lib/uplot/command.rb @@ -1,5 +1,6 @@ require 'optparse' require_relative 'preprocessing' +require_relative 'command/params' module Uplot Data = Struct.new(:headers, :series) @@ -225,7 +226,7 @@ module Uplot def run parse_options - + if command == :colors Plot.colors exit diff --git a/lib/uplot/plot.rb b/lib/uplot/plot.rb index 79ebed0..258a352 100644 --- a/lib/uplot/plot.rb +++ b/lib/uplot/plot.rb @@ -124,15 +124,15 @@ module Uplot end def colors - UnicodePlot::StyledPrinter::TEXT_COLORS.each do |k,v| - print v - print k - print "\t" - print " ●" - print "\033[0m" - print "\t" - end - puts + UnicodePlot::StyledPrinter::TEXT_COLORS.each do |k, v| + print v + print k + print "\t" + print ' ●' + print "\033[0m" + print "\t" + end + puts end def check_series_size(data, fmt) diff --git a/test/uplot/preprocessing_test.rb b/test/uplot/preprocessing_test.rb index f3be617..d20cfce 100644 --- a/test/uplot/preprocessing_test.rb +++ b/test/uplot/preprocessing_test.rb @@ -61,7 +61,7 @@ class UplotPreprocessingTest < Test::Unit::TestCase test :get_series do n = nil - + assert_equal([[2, 3], [5, 6], [8, 9]], @m.get_series([[1, 2, 3], [4, 5, 6], [7, 8, 9]], true, true))