lib/rubocop/codetakt/cli.rb in rubocop-codetakt-0.82.0.0 vs lib/rubocop/codetakt/cli.rb in rubocop-codetakt-0.82.0.1
- old
+ new
@@ -1,6 +1,6 @@
-require "fileutils"
+require 'fileutils'
module RuboCop
module Codetakt
class CLI
def self.start(args)
@@ -28,18 +28,19 @@
meth = args.first.to_s unless args.empty?
args.shift if meth && (meth !~ /^\-/)
end
def self.print_help
- puts "rubocop-codetakt commands:"
- puts " init - Setup .rubocop.yml"
+ puts 'rubocop-codetakt commands:'
+ puts ' init - Setup .rubocop.yml'
end
- CONFIG_FILE_NAME = ".rubocop.yml"
+ CONFIG_FILE_NAME = '.rubocop.yml'.freeze
def init(args)
- raise "usage: rubocop-codetakt init" unless args.empty?
- template_path = File.expand_path("../../../templates", __dir__)
- puts "#{File.exist?(CONFIG_FILE_NAME) ? "overwrite" : "create"} #{CONFIG_FILE_NAME}"
+ raise 'usage: rubocop-codetakt init' unless args.empty?
+
+ template_path = File.expand_path('../../../templates', __dir__)
+ puts "#{File.exist?(CONFIG_FILE_NAME) ? 'overwrite' : 'create'} #{CONFIG_FILE_NAME}"
FileUtils.copy_file(File.join(template_path, CONFIG_FILE_NAME), CONFIG_FILE_NAME)
end
end
end
end