Skip to content

Commit

Permalink
fix: reverting safe navigation operator to chained calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
rashiagarwal committed Jun 22, 2018
1 parent 7d90e13 commit 8194ed6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/pact/pact_broker/fetch_pacts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,15 @@ def self.call(provider, tags, broker_base_url, basic_auth_options)

def call
get_index
tags&.any? ? get_tagged_pacts_for_provider : get_latest_pacts_for_provider
tag_exist ? get_tagged_pacts_for_provider : get_latest_pacts_for_provider
end

private

def tag_exist
tags && tags.any?
end

def get_tagged_pacts_for_provider
tags.collect do |tag|
link = get_link(tag)
Expand Down

0 comments on commit 8194ed6

Please sign in to comment.