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:
Diffstat (limited to 'app/models/project_services/external_wiki_service.rb')
-rw-r--r--app/models/project_services/external_wiki_service.rb48
1 files changed, 0 insertions, 48 deletions
diff --git a/app/models/project_services/external_wiki_service.rb b/app/models/project_services/external_wiki_service.rb
deleted file mode 100644
index a199d0e86f2..00000000000
--- a/app/models/project_services/external_wiki_service.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-# == Schema Information
-#
-# Table name: services
-#
-# id :integer not null, primary key
-# type :string(255)
-# title :string(255)
-# project_id :integer not null
-# created_at :datetime
-# updated_at :datetime
-# active :boolean default(FALSE), not null
-# properties :text
-#
-
-class ExternalWikiService < Service
- include HTTParty
-
- prop_accessor :external_wiki_url
- validates :external_wiki_url,
- presence: true,
- format: { with: /\A#{URI.regexp}\z/ },
- if: :activated?
-
- def title
- 'External Wiki'
- end
-
- def description
- 'Replaces the link to the internal wiki with a link to an external wiki.'
- end
-
- def to_param
- 'external_wiki'
- end
-
- def fields
- [
- { type: 'text', name: 'external_wiki_url', placeholder: 'The URL of the external Wiki' },
- ]
- end
-
- def execute(_data)
- @response = HTTParty.get(properties['external_wiki_url'], verify: true) rescue nil
- if @response !=200
- nil
- end
- end
-end