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>
This commit is contained in:
parent
7d12f3a84e
commit
ea32e1c41f
1 changed files with 11 additions and 8 deletions
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue