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
5349abb2
Commit
5349abb2
authored
Jan 17, 2022
by
Markus Koller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue_220040_14' into 'master'
Fix Rails/SaveBang offenses See merge request gitlab-org/gitlab!75976
parents
4a36c773
9ee72296
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
13 deletions
+8
-13
.rubocop_todo/rails/save_bang.yml
.rubocop_todo/rails/save_bang.yml
+0
-5
spec/lib/gitlab/gfm/reference_rewriter_spec.rb
spec/lib/gitlab/gfm/reference_rewriter_spec.rb
+1
-1
spec/lib/gitlab/git_access_spec.rb
spec/lib/gitlab/git_access_spec.rb
+4
-4
spec/lib/gitlab/import_export/avatar_saver_spec.rb
spec/lib/gitlab/import_export/avatar_saver_spec.rb
+1
-1
spec/lib/gitlab/import_export/base/relation_factory_spec.rb
spec/lib/gitlab/import_export/base/relation_factory_spec.rb
+1
-1
spec/lib/gitlab/import_export/design_repo_restorer_spec.rb
spec/lib/gitlab/import_export/design_repo_restorer_spec.rb
+1
-1
No files found.
.rubocop_todo/rails/save_bang.yml
View file @
5349abb2
...
...
@@ -31,11 +31,6 @@ Rails/SaveBang:
-
spec/lib/gitlab/database/custom_structure_spec.rb
-
spec/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers_spec.rb
-
spec/lib/gitlab/database_importers/self_monitoring/project/create_service_spec.rb
-
spec/lib/gitlab/gfm/reference_rewriter_spec.rb
-
spec/lib/gitlab/git_access_spec.rb
-
spec/lib/gitlab/import_export/avatar_saver_spec.rb
-
spec/lib/gitlab/import_export/base/relation_factory_spec.rb
-
spec/lib/gitlab/import_export/design_repo_restorer_spec.rb
-
spec/lib/gitlab/import_export/fast_hash_serializer_spec.rb
-
spec/lib/gitlab/import_export/fork_spec.rb
-
spec/lib/gitlab/import_export/group/legacy_tree_saver_spec.rb
...
...
spec/lib/gitlab/gfm/reference_rewriter_spec.rb
View file @
5349abb2
...
...
@@ -92,7 +92,7 @@ RSpec.describe Gitlab::Gfm::ReferenceRewriter do
let!
(
:group_label
)
{
create
(
:group_label
,
id:
321
,
name:
'group label'
,
group:
old_group
)
}
before
do
old_project
.
update
(
namespace:
old_group
)
old_project
.
update
!
(
namespace:
old_group
)
end
context
'label referenced by id'
do
...
...
spec/lib/gitlab/git_access_spec.rb
View file @
5349abb2
...
...
@@ -96,7 +96,7 @@ RSpec.describe Gitlab::GitAccess do
context
'when the DeployKey has access to the project'
do
before
do
deploy_key
.
deploy_keys_projects
.
create
(
project:
project
,
can_push:
true
)
deploy_key
.
deploy_keys_projects
.
create
!
(
project:
project
,
can_push:
true
)
end
it
'allows push and pull access'
do
...
...
@@ -820,7 +820,7 @@ RSpec.describe Gitlab::GitAccess do
project
.
add_role
(
user
,
role
)
end
protected_branch
.
save
protected_branch
.
save
!
aggregate_failures
do
matrix
.
each
do
|
action
,
allowed
|
...
...
@@ -1090,7 +1090,7 @@ RSpec.describe Gitlab::GitAccess do
context
'when deploy_key can push'
do
context
'when project is authorized'
do
before
do
key
.
deploy_keys_projects
.
create
(
project:
project
,
can_push:
true
)
key
.
deploy_keys_projects
.
create
!
(
project:
project
,
can_push:
true
)
end
it
{
expect
{
push_access_check
}.
not_to
raise_error
}
...
...
@@ -1120,7 +1120,7 @@ RSpec.describe Gitlab::GitAccess do
context
'when deploy_key cannot push'
do
context
'when project is authorized'
do
before
do
key
.
deploy_keys_projects
.
create
(
project:
project
,
can_push:
false
)
key
.
deploy_keys_projects
.
create
!
(
project:
project
,
can_push:
false
)
end
it
{
expect
{
push_access_check
}.
to
raise_forbidden
(
described_class
::
ERROR_MESSAGES
[
:deploy_key_upload
])
}
...
...
spec/lib/gitlab/import_export/avatar_saver_spec.rb
View file @
5349abb2
...
...
@@ -20,7 +20,7 @@ RSpec.describe Gitlab::ImportExport::AvatarSaver do
end
it
'saves a project avatar'
do
described_class
.
new
(
project:
project_with_avatar
,
shared:
shared
).
save
described_class
.
new
(
project:
project_with_avatar
,
shared:
shared
).
save
# rubocop:disable Rails/SaveBang
expect
(
File
).
to
exist
(
Dir
[
"
#{
shared
.
export_path
}
/avatar/**/dk.png"
].
first
)
end
...
...
spec/lib/gitlab/import_export/base/relation_factory_spec.rb
View file @
5349abb2
...
...
@@ -11,7 +11,7 @@ RSpec.describe Gitlab::ImportExport::Base::RelationFactory do
let
(
:excluded_keys
)
{
[]
}
subject
do
described_class
.
create
(
relation_sym:
relation_sym
,
described_class
.
create
(
relation_sym:
relation_sym
,
# rubocop:disable Rails/SaveBang
relation_hash:
relation_hash
,
relation_index:
1
,
object_builder:
Gitlab
::
ImportExport
::
Project
::
ObjectBuilder
,
...
...
spec/lib/gitlab/import_export/design_repo_restorer_spec.rb
View file @
5349abb2
...
...
@@ -24,7 +24,7 @@ RSpec.describe Gitlab::ImportExport::DesignRepoRestorer do
allow
(
instance
).
to
receive
(
:storage_path
).
and_return
(
export_path
)
end
bundler
.
save
bundler
.
save
# rubocop:disable Rails/SaveBang
end
after
do
...
...
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