script_detector_2 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +11 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/script_detector_2.rb +9 -5
- data/lib/script_detector_2/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 838e7ab01b6736b5afc135b6a062235a921862b0a580d4fe8c6e8be84fcbe15f
|
4
|
+
data.tar.gz: 2ceb59009e8eb81d2ef635221ffb98b5eaf718eea3c6dd65a3835d5487c343fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5297b4ffcdf61ffa90af98b7243773f9ac8bc20abac8a3879892670f90d524fdbb9e38fb962b250c3f9a3fb8e184b179d9db5c629c9de101014233cc3d399c26
|
7
|
+
data.tar.gz: a1f7fee7616b01f5c1aa8e1f92d0e2dbf7256e7c00d7002236e83dad4a0d25f55c7840eaa1c6c3474a2cdf3d167937eba8ef936818e733e29342a21fb9dfd124
|
data/.rubocop_todo.yml
CHANGED
@@ -1,12 +1,22 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2021-08-
|
3
|
+
# on 2021-08-22 13:16:05 UTC using RuboCop version 1.19.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: IgnoredMethods.
|
11
|
+
Metrics/CyclomaticComplexity:
|
12
|
+
Max: 8
|
13
|
+
|
9
14
|
# Offense count: 1
|
10
15
|
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
11
16
|
Metrics/MethodLength:
|
12
17
|
Max: 14
|
18
|
+
|
19
|
+
# Offense count: 1
|
20
|
+
# Configuration parameters: IgnoredMethods.
|
21
|
+
Metrics/PerceivedComplexity:
|
22
|
+
Max: 10
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/script_detector_2.rb
CHANGED
@@ -64,11 +64,15 @@ module ScriptDetector2
|
|
64
64
|
# @param string [String]
|
65
65
|
# @return [Symbol]
|
66
66
|
def identify_script(string)
|
67
|
-
if japanese?(string)
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
67
|
+
return :Jpan if japanese?(string)
|
68
|
+
return :Kore if korean?(string)
|
69
|
+
|
70
|
+
is_hant = traditional_chinese?(string)
|
71
|
+
is_hans = simplified_chinese?(string)
|
72
|
+
if is_hant && is_hans then :Hani
|
73
|
+
elsif is_hans then :Hans
|
74
|
+
elsif is_hant then :Hant
|
75
|
+
elsif chinese?(string) then :Hani # rubocop:disable Lint/DuplicateBranch
|
72
76
|
else :Zyyy
|
73
77
|
end
|
74
78
|
end
|