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 'lib/sentry/api_urls.rb')
-rw-r--r--lib/sentry/api_urls.rb39
1 files changed, 0 insertions, 39 deletions
diff --git a/lib/sentry/api_urls.rb b/lib/sentry/api_urls.rb
deleted file mode 100644
index 388d0531da1..00000000000
--- a/lib/sentry/api_urls.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: true
-
-module Sentry
- class ApiUrls
- def initialize(url_base)
- @uri = URI(url_base).freeze
- end
-
- def issues_url
- with_path(File.join(@uri.path, '/issues/'))
- end
-
- def issue_url(issue_id)
- with_path("/api/0/issues/#{escape(issue_id)}/")
- end
-
- def projects_url
- with_path('/api/0/projects/')
- end
-
- def issue_latest_event_url(issue_id)
- with_path("/api/0/issues/#{escape(issue_id)}/events/latest/")
- end
-
- private
-
- def with_path(new_path)
- new_uri = @uri.dup
- # Sentry API returns 404 if there are extra slashes in the URL
- new_uri.path = new_path.squeeze('/')
-
- new_uri
- end
-
- def escape(param)
- CGI.escape(param.to_s)
- end
- end
-end