From a33b0e7628de8a70180d394ecf7b80b971bf4ff4 Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Sat, 19 Sep 2020 00:08:09 +0900 Subject: [PATCH] Rubocop auto correct --- Gemfile | 2 ++ Rakefile | 2 ++ exe/uplot | 1 + lib/uplot.rb | 2 ++ lib/uplot/command.rb | 2 ++ lib/uplot/command/params.rb | 2 ++ lib/uplot/command/parser.rb | 5 +++-- lib/uplot/plot.rb | 2 ++ lib/uplot/preprocessing.rb | 2 ++ lib/uplot/version.rb | 4 +++- test/test_helper.rb | 2 ++ test/uplot/command_test.rb | 2 ++ test/uplot/plot_test.rb | 2 ++ test/uplot/preprocessing_test.rb | 2 ++ test/uplot_test.rb | 2 ++ uplot.gemspec | 2 ++ 16 files changed, 33 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 87598e7..97f600f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source 'https://rubygems.org' # Specify your gem's dependencies in uplot.gemspec diff --git a/Rakefile b/Rakefile index 4b2b782..4caa98e 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'bundler/gem_tasks' require 'rake/testtask' diff --git a/exe/uplot b/exe/uplot index 5d740e2..88eb387 100755 --- a/exe/uplot +++ b/exe/uplot @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true require 'uplot' diff --git a/lib/uplot.rb b/lib/uplot.rb index c85a473..3992c40 100644 --- a/lib/uplot.rb +++ b/lib/uplot.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'unicode_plot' require 'uplot/version' require 'uplot/preprocessing' diff --git a/lib/uplot/command.rb b/lib/uplot/command.rb index 2ab46e0..bb9b7a6 100644 --- a/lib/uplot/command.rb +++ b/lib/uplot/command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative 'preprocessing' require_relative 'command/parser' diff --git a/lib/uplot/command/params.rb b/lib/uplot/command/params.rb index 1b5d6a2..618a33d 100644 --- a/lib/uplot/command/params.rb +++ b/lib/uplot/command/params.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Uplot class Command Params = Struct.new( diff --git a/lib/uplot/command/parser.rb b/lib/uplot/command/parser.rb index 7e3895f..29b4181 100644 --- a/lib/uplot/command/parser.rb +++ b/lib/uplot/command/parser.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'optparse' require_relative 'params' @@ -211,7 +213,7 @@ module Uplot @command = argv.shift&.to_sym - unless sub_parsers.has_key?(command) + unless sub_parsers.key?(command) if command.nil? warn main_parser.help else @@ -228,7 +230,6 @@ module Uplot exit 1 end end - end end end diff --git a/lib/uplot/plot.rb b/lib/uplot/plot.rb index 258a352..0b73ad9 100644 --- a/lib/uplot/plot.rb +++ b/lib/uplot/plot.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'unicode_plot' module Uplot diff --git a/lib/uplot/preprocessing.rb b/lib/uplot/preprocessing.rb index ac07c35..1edbaa3 100644 --- a/lib/uplot/preprocessing.rb +++ b/lib/uplot/preprocessing.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'csv' module Uplot diff --git a/lib/uplot/version.rb b/lib/uplot/version.rb index 960d235..1ffa54d 100644 --- a/lib/uplot/version.rb +++ b/lib/uplot/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Uplot - VERSION = '0.2.3'.freeze + VERSION = '0.2.3' end diff --git a/test/test_helper.rb b/test/test_helper.rb index aba8070..a0f705b 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'simplecov' SimpleCov.start diff --git a/test/uplot/command_test.rb b/test/uplot/command_test.rb index 338c112..17c6403 100644 --- a/test/uplot/command_test.rb +++ b/test/uplot/command_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../test_helper.rb' class UplotCommandTest < Test::Unit::TestCase diff --git a/test/uplot/plot_test.rb b/test/uplot/plot_test.rb index 41a6cf2..625bbe0 100644 --- a/test/uplot/plot_test.rb +++ b/test/uplot/plot_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../test_helper.rb' class UplotPlotTest < Test::Unit::TestCase diff --git a/test/uplot/preprocessing_test.rb b/test/uplot/preprocessing_test.rb index d20cfce..7f1cc3f 100644 --- a/test/uplot/preprocessing_test.rb +++ b/test/uplot/preprocessing_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../test_helper.rb' class UplotPreprocessingTest < Test::Unit::TestCase diff --git a/test/uplot_test.rb b/test/uplot_test.rb index 67edf95..85e9859 100644 --- a/test/uplot_test.rb +++ b/test/uplot_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class UplotTest < Test::Unit::TestCase diff --git a/uplot.gemspec b/uplot.gemspec index e8724a3..d9b914d 100644 --- a/uplot.gemspec +++ b/uplot.gemspec @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative 'lib/uplot/version' Gem::Specification.new do |spec|