Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f74ca33a
Commit
f74ca33a
authored
Feb 22, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Style/ClassCheck
parent
f3a83dc8
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
12 additions
and
12 deletions
+12
-12
.rubocop.yml
.rubocop.yml
+1
-1
app/helpers/issuables_helper.rb
app/helpers/issuables_helper.rb
+1
-1
app/helpers/namespaces_helper.rb
app/helpers/namespaces_helper.rb
+1
-1
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
app/models/commit.rb
app/models/commit.rb
+1
-1
app/services/system_note_service.rb
app/services/system_note_service.rb
+1
-1
lib/file_size_validator.rb
lib/file_size_validator.rb
+2
-2
lib/gitlab/changes_list.rb
lib/gitlab/changes_list.rb
+1
-1
spec/support/login_helpers.rb
spec/support/login_helpers.rb
+1
-1
spec/support/matchers/access_matchers.rb
spec/support/matchers/access_matchers.rb
+1
-1
spec/support/select2_helper.rb
spec/support/select2_helper.rb
+1
-1
No files found.
.rubocop.yml
View file @
f74ca33a
...
@@ -110,7 +110,7 @@ Style/ClassAndModuleChildren:
...
@@ -110,7 +110,7 @@ Style/ClassAndModuleChildren:
# Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
# Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
Style/ClassCheck
:
Style/ClassCheck
:
Enabled
:
fals
e
Enabled
:
tru
e
# Use self when defining module/class methods.
# Use self when defining module/class methods.
Style/ClassMethods
:
Style/ClassMethods
:
...
...
app/helpers/issuables_helper.rb
View file @
f74ca33a
...
@@ -23,7 +23,7 @@ module IssuablesHelper
...
@@ -23,7 +23,7 @@ module IssuablesHelper
def
issuable_json_path
(
issuable
)
def
issuable_json_path
(
issuable
)
project
=
issuable
.
project
project
=
issuable
.
project
if
issuable
.
kind_of
?
(
MergeRequest
)
if
issuable
.
is_a
?
(
MergeRequest
)
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
issuable
.
iid
,
:json
)
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
issuable
.
iid
,
:json
)
else
else
namespace_project_issue_path
(
project
.
namespace
,
project
,
issuable
.
iid
,
:json
)
namespace_project_issue_path
(
project
.
namespace
,
project
,
issuable
.
iid
,
:json
)
...
...
app/helpers/namespaces_helper.rb
View file @
f74ca33a
...
@@ -33,7 +33,7 @@ module NamespacesHelper
...
@@ -33,7 +33,7 @@ module NamespacesHelper
end
end
def
namespace_icon
(
namespace
,
size
=
40
)
def
namespace_icon
(
namespace
,
size
=
40
)
if
namespace
.
kind_of
?
(
Group
)
if
namespace
.
is_a
?
(
Group
)
group_icon
(
namespace
)
group_icon
(
namespace
)
else
else
avatar_icon
(
namespace
.
owner
.
email
,
size
)
avatar_icon
(
namespace
.
owner
.
email
,
size
)
...
...
app/models/ci/build.rb
View file @
f74ca33a
...
@@ -257,7 +257,7 @@ module Ci
...
@@ -257,7 +257,7 @@ module Ci
return
unless
regex
return
unless
regex
matches
=
text
.
scan
(
Regexp
.
new
(
regex
)).
last
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
coverage
=
matches
.
gsub
(
/\d+(\.\d+)?/
).
first
if
coverage
.
present?
if
coverage
.
present?
...
...
app/models/commit.rb
View file @
f74ca33a
...
@@ -27,7 +27,7 @@ class Commit
...
@@ -27,7 +27,7 @@ class Commit
class
<<
self
class
<<
self
def
decorate
(
commits
,
project
)
def
decorate
(
commits
,
project
)
commits
.
map
do
|
commit
|
commits
.
map
do
|
commit
|
if
commit
.
kind_of
?
(
Commit
)
if
commit
.
is_a
?
(
Commit
)
commit
commit
else
else
self
.
new
(
commit
,
project
)
self
.
new
(
commit
,
project
)
...
...
app/services/system_note_service.rb
View file @
f74ca33a
...
@@ -356,7 +356,7 @@ module SystemNoteService
...
@@ -356,7 +356,7 @@ module SystemNoteService
note:
cross_reference_note_content
(
gfm_reference
)
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
)
note_options
.
merge!
(
noteable_type:
'Commit'
,
commit_id:
noteable
.
id
)
else
else
note_options
[
:noteable
]
=
noteable
note_options
[
:noteable
]
=
noteable
...
...
lib/file_size_validator.rb
View file @
f74ca33a
...
@@ -32,9 +32,9 @@ class FileSizeValidator < ActiveModel::EachValidator
...
@@ -32,9 +32,9 @@ class FileSizeValidator < ActiveModel::EachValidator
end
end
def
validate_each
(
record
,
attribute
,
value
)
def
validate_each
(
record
,
attribute
,
value
)
raise
(
ArgumentError
,
"A CarrierWave::Uploader::Base object was expected"
)
unless
value
.
kind_of
?
CarrierWave
::
Uploader
::
Base
raise
(
ArgumentError
,
"A CarrierWave::Uploader::Base object was expected"
)
unless
value
.
is_a
?
CarrierWave
::
Uploader
::
Base
value
=
(
options
[
:tokenizer
]
||
DEFAULT_TOKENIZER
).
call
(
value
)
if
value
.
kind_of
?
(
String
)
value
=
(
options
[
:tokenizer
]
||
DEFAULT_TOKENIZER
).
call
(
value
)
if
value
.
is_a
?
(
String
)
CHECKS
.
each
do
|
key
,
validity_check
|
CHECKS
.
each
do
|
key
,
validity_check
|
next
unless
check_value
=
options
[
key
]
next
unless
check_value
=
options
[
key
]
...
...
lib/gitlab/changes_list.rb
View file @
f74ca33a
...
@@ -5,7 +5,7 @@ module Gitlab
...
@@ -5,7 +5,7 @@ module Gitlab
attr_reader
:raw_changes
attr_reader
:raw_changes
def
initialize
(
changes
)
def
initialize
(
changes
)
@raw_changes
=
changes
.
kind_of
?
(
String
)
?
changes
.
lines
:
changes
@raw_changes
=
changes
.
is_a
?
(
String
)
?
changes
.
lines
:
changes
end
end
def
each
(
&
block
)
def
each
(
&
block
)
...
...
spec/support/login_helpers.rb
View file @
f74ca33a
...
@@ -16,7 +16,7 @@ module LoginHelpers
...
@@ -16,7 +16,7 @@ module LoginHelpers
# login_as(user)
# login_as(user)
def
login_as
(
user_or_role
)
def
login_as
(
user_or_role
)
@user
=
@user
=
if
user_or_role
.
kind_of
?
(
User
)
if
user_or_role
.
is_a
?
(
User
)
user_or_role
user_or_role
else
else
create
(
user_or_role
)
create
(
user_or_role
)
...
...
spec/support/matchers/access_matchers.rb
View file @
f74ca33a
...
@@ -38,7 +38,7 @@ module AccessMatchers
...
@@ -38,7 +38,7 @@ module AccessMatchers
end
end
def
description_for
(
user
,
type
)
def
description_for
(
user
,
type
)
if
user
.
kind_of
?
(
User
)
if
user
.
is_a
?
(
User
)
# User#inspect displays too much information for RSpec's descriptions
# User#inspect displays too much information for RSpec's descriptions
"be
#{
type
}
for the specified user"
"be
#{
type
}
for the specified user"
else
else
...
...
spec/support/select2_helper.rb
View file @
f74ca33a
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
module
Select2Helper
module
Select2Helper
def
select2
(
value
,
options
=
{})
def
select2
(
value
,
options
=
{})
raise
ArgumentError
,
'options must be a Hash'
unless
options
.
kind_of
?
(
Hash
)
raise
ArgumentError
,
'options must be a Hash'
unless
options
.
is_a
?
(
Hash
)
selector
=
options
.
fetch
(
:from
)
selector
=
options
.
fetch
(
:from
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment