Class: Pact::ProviderVerifier::App

Inherits:
Object
  • Object
show all
Defined in:
lib/pact/provider_verifier/app.rb

Constant Summary collapse

PROXY_PACT_HELPER =
File.expand_path(File.join(File.dirname(__FILE__), "pact_helper.rb"))

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pact_urls, options = {}) ⇒ App

Returns a new instance of App.



15
16
17
18
# File 'lib/pact/provider_verifier/app.rb', line 15

def initialize pact_urls, options = {}
  @pact_urls = pact_urls
  @options = options
end

Class Method Details

.call(pact_urls, options) ⇒ Object



20
21
22
# File 'lib/pact/provider_verifier/app.rb', line 20

def self.call pact_urls, options
  new(pact_urls, options).call
end

Instance Method Details

#callObject



24
25
26
27
28
29
30
31
32
33
# File 'lib/pact/provider_verifier/app.rb', line 24

def call
  setup

  exit_statuses = pact_urls.collect do |pact_url|
    verify_pact pact_url
  end

  # Return non-zero exit code if failures - increment for each Pact
  exit exit_statuses.count{ | status | status != 0 }
end