class PactBroker::Api::Resources::PactContentDiff
Public Instance Methods
allowed_methods()
click to toggle source
# File lib/pact_broker/api/resources/pact_content_diff.rb, line 13 def allowed_methods ["GET", "OPTIONS"] end
comparison_pact_params()
click to toggle source
# File lib/pact_broker/api/resources/pact_content_diff.rb, line 38 def comparison_pact_params if identifier_from_path[:comparison_consumer_version_number] || identifier_from_path[:comparison_pact_version_sha] comparison_identifier_from_path = identifier_from_path.merge( consumer_version_number: identifier_from_path[:comparison_consumer_version_number], pact_version_sha: identifier_from_path[:comparison_pact_version_sha], base_url: base_url) PactBroker::Pacts::PactParams.from_path_info(comparison_identifier_from_path) else nil end end
content_types_provided()
click to toggle source
# File lib/pact_broker/api/resources/pact_content_diff.rb, line 9 def content_types_provided [["text/plain", :to_text]] end
pact()
click to toggle source
# File lib/pact_broker/api/resources/pact_content_diff.rb, line 26 def pact @pact ||= pact_service.find_pact(pact_params) end
pact_params()
click to toggle source
# File lib/pact_broker/api/resources/pact_content_diff.rb, line 30 def pact_params @pact_params ||= PactBroker::Pacts::PactParams.from_path_info identifier_from_path end
policy_name()
click to toggle source
# File lib/pact_broker/api/resources/pact_content_diff.rb, line 34 def policy_name :'pacts::pact' end
resource_exists?()
click to toggle source
# File lib/pact_broker/api/resources/pact_content_diff.rb, line 17 def resource_exists? pact end
to_text()
click to toggle source
# File lib/pact_broker/api/resources/pact_content_diff.rb, line 21 def to_text output = PactBroker::Pacts::Diff.new.process pact_params.merge(base_url: base_url), comparison_pact_params, raw: false response.body = output end