Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Gonzalez <ogonzalez@gitlab.com>2018-05-23 12:40:45 +0300
committerDouwe Maan <douwe@gitlab.com>2018-05-23 12:40:45 +0300
commit40dd12c7758c90ad124e68bd549027eac1973fe6 (patch)
tree505619ce665c92e43d14a74cdd875d0dd819423c /app/models/project_services
parentf0fbdad9202b6dfdc437783f85d8c199ed069838 (diff)
Resolve "Deprecate Gemnasium project service"
Diffstat (limited to 'app/models/project_services')
-rw-r--r--app/models/project_services/gemnasium_service.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/models/project_services/gemnasium_service.rb b/app/models/project_services/gemnasium_service.rb
index 26cbfd784ad..84248f9590b 100644
--- a/app/models/project_services/gemnasium_service.rb
+++ b/app/models/project_services/gemnasium_service.rb
@@ -3,6 +3,7 @@ require "gemnasium/gitlab_service"
class GemnasiumService < Service
prop_accessor :token, :api_key
validates :token, :api_key, presence: true, if: :activated?
+ validate :deprecation_validation
def title
'Gemnasium'
@@ -27,6 +28,18 @@ class GemnasiumService < Service
%w(push)
end
+ def deprecated?
+ true
+ end
+
+ def deprecation_message
+ "Gemnasium has been acquired by GitLab in January 2018. Since May 15, 2018, the service provided by Gemnasium is no longer available."
+ end
+
+ def deprecation_validation
+ errors[:base] << deprecation_message
+ end
+
def execute(data)
return unless supported_events.include?(data[:object_kind])