Class: Gitlab::QA::Component::Staging::Version
- Inherits:
-
Object
- Object
- Gitlab::QA::Component::Staging::Version
- Defined in:
- lib/gitlab/qa/component/staging.rb
Instance Attribute Summary collapse
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(address) ⇒ Version
constructor
A new instance of Version.
- #tag ⇒ Object
Constructor Details
#initialize(address) ⇒ Version
Returns a new instance of Version.
52 53 54 55 56 |
# File 'lib/gitlab/qa/component/staging.rb', line 52 def initialize(address) @uri = URI.join(address, '/api/v4/version') Runtime::Env.require_qa_access_token! end |
Instance Attribute Details
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
50 51 52 |
# File 'lib/gitlab/qa/component/staging.rb', line 50 def uri @uri end |
Instance Method Details
#tag ⇒ Object
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/gitlab/qa/component/staging.rb', line 58 def tag if official? # Because RCs are considered to be pre-releases, that come before # regular releases we can't check if version < 15.6.0, hence # using this weird not-gonna-happen-patch-release hack. Gem::Version.new(version) > Gem::Version.new('15.5.99') ? version : "v#{version}" else revision end end |