Skip to content

Commit

Permalink
fix: can't use safe navigation operator because of Ruby 2.2 in Travel…
Browse files Browse the repository at this point in the history
…ling Ruby for the pact-ruby-standalone
  • Loading branch information
bethesque committed Nov 9, 2019
1 parent 0048495 commit 3068ceb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/pact/pact_broker/fetch_pact_uris_for_verification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class FetchPactURIsForVerification

def initialize(provider, consumer_version_selectors, provider_version_tags, broker_base_url, http_client_options)
@provider = provider
@consumer_version_selectors = consumer_version_selectors
@provider_version_tags = provider_version_tags
@consumer_version_selectors = consumer_version_selectors || []
@provider_version_tags = provider_version_tags || []
@http_client_options = http_client_options
@broker_base_url = broker_base_url
@http_client = Pact::Hal::HttpClient.new(http_client_options)
Expand Down Expand Up @@ -67,18 +67,18 @@ def pacts_for_verification_entity

def query
q = {}
if consumer_version_selectors&.any?
if consumer_version_selectors.any?
q["consumer_version_selectors"] = consumer_version_selectors
end

if provider_version_tags&.any?
if provider_version_tags.any?
q["provider_version_tags"] = provider_version_tags
end
q
end

def log_message
latest = consumer_version_selectors&.any? ? "" : "latest "
latest = consumer_version_selectors.any? ? "" : "latest "
message = "INFO: Fetching #{latest}pacts for #{provider} from #{broker_base_url}"
if consumer_version_selectors&.any?
desc = consumer_version_selectors.collect do |selector|
Expand Down

0 comments on commit 3068ceb

Please sign in to comment.