Class: Concourse::SubClients::SkymarshalClient
- Inherits:
-
Object
- Object
- Concourse::SubClients::SkymarshalClient
- Includes:
- Http
- Defined in:
- lib/concourse/sub_clients/skymarshal_client.rb
Constant Summary collapse
- VERSION_6_1 =
Semantic::Version.new('6.1.0')
Instance Method Summary collapse
- #==(other) ⇒ Object
- #create_token(parameters) ⇒ Object
-
#initialize(options) ⇒ SkymarshalClient
constructor
A new instance of SkymarshalClient.
Methods included from Http
Constructor Details
#initialize(options) ⇒ SkymarshalClient
Returns a new instance of SkymarshalClient.
18 19 20 21 |
# File 'lib/concourse/sub_clients/skymarshal_client.rb', line 18 def initialize() @url = [:url] @version = Semantic::Version.new([:version]) end |
Instance Method Details
#==(other) ⇒ Object
35 36 37 |
# File 'lib/concourse/sub_clients/skymarshal_client.rb', line 35 def ==(other) other.class == self.class && other.state == state end |
#create_token(parameters) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/concourse/sub_clients/skymarshal_client.rb', line 23 def create_token(parameters) url = create_token_url headers = create_token_headers body = create_token_body(parameters) token_request = Http::Request.new(url, headers, body) token_response = Excon.post(url, headers:, body:) assert_successful(token_request, token_response) token(token_response) end |