Commit b4f6fbd8 authored by Stan Hu's avatar Stan Hu

Remove circular dependency between HTTPHelper and GitlabNet

HttpHelper depended on exceptions defined in GitLabNet, but GitLabNet
included HttpHelper. Specs in Ruby 2.5 were breaking as a result of
Action::Custom not able to reference constants in GitLabNet:
https://gitlab.com/gitlab-org/gitlab-shell/-/jobs/126362702.

Closes https://gitlab.com/gitlab-org/gitlab-shell/issues/169
parent e77f89e1
......@@ -10,9 +10,6 @@ require_relative 'http_helper'
class GitlabNet # rubocop:disable Metrics/ClassLength
include HTTPHelper
class ApiUnreachableError < StandardError; end
class NotFound < StandardError; end
CHECK_TIMEOUT = 5
API_INACCESSIBLE_MESSAGE = 'API is not accessible'.freeze
......
class GitlabNet
class ApiUnreachableError < StandardError; end
class NotFound < StandardError; end
end
require_relative 'httpunix'
require_relative 'gitlab_logger'
require_relative 'gitlab_net/errors'
module HTTPHelper
READ_TIMEOUT = 300
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment