lib/pact_broker/matrix/repository.rb
# Find the version number for selectors with the latest and/or tag specified
Find the version number for selectors with the latest and/or tag specified
Find the version number for selectors with the latest and / or tag specified
def resolve_versions_and_add_ids(unresolved_selectors, selector_type, resolved_ignore_selectors = [])
        names = unresolved_selectors.collect(&:pacticipant_name)
        pacticipants = PactBroker::Domain::Pacticipant.where(name: names).to_a.group_by(&:name).transform_values(&:first)
        unresolved_selectors.collect do | unresolved_selector |
          pacticipant = pacticipants[unresolved_selector.pacticipant_name]
          if pacticipant
            versions = find_versions_for_selector(unresolved_selector)
            build_resolved_selectors(pacticipant, versions, unresolved_selector, selector_type, resolved_ignore_selectors)
          else
            selector_for_non_existing_pacticipant(unresolved_selector, selector_type)
          end
        end.flatten
      end
def resolve_versions_and_add_ids ( unresolved_selectors , selector_type , resolved_ignore_selectors = [ ] ) names = unresolved_selectors . collect ( & :pacticipant_name ) pacticipants = PactBroker :: Domain :: Pacticipant . where ( name : names ) . to_a . group_by ( & :name ) . transform_values ( & :first ) unresolved_selectors . collect do | unresolved_selector | pacticipant = pacticipants [ unresolved_selector . pacticipant_name ] if pacticipant versions = find_versions_for_selector ( unresolved_selector ) build_resolved_selectors ( pacticipant , versions , unresolved_selector , selector_type , resolved_ignore_selectors ) else selector_for_non_existing_pacticipant ( unresolved_selector , selector_type ) end end . flatten end
Find the version number for selectors with the latest and/or tag specified
Find the version number for selectors with the latest and / or tag specified
unresolved_selectors
selector_type
resolved_ignore_selectors