Sha256: 9d3f4cd415647f13cbee9952151c8f5b26ad52e990dbdf528aecd3ab949d8e3f

Contents?: true

Size: 679 Bytes

Versions: 10

Compression:

Stored size: 679 Bytes

Contents

require 'pact_broker/matrix/row'

module PactBroker
  module Matrix
    # Latest pact revision for each consumer version => latest verification
    class LatestRow < Row
      set_dataset(:latest_matrix)

      # For some reason, with MySQL, the success column value
      # comes back as an integer rather than a boolean
      # for the latest_matrix view (but not the matrix view!)
      # Maybe something to do with the union?
      # Haven't investigated as this is an easy enough fix.
      def success
        value = super
        value.nil? ? nil : value == true || value == 1
      end

      def values
        super.merge(success: success)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
pact_broker-2.15.0 lib/pact_broker/matrix/latest_row.rb
pact_broker-2.14.0 lib/pact_broker/matrix/latest_row.rb
pact_broker-2.13.1 lib/pact_broker/matrix/latest_row.rb
pact_broker-2.13.0 lib/pact_broker/matrix/latest_row.rb
pact_broker-2.12.0 lib/pact_broker/matrix/latest_row.rb
pact_broker-2.11.0 lib/pact_broker/matrix/latest_row.rb
pact_broker-2.10.0 lib/pact_broker/matrix/latest_row.rb
pact_broker-2.9.0 lib/pact_broker/matrix/latest_row.rb
pact_broker-2.9.0.beta.5 lib/pact_broker/matrix/latest_row.rb
pact_broker-2.8.0.beta.5 lib/pact_broker/matrix/latest_row.rb