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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
ea32e1c4
Commit
ea32e1c4
authored
Feb 27, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a "can't modify frozen Hash" error in lib/api/services.rb in development env
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
7d12f3a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
lib/api/services.rb
lib/api/services.rb
+11
-8
No files found.
lib/api/services.rb
View file @
ea32e1c4
...
...
@@ -139,7 +139,7 @@ module API
}
].
freeze
SERVICES
=
{
services
=
{
'asana'
=>
[
{
required:
true
,
...
...
@@ -673,9 +673,9 @@ module API
desc:
'The password of the user'
}
]
}
.
freeze
}
SERVICE_CLASSES
=
[
service_classes
=
[
AsanaService
,
AssemblaService
,
BambooService
,
...
...
@@ -704,10 +704,10 @@ module API
MattermostService
,
MicrosoftTeamsService
,
TeamcityService
]
.
freeze
]
if
Rails
.
env
.
development?
SERVICES
[
'mock-ci'
]
=
[
services
[
'mock-ci'
]
=
[
{
required:
true
,
name: :mock_service_url
,
...
...
@@ -715,16 +715,19 @@ module API
desc:
'URL to the mock service'
}
]
SERVICES
[
'mock-deployment'
]
=
[]
SERVICES
[
'mock-monitoring'
]
=
[]
services
[
'mock-deployment'
]
=
[]
services
[
'mock-monitoring'
]
=
[]
SERVICE_CLASSES
+=
[
service_classes
+=
[
MockCiService
,
MockDeploymentService
,
MockMonitoringService
]
end
SERVICES
=
services
.
freeze
SERVICE_CLASSES
=
service_classes
.
freeze
SERVICE_CLASSES
.
each
do
|
service
|
event_names
=
service
.
try
(
:event_names
)
||
next
event_names
.
each
do
|
event_name
|
...
...
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