net-imap 0.4.1 → 0.4.4
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.
Potentially problematic release.
This version of net-imap might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +2 -0
- data/lib/net/imap/errors.rb +20 -0
- data/lib/net/imap/response_data.rb +46 -6
- data/lib/net/imap/response_parser/parser_utils.rb +14 -4
- data/lib/net/imap/response_parser.rb +609 -368
- data/lib/net/imap/sasl/anonymous_authenticator.rb +3 -2
- data/lib/net/imap/sasl/authenticators.rb +2 -2
- data/lib/net/imap/sasl/cram_md5_authenticator.rb +7 -3
- data/lib/net/imap/sasl/digest_md5_authenticator.rb +20 -8
- data/lib/net/imap/sasl/external_authenticator.rb +26 -5
- data/lib/net/imap/sasl/login_authenticator.rb +7 -3
- data/lib/net/imap/sasl/oauthbearer_authenticator.rb +73 -38
- data/lib/net/imap/sasl/plain_authenticator.rb +19 -11
- data/lib/net/imap/sasl/scram_authenticator.rb +19 -10
- data/lib/net/imap/sasl/xoauth2_authenticator.rb +34 -16
- data/lib/net/imap.rb +26 -28
- data/net-imap.gemspec +3 -2
- data/rakelib/benchmarks.rake +98 -0
- metadata +3 -6
- data/benchmarks/generate_parser_benchmarks +0 -52
- data/benchmarks/parser.yml +0 -578
- data/benchmarks/stringprep.yml +0 -65
- data/benchmarks/table-regexps.yml +0 -39
@@ -1,39 +0,0 @@
|
|
1
|
-
prelude: |
|
2
|
-
require "json"
|
3
|
-
require "set"
|
4
|
-
|
5
|
-
all_codepoints = (0..0x10ffff).map{_1.chr("UTF-8") rescue nil}.compact
|
6
|
-
|
7
|
-
rfc3454_tables = Dir["rfcs/rfc3454*.json"]
|
8
|
-
.first
|
9
|
-
.then{File.read _1}
|
10
|
-
.then{JSON.parse _1}
|
11
|
-
titles = rfc3454_tables.delete("titles")
|
12
|
-
|
13
|
-
sets = rfc3454_tables
|
14
|
-
.transform_values{|t|t.keys rescue t}
|
15
|
-
.transform_values{|table|
|
16
|
-
table
|
17
|
-
.map{_1.split(?-).map{|i|Integer i, 16}}
|
18
|
-
.flat_map{_2 ? (_1.._2).to_a : _1}
|
19
|
-
.to_set
|
20
|
-
}
|
21
|
-
|
22
|
-
TABLE_A1_SET = sets.fetch "A.1"
|
23
|
-
ASSIGNED_3_2 = /\p{AGE=3.2}/
|
24
|
-
UNASSIGNED_3_2 = /\P{AGE=3.2}/
|
25
|
-
TABLE_A1_REGEX = /(?-mix:[\u{0000}-\u{001f}\u{007f}-\u{00a0}\u{0340}-\u{0341}\u{06dd}\u{070f}\u{1680}\u{180e}\u{2000}-\u{200f}\u{2028}-\u{202f}\u{205f}-\u{2063}\u{206a}-\u{206f}\u{2ff0}-\u{2ffb}\u{3000}\u{e000}-\u{f8ff}\u{fdd0}-\u{fdef}\u{feff}\u{fff9}-\u{ffff}\u{1d173}-\u{1d17a}\u{1fffe}-\u{1ffff}\u{2fffe}-\u{2ffff}\u{3fffe}-\u{3ffff}\u{4fffe}-\u{4ffff}\u{5fffe}-\u{5ffff}\u{6fffe}-\u{6ffff}\u{7fffe}-\u{7ffff}\u{8fffe}-\u{8ffff}\u{9fffe}-\u{9ffff}\u{afffe}-\u{affff}\u{bfffe}-\u{bffff}\u{cfffe}-\u{cffff}\u{dfffe}-\u{dffff}\u{e0001}\u{e0020}-\u{e007f}\u{efffe}-\u{10ffff}])|(?-mix:\p{Cs})/.freeze
|
26
|
-
|
27
|
-
benchmark:
|
28
|
-
|
29
|
-
# matches A.1
|
30
|
-
- script: "all_codepoints.grep(TABLE_A1_SET)"
|
31
|
-
- script: "all_codepoints.grep(TABLE_A1_REGEX)"
|
32
|
-
- script: "all_codepoints.grep(UNASSIGNED_3_2)"
|
33
|
-
- script: "all_codepoints.grep_v(ASSIGNED_3_2)"
|
34
|
-
|
35
|
-
# doesn't match A.1
|
36
|
-
- script: "all_codepoints.grep_v(TABLE_A1_SET)"
|
37
|
-
- script: "all_codepoints.grep_v(TABLE_A1_REGEX)"
|
38
|
-
- script: "all_codepoints.grep_v(UNASSIGNED_3_2)"
|
39
|
-
- script: "all_codepoints.grep(ASSIGNED_3_2)"
|