From 1071ca8a1e9b5b9e1bc1b724349e63526f17928c Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Fri, 8 Nov 2019 16:15:16 +1100 Subject: [PATCH] feat: add missing super calls in BaseResource child classes --- lib/pact_broker/api/resources/can_i_deploy.rb | 1 + lib/pact_broker/api/resources/matrix.rb | 1 + .../api/resources/matrix_for_consumer_and_provider.rb | 1 + lib/pact_broker/api/resources/provider_pacts_for_verification.rb | 1 + 4 files changed, 4 insertions(+) diff --git a/lib/pact_broker/api/resources/can_i_deploy.rb b/lib/pact_broker/api/resources/can_i_deploy.rb index 4be3c8396..14ae8f864 100644 --- a/lib/pact_broker/api/resources/can_i_deploy.rb +++ b/lib/pact_broker/api/resources/can_i_deploy.rb @@ -7,6 +7,7 @@ module Api module Resources class CanIDeploy < Matrix def initialize + super @query_params = JSON.parse(Rack::Utils.parse_nested_query(request.uri.query).to_json, symbolize_names: true) @selectors, @options = PactBroker::Matrix::ParseCanIDeployQuery.call(query_params) end diff --git a/lib/pact_broker/api/resources/matrix.rb b/lib/pact_broker/api/resources/matrix.rb index 01a72efe8..61ebd059d 100644 --- a/lib/pact_broker/api/resources/matrix.rb +++ b/lib/pact_broker/api/resources/matrix.rb @@ -10,6 +10,7 @@ class Matrix < BaseResource attr_reader :selectors, :options def initialize + super @selectors, @options = PactBroker::Matrix::ParseQuery.call(request.uri.query) end diff --git a/lib/pact_broker/api/resources/matrix_for_consumer_and_provider.rb b/lib/pact_broker/api/resources/matrix_for_consumer_and_provider.rb index 0b6c240ad..1d8101b7e 100644 --- a/lib/pact_broker/api/resources/matrix_for_consumer_and_provider.rb +++ b/lib/pact_broker/api/resources/matrix_for_consumer_and_provider.rb @@ -7,6 +7,7 @@ module Resources class MatrixForConsumerAndProvider < BaseResource def initialize + super _, @options = PactBroker::Matrix::ParseQuery.call(request.uri.query) end diff --git a/lib/pact_broker/api/resources/provider_pacts_for_verification.rb b/lib/pact_broker/api/resources/provider_pacts_for_verification.rb index bf23b1189..37850724b 100644 --- a/lib/pact_broker/api/resources/provider_pacts_for_verification.rb +++ b/lib/pact_broker/api/resources/provider_pacts_for_verification.rb @@ -8,6 +8,7 @@ module Api module Resources class ProviderPactsForVerification < ProviderPacts def initialize + super @query = Rack::Utils.parse_nested_query(request.uri.query) end