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

Update comment in data-files to mention rake command #5

Merged
merged 4 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog],
and this project adheres to [Semantic Versioning].

## [Unreleased]

### Fixed

- Update comment in data-files to mention rake command. ([@skryukov])

## [0.2.2] - 2023-11-25

### Changed
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ To set directory for generated files, use `DEST_DIR` environment variable, e.g.

Unicode data cached in the `tmp` directory by default, to change it, use `CACHE_DIR` environment variable, e.g. `CACHE_DIR=~/.cache/unicode_data bundle exec rake idna:generate`.

_Note: `rake idna:generate` might generate different results on different versions of Ruby due to usage of built-in Unicode normalization methods._

### Inspect Unicode data

To inspect Unicode data, run `bundle exec rake 'idna:inspect[<HEX_CODE>]'`.
Expand Down
2 changes: 1 addition & 1 deletion lib/uri/idna/data/bidi_classes.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This file is automatically generated by bin/generate
# This file is automatically generated by rake idna:generate
# Unicode version 15.1.0

module URI
Expand Down
2 changes: 1 addition & 1 deletion lib/uri/idna/data/codepoint_classes.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This file is automatically generated by bin/generate
# This file is automatically generated by rake idna:generate
# Unicode version 15.1.0

module URI
Expand Down
2 changes: 1 addition & 1 deletion lib/uri/idna/data/joining_types.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This file is automatically generated by bin/generate
# This file is automatically generated by rake idna:generate
# Unicode version 15.1.0

module URI
Expand Down
2 changes: 1 addition & 1 deletion lib/uri/idna/data/leading_combiners.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This file is automatically generated by bin/generate
# This file is automatically generated by rake idna:generate
# Unicode version 15.1.0

module URI
Expand Down
2 changes: 1 addition & 1 deletion lib/uri/idna/data/scripts.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This file is automatically generated by bin/generate
# This file is automatically generated by rake idna:generate
# Unicode version 15.1.0

module URI
Expand Down
2 changes: 1 addition & 1 deletion lib/uri/idna/data/unicode_version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This file is automatically generated by bin/generate
# This file is automatically generated by rake idna:generate
# Unicode version 15.1.0

module URI
Expand Down
2 changes: 1 addition & 1 deletion lib/uri/idna/data/uts46.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This file is automatically generated by bin/generate
# This file is automatically generated by rake idna:generate
# Unicode version 15.1.0

module URI
Expand Down
2 changes: 1 addition & 1 deletion lib/uri/idna/data/virama_combining_classes.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This file is automatically generated by bin/generate
# This file is automatically generated by rake idna:generate
# Unicode version 15.1.0

module URI
Expand Down
3 changes: 2 additions & 1 deletion tasks/idna_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class IDNAGenerator < BaseGenerator
def data
@data ||= { bidi_classes: {}, codepoint_classes: {}, combiners: [], virama_combining_classes: [] }.tap do |hash|
ucdata.codepoints do |cp|
next unless [cp.value].pack("U").valid_encoding?
# skip UTF-16 surrogates
next if cp.value >= 0xd800 && cp.value <= 0xdfff

bidi_class = BIDI_MAPPING[cp.bidi_class] || "UNUSED"
hash[:bidi_classes][bidi_class] ||= []
Expand Down
2 changes: 1 addition & 1 deletion tasks/templates/bidi_classes.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This file is automatically generated by bin/generate
# This file is automatically generated by rake idna:generate
# Unicode version <%= ucdata.version %>

module URI
Expand Down
2 changes: 1 addition & 1 deletion tasks/templates/codepoint_classes.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This file is automatically generated by bin/generate
# This file is automatically generated by rake idna:generate
# Unicode version <%= ucdata.version %>

module URI
Expand Down
2 changes: 1 addition & 1 deletion tasks/templates/joining_types.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This file is automatically generated by bin/generate
# This file is automatically generated by rake idna:generate
# Unicode version <%= ucdata.version %>

module URI
Expand Down
2 changes: 1 addition & 1 deletion tasks/templates/leading_combiners.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This file is automatically generated by bin/generate
# This file is automatically generated by rake idna:generate
# Unicode version <%= ucdata.version %>

module URI
Expand Down
2 changes: 1 addition & 1 deletion tasks/templates/scripts.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This file is automatically generated by bin/generate
# This file is automatically generated by rake idna:generate
# Unicode version <%= ucdata.version %>

module URI
Expand Down
2 changes: 1 addition & 1 deletion tasks/templates/unicode_version.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This file is automatically generated by bin/generate
# This file is automatically generated by rake idna:generate
# Unicode version <%= ucdata.version %>

module URI
Expand Down
2 changes: 1 addition & 1 deletion tasks/templates/uts46.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This file is automatically generated by bin/generate
# This file is automatically generated by rake idna:generate
# Unicode version <%= ucdata.version %>

module URI
Expand Down
2 changes: 1 addition & 1 deletion tasks/templates/virama_combining_classes.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This file is automatically generated by bin/generate
# This file is automatically generated by rake idna:generate
# Unicode version <%= ucdata.version %>

module URI
Expand Down