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
f3faf32e
Commit
f3faf32e
authored
Aug 15, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Auto-correct EE-only offenses for Layout/TrailingWhitespace
parent
1ce6142c
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
39 additions
and
39 deletions
+39
-39
app/controllers/projects/push_rules_controller.rb
app/controllers/projects/push_rules_controller.rb
+1
-1
app/controllers/unicorn_test_controller.rb
app/controllers/unicorn_test_controller.rb
+1
-1
app/workers/admin_emails_worker.rb
app/workers/admin_emails_worker.rb
+1
-1
features/steps/admin/license.rb
features/steps/admin/license.rb
+1
-1
lib/audit/details.rb
lib/audit/details.rb
+5
-5
lib/gitlab/workhorse.rb
lib/gitlab/workhorse.rb
+1
-1
spec/controllers/projects/issues_controller_ee_spec.rb
spec/controllers/projects/issues_controller_ee_spec.rb
+1
-1
spec/controllers/projects/push_rules_controller_spec.rb
spec/controllers/projects/push_rules_controller_spec.rb
+1
-1
spec/ee/spec/lib/ee/gitlab/o_auth/user_spec.rb
spec/ee/spec/lib/ee/gitlab/o_auth/user_spec.rb
+1
-1
spec/ee/spec/models/ssh_host_key_spec.rb
spec/ee/spec/models/ssh_host_key_spec.rb
+1
-1
spec/factories/ci/sources/pipelines.rb
spec/factories/ci/sources/pipelines.rb
+1
-1
spec/features/projects/mirror_spec.rb
spec/features/projects/mirror_spec.rb
+1
-1
spec/lib/audit/details_spec.rb
spec/lib/audit/details_spec.rb
+7
-7
spec/lib/gitlab/pagination_delegate_spec.rb
spec/lib/gitlab/pagination_delegate_spec.rb
+6
-6
spec/models/ci/sources/pipeline_spec.rb
spec/models/ci/sources/pipeline_spec.rb
+1
-1
spec/tasks/gitlab/artifacts_rake_spec.rb
spec/tasks/gitlab/artifacts_rake_spec.rb
+1
-1
spec/uploaders/artifact_uploader_spec.rb
spec/uploaders/artifact_uploader_spec.rb
+2
-2
spec/uploaders/object_store_uploader_spec.rb
spec/uploaders/object_store_uploader_spec.rb
+5
-5
spec/workers/update_all_mirrors_worker_spec.rb
spec/workers/update_all_mirrors_worker_spec.rb
+1
-1
No files found.
app/controllers/projects/push_rules_controller.rb
View file @
f3faf32e
class
Projects::PushRulesController
<
Projects
::
ApplicationController
include
RepositorySettingsRedirect
# Authorize
before_action
:authorize_admin_project!
before_action
:check_push_rules_available!
...
...
app/controllers/unicorn_test_controller.rb
View file @
f3faf32e
...
...
@@ -3,7 +3,7 @@ if Rails.env.test?
def
pid
render
plain:
Process
.
pid
.
to_s
end
def
kill
Process
.
kill
(
params
[
:signal
],
Process
.
pid
)
render
plain:
'Bye!'
...
...
app/workers/admin_emails_worker.rb
View file @
f3faf32e
...
...
@@ -3,7 +3,7 @@ class AdminEmailsWorker
include
DedicatedSidekiqQueue
def
perform
(
recipient_id
,
subject
,
body
)
recipient_list
(
recipient_id
).
pluck
(
:id
).
uniq
.
each
do
|
user_id
|
recipient_list
(
recipient_id
).
pluck
(
:id
).
uniq
.
each
do
|
user_id
|
Notify
.
send_admin_notification
(
user_id
,
subject
,
body
).
deliver_later
end
end
...
...
features/steps/admin/license.rb
View file @
f3faf32e
...
...
@@ -56,7 +56,7 @@ class Spinach::Features::AdminLicense < Spinach::FeatureSteps
license
=
build
(
:gitlab_license
)
File
.
write
(
path
,
license
.
export
)
attach_file
'license_data_file'
,
path
click_button
"Upload license"
end
...
...
lib/audit/details.rb
View file @
f3faf32e
module
Audit
class
Details
ACTIONS
=
%i[add remove failed_login change]
.
freeze
def
self
.
humanize
(
*
args
)
new
(
*
args
).
humanize
end
def
initialize
(
details
)
@details
=
details
end
def
humanize
if
@details
[
:with
]
"Signed in with
#{
@details
[
:with
].
upcase
}
authentication"
...
...
@@ -17,9 +17,9 @@ module Audit
action_text
end
end
private
def
action_text
action
=
@details
.
slice
(
*
ACTIONS
)
value
=
@details
.
values
.
first
.
tr
(
'_'
,
' '
)
...
...
lib/gitlab/workhorse.rb
View file @
f3faf32e
...
...
@@ -127,7 +127,7 @@ module Gitlab
def
send_artifacts_entry
(
build
,
entry
)
file
=
build
.
artifacts_file
archive
=
archive
=
if
file
.
file_storage?
file
.
path
else
...
...
spec/controllers/projects/issues_controller_ee_spec.rb
View file @
f3faf32e
...
...
@@ -122,7 +122,7 @@ describe Projects::IssuesController do
_
=
issue2
perform
:get
,
:index
,
weight:
1
expect
(
response
).
to
have_http_status
(
200
)
expect
(
assigns
(
:issues
)).
to
eq
([
issue2
])
end
...
...
spec/controllers/projects/push_rules_controller_spec.rb
View file @
f3faf32e
...
...
@@ -9,7 +9,7 @@ describe Projects::PushRulesController do
sign_in
(
user
)
end
describe
'#update'
do
def
do_update
patch
:update
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
1
,
push_rule:
{
prevent_secrets:
true
}
...
...
spec/ee/spec/lib/ee/gitlab/o_auth/user_spec.rb
View file @
f3faf32e
...
...
@@ -39,7 +39,7 @@ describe Gitlab::OAuth::User do
{
provider:
'ldapmain'
,
extern_uid:
"uid=
#{
uid
}
,
#{
base_dn
}
"
},
{
provider:
'kerberos'
,
extern_uid:
uid
+
'@'
+
realm
}
)
expect
(
gl_user
.
email
).
to
eq
(
real_email
)
end
end
...
...
spec/ee/spec/models/ssh_host_key_spec.rb
View file @
f3faf32e
...
...
@@ -55,7 +55,7 @@ describe SshHostKey do
expected
=
[
key1
,
key2
]
.
map
{
|
data
|
Gitlab
::
KeyFingerprint
.
new
(
data
)
}
.
each_with_index
.
map
{
|
key
,
i
|
{
bits:
key
.
bits
,
fingerprint:
key
.
fingerprint
,
type:
key
.
type
,
index:
i
}
}
.
map
{
|
key
,
i
|
{
bits:
key
.
bits
,
fingerprint:
key
.
fingerprint
,
type:
key
.
type
,
index:
i
}
}
expect
(
ssh_host_key
.
fingerprints
.
as_json
).
to
eq
(
expected
)
end
...
...
spec/factories/ci/sources/pipelines.rb
View file @
f3faf32e
...
...
@@ -7,7 +7,7 @@ FactoryGirl.define do
end
source_job
factory: :ci_build
pipeline
factory: :ci_empty_pipeline
end
end
spec/features/projects/mirror_spec.rb
View file @
f3faf32e
...
...
@@ -171,7 +171,7 @@ feature 'Project mirror', js: true do
click_without_sidekiq
'Save changes'
expect
(
page
).
to
have_content
(
key
.
fingerprint
)
expect
(
page
).
to
have_content
(
"Verified by
#{
h
(
user
.
name
)
}
less than a minute ago"
)
expect
(
page
).
to
have_content
(
"Verified by
#{
h
(
user
.
name
)
}
less than a minute ago"
)
end
end
end
...
...
spec/lib/audit/details_spec.rb
View file @
f3faf32e
...
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
Audit
::
Details
do
let
(
:user
)
{
create
(
:user
)
}
describe
'.humanize'
do
context
'user'
do
let
(
:login_action
)
do
...
...
@@ -13,12 +13,12 @@ describe Audit::Details do
target_details:
user
.
name
}
end
it
'humanizes user login action'
do
expect
(
described_class
.
humanize
(
login_action
)).
to
eq
(
'Signed in with LDAP authentication'
)
end
end
context
'project'
do
let
(
:user_member
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
...
...
@@ -33,12 +33,12 @@ describe Audit::Details do
target_details:
member
.
user
.
name
}
end
it
'humanizes add project member access action'
do
expect
(
described_class
.
humanize
(
member_access_action
)).
to
eq
(
'Added user access as Developer'
)
end
end
context
'group'
do
let
(
:user_member
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
)
}
...
...
@@ -54,12 +54,12 @@ describe Audit::Details do
target_details:
member
.
user
.
name
}
end
it
'humanizes add group member access action'
do
expect
(
described_class
.
humanize
(
member_access_action
)).
to
eq
(
'Changed access level from Guest to Owner'
)
end
end
context
'deploy key'
do
let
(
:removal_action
)
do
{
...
...
spec/lib/gitlab/pagination_delegate_spec.rb
View file @
f3faf32e
...
...
@@ -2,10 +2,10 @@ require 'spec_helper'
describe
Gitlab
::
PaginationDelegate
do
context
'no data'
do
let
(
:delegate
)
do
let
(
:delegate
)
do
described_class
.
new
(
page:
1
,
per_page:
10
,
count:
0
)
count:
0
)
end
it
'shows the correct total count'
do
...
...
@@ -46,10 +46,10 @@ describe Gitlab::PaginationDelegate do
end
context
'with data'
do
let
(
:delegate
)
do
let
(
:delegate
)
do
described_class
.
new
(
page:
5
,
per_page:
100
,
count:
1000
)
count:
1000
)
end
it
'shows the correct total count'
do
...
...
@@ -90,10 +90,10 @@ describe Gitlab::PaginationDelegate do
end
context
'last page'
do
let
(
:delegate
)
do
let
(
:delegate
)
do
described_class
.
new
(
page:
10
,
per_page:
100
,
count:
1000
)
count:
1000
)
end
it
'shows the correct total count'
do
...
...
spec/models/ci/sources/pipeline_spec.rb
View file @
f3faf32e
...
...
@@ -7,7 +7,7 @@ describe Ci::Sources::Pipeline do
it
{
is_expected
.
to
belong_to
(
:source_project
)
}
it
{
is_expected
.
to
belong_to
(
:source_job
)
}
it
{
is_expected
.
to
belong_to
(
:source_pipeline
)
}
it
{
is_expected
.
to
validate_presence_of
(
:project
)
}
it
{
is_expected
.
to
validate_presence_of
(
:pipeline
)
}
...
...
spec/tasks/gitlab/artifacts_rake_spec.rb
View file @
f3faf32e
...
...
@@ -32,7 +32,7 @@ describe 'gitlab:artifacts namespace rake task' do
stub_artifacts_object_storage
job
end
it
"migrates file to remote storage"
do
subject
...
...
spec/uploaders/artifact_uploader_spec.rb
View file @
f3faf32e
...
...
@@ -18,7 +18,7 @@ describe ArtifactUploader do
describe
'.artifacts_upload_path'
do
subject
{
described_class
.
artifacts_upload_path
}
it
{
is_expected
.
to
start_with
(
local_path
)
}
it
{
is_expected
.
to
end_with
(
'tmp/uploads/'
)
}
end
...
...
@@ -35,7 +35,7 @@ describe ArtifactUploader do
context
'when using remote storage'
do
let
(
:store
)
{
described_class
::
REMOTE_STORE
}
before
do
stub_artifacts_object_storage
end
...
...
spec/uploaders/object_store_uploader_spec.rb
View file @
f3faf32e
...
...
@@ -133,7 +133,7 @@ describe ObjectStoreUploader do
let
(
:job
)
{
create
(
:ci_build
,
:artifacts
,
artifacts_file_store:
store
)
}
let
(
:uploader
)
{
job
.
artifacts_file
}
let
(
:store
)
{
described_class
::
LOCAL_STORE
}
subject
{
uploader
.
migrate!
(
new_store
)
}
context
'when using the same storage'
do
...
...
@@ -149,7 +149,7 @@ describe ObjectStoreUploader do
context
'when migrating to local storage'
do
let
(
:store
)
{
described_class
::
REMOTE_STORE
}
let
(
:new_store
)
{
described_class
::
LOCAL_STORE
}
before
do
stub_artifacts_object_storage
end
...
...
@@ -173,10 +173,10 @@ describe ObjectStoreUploader do
it
"file does exist"
do
expect
(
File
.
exist?
(
current_path
)).
to
eq
(
true
)
end
context
'when storage is disabled'
do
before
do
stub_artifacts_object_storage
(
enabled:
false
)
stub_artifacts_object_storage
(
enabled:
false
)
end
it
"to raise an error"
do
...
...
@@ -198,7 +198,7 @@ describe ObjectStoreUploader do
it
"does delete original file"
do
subject
expect
(
File
.
exist?
(
current_path
)).
to
eq
(
false
)
end
...
...
spec/workers/update_all_mirrors_worker_spec.rb
View file @
f3faf32e
...
...
@@ -74,7 +74,7 @@ describe UpdateAllMirrorsWorker do
def
schedule_mirrors!
(
capacity
:)
allow
(
Gitlab
::
Mirror
).
to
receive_messages
(
available_capacity:
capacity
)
Sidekiq
::
Testing
.
fake!
do
Sidekiq
::
Testing
.
fake!
do
worker
.
schedule_mirrors!
end
end
...
...
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