class PactBroker::Api::Resources::PactVersions

Public Instance Methods

allowed_methods() click to toggle source
# File lib/pact_broker/api/resources/pact_versions.rb, line 13
def allowed_methods
  ["GET", "DELETE", "OPTIONS"]
end
content_types_provided() click to toggle source
# File lib/pact_broker/api/resources/pact_versions.rb, line 9
def content_types_provided
  [["application/hal+json", :to_json]]
end
delete_resource() click to toggle source
# File lib/pact_broker/api/resources/pact_versions.rb, line 29
def delete_resource
  pact_service.delete_all_pact_publications_between(consumer_name, and: provider_name)
  true
end
pacts() click to toggle source
# File lib/pact_broker/api/resources/pact_versions.rb, line 25
def pacts
  @pacts ||= pact_service.find_all_pact_versions_between consumer_name, :and => provider_name
end
policy_name() click to toggle source
# File lib/pact_broker/api/resources/pact_versions.rb, line 34
def policy_name
  :'pacts::pacts'
end
policy_pacticipant() click to toggle source
# File lib/pact_broker/api/resources/pact_versions.rb, line 38
def policy_pacticipant
  consumer
end
resource_exists?() click to toggle source
# File lib/pact_broker/api/resources/pact_versions.rb, line 17
def resource_exists?
  consumer && provider
end
to_json() click to toggle source
# File lib/pact_broker/api/resources/pact_versions.rb, line 21
def to_json
  decorator_class(:pact_versions_decorator).new(pacts).to_json(decorator_options(identifier_from_path))
end