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
8afd76e7
Commit
8afd76e7
authored
Jul 19, 2018
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-07-19
parents
01851e66
91fcb311
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
103 additions
and
7 deletions
+103
-7
app/services/prometheus/adapter_service.rb
app/services/prometheus/adapter_service.rb
+2
-0
app/services/protected_branches/access_level_params.rb
app/services/protected_branches/access_level_params.rb
+2
-0
app/services/protected_branches/api_service.rb
app/services/protected_branches/api_service.rb
+2
-0
app/services/protected_branches/create_service.rb
app/services/protected_branches/create_service.rb
+2
-0
app/services/protected_branches/destroy_service.rb
app/services/protected_branches/destroy_service.rb
+2
-0
app/services/protected_branches/legacy_api_create_service.rb
app/services/protected_branches/legacy_api_create_service.rb
+2
-0
app/services/protected_branches/legacy_api_update_service.rb
app/services/protected_branches/legacy_api_update_service.rb
+2
-0
app/services/protected_branches/update_service.rb
app/services/protected_branches/update_service.rb
+2
-0
app/services/protected_tags/create_service.rb
app/services/protected_tags/create_service.rb
+2
-0
app/services/protected_tags/destroy_service.rb
app/services/protected_tags/destroy_service.rb
+2
-0
app/services/protected_tags/update_service.rb
app/services/protected_tags/update_service.rb
+2
-0
app/services/quick_actions/interpret_service.rb
app/services/quick_actions/interpret_service.rb
+2
-0
app/services/search/global_service.rb
app/services/search/global_service.rb
+2
-0
app/services/search/group_service.rb
app/services/search/group_service.rb
+2
-0
app/services/search/project_service.rb
app/services/search/project_service.rb
+2
-0
app/services/search/snippet_service.rb
app/services/search/snippet_service.rb
+2
-0
app/services/tags/create_service.rb
app/services/tags/create_service.rb
+2
-0
app/services/tags/destroy_service.rb
app/services/tags/destroy_service.rb
+2
-0
app/services/test_hooks/base_service.rb
app/services/test_hooks/base_service.rb
+2
-0
app/services/test_hooks/project_service.rb
app/services/test_hooks/project_service.rb
+2
-0
app/services/test_hooks/system_service.rb
app/services/test_hooks/system_service.rb
+2
-0
app/services/users/activity_service.rb
app/services/users/activity_service.rb
+2
-0
app/services/users/build_service.rb
app/services/users/build_service.rb
+2
-0
app/services/users/create_service.rb
app/services/users/create_service.rb
+2
-0
app/services/users/destroy_service.rb
app/services/users/destroy_service.rb
+2
-0
app/services/users/last_push_event_service.rb
app/services/users/last_push_event_service.rb
+2
-0
app/services/users/migrate_to_ghost_user_service.rb
app/services/users/migrate_to_ghost_user_service.rb
+2
-0
app/services/users/refresh_authorized_projects_service.rb
app/services/users/refresh_authorized_projects_service.rb
+2
-0
app/services/users/respond_to_terms_service.rb
app/services/users/respond_to_terms_service.rb
+2
-0
app/services/users/update_service.rb
app/services/users/update_service.rb
+2
-0
app/services/wiki_pages/base_service.rb
app/services/wiki_pages/base_service.rb
+2
-0
app/services/wiki_pages/create_service.rb
app/services/wiki_pages/create_service.rb
+2
-0
app/services/wiki_pages/destroy_service.rb
app/services/wiki_pages/destroy_service.rb
+2
-0
app/services/wiki_pages/update_service.rb
app/services/wiki_pages/update_service.rb
+2
-0
changelogs/unreleased/frozen-string-enable-apps-services-inner-even-more.yml
...ed/frozen-string-enable-apps-services-inner-even-more.yml
+5
-0
spec/javascripts/helpers/vuex_action_helper.js
spec/javascripts/helpers/vuex_action_helper.js
+5
-7
spec/javascripts/helpers/vuex_action_helper_spec.js
spec/javascripts/helpers/vuex_action_helper_spec.js
+25
-0
No files found.
app/services/prometheus/adapter_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
Prometheus
class
AdapterService
def
initialize
(
project
,
deployment_platform
=
nil
)
...
...
app/services/protected_branches/access_level_params.rb
View file @
8afd76e7
# frozen_string_literal: true
module
ProtectedBranches
class
AccessLevelParams
prepend
EE
::
ProtectedBranches
::
AccessLevelParams
...
...
app/services/protected_branches/api_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
ProtectedBranches
class
ApiService
<
BaseService
prepend
EE
::
ProtectedBranches
::
ApiService
...
...
app/services/protected_branches/create_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
ProtectedBranches
class
CreateService
<
BaseService
def
execute
(
skip_authorization:
false
)
...
...
app/services/protected_branches/destroy_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
ProtectedBranches
class
DestroyService
<
BaseService
def
execute
(
protected_branch
)
...
...
app/services/protected_branches/legacy_api_create_service.rb
View file @
8afd76e7
# frozen_string_literal: true
# The branches#protect API still uses the `developers_can_push` and `developers_can_merge`
# flags for backward compatibility, and so performs translation between that format and the
# internal data model (separate access levels). The translation code is non-trivial, and so
...
...
app/services/protected_branches/legacy_api_update_service.rb
View file @
8afd76e7
# frozen_string_literal: true
# The branches#protect API still uses the `developers_can_push` and `developers_can_merge`
# flags for backward compatibility, and so performs translation between that format and the
# internal data model (separate access levels). The translation code is non-trivial, and so
...
...
app/services/protected_branches/update_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
ProtectedBranches
class
UpdateService
<
BaseService
def
execute
(
protected_branch
)
...
...
app/services/protected_tags/create_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
ProtectedTags
class
CreateService
<
BaseService
attr_reader
:protected_tag
...
...
app/services/protected_tags/destroy_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
ProtectedTags
class
DestroyService
<
BaseService
def
execute
(
protected_tag
)
...
...
app/services/protected_tags/update_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
ProtectedTags
class
UpdateService
<
BaseService
def
execute
(
protected_tag
)
...
...
app/services/quick_actions/interpret_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
QuickActions
class
InterpretService
<
BaseService
include
Gitlab
::
QuickActions
::
Dsl
...
...
app/services/search/global_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
Search
class
GlobalService
attr_accessor
:current_user
,
:params
...
...
app/services/search/group_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
Search
class
GroupService
<
Search
::
GlobalService
attr_accessor
:group
...
...
app/services/search/project_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
Search
class
ProjectService
attr_accessor
:project
,
:current_user
,
:params
...
...
app/services/search/snippet_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
Search
class
SnippetService
attr_accessor
:current_user
,
:params
...
...
app/services/tags/create_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
Tags
class
CreateService
<
BaseService
def
execute
(
tag_name
,
target
,
message
,
release_description
=
nil
)
...
...
app/services/tags/destroy_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
Tags
class
DestroyService
<
BaseService
def
execute
(
tag_name
)
...
...
app/services/test_hooks/base_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
TestHooks
class
BaseService
attr_accessor
:hook
,
:current_user
,
:trigger
...
...
app/services/test_hooks/project_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
TestHooks
class
ProjectService
<
TestHooks
::
BaseService
attr_writer
:project
...
...
app/services/test_hooks/system_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
TestHooks
class
SystemService
<
TestHooks
::
BaseService
private
...
...
app/services/users/activity_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
Users
class
ActivityService
LEASE_TIMEOUT
=
1
.
minute
.
to_i
...
...
app/services/users/build_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
Users
class
BuildService
<
BaseService
prepend
::
EE
::
Users
::
BuildService
...
...
app/services/users/create_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
Users
class
CreateService
<
BaseService
include
NewUserNotifier
...
...
app/services/users/destroy_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
Users
class
DestroyService
prepend
::
EE
::
Users
::
DestroyService
...
...
app/services/users/last_push_event_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
Users
# Service class for caching and retrieving the last push event of a user.
class
LastPushEventService
...
...
app/services/users/migrate_to_ghost_user_service.rb
View file @
8afd76e7
# frozen_string_literal: true
# When a user is destroyed, some of their associated records are
# moved to a "Ghost User", to prevent these associated records from
# being destroyed.
...
...
app/services/users/refresh_authorized_projects_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
Users
# Service for refreshing the authorized projects of a user.
#
...
...
app/services/users/respond_to_terms_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
Users
class
RespondToTermsService
def
initialize
(
user
,
term
)
...
...
app/services/users/update_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
Users
class
UpdateService
<
BaseService
include
NewUserNotifier
...
...
app/services/wiki_pages/base_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
WikiPages
class
BaseService
<
::
BaseService
prepend
EE
::
WikiPages
::
BaseService
...
...
app/services/wiki_pages/create_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
WikiPages
class
CreateService
<
WikiPages
::
BaseService
def
execute
...
...
app/services/wiki_pages/destroy_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
WikiPages
class
DestroyService
<
WikiPages
::
BaseService
def
execute
(
page
)
...
...
app/services/wiki_pages/update_service.rb
View file @
8afd76e7
# frozen_string_literal: true
module
WikiPages
class
UpdateService
<
WikiPages
::
BaseService
def
execute
(
page
)
...
...
changelogs/unreleased/frozen-string-enable-apps-services-inner-even-more.yml
0 → 100644
View file @
8afd76e7
---
title
:
Enable even more frozen string in app/services/**/*.rb
merge_request
:
20702
author
:
gfyoung
type
:
performance
spec/javascripts/helpers/vuex_action_helper.js
View file @
8afd76e7
...
...
@@ -84,14 +84,12 @@ export default (
done
();
};
return
new
Promise
((
resolve
,
reject
)
=>
{
try
{
const
result
=
action
({
commit
,
state
,
dispatch
,
rootState
:
state
},
payload
);
resolve
(
result
);
}
catch
(
e
)
{
reject
(
e
);
}
const
result
=
action
({
commit
,
state
,
dispatch
,
rootState
:
state
},
payload
);
return
new
Promise
(
resolve
=>
{
setImmediate
(
resolve
);
})
.
then
(()
=>
result
)
.
catch
(
error
=>
{
validateResults
();
throw
error
;
...
...
spec/javascripts/helpers/vuex_action_helper_spec.js
View file @
8afd76e7
...
...
@@ -138,4 +138,29 @@ describe('VueX test helper (testAction)', () => {
});
});
});
it
(
'
should work with async actions not returning promises
'
,
done
=>
{
const
data
=
{
FOO
:
'
BAR
'
};
const
promiseAction
=
({
commit
,
dispatch
})
=>
{
dispatch
(
'
ACTION
'
);
axios
.
get
(
TEST_HOST
)
.
then
(()
=>
{
commit
(
'
SUCCESS
'
);
return
data
;
})
.
catch
(
error
=>
{
commit
(
'
ERROR
'
);
throw
error
;
});
};
mock
.
onGet
(
TEST_HOST
).
replyOnce
(
200
,
42
);
assertion
=
{
mutations
:
[{
type
:
'
SUCCESS
'
}],
actions
:
[{
type
:
'
ACTION
'
}]
};
testAction
(
promiseAction
,
null
,
{},
assertion
.
mutations
,
assertion
.
actions
,
done
);
});
});
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