Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix determination of most specific rule #312

Merged
merged 3 commits into from
Apr 9, 2018
Merged

Fix determination of most specific rule #312

merged 3 commits into from
Apr 9, 2018

Conversation

hwbllmnn
Copy link
Member

@hwbllmnn hwbllmnn commented Apr 9, 2018

Previously not all rules were considered, the first matching one would win.

@terrestris/devs please review

Copy link
Member

@ahennr ahennr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @hwbllmnn: I really like your approach by scoring interceptor rules than choosing the first that matches 🔝

Maybe you could add some tests here?

IMHO this should be releases ASAP

@hwbllmnn
Copy link
Member Author

hwbllmnn commented Apr 9, 2018

@ahennr Actually the tests already check for this behaviour, it was just sheer luck that they would pass previously. I've changed the order of the test rules so they would fail with the previous code.

@hwbllmnn hwbllmnn merged commit 32715b4 into terrestris:master Apr 9, 2018
@hwbllmnn hwbllmnn deleted the fix-most-specific branch April 9, 2018 08:30
@hwbllmnn
Copy link
Member Author

hwbllmnn commented Apr 9, 2018

1.0.2 and 0.1.7 have been released and should show up on central in a couple of hours.

@marcjansen
Copy link
Member

Very nice. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants