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
c453836d
Commit
c453836d
authored
Oct 10, 2017
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rubocop offences after merge from CE
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
32620938
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
16 deletions
+12
-16
app/services/issuable_base_service.rb
app/services/issuable_base_service.rb
+0
-4
spec/controllers/projects/mirrors_controller_spec.rb
spec/controllers/projects/mirrors_controller_spec.rb
+1
-1
spec/ee/spec/models/ssh_host_key_spec.rb
spec/ee/spec/models/ssh_host_key_spec.rb
+2
-2
spec/features/projects/mirror_spec.rb
spec/features/projects/mirror_spec.rb
+1
-1
spec/features/projects/remote_mirror_spec.rb
spec/features/projects/remote_mirror_spec.rb
+1
-1
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+3
-3
spec/services/projects/update_repository_storage_service_spec.rb
...rvices/projects/update_repository_storage_service_spec.rb
+2
-2
spec/services/projects/update_service_spec.rb
spec/services/projects/update_service_spec.rb
+2
-2
No files found.
app/services/issuable_base_service.rb
View file @
c453836d
...
...
@@ -49,10 +49,6 @@ class IssuableBaseService < BaseService
SystemNoteService
.
discussion_lock
(
issuable
,
current_user
)
end
def
create_discussion_lock_note
(
issuable
)
SystemNoteService
.
discussion_lock
(
issuable
,
current_user
)
end
def
filter_params
(
issuable
)
ability_name
=
:"admin_
#{
issuable
.
to_ability_name
}
"
...
...
spec/controllers/projects/mirrors_controller_spec.rb
View file @
c453836d
...
...
@@ -215,7 +215,7 @@ describe Projects::MirrorsController do
end
end
describe
'#ssh_host_keys'
,
use_clean_rails_memory_store_caching:
true
do
describe
'#ssh_host_keys'
,
:use_clean_rails_memory_store_caching
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:cache
)
{
SshHostKey
.
new
(
project:
project
,
url:
"ssh://example.com:22"
)
}
...
...
spec/ee/spec/models/ssh_host_key_spec.rb
View file @
c453836d
...
...
@@ -48,7 +48,7 @@ describe SshHostKey do
subject
(
:ssh_host_key
)
{
described_class
.
new
(
project:
project
,
url:
'ssh://example.com:2222'
)
}
describe
'#fingerprints'
,
use_clean_rails_memory_store_caching:
true
do
describe
'#fingerprints'
,
:use_clean_rails_memory_store_caching
do
it
'returns an array of indexed fingerprints when the cache is filled'
do
stub_reactive_cache
(
ssh_host_key
,
known_hosts:
known_hosts
)
...
...
@@ -65,7 +65,7 @@ describe SshHostKey do
end
end
describe
'#fingerprints'
,
use_clean_rails_memory_store_caching:
true
do
describe
'#fingerprints'
,
:use_clean_rails_memory_store_caching
do
it
'returns an array of indexed fingerprints when the cache is filled'
do
stub_reactive_cache
(
ssh_host_key
,
known_hosts:
known_hosts
)
...
...
spec/features/projects/mirror_spec.rb
View file @
c453836d
...
...
@@ -151,7 +151,7 @@ feature 'Project mirror', :js do
end
end
describe
'host key management'
,
use_clean_rails_memory_store_caching:
true
do
describe
'host key management'
,
:use_clean_rails_memory_store_caching
do
let
(
:key
)
{
Gitlab
::
SSHPublicKey
.
new
(
SSHKeygen
.
generate
)
}
let
(
:cache
)
{
SshHostKey
.
new
(
project:
project
,
url:
"ssh://example.com:22"
)
}
...
...
spec/features/projects/remote_mirror_spec.rb
View file @
c453836d
require
'spec_helper'
feature
'Project remote mirror'
,
feature:
tru
e
do
feature
'Project remote mirror'
,
:featur
e
do
let
(
:project
)
{
create
(
:project
,
:repository
,
:remote_mirror
)
}
let
(
:remote_mirror
)
{
project
.
remote_mirrors
.
first
}
let
(
:user
)
{
create
(
:user
)
}
...
...
spec/models/repository_spec.rb
View file @
c453836d
...
...
@@ -259,13 +259,13 @@ describe Repository do
it_behaves_like
'finding commits by message'
end
describe
'when storage is broken'
,
:broken_storage
do
describe
'when storage is broken'
,
:broken_storage
do
it
'should raise a storage error'
do
expect_to_raise_storage_error
{
broken_repository
.
find_commits_by_message
(
's'
)
}
end
end
describe
'when storage is broken'
,
broken_storage:
true
do
describe
'when storage is broken'
,
:broken_storage
do
it
'should raise a storage error'
do
expect_to_raise_storage_error
{
broken_repository
.
find_commits_by_message
(
's'
)
}
end
...
...
@@ -1569,7 +1569,7 @@ describe Repository do
end
end
describe
"Elastic search"
,
elastic:
true
do
describe
"Elastic search"
,
:elastic
do
before
do
stub_application_setting
(
elasticsearch_search:
true
,
elasticsearch_indexing:
true
)
Gitlab
::
Elastic
::
Helper
.
create_empty_index
...
...
spec/services/projects/update_repository_storage_service_spec.rb
View file @
c453836d
...
...
@@ -28,7 +28,7 @@ describe Projects::UpdateRepositoryStorageService do
FileUtils
.
rm_rf
(
'tmp/tests/storage_b'
)
end
context
'without wiki'
,
skip_gitaly_mock:
true
do
context
'without wiki'
,
:skip_gitaly_mock
do
let
(
:project
)
{
create
(
:project
,
:repository
,
repository_storage:
'a'
,
repository_read_only:
true
,
wiki_enabled:
false
)
}
context
'when the move succeeds'
do
...
...
@@ -64,7 +64,7 @@ describe Projects::UpdateRepositoryStorageService do
end
end
context
'with wiki'
,
skip_gitaly_mock:
true
do
context
'with wiki'
,
:skip_gitaly_mock
do
let
(
:project
)
{
create
(
:project
,
:repository
,
repository_storage:
'a'
,
repository_read_only:
true
,
wiki_enabled:
true
)
}
before
do
...
...
spec/services/projects/update_service_spec.rb
View file @
c453836d
...
...
@@ -219,13 +219,13 @@ describe Projects::UpdateService, '#execute' do
FileUtils
.
rm_rf
(
'tmp/tests/storage_b'
)
end
it
'calls the change repository storage method if the storage changed'
,
skip_gitaly_mock:
true
do
it
'calls the change repository storage method if the storage changed'
,
:skip_gitaly_mock
do
expect
(
project
).
to
receive
(
:change_repository_storage
).
with
(
'b'
)
update_project
(
project
,
admin_user
,
opts
).
inspect
end
it
"doesn't call the change repository storage for non-admin users"
,
skip_gitaly_mock:
true
do
it
"doesn't call the change repository storage for non-admin users"
,
:skip_gitaly_mock
do
expect
(
project
).
not_to
receive
(
:change_repository_storage
)
update_project
(
project
,
user
,
opts
).
inspect
...
...
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