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
1d5a9730
Commit
1d5a9730
authored
Aug 09, 2020
by
Rajendra Kadam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rails/SaveBang offenses for spec/support/helpers/** in core and ee
parent
0568efa2
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
16 deletions
+9
-16
.rubocop_todo.yml
.rubocop_todo.yml
+0
-7
ee/spec/support/helpers/ee/geo_helpers.rb
ee/spec/support/helpers/ee/geo_helpers.rb
+1
-1
spec/support/helpers/cycle_analytics_helpers.rb
spec/support/helpers/cycle_analytics_helpers.rb
+1
-1
spec/support/helpers/design_management_test_helpers.rb
spec/support/helpers/design_management_test_helpers.rb
+2
-2
spec/support/helpers/jira_service_helper.rb
spec/support/helpers/jira_service_helper.rb
+1
-1
spec/support/helpers/login_helpers.rb
spec/support/helpers/login_helpers.rb
+1
-1
spec/support/helpers/notification_helpers.rb
spec/support/helpers/notification_helpers.rb
+2
-2
spec/support/helpers/stub_object_storage.rb
spec/support/helpers/stub_object_storage.rb
+1
-1
No files found.
.rubocop_todo.yml
View file @
1d5a9730
...
@@ -862,7 +862,6 @@ Rails/SaveBang:
...
@@ -862,7 +862,6 @@ Rails/SaveBang:
-
'
ee/spec/services/todo_service_spec.rb'
-
'
ee/spec/services/todo_service_spec.rb'
-
'
ee/spec/services/update_build_minutes_service_spec.rb'
-
'
ee/spec/services/update_build_minutes_service_spec.rb'
-
'
ee/spec/services/vulnerability_feedback/create_service_spec.rb'
-
'
ee/spec/services/vulnerability_feedback/create_service_spec.rb'
-
'
ee/spec/support/helpers/ee/geo_helpers.rb'
-
'
ee/spec/support/protected_tags/access_control_shared_examples.rb'
-
'
ee/spec/support/protected_tags/access_control_shared_examples.rb'
-
'
ee/spec/support/shared_examples/features/protected_branches_access_control_shared_examples.rb'
-
'
ee/spec/support/shared_examples/features/protected_branches_access_control_shared_examples.rb'
-
'
ee/spec/support/shared_examples/finders/geo/framework_registry_finder_shared_examples.rb'
-
'
ee/spec/support/shared_examples/finders/geo/framework_registry_finder_shared_examples.rb'
...
@@ -1306,12 +1305,6 @@ Rails/SaveBang:
...
@@ -1306,12 +1305,6 @@ Rails/SaveBang:
-
'
spec/services/users/repair_ldap_blocked_service_spec.rb'
-
'
spec/services/users/repair_ldap_blocked_service_spec.rb'
-
'
spec/services/verify_pages_domain_service_spec.rb'
-
'
spec/services/verify_pages_domain_service_spec.rb'
-
'
spec/sidekiq/cron/job_gem_dependency_spec.rb'
-
'
spec/sidekiq/cron/job_gem_dependency_spec.rb'
-
'
spec/support/helpers/cycle_analytics_helpers.rb'
-
'
spec/support/helpers/design_management_test_helpers.rb'
-
'
spec/support/helpers/jira_service_helper.rb'
-
'
spec/support/helpers/login_helpers.rb'
-
'
spec/support/helpers/notification_helpers.rb'
-
'
spec/support/helpers/stub_object_storage.rb'
-
'
spec/support/migrations_helpers/cluster_helpers.rb'
-
'
spec/support/migrations_helpers/cluster_helpers.rb'
-
'
spec/support/migrations_helpers/namespaces_helper.rb'
-
'
spec/support/migrations_helpers/namespaces_helper.rb'
-
'
spec/support/shared_contexts/email_shared_context.rb'
-
'
spec/support/shared_contexts/email_shared_context.rb'
...
...
ee/spec/support/helpers/ee/geo_helpers.rb
View file @
1d5a9730
...
@@ -30,7 +30,7 @@ module EE
...
@@ -30,7 +30,7 @@ module EE
end
end
def
stub_healthy_shards
(
shards
)
def
stub_healthy_shards
(
shards
)
::
Gitlab
::
ShardHealthCache
.
update
(
Array
(
shards
))
::
Gitlab
::
ShardHealthCache
.
update
!
(
Array
(
shards
))
end
end
def
create_project_on_shard
(
shard_name
)
def
create_project_on_shard
(
shard_name
)
...
...
spec/support/helpers/cycle_analytics_helpers.rb
View file @
1d5a9730
...
@@ -37,7 +37,7 @@ module CycleAnalyticsHelpers
...
@@ -37,7 +37,7 @@ module CycleAnalyticsHelpers
end
end
def
create_cycle
(
user
,
project
,
issue
,
mr
,
milestone
,
pipeline
)
def
create_cycle
(
user
,
project
,
issue
,
mr
,
milestone
,
pipeline
)
issue
.
update
(
milestone:
milestone
)
issue
.
update
!
(
milestone:
milestone
)
pipeline
.
run
pipeline
.
run
ci_build
=
create
(
:ci_build
,
pipeline:
pipeline
,
status: :success
,
author:
user
)
ci_build
=
create
(
:ci_build
,
pipeline:
pipeline
,
status: :success
,
author:
user
)
...
...
spec/support/helpers/design_management_test_helpers.rb
View file @
1d5a9730
...
@@ -35,9 +35,9 @@ module DesignManagementTestHelpers
...
@@ -35,9 +35,9 @@ module DesignManagementTestHelpers
def
act_on_designs
(
designs
,
&
block
)
def
act_on_designs
(
designs
,
&
block
)
issue
=
designs
.
first
.
issue
issue
=
designs
.
first
.
issue
version
=
build
(
:design_version
,
:empty
,
issue:
issue
).
tap
{
|
v
|
v
.
save
(
validate:
false
)
}
version
=
build
(
:design_version
,
:empty
,
issue:
issue
).
tap
{
|
v
|
v
.
save
!
(
validate:
false
)
}
designs
.
each
do
|
d
|
designs
.
each
do
|
d
|
yield
.
create
(
design:
d
,
version:
version
)
yield
.
create
!
(
design:
d
,
version:
version
)
end
end
version
version
end
end
...
...
spec/support/helpers/jira_service_helper.rb
View file @
1d5a9730
...
@@ -10,7 +10,7 @@ module JiraServiceHelper
...
@@ -10,7 +10,7 @@ module JiraServiceHelper
password
=
'my-secret-password'
password
=
'my-secret-password'
jira_issue_transition_id
=
'1'
jira_issue_transition_id
=
'1'
jira_tracker
.
update
(
jira_tracker
.
update
!
(
url:
url
,
username:
username
,
password:
password
,
url:
url
,
username:
username
,
password:
password
,
jira_issue_transition_id:
jira_issue_transition_id
,
active:
true
jira_issue_transition_id:
jira_issue_transition_id
,
active:
true
)
)
...
...
spec/support/helpers/login_helpers.rb
View file @
1d5a9730
...
@@ -40,7 +40,7 @@ module LoginHelpers
...
@@ -40,7 +40,7 @@ module LoginHelpers
if
user_or_role
.
is_a?
(
User
)
if
user_or_role
.
is_a?
(
User
)
user_or_role
user_or_role
else
else
create
(
user_or_role
)
create
!
(
user_or_role
)
end
end
gitlab_sign_in_with
(
user
,
**
kwargs
)
gitlab_sign_in_with
(
user
,
**
kwargs
)
...
...
spec/support/helpers/notification_helpers.rb
View file @
1d5a9730
...
@@ -12,7 +12,7 @@ module NotificationHelpers
...
@@ -12,7 +12,7 @@ module NotificationHelpers
def
create_global_setting_for
(
user
,
level
)
def
create_global_setting_for
(
user
,
level
)
setting
=
user
.
global_notification_setting
setting
=
user
.
global_notification_setting
setting
.
level
=
level
setting
.
level
=
level
setting
.
save
setting
.
save
!
user
user
end
end
...
@@ -27,7 +27,7 @@ module NotificationHelpers
...
@@ -27,7 +27,7 @@ module NotificationHelpers
def
create_notification_setting
(
user
,
resource
,
level
)
def
create_notification_setting
(
user
,
resource
,
level
)
setting
=
user
.
notification_settings_for
(
resource
)
setting
=
user
.
notification_settings_for
(
resource
)
setting
.
level
=
level
setting
.
level
=
level
setting
.
save
setting
.
save
!
end
end
# Create custom notifications
# Create custom notifications
...
...
spec/support/helpers/stub_object_storage.rb
View file @
1d5a9730
...
@@ -37,7 +37,7 @@ module StubObjectStorage
...
@@ -37,7 +37,7 @@ module StubObjectStorage
Fog
.
mock!
Fog
.
mock!
::
Fog
::
Storage
.
new
(
connection_params
).
tap
do
|
connection
|
::
Fog
::
Storage
.
new
(
connection_params
).
tap
do
|
connection
|
connection
.
directories
.
create
(
key:
remote_directory
)
connection
.
directories
.
create
!
(
key:
remote_directory
)
# Cleanup remaining files
# Cleanup remaining files
connection
.
directories
.
each
do
|
directory
|
connection
.
directories
.
each
do
|
directory
|
...
...
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