Skip to content

Commit

Permalink
feat: change version ordering to sort by date by default
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jun 14, 2018
1 parent 8f64288 commit 6552b46
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions lib/pact_broker/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ def self.default_configuration
config.version_parser = PactBroker::Versions::ParseSemanticVersion
config.sha_generator = PactBroker::Pacts::GenerateSha
config.base_equality_only_on_content_that_affects_verification_results = false
# TODO change this to true
config.order_versions_by_date = false
config.order_versions_by_date = true
config.semver_formats = ["%M.%m.%p%s%d", "%M.%m", "%M"]
config.webhook_retry_schedule = [10, 60, 120, 300, 600, 1200] #10 sec, 1 min, 2 min, 5 min, 10 min, 20 min => 38 minutes
config.check_for_potential_duplicate_pacticipant_names = true
Expand Down
1 change: 1 addition & 0 deletions spec/lib/pact_broker/pacts/pact_version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ module Pacts

describe "#latest_consumer_version_number" do
before do
PactBroker.configuration.order_versions_by_date = false
builder = TestDataBuilder.new
builder
.create_consumer
Expand Down
1 change: 1 addition & 0 deletions spec/lib/pact_broker/verifications/repository_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ module Verifications

context "when no tag is specified" do
before do
PactBroker.configuration.order_versions_by_date = false
TestDataBuilder.new
.create_provider("Provider1")
.create_consumer("Consumer1")
Expand Down

0 comments on commit 6552b46

Please sign in to comment.