uri-idna 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -1
- data/README.md +4 -2
- data/lib/uri/idna/base_processing.rb +2 -2
- data/lib/uri/idna/data/bidi_classes.rb +1 -1
- data/lib/uri/idna/data/codepoint_classes.rb +1 -1
- data/lib/uri/idna/data/joining_types.rb +1 -1
- data/lib/uri/idna/data/leading_combiners.rb +1 -1
- data/lib/uri/idna/data/scripts.rb +1 -1
- data/lib/uri/idna/data/unicode_version.rb +1 -1
- data/lib/uri/idna/data/uts46.rb +1 -1
- data/lib/uri/idna/data/virama_combining_classes.rb +1 -1
- data/lib/uri/idna/uts46/options.rb +4 -0
- data/lib/uri/idna/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0be96c995cea54b44d066d20834e442c4f228ddaeccfb47288c61ebcc35f120
|
4
|
+
data.tar.gz: 366f2c3f1c9e20e9ad5bd65b61a4c8a6bda1612d35f30089858424dcdc2af3a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90bf436ab38aee10300a5d3f0ccc9700884ce7b98f99552cf9092f3b60224e75c79d7fb611e3791bdd9965b74717fef8e1425efcebbee0ee21dff5987bf2201f
|
7
|
+
data.tar.gz: 4e03e4bbf53ae6f2f1349efef8fed20869d2dd3f9b3af1a4e15e826899ed0ea58be2803ab866ce83bdc34198bdba184ef5c27aa19b3b4e3dd2547d3850d6cb8f
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog],
|
6
6
|
and this project adheres to [Semantic Versioning].
|
7
7
|
|
8
|
+
## [Unreleased]
|
9
|
+
|
10
|
+
## [0.3.0] - 2025-05-09
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
- Allow empty labels in UTS46 and WHATWG. ([@skryukov])
|
15
|
+
- Update comment in data-files to mention rake command. ([@skryukov])
|
16
|
+
|
8
17
|
## [0.2.2] - 2023-11-25
|
9
18
|
|
10
19
|
### Changed
|
@@ -41,7 +50,8 @@ and this project adheres to [Semantic Versioning].
|
|
41
50
|
|
42
51
|
[@skryukov]: https://github.com/skryukov
|
43
52
|
|
44
|
-
[Unreleased]: https://github.com/skryukov/uri-idna/compare/v0.
|
53
|
+
[Unreleased]: https://github.com/skryukov/uri-idna/compare/v0.3.0...HEAD
|
54
|
+
[0.3.0]: https://github.com/skryukov/uri-idna/compare/v0.2.2...v0.3.0
|
45
55
|
[0.2.2]: https://github.com/skryukov/uri-idna/compare/v0.2.1...v0.2.2
|
46
56
|
[0.2.1]: https://github.com/skryukov/uri-idna/compare/v0.2.0...v0.2.1
|
47
57
|
[0.2.0]: https://github.com/skryukov/uri-idna/compare/v0.1.0...v0.2.0
|
data/README.md
CHANGED
@@ -155,7 +155,7 @@ char.downcase.ord
|
|
155
155
|
#=> 12068
|
156
156
|
|
157
157
|
# but UTS46 mapping does it's thing:
|
158
|
-
URI::IDNA::UTS46::Mapping.call(char).ord
|
158
|
+
URI::IDNA::UTS46::Mapping.call(char).ord
|
159
159
|
#=> 22823
|
160
160
|
|
161
161
|
# so here is a full example:
|
@@ -203,7 +203,7 @@ URI::IDNA.whatwg_to_ascii("2003_rules.com")
|
|
203
203
|
|
204
204
|
##### Options
|
205
205
|
|
206
|
-
- `be_strict`: `true` -
|
206
|
+
- `be_strict`: `true` - defines value of `use_std3_ascii_rules` UTS46 option.
|
207
207
|
|
208
208
|
```ruby
|
209
209
|
require "uri/idna"
|
@@ -260,6 +260,8 @@ To set directory for generated files, use `DEST_DIR` environment variable, e.g.
|
|
260
260
|
|
261
261
|
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`.
|
262
262
|
|
263
|
+
_Note: `rake idna:generate` might generate different results on different versions of Ruby due to usage of built-in Unicode normalization methods._
|
264
|
+
|
263
265
|
### Inspect Unicode data
|
264
266
|
|
265
267
|
To inspect Unicode data, run `bundle exec rake 'idna:inspect[<HEX_CODE>]'`.
|
@@ -45,7 +45,7 @@ module URI
|
|
45
45
|
labels, trailing_dot = split_domain(domain)
|
46
46
|
|
47
47
|
labels.map! do |label|
|
48
|
-
raise Error, "Empty label" if label.empty?
|
48
|
+
raise Error, "Empty label" if label.empty? && options.verify_dns_length?
|
49
49
|
|
50
50
|
yield label
|
51
51
|
end
|
@@ -62,7 +62,7 @@ module URI
|
|
62
62
|
labels = domain.split(".", -1)
|
63
63
|
trailing_dot = labels[-1] && labels[-1].empty? ? labels.pop : false
|
64
64
|
|
65
|
-
raise Error, "Empty domain" if labels.empty? || labels == [""]
|
65
|
+
raise Error, "Empty domain" if (labels.empty? || labels == [""]) && options.verify_dns_length?
|
66
66
|
|
67
67
|
[labels, trailing_dot]
|
68
68
|
end
|
data/lib/uri/idna/data/uts46.rb
CHANGED
data/lib/uri/idna/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uri-idna
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Svyatoslav Kryukov
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-05-09 00:00:00.000000000 Z
|
12
11
|
dependencies: []
|
13
12
|
description: Internationalized Domain Names in Applications (IDNA)
|
14
13
|
email:
|
@@ -55,7 +54,6 @@ metadata:
|
|
55
54
|
homepage_uri: https://github.com/skryukov/uri-idna
|
56
55
|
source_code_uri: https://github.com/skryukov/uri-idna
|
57
56
|
rubygems_mfa_required: 'true'
|
58
|
-
post_install_message:
|
59
57
|
rdoc_options: []
|
60
58
|
require_paths:
|
61
59
|
- lib
|
@@ -70,8 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
68
|
- !ruby/object:Gem::Version
|
71
69
|
version: '0'
|
72
70
|
requirements: []
|
73
|
-
rubygems_version: 3.
|
74
|
-
signing_key:
|
71
|
+
rubygems_version: 3.6.2
|
75
72
|
specification_version: 4
|
76
73
|
summary: Internationalized Domain Names for Ruby (IDNA2008, UTS46 and WHATWG)
|
77
74
|
test_files: []
|