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 tests #51

Merged
merged 1 commit into from
Apr 19, 2018
Merged

fix tests #51

merged 1 commit into from
Apr 19, 2018

Conversation

glaszig
Copy link
Collaborator

@glaszig glaszig commented Apr 19, 2018

use Base64.strict_encode64 which does not add line feeds every few characters.

see https://ruby-doc.org/stdlib-2.2.0/libdoc/base64/rdoc/Base64.html#method-i-strict_encode64

::strict_encode64 also uses the same #pack logic
as rack-test does inside its #basic_authorize method.

see https://github.com/rack-test/rack-test/blob/72fc72dc15bfd33f45bc13cd134fb5e2c04dbe1e/lib/rack/test.rb#L166

more: https://glaucocustodio.github.io/2014/09/27/a-reminder-about-base64encode64-in-ruby/

@jayzes
Copy link
Owner

jayzes commented Apr 19, 2018

Thanks!

@jayzes jayzes merged commit 82cba14 into jayzes:master Apr 19, 2018
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.

None yet

2 participants