BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
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
star.rb
features/steps/project/star.rb
+4
-4
group.rb
features/steps/shared/group.rb
+7
-7
No files found.
.rubocop.yml
View file @
380dff62
...
...
@@ -606,6 +606,18 @@ Style/YodaCondition:
Style/Proc
:
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 #####################################################################
# A calculated magnitude based on number of assignments,
...
...
.rubocop_todo.yml
View file @
380dff62
...
...
@@ -237,16 +237,6 @@ Style/PercentLiteralDelimiters:
Style/PerlBackrefs
:
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
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
...
...
features/steps/project/star.rb
View file @
380dff62
...
...
@@ -9,15 +9,15 @@ class Spinach::Features::ProjectStar < Spinach::FeatureSteps
end
step
"The project has 0 stars"
do
has_n_stars
?
(
0
)
has_n_stars
(
0
)
end
step
"The project has 1 star"
do
has_n_stars
?
(
1
)
has_n_stars
(
1
)
end
step
"The project has 2 stars"
do
has_n_stars
?
(
2
)
has_n_stars
(
2
)
end
# Requires @javascript
...
...
@@ -31,7 +31,7 @@ class Spinach::Features::ProjectStar < Spinach::FeatureSteps
protected
def
has_n_stars
?
(
n
)
def
has_n_stars
(
n
)
expect
(
page
).
to
have_css
(
".star-count"
,
text:
n
,
visible:
true
)
end
end
features/steps/shared/group.rb
View file @
380dff62
...
...
@@ -2,27 +2,27 @@ module SharedGroup
include
Spinach
::
DSL
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
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
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
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
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
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
step
'I should see group "TestGroup"'
do
...
...
@@ -35,7 +35,7 @@ module SharedGroup
protected
def
member_of?
(
username
,
groupname
,
role
)
def
is_member_of
(
username
,
groupname
,
role
)
@project_count
||=
0
user
=
User
.
find_by
(
name:
username
)
||
create
(
:user
,
name:
username
)
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