Skip to content

Commit

Permalink
fix(clean): honour max_age when set in clean selector
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Oct 27, 2021
1 parent 8543ed4 commit 828420d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/pact_broker/db/clean/selector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions lib/pact_broker/tasks/clean_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 828420d

Please sign in to comment.