diff --git a/lib/pact_broker/db/clean/selector.rb b/lib/pact_broker/db/clean/selector.rb index a011a3f0f..0be400a3a 100644 --- a/lib/pact_broker/db/clean/selector.rb +++ b/lib/pact_broker/db/clean/selector.rb @@ -33,7 +33,7 @@ def to_hash end alias_method :to_h, :to_hash - def to_json + def to_json(opts = nil) (@source_hash || to_hash).to_json end diff --git a/lib/pact_broker/tasks/clean_task.rb b/lib/pact_broker/tasks/clean_task.rb index 231ef4927..f70e3edc0 100644 --- a/lib/pact_broker/tasks/clean_task.rb +++ b/lib/pact_broker/tasks/clean_task.rb @@ -17,9 +17,9 @@ def initialize &block end def keep_version_selectors=(keep_version_selectors) - require "pact_broker/matrix/unresolved_selector" + require "pact_broker/db/clean/selector" @keep_version_selectors = [*keep_version_selectors].collect do | hash | - PactBroker::Matrix::UnresolvedSelector.from_hash(hash) + PactBroker::DB::Clean::Selector.from_hash(hash) end end