-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: parse pacts without a specification version as v2
- Loading branch information
Showing
8 changed files
with
67 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module Pact | ||
class SpecificationVersion < Gem::Version | ||
|
||
NIL_VERSION = SpecificationVersion.new('') | ||
|
||
def major | ||
segments.first | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"consumer": { | ||
"name": "some-test-consumer" | ||
}, | ||
"provider": { | ||
"name": "an unknown provider" | ||
}, | ||
"interactions": [ | ||
{ | ||
"description": "a test request", | ||
"request": { | ||
"method": "get", | ||
"path": "/weather", | ||
"query": "" | ||
}, | ||
"response": { | ||
"matchingRules": { | ||
"$.headers.Content-Type" : { | ||
"match": "regex", "regex": "json" | ||
}, | ||
"$.body.message" : { | ||
"match": "regex", "regex": "sun" | ||
} | ||
}, | ||
"status": 200, | ||
"headers" : { | ||
"Content-Type": "foo/json" | ||
}, | ||
"body": { | ||
"message" : "sunful" | ||
} | ||
}, | ||
"provider_state": "the weather is sunny" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters