Skip to content

Commit 6552b46

Browse files
committed
feat: change version ordering to sort by date by default
1 parent 8f64288 commit 6552b46

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

lib/pact_broker/configuration.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ def self.default_configuration
7373
config.version_parser = PactBroker::Versions::ParseSemanticVersion
7474
config.sha_generator = PactBroker::Pacts::GenerateSha
7575
config.base_equality_only_on_content_that_affects_verification_results = false
76-
# TODO change this to true
77-
config.order_versions_by_date = false
76+
config.order_versions_by_date = true
7877
config.semver_formats = ["%M.%m.%p%s%d", "%M.%m", "%M"]
7978
config.webhook_retry_schedule = [10, 60, 120, 300, 600, 1200] #10 sec, 1 min, 2 min, 5 min, 10 min, 20 min => 38 minutes
8079
config.check_for_potential_duplicate_pacticipant_names = true

spec/lib/pact_broker/pacts/pact_version_spec.rb

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ module Pacts
7070

7171
describe "#latest_consumer_version_number" do
7272
before do
73+
PactBroker.configuration.order_versions_by_date = false
7374
builder = TestDataBuilder.new
7475
builder
7576
.create_consumer

spec/lib/pact_broker/verifications/repository_spec.rb

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ module Verifications
9393

9494
context "when no tag is specified" do
9595
before do
96+
PactBroker.configuration.order_versions_by_date = false
9697
TestDataBuilder.new
9798
.create_provider("Provider1")
9899
.create_consumer("Consumer1")

0 commit comments

Comments
 (0)