-
Notifications
You must be signed in to change notification settings - Fork 88
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
A few cases recognize-path doesn't handle. #44
Comments
/cc @kyrylo |
For the URL I don't think it should try to match anything from the domain but just take the path & use that. |
|
@kyrylo can pry-rails not handle the cases Rails cannot? I copy+paste from my URL all the time, and I don't consult RFCs beforehand. I think it's not hard to handle these cases, they're very easy to solve before passing to the Rails API. |
I'm thinking of something like this for the first case: unless fragment.starts_with? "/"
warn "Prepending / to #{fragment}"
fragment.prepend "/"
end For the second case: fragment = URI.parse(fragment).path rescue fragment |
Why not? Looks good to me. I had borne in mind these possible extensions to the command when I worked on it. However, I decided to make it as simple as it can be, because I wasn't sure the patch would be accepted. |
@kyrylo ah I see. okay. should I make the pull request, or you? :-D I'd love for those cases to be handled because anytime I use the |
Sure, it would be cool, go for it. You're probably the most active |
added to the never ending list ;-) |
Doesn't work:
Works fine:
The text was updated successfully, but these errors were encountered: