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
380dff62
Commit
380dff62
authored
Aug 29, 2017
by
Maxim Rydkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exclude spec/ and features/ from `Style/PredicateName` cop
parent
e637f802
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
21 deletions
+23
-21
.rubocop.yml
.rubocop.yml
+12
-0
.rubocop_todo.yml
.rubocop_todo.yml
+0
-10
features/steps/project/star.rb
features/steps/project/star.rb
+4
-4
features/steps/shared/group.rb
features/steps/shared/group.rb
+7
-7
No files found.
.rubocop.yml
View file @
380dff62
...
@@ -606,6 +606,18 @@ Style/YodaCondition:
...
@@ -606,6 +606,18 @@ Style/YodaCondition:
Style/Proc
:
Style/Proc
:
Enabled
:
true
Enabled
:
true
# Use `spam?` instead of `is_spam?`
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
# NamePrefix: is_, has_, have_
# NamePrefixBlacklist: is_, has_, have_
# NameWhitelist: is_a?
Style/PredicateName
:
Enabled
:
true
NamePrefixBlacklist
:
is_
Exclude
:
-
'
spec/**/*'
-
'
features/**/*'
# Metrics #####################################################################
# Metrics #####################################################################
# A calculated magnitude based on number of assignments,
# A calculated magnitude based on number of assignments,
...
...
.rubocop_todo.yml
View file @
380dff62
...
@@ -237,16 +237,6 @@ Style/PercentLiteralDelimiters:
...
@@ -237,16 +237,6 @@ Style/PercentLiteralDelimiters:
Style/PerlBackrefs
:
Style/PerlBackrefs
:
Enabled
:
false
Enabled
:
false
# Offense count: 105
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
# NamePrefix: is_, has_, have_
# NamePrefixBlacklist: is_, has_, have_
# NameWhitelist: is_a?
Style/PredicateName
:
Enabled
:
true
NamePrefixBlacklist
:
is_
NameWhitelist
:
have_visible_content
# Offense count: 58
# Offense count: 58
# Cop supports --auto-correct.
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# Configuration parameters: EnforcedStyle, SupportedStyles.
...
...
features/steps/project/star.rb
View file @
380dff62
...
@@ -9,15 +9,15 @@ class Spinach::Features::ProjectStar < Spinach::FeatureSteps
...
@@ -9,15 +9,15 @@ class Spinach::Features::ProjectStar < Spinach::FeatureSteps
end
end
step
"The project has 0 stars"
do
step
"The project has 0 stars"
do
has_n_stars
?
(
0
)
has_n_stars
(
0
)
end
end
step
"The project has 1 star"
do
step
"The project has 1 star"
do
has_n_stars
?
(
1
)
has_n_stars
(
1
)
end
end
step
"The project has 2 stars"
do
step
"The project has 2 stars"
do
has_n_stars
?
(
2
)
has_n_stars
(
2
)
end
end
# Requires @javascript
# Requires @javascript
...
@@ -31,7 +31,7 @@ class Spinach::Features::ProjectStar < Spinach::FeatureSteps
...
@@ -31,7 +31,7 @@ class Spinach::Features::ProjectStar < Spinach::FeatureSteps
protected
protected
def
has_n_stars
?
(
n
)
def
has_n_stars
(
n
)
expect
(
page
).
to
have_css
(
".star-count"
,
text:
n
,
visible:
true
)
expect
(
page
).
to
have_css
(
".star-count"
,
text:
n
,
visible:
true
)
end
end
end
end
features/steps/shared/group.rb
View file @
380dff62
...
@@ -2,27 +2,27 @@ module SharedGroup
...
@@ -2,27 +2,27 @@ module SharedGroup
include
Spinach
::
DSL
include
Spinach
::
DSL
step
'current user is developer of group "Owned"'
do
step
'current user is developer of group "Owned"'
do
member_of?
(
current_user
.
name
,
"Owned"
,
Gitlab
::
Access
::
DEVELOPER
)
is_member_of
(
current_user
.
name
,
"Owned"
,
Gitlab
::
Access
::
DEVELOPER
)
end
end
step
'"John Doe" is owner of group "Owned"'
do
step
'"John Doe" is owner of group "Owned"'
do
member_of?
(
"John Doe"
,
"Owned"
,
Gitlab
::
Access
::
OWNER
)
is_member_of
(
"John Doe"
,
"Owned"
,
Gitlab
::
Access
::
OWNER
)
end
end
step
'"John Doe" is guest of group "Guest"'
do
step
'"John Doe" is guest of group "Guest"'
do
member_of?
(
"John Doe"
,
"Guest"
,
Gitlab
::
Access
::
GUEST
)
is_member_of
(
"John Doe"
,
"Guest"
,
Gitlab
::
Access
::
GUEST
)
end
end
step
'"Mary Jane" is owner of group "Owned"'
do
step
'"Mary Jane" is owner of group "Owned"'
do
member_of?
(
"Mary Jane"
,
"Owned"
,
Gitlab
::
Access
::
OWNER
)
is_member_of
(
"Mary Jane"
,
"Owned"
,
Gitlab
::
Access
::
OWNER
)
end
end
step
'"Mary Jane" is guest of group "Owned"'
do
step
'"Mary Jane" is guest of group "Owned"'
do
member_of?
(
"Mary Jane"
,
"Owned"
,
Gitlab
::
Access
::
GUEST
)
is_member_of
(
"Mary Jane"
,
"Owned"
,
Gitlab
::
Access
::
GUEST
)
end
end
step
'"Mary Jane" is guest of group "Guest"'
do
step
'"Mary Jane" is guest of group "Guest"'
do
member_of?
(
"Mary Jane"
,
"Guest"
,
Gitlab
::
Access
::
GUEST
)
is_member_of
(
"Mary Jane"
,
"Guest"
,
Gitlab
::
Access
::
GUEST
)
end
end
step
'I should see group "TestGroup"'
do
step
'I should see group "TestGroup"'
do
...
@@ -35,7 +35,7 @@ module SharedGroup
...
@@ -35,7 +35,7 @@ module SharedGroup
protected
protected
def
member_of?
(
username
,
groupname
,
role
)
def
is_member_of
(
username
,
groupname
,
role
)
@project_count
||=
0
@project_count
||=
0
user
=
User
.
find_by
(
name:
username
)
||
create
(
:user
,
name:
username
)
user
=
User
.
find_by
(
name:
username
)
||
create
(
:user
,
name:
username
)
group
=
Group
.
find_by
(
name:
groupname
)
||
create
(
:group
,
name:
groupname
)
group
=
Group
.
find_by
(
name:
groupname
)
||
create
(
:group
,
name:
groupname
)
...
...
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