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

Remove monkey patch from Addressable::URI#normalized_query so that it can be compatible with Addressable 2.8.2 #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ericfirth
Copy link

This fixes the error on #49

Removing the monkey patch entirely lead to the following error

/Users/eric.firth/.rbenv/versions/3.0.4/bin/ruby -I/Users/eric.firth/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/rspec-core-3.12.2/lib:/Users/eric.firth/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/rspec-support-3.12.1/lib /Users/eric.firth/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/rspec-core-3.12.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
...........F...........................................................

Failures:

  1) PostRank::URI normalize cleans whitespace in PostRank::URIs
     Failure/Error: expect(n('http://igvita.com/a/../?  ')).to eq(igvita)

       expected: "http://igvita.com/"
            got: "http://igvita.com/?%20%20"

       (compared using ==)
     # ./spec/postrank-uri_spec.rb:77:in `block (3 levels) in <top (required)>'

Finished in 0.13964 seconds (files took 0.29346 seconds to load)
71 examples, 1 failure

Failed examples:

rspec ./spec/postrank-uri_spec.rb:76 # PostRank::URI normalize cleans whitespace in PostRank::URIs

So I split on whitespace and took the first item. I initially tried just stripping the URI as a string, but then got

     Failure/Error: expect(n('http://igvita.com/a/../? #test')).to eq(igvita)

       expected: "http://igvita.com/"
            got: "http://igvita.com/?%20"

Happy to make any changes needed.

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.

1 participant