-
Notifications
You must be signed in to change notification settings - Fork 97
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
Method + Path combination constraints #53
base: master
Are you sure you want to change the base?
Conversation
erg. Travis failed, but all tests passed when I ran them locally. |
ooohhh, Travis is testing with 1.8.7, which doesn't support a |
Amended commit e53a1df to be compatible with Ruby 1.8.7 |
Thank you @wyattisimo! It looks good to me, what do you think @tobmatth / @thibaudgg ? |
Looks good! |
constraint_type = key.to_s[0, key.to_s.index('_') || key.to_s.length] | ||
|
||
if key.to_s =~ /methods_with_paths/ | ||
# Match method and path constraints seperately, then combine the results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"seperately" => "separately" ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha, I guess I need a spell-checker in my text editor 😁
amended commit 10594b6 to fix spelling: "seperately" => "separately" |
Don't merge this yet. There's a bug when specifying a |
@rymai I think there's a bug when specifying a :methods_with_paths constraint along with other constraints. Would not merge. ;) |
@rymai @tobmatth Amended commit 00ddb0e with the fixes and a "complex" spec to test specifying This ended up requiring more significant changes than I originally expected. I tweaked Let me know what you think. |
Looks good to me now. @tobmatth is it ok for you? |
+1 for this pull request! |
@wyattisimo Could you please rebase on master? Thanks! @tobmatth What do you think of this PR now? |
This update allows you to define constraints for discrete method and path combinations.
See the updated README for more details: https://github.com/Matchbook/rack-ssl-enforcer#method--path-combination-constraints