Class: PactBroker::Client::CreateTag
- Inherits:
-
Object
- Object
- PactBroker::Client::CreateTag
- Defined in:
- lib/pact_broker/client/create_tag.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(pact_broker_base_url, pacticipant_name, version, tags, auto_create_version, pact_broker_client_options) ⇒ CreateTag
constructor
A new instance of CreateTag.
Constructor Details
#initialize(pact_broker_base_url, pacticipant_name, version, tags, auto_create_version, pact_broker_client_options) ⇒ CreateTag
Returns a new instance of CreateTag.
13 14 15 16 17 18 19 20 |
# File 'lib/pact_broker/client/create_tag.rb', line 13 def initialize(pact_broker_base_url, pacticipant_name, version, , auto_create_version, ) @pact_broker_base_url = pact_broker_base_url @pacticipant_name = pacticipant_name @version = version @tags = @auto_create_version = auto_create_version @pact_broker_client_options = end |
Class Method Details
.call(pact_broker_base_url, pacticipant_name, version, tags, auto_create_version, pact_broker_client_options = {}) ⇒ Object
9 10 11 |
# File 'lib/pact_broker/client/create_tag.rb', line 9 def self.call(pact_broker_base_url, pacticipant_name, version, , auto_create_version, ={}) new(pact_broker_base_url, pacticipant_name, version, , auto_create_version, ).call end |
Instance Method Details
#call ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/pact_broker/client/create_tag.rb', line 22 def call ensure_version_exists if !auto_create_version .each do | tag | $stdout.puts "Tagging #{pacticipant_name} version #{version} as #{tag}" Retry.while_error do pact_broker_client.pacticipants.versions.tag pacticipant: pacticipant_name, version: version, tag: tag end end end |