class PactBroker::Pacts::Selectors
Public Class Methods
Source
# File lib/pact_broker/pacts/selectors.rb, line 10 def self.create_for_all_of_each_tag(tag_names) Selectors.new(tag_names.collect{ | tag_name | Selector.all_for_tag(tag_name) }) end
Source
# File lib/pact_broker/pacts/selectors.rb, line 26 def self.create_for_latest_for_branch(branch) Selectors.new([Selector.latest_for_branch(branch)]) end
Source
# File lib/pact_broker/pacts/selectors.rb, line 18 def self.create_for_latest_for_tag(tag_name) Selectors.new([Selector.latest_for_tag(tag_name)]) end
Source
# File lib/pact_broker/pacts/selectors.rb, line 30 def self.create_for_latest_from_main_branch Selectors.new([Selector.latest_for_main_branch]) end
Source
# File lib/pact_broker/pacts/selectors.rb, line 22 def self.create_for_latest_of_each_branch(branches) Selectors.new(branches.collect{ | branch | Selector.latest_for_branch(branch) }) end
Source
# File lib/pact_broker/pacts/selectors.rb, line 14 def self.create_for_latest_of_each_tag(tag_names) Selectors.new(tag_names.collect{ | tag_name | Selector.latest_for_tag(tag_name) }) end
Source
# File lib/pact_broker/pacts/selectors.rb, line 34 def self.create_for_overall_latest Selectors.new([Selector.overall_latest]) end
Source
# File lib/pact_broker/pacts/selectors.rb, line 6 def initialize *selectors super([*selectors].flatten) end
Calls superclass method
Public Instance Methods
Source
# File lib/pact_broker/pacts/selectors.rb, line 46 def + other Selectors.new(super) end
Calls superclass method
Source
# File lib/pact_broker/pacts/selectors.rb, line 70 def branches_of_selectors_for_latest_pacts select(&:latest_for_branch?).collect(&:branch).uniq end
Source
# File lib/pact_broker/pacts/selectors.rb, line 58 def latest_for_tag? potential_tag = nil any? { | selector | selector.latest_for_tag?(potential_tag) } end
Source
# File lib/pact_broker/pacts/selectors.rb, line 54 def overall_latest? any?(&:overall_latest?) end
Source
# File lib/pact_broker/pacts/selectors.rb, line 38 def resolve(consumer_version) Selectors.new(collect{ |selector| selector.resolve(consumer_version) }) end
Source
# File lib/pact_broker/pacts/selectors.rb, line 42 def resolve_for_environment(consumer_version, environment) Selectors.new(collect{ |selector| selector.resolve_for_environment(consumer_version, environment) }) end
Source
# File lib/pact_broker/pacts/selectors.rb, line 50 def sort Selectors.new(super) end
Calls superclass method
Source
# File lib/pact_broker/pacts/selectors.rb, line 62 def tag_names_of_selectors_for_all_pacts select(&:all_for_tag?).collect(&:tag).uniq end
Source
# File lib/pact_broker/pacts/selectors.rb, line 66 def tag_names_of_selectors_for_latest_pacts select(&:latest_for_tag?).collect(&:tag).uniq end