lib/pact/provider/world.rb in pact-1.27.0 vs lib/pact/provider/world.rb in pact-1.28.0.rc1
- old
+ new
@@ -27,10 +27,24 @@
def pact_verifications
@pact_verifications ||= []
end
def pact_urls
- pact_verifications.collect(&:uri)
+ (pact_verifications.collect(&:uri) + pact_uris_from_pact_uri_sources).compact
end
+
+ def add_pact_uri_source pact_uri_source
+ pact_uri_sources << pact_uri_source
+ end
+
+ private
+
+ def pact_uri_sources
+ @pact_uri_sources ||= []
+ end
+
+ def pact_uris_from_pact_uri_sources
+ pact_uri_sources.collect{| pact_uri_source| pact_uri_source.call }.flatten
+ end
end
end
-end
\ No newline at end of file
+end