lib/pact/provider/configuration/service_provider_dsl.rb in pact-1.57.0 vs lib/pact/provider/configuration/service_provider_dsl.rb in pact-1.58.0

- old
+ new

@@ -13,11 +13,11 @@ class ServiceProviderDSL extend Pact::DSL - attr_accessor :name, :app_block, :application_version, :tags, :publish_verification_results + attr_accessor :name, :app_block, :application_version, :branch, :tags, :publish_verification_results CONFIG_RU_APP = lambda { unless File.exist? Pact.configuration.config_ru_path raise "Could not find config.ru file at #{Pact.configuration.config_ru_path} Please configure the service provider app or create a config.ru file in the root directory of the project. See https://github.com/pact-foundation/pact-ruby/wiki/Verifying-pacts for more information." end @@ -42,10 +42,14 @@ def app_version_tags tags self.tags = tags end + def app_version_branch branch + self.branch = branch + end + def publish_verification_results publish_verification_results self.publish_verification_results = publish_verification_results Pact::RSpec.with_rspec_2 do Pact.configuration.error_stream.puts "WARN: Publishing of verification results is currently not supported with rspec 2. If you would like this functionality, please feel free to submit a PR!" end @@ -63,11 +67,11 @@ def create_pact_verification consumer_name, options, &block PactVerification.build(consumer_name, options, &block) end def create_pact_verification_from_broker(&block) - PactVerificationFromBroker.build(name, tags, &block) + PactVerificationFromBroker.build(name, branch, tags, &block) end def finalize validate create_service_provider @@ -83,10 +87,10 @@ def application_version_blank? application_version.nil? || application_version.strip.empty? end def create_service_provider - Pact.configuration.provider = ServiceProviderConfig.new(application_version, tags, publish_verification_results, &@app_block) + Pact.configuration.provider = ServiceProviderConfig.new(application_version, branch, tags, publish_verification_results, &@app_block) end end end end end