cmorten / superoak

HTTP assertions for Oak made easy via SuperDeno. 🐿 🦕
https://cmorten.github.io/superoak/
MIT License
121 stars 8 forks source link

[ISSUE-1] Decouple SuperOak from Oak v5.0.0 to prevent type errors. #2

Closed asos-craigmorten closed 4 years ago

asos-craigmorten commented 4 years ago

Issue

ISSUE-1

Details

Decouples SuperOak from Oak v5.0.0.

As Oak develops, so does it's types, so to use any particular version of Oak to determine whether an object is an instance of it's Application will inevitably fail as what an Application is will change (esp. with strong typing).

This patch introduces some duck typing to determine if the passed app has the minimal desired shape of an Oak Application instance.

This should be fortified in future as the duck-typing is somewhat fragile and still susceptible to major changes in the Oak framework.

CheckList