class PactBroker::Api::Resources::LatestVerificationsForConsumerVersion
Public Instance Methods
allowed_methods()
click to toggle source
# File lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb, line 12 def allowed_methods ["GET", "OPTIONS"] end
content_types_provided()
click to toggle source
# File lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb, line 16 def content_types_provided [["application/hal+json", :to_json]] end
policy_name()
click to toggle source
# File lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb, line 29 def policy_name :'verifications::verifications' end
resource_exists?()
click to toggle source
# File lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb, line 20 def resource_exists? !!version end
to_json()
click to toggle source
# File lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb, line 24 def to_json summary = verification_service.verification_summary_for_consumer_version(identifier_from_path) decorator_for(summary).to_json(decorator_options(identifier_from_path)) end
Private Instance Methods
decorator_for(summary)
click to toggle source
# File lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb, line 42 def decorator_for summary decorator_class(:verification_summary_decorator).new(summary) end
version()
click to toggle source
# File lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb, line 35 def version version_service.find_by_pacticipant_name_and_number( pacticipant_name: consumer_name, pacticipant_version_number: consumer_version_number ) end