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

Add UTS #46 support #13

Merged
merged 1 commit into from
Jan 24, 2018
Merged

Add UTS #46 support #13

merged 1 commit into from
Jan 24, 2018

Conversation

pzb
Copy link
Contributor

@pzb pzb commented Jun 16, 2017

This adds support for UTS #46 (http://unicode.org/reports/tr46/). One of the requirements of UTS #46 is to perform Unicode normalization. This was only added natively in Ruby 2.2. It will load the unf gem if no supported method is available.

I'm not sure if this is the best strategy, but it works.

This includes the full UST #46 test suite which all pass.

@codecov
Copy link

codecov bot commented Aug 8, 2017

Codecov Report

Merging #13 into master will decrease coverage by 0.68%.
The diff coverage is 96.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #13      +/-   ##
==========================================
- Coverage     100%   99.31%   -0.69%     
==========================================
  Files           1        3       +2     
  Lines           1      147     +146     
==========================================
+ Hits            1      146     +145     
- Misses          0        1       +1
Impacted Files Coverage Δ
spec/test_vectors.rb 100% <ø> (ø) ⬆️
lib/simpleidn/uts46mapping.rb 100% <ø> (ø)
lib/simpleidn.rb 99.3% <96.55%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4974326...366217d. Read the comment docs.

@pzb
Copy link
Contributor Author

pzb commented Aug 9, 2017

I've updated this to take a runtime dependency on the unf gem on all versions as unf is more than 11x faster than the native String#unicode_normalize method. This also allows support for all Ruby versions back to 1.9.

@pzb
Copy link
Contributor Author

pzb commented Aug 9, 2017

I rebased on current master which seems to have horribly confused codecov.

onli added a commit to portier/sinatra-portier that referenced this pull request Jan 17, 2018
In the future the token will no longer contain ['email']. Normalization is done by the broker now, the simpleidn gem used here however does not always produce the same result. Merging mmriis/simpleidn#13 will fix this.
@mmriis
Copy link
Owner

mmriis commented Jan 24, 2018

I'm sorry this has taken so long. Thanks for the PR.

@mmriis mmriis merged commit 95adf28 into mmriis:master Jan 24, 2018
@mmriis
Copy link
Owner

mmriis commented Jan 24, 2018

0.1.1 pushed to rubygems now.

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