diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-22 20:25:50 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 18:32:22 +0300 |
commit | f74ca33a32fbf810b377cf480e996fb383d8f400 (patch) | |
tree | b49de25e505da3ee7ca44493c4934b1add025130 /app | |
parent | f3a83dc8fc377357291fd25d333f5b5a3616fae9 (diff) |
Enable Style/ClassCheck
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/issuables_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/namespaces_helper.rb | 2 | ||||
-rw-r--r-- | app/models/ci/build.rb | 2 | ||||
-rw-r--r-- | app/models/commit.rb | 2 | ||||
-rw-r--r-- | app/services/system_note_service.rb | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index b65edb4049c..715072290c6 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -23,7 +23,7 @@ module IssuablesHelper def issuable_json_path(issuable) project = issuable.project - if issuable.kind_of?(MergeRequest) + if issuable.is_a?(MergeRequest) namespace_project_merge_request_path(project.namespace, project, issuable.iid, :json) else namespace_project_issue_path(project.namespace, project, issuable.iid, :json) diff --git a/app/helpers/namespaces_helper.rb b/app/helpers/namespaces_helper.rb index dc5ae8edbb2..2e3a15bc1b9 100644 --- a/app/helpers/namespaces_helper.rb +++ b/app/helpers/namespaces_helper.rb @@ -33,7 +33,7 @@ module NamespacesHelper end def namespace_icon(namespace, size = 40) - if namespace.kind_of?(Group) + if namespace.is_a?(Group) group_icon(namespace) else avatar_icon(namespace.owner.email, size) diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index de9fe352059..7e21eb22e27 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -257,7 +257,7 @@ module Ci return unless regex matches = text.scan(Regexp.new(regex)).last - matches = matches.last if matches.kind_of?(Array) + matches = matches.last if matches.is_a?(Array) coverage = matches.gsub(/\d+(\.\d+)?/).first if coverage.present? diff --git a/app/models/commit.rb b/app/models/commit.rb index 8f6179f183e..dc971e710ff 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -27,7 +27,7 @@ class Commit class << self def decorate(commits, project) commits.map do |commit| - if commit.kind_of?(Commit) + if commit.is_a?(Commit) commit else self.new(commit, project) diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb index 5cb4401d69d..55b548a12f9 100644 --- a/app/services/system_note_service.rb +++ b/app/services/system_note_service.rb @@ -356,7 +356,7 @@ module SystemNoteService note: cross_reference_note_content(gfm_reference) } - if noteable.kind_of?(Commit) + if noteable.is_a?(Commit) note_options.merge!(noteable_type: 'Commit', commit_id: noteable.id) else note_options[:noteable] = noteable |