Skip to content

Commit

Permalink
Enable Style/ClassCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
winebarrel committed Jun 11, 2018
1 parent d114ffa commit fc694b2
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ Style/CaseEquality:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/ClassCheck:
Enabled: false
Style/CommentedKeyword:
Enabled: false
Style/ConditionalAssignment:
Expand Down
2 changes: 1 addition & 1 deletion bin/ridgepole
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ ARGV.options do |opt|
rescue => e
warn("[ERROR] #{e.message}")

unless e.kind_of?(OptionParser::ParseError)
unless e.is_a?(OptionParser::ParseError)
puts "\t" + e.backtrace.join("\n\t")
end

Expand Down
2 changes: 1 addition & 1 deletion lib/ridgepole/cli/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def load(config, env = 'development')
parsed_config = YAML.safe_load(ERB.new(config).result, [], [], true)
end

unless parsed_config.kind_of?(Hash)
unless parsed_config.is_a?(Hash)
parsed_config = parse_database_url(config)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/ridgepole/delta.rb
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def normalize_limit(column_type, column_options)
def inspect_options_include_default_proc(options)
options = options.dup

if options[:default].kind_of?(Proc)
if options[:default].is_a?(Proc)
proc_default = options.delete(:default)
proc_default = ":default=>proc{#{proc_default.call.inspect}}"
options_inspect = options.inspect
Expand Down
4 changes: 2 additions & 2 deletions lib/ridgepole/diff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def scan_indices_change(from, to, to_columns, table_delta, _from_table_options,
indices_delta = {}

to.each do |index_name, to_attrs|
if index_name.kind_of?(Array)
if index_name.is_a?(Array)
from_index_name, from_attrs = from.find { |_name, attrs| attrs[:column_name] == index_name }

if from_attrs
Expand Down Expand Up @@ -472,7 +472,7 @@ def compare_column_attrs(attrs1, attrs2)
end

def normalize_default_proc_options!(opts1, opts2)
if opts1[:default].kind_of?(Proc) && opts2[:default].kind_of?(Proc)
if opts1[:default].is_a?(Proc) && opts2[:default].is_a?(Proc)
opts1[:default] = opts1[:default].call
opts2[:default] = opts2[:default].call
end
Expand Down
2 changes: 1 addition & 1 deletion lib/ridgepole/ext/pp_sort_hash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def pretty_print(q)
end

def self.extend_if_hash(obj)
if obj.kind_of?(Hash)
if obj.is_a?(Hash)
obj = obj.dup
obj.extend(self)
end
Expand Down

0 comments on commit fc694b2

Please sign in to comment.