summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-20 19:29:39 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-20 19:42:13 -0200
commitd1bf557aacb5dd789ccc88786b47ec174ed1de2b (patch)
treedd61efe1fd2522861a10fe2c39bd275f3aacf953
parentfed29117de6f30055d88daaa497ec18f85397ad6 (diff)
downloadgitlab-ce-fix/25843.tar.gz
Rename MattermostNotificationService back to MattermostServicefix/25843
-rw-r--r--app/models/project.rb2
-rw-r--r--app/models/project_services/mattermost_service.rb (renamed from app/models/project_services/mattermost_notification_service.rb)4
-rw-r--r--app/models/service.rb2
-rw-r--r--lib/api/services.rb2
-rw-r--r--spec/lib/gitlab/import_export/all_models.yml2
-rw-r--r--spec/models/project_services/mattermost_service_spec.rb (renamed from spec/models/project_services/mattermost_notification_service_spec.rb)2
-rw-r--r--spec/models/project_spec.rb2
7 files changed, 8 insertions, 8 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 5807ea5acdc..26fa20f856d 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -94,7 +94,7 @@ class Project < ActiveRecord::Base
has_one :asana_service, dependent: :destroy
has_one :gemnasium_service, dependent: :destroy
has_one :mattermost_slash_commands_service, dependent: :destroy
- has_one :mattermost_notification_service, dependent: :destroy
+ has_one :mattermost_service, dependent: :destroy
has_one :slack_slash_commands_service, dependent: :destroy
has_one :slack_service, dependent: :destroy
has_one :buildkite_service, dependent: :destroy
diff --git a/app/models/project_services/mattermost_notification_service.rb b/app/models/project_services/mattermost_service.rb
index de18c4b1f00..0650f930402 100644
--- a/app/models/project_services/mattermost_notification_service.rb
+++ b/app/models/project_services/mattermost_service.rb
@@ -1,4 +1,4 @@
-class MattermostNotificationService < ChatNotificationService
+class MattermostService < ChatNotificationService
def title
'Mattermost notifications'
end
@@ -8,7 +8,7 @@ class MattermostNotificationService < ChatNotificationService
end
def to_param
- 'mattermost_notification'
+ 'mattermost'
end
def help
diff --git a/app/models/service.rb b/app/models/service.rb
index 918ed8206e0..19ef3ba9c23 100644
--- a/app/models/service.rb
+++ b/app/models/service.rb
@@ -216,7 +216,7 @@ class Service < ActiveRecord::Base
jira
kubernetes
mattermost_slash_commands
- mattermost_notification
+ mattermost
pipelines_email
pivotaltracker
pushover
diff --git a/lib/api/services.rb b/lib/api/services.rb
index 44e668e3cf5..d11cdce4e18 100644
--- a/lib/api/services.rb
+++ b/lib/api/services.rb
@@ -500,7 +500,7 @@ module API
desc: 'The channel name'
}
],
- 'mattermost-notification' => [
+ 'mattermost' => [
{
required: true,
name: :webhook,
diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml
index 155cf8565b5..f420d71dee2 100644
--- a/spec/lib/gitlab/import_export/all_models.yml
+++ b/spec/lib/gitlab/import_export/all_models.yml
@@ -138,7 +138,7 @@ project:
- asana_service
- gemnasium_service
- slack_service
-- mattermost_notification_service
+- mattermost_service
- buildkite_service
- bamboo_service
- teamcity_service
diff --git a/spec/models/project_services/mattermost_notification_service_spec.rb b/spec/models/project_services/mattermost_service_spec.rb
index 7832d6f50cf..490d6aedffc 100644
--- a/spec/models/project_services/mattermost_notification_service_spec.rb
+++ b/spec/models/project_services/mattermost_service_spec.rb
@@ -1,5 +1,5 @@
require 'spec_helper'
-describe MattermostNotificationService, models: true do
+describe MattermostService, models: true do
it_behaves_like "slack or mattermost notifications"
end
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 569071c0418..88d5d14f855 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -22,7 +22,7 @@ describe Project, models: true do
it { is_expected.to have_many(:protected_branches).dependent(:destroy) }
it { is_expected.to have_one(:forked_project_link).dependent(:destroy) }
it { is_expected.to have_one(:slack_service).dependent(:destroy) }
- it { is_expected.to have_one(:mattermost_notification_service).dependent(:destroy) }
+ it { is_expected.to have_one(:mattermost_service).dependent(:destroy) }
it { is_expected.to have_one(:pushover_service).dependent(:destroy) }
it { is_expected.to have_one(:asana_service).dependent(:destroy) }
it { is_expected.to have_many(:boards).dependent(:destroy) }