uri-idna 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../data/leading_combiners"
4
+
5
+ module URI
6
+ module IDNA
7
+ module Validation
8
+ # 4.2.3.2. Leading Combining Marks
9
+ # https://datatracker.ietf.org/doc/html/rfc5891#section-4.2.3.2
10
+ module LeadingCombining
11
+ class << self
12
+ LEADING_COMBINERS_REGEX = Regexp.new(LEADING_COMBINERS).freeze
13
+
14
+ def call(label)
15
+ return unless label[0].match?(LEADING_COMBINERS_REGEX)
16
+
17
+ raise Error, "Label begins with an illegal combining character"
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module URI
4
4
  module IDNA
5
- VERSION = "0.2.1"
5
+ VERSION = "0.2.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uri-idna
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svyatoslav Kryukov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-15 00:00:00.000000000 Z
11
+ date: 2023-11-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Internationalized Domain Names in Applications (IDNA)
14
14
  email:
15
- - s.g.kryukov@yandex.ru
15
+ - me@skryukov.dev
16
16
  executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
@@ -23,18 +23,26 @@ files:
23
23
  - lib/uri-idna.rb
24
24
  - lib/uri/idna.rb
25
25
  - lib/uri/idna/base_processing.rb
26
- - lib/uri/idna/data/idna.rb
26
+ - lib/uri/idna/data/bidi_classes.rb
27
+ - lib/uri/idna/data/codepoint_classes.rb
28
+ - lib/uri/idna/data/joining_types.rb
29
+ - lib/uri/idna/data/leading_combiners.rb
30
+ - lib/uri/idna/data/scripts.rb
31
+ - lib/uri/idna/data/unicode_version.rb
27
32
  - lib/uri/idna/data/uts46.rb
33
+ - lib/uri/idna/data/virama_combining_classes.rb
28
34
  - lib/uri/idna/idna2008/options.rb
29
35
  - lib/uri/idna/idna2008/processing.rb
30
- - lib/uri/idna/intranges.rb
31
36
  - lib/uri/idna/punycode.rb
32
37
  - lib/uri/idna/uts46/mapping.rb
33
38
  - lib/uri/idna/uts46/options.rb
34
39
  - lib/uri/idna/uts46/processing.rb
35
40
  - lib/uri/idna/validation/bidi.rb
36
- - lib/uri/idna/validation/codepoint.rb
41
+ - lib/uri/idna/validation/contextj.rb
42
+ - lib/uri/idna/validation/contexto.rb
43
+ - lib/uri/idna/validation/idna_permitted.rb
37
44
  - lib/uri/idna/validation/label.rb
45
+ - lib/uri/idna/validation/leading_combining.rb
38
46
  - lib/uri/idna/version.rb
39
47
  - lib/uri/idna/whatwg/processing.rb
40
48
  homepage: https://github.com/skryukov/uri-idna
@@ -65,5 +73,5 @@ requirements: []
65
73
  rubygems_version: 3.3.7
66
74
  signing_key:
67
75
  specification_version: 4
68
- summary: 'Internationalized Domain Names for Ruby (IDNA 2008 and UTS #46)'
76
+ summary: Internationalized Domain Names for Ruby (IDNA2008, UTS46 and WHATWG)
69
77
  test_files: []