diff options
author | Gilbert Roulot <groulot@gitlab.com> | 2018-08-20 18:09:57 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-08-20 18:09:57 +0000 |
commit | 4d7d4a0c16bfcac87416a0ba51296039e4c8b1d4 (patch) | |
tree | a9a93b915de6d95b8534ad09a4efa83c57ac283a /app/models/project_services | |
parent | 9e7bc3fe0bac41dcebc4a78932bb87765baa837d (diff) | |
download | gitlab-ce-4d7d4a0c16bfcac87416a0ba51296039e4c8b1d4.tar.gz |
Remove Gemnasium service
Diffstat (limited to 'app/models/project_services')
-rw-r--r-- | app/models/project_services/gemnasium_service.rb | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/app/models/project_services/gemnasium_service.rb b/app/models/project_services/gemnasium_service.rb deleted file mode 100644 index 67a92c441b1..00000000000 --- a/app/models/project_services/gemnasium_service.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -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' - end - - def description - 'Gemnasium monitors your project dependencies and alerts you about updates and security vulnerabilities.' - end - - def self.to_param - 'gemnasium' - end - - def fields - [ - { type: 'text', name: 'api_key', placeholder: 'Your personal API KEY on gemnasium.com ', required: true }, - { type: 'text', name: 'token', placeholder: 'The project\'s slug on gemnasium.com', required: true } - ] - end - - def self.supported_events - %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]) - - # Gitaly: this class will be removed https://gitlab.com/gitlab-org/gitlab-ee/issues/6010 - repo_path = Gitlab::GitalyClient::StorageSettings.allow_disk_access do - project.repository.path_to_repo - end - - Gemnasium::GitlabService.execute( - ref: data[:ref], - before: data[:before], - after: data[:after], - token: token, - api_key: api_key, - repo: repo_path - ) - end -end |