Sha256: 2ba03915837586383bfbdd83c4d3389bcc2042b5533b01932bda46979ca572f8
Contents?: true
Size: 902 Bytes
Versions: 6
Compression:
Stored size: 902 Bytes
Contents
require 'pact_broker/ui/controllers/base_controller' require 'pact_broker/ui/view_models/matrix_line' require 'haml' module PactBroker module UI module Controllers class Matrix < Base include PactBroker::Services get "/provider/:provider_name/consumer/:consumer_name" do selectors = [{ pacticipant_name: params[:consumer_name] }, { pacticipant_name: params[:provider_name] } ] lines = matrix_service.find(selectors, {latestby: 'cvpv', limit: 1000}) lines = lines.collect{|line| PactBroker::UI::ViewDomain::MatrixLine.new(line) }.sort locals = { lines: lines, title: "The Matrix", consumer_name: params[:consumer_name], provider_name: params[:provider_name] } haml :'matrix/show', {locals: locals, layout: :'layouts/main'} end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems