eiwa 0.1.2 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2da2b15cfd1217fc66c9cb8a33bfba25c04661b8da5566b25141b0c1817c014b
4
- data.tar.gz: 2d9e4b4d9628e2a1d65c513662428947121309e7e383b922638633913fef0da9
3
+ metadata.gz: 9ffd9fbaca6f1c1217db4749eb9561e251906647dc28bf6ddb3fb964cfe2049b
4
+ data.tar.gz: f3e71e3dc6203a90de235644f7c8d7f6bf9e47f648186f4031ed43d7e401107c
5
5
  SHA512:
6
- metadata.gz: 7434fdf07b21cd01088eae89b024c77e1ffc99d7377186ad833b4ff6ca68eac25123cc0b2139a01101acae4a367ad40daa4700770d5de2ed13eedf55ca873483
7
- data.tar.gz: df9dc920677758fc3d9186205d3a623205c2ab481030e9a2966fe33a5113d14774f46ff31d3e0e72f28c909e6a9942742bd7fd6ba0f4298794a35e98f558da92
6
+ metadata.gz: bfda1b2ba7c5b970960c5b9ac90e48502e41b0db4c9ec14197ccc39a0c68bebabcfacc80340b84b1dfe9bbcf015c3cd41c50d06804ff9ce43bfbb75029f8425b
7
+ data.tar.gz: 7c0220401a9314f73bb01f0546c32848e5e1352237f9791ca3068d0eb1c9b6d55680ba86915bf5c824b2dc1686161380c56939efcb9efbb8a7ae913fd6ba813a
data/.standard.yml CHANGED
@@ -1 +1 @@
1
- ruby_version: 3.0
1
+ ruby_version: 3.2
data/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # 0.2.1
2
+
3
+ * Require Nokogiri 1.19.4 or newer to incorporate current security fixes
4
+ * Require Ruby 3.2 or newer, matching Nokogiri's supported Ruby versions
5
+ * Support Ruby's future frozen string literal default
6
+
7
+ # 0.2.0
8
+
9
+ * Upgrade nokogiri and improve entity decoding - [@flavorjones](https://github.com/flavorjones) [#11](https://github.com/searls/eiwa/pull/11)
10
+
11
+ # 0.1.2
12
+
13
+ The time before this had a changelog.
data/Gemfile.lock CHANGED
@@ -1,64 +1,72 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eiwa (0.1.2)
5
- nokogiri (= 1.14.5)
4
+ eiwa (0.2.1)
5
+ nokogiri (>= 1.19.4, < 2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  ast (2.4.2)
11
- json (2.7.1)
11
+ json (2.21.1)
12
12
  language_server-protocol (3.17.0.3)
13
13
  lint_roller (1.1.0)
14
14
  m (1.6.2)
15
15
  method_source (>= 0.6.7)
16
16
  rake (>= 0.9.2.2)
17
- method_source (1.0.0)
18
- mini_portile2 (2.8.5)
19
- minitest (5.22.2)
20
- nokogiri (1.14.5)
21
- mini_portile2 (~> 2.8.0)
17
+ method_source (1.1.0)
18
+ mini_portile2 (2.8.9)
19
+ minitest (5.25.4)
20
+ nokogiri (1.19.4)
21
+ mini_portile2 (~> 2.8.2)
22
22
  racc (~> 1.4)
23
- parallel (1.24.0)
24
- parser (3.3.0.5)
23
+ nokogiri (1.19.4-aarch64-linux-gnu)
24
+ racc (~> 1.4)
25
+ nokogiri (1.19.4-arm-linux-gnu)
26
+ racc (~> 1.4)
27
+ nokogiri (1.19.4-arm64-darwin)
28
+ racc (~> 1.4)
29
+ nokogiri (1.19.4-x86_64-darwin)
30
+ racc (~> 1.4)
31
+ nokogiri (1.19.4-x86_64-linux-gnu)
32
+ racc (~> 1.4)
33
+ parallel (1.26.3)
34
+ parser (3.3.6.0)
25
35
  ast (~> 2.4.1)
26
36
  racc
27
- racc (1.7.3)
37
+ racc (1.8.1)
28
38
  rainbow (3.1.1)
29
- rake (13.1.0)
30
- regexp_parser (2.9.0)
31
- rexml (3.2.6)
32
- rubocop (1.62.1)
39
+ rake (13.2.1)
40
+ regexp_parser (2.9.3)
41
+ rubocop (1.68.0)
33
42
  json (~> 2.3)
34
43
  language_server-protocol (>= 3.17.0)
35
44
  parallel (~> 1.10)
36
45
  parser (>= 3.3.0.2)
37
46
  rainbow (>= 2.2.2, < 4.0)
38
- regexp_parser (>= 1.8, < 3.0)
39
- rexml (>= 3.2.5, < 4.0)
40
- rubocop-ast (>= 1.31.1, < 2.0)
47
+ regexp_parser (>= 2.4, < 3.0)
48
+ rubocop-ast (>= 1.32.2, < 2.0)
41
49
  ruby-progressbar (~> 1.7)
42
50
  unicode-display_width (>= 2.4.0, < 3.0)
43
- rubocop-ast (1.31.2)
44
- parser (>= 3.3.0.4)
45
- rubocop-performance (1.20.2)
51
+ rubocop-ast (1.36.2)
52
+ parser (>= 3.3.1.0)
53
+ rubocop-performance (1.22.1)
46
54
  rubocop (>= 1.48.1, < 2.0)
47
- rubocop-ast (>= 1.30.0, < 2.0)
55
+ rubocop-ast (>= 1.31.1, < 2.0)
48
56
  ruby-progressbar (1.13.0)
49
- standard (1.34.0)
57
+ standard (1.42.1)
50
58
  language_server-protocol (~> 3.17.0.2)
51
59
  lint_roller (~> 1.0)
52
- rubocop (~> 1.60)
60
+ rubocop (~> 1.68.0)
53
61
  standard-custom (~> 1.0.0)
54
- standard-performance (~> 1.3)
62
+ standard-performance (~> 1.5)
55
63
  standard-custom (1.0.2)
56
64
  lint_roller (~> 1.0)
57
65
  rubocop (~> 1.50)
58
- standard-performance (1.3.1)
66
+ standard-performance (1.5.0)
59
67
  lint_roller (~> 1.1)
60
- rubocop-performance (~> 1.20.2)
61
- unicode-display_width (2.5.0)
68
+ rubocop-performance (~> 1.22.0)
69
+ unicode-display_width (2.6.0)
62
70
 
63
71
  PLATFORMS
64
72
  aarch64-linux
@@ -76,4 +84,4 @@ DEPENDENCIES
76
84
  standard
77
85
 
78
86
  BUNDLED WITH
79
- 2.5.4
87
+ 2.5.23
data/eiwa.gemspec CHANGED
@@ -11,6 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = "Parses the JMDict Japanese-English dictionary"
12
12
  spec.homepage = "https://github.com/searls/eiwa"
13
13
  spec.license = "MIT"
14
+ spec.required_ruby_version = ">= 3.2"
14
15
 
15
16
  spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
16
17
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|tmp)/}) }
@@ -19,5 +20,5 @@ Gem::Specification.new do |spec|
19
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
21
  spec.require_paths = ["lib"]
21
22
 
22
- spec.add_dependency "nokogiri", "1.14.5"
23
+ spec.add_dependency "nokogiri", ">= 1.19.4", "< 2"
23
24
  end
@@ -53,6 +53,10 @@ module Eiwa
53
53
  @current.add_characters(s)
54
54
  end
55
55
 
56
+ def reference(name, content)
57
+ @current.set_entity(name, content)
58
+ end
59
+
56
60
  # def comment string
57
61
  # puts "comment #{string}"
58
62
  # end
@@ -62,15 +66,7 @@ module Eiwa
62
66
  # end
63
67
 
64
68
  def error(msg)
65
- if (matches = msg.match(/Entity '(\S+)' not defined/))
66
- # See: http://github.com/sparklemotion/nokogiri/issues/1926
67
- code = matches[1]
68
- @current.set_entity(code, ENTITIES[code])
69
- elsif msg == "Detected an entity reference loop\n"
70
- # Do nothing and hope this does not matter.
71
- else
72
- raise Eiwa::Error.new("Parsing error: #{msg}")
73
- end
69
+ raise Eiwa::Error.new("Parsing error: #{msg}")
74
70
  end
75
71
 
76
72
  # def cdata_block string
@@ -13,7 +13,7 @@ module Eiwa
13
13
  "adj-ku" => "`ku' adjective (archaic)",
14
14
  "adj-na" => "adjectival nouns or quasi-adjectives (keiyodoshi)",
15
15
  "adj-nari" => "archaic/formal form of na-adjective",
16
- "adj-no" => "nouns which may take the genitive case particle `no'",
16
+ "adj-no" => "nouns which may take the genitive case particle 'no'",
17
17
  "adj-pn" => "pre-noun adjectival (rentaishi)",
18
18
  "adj-shiku" => "`shiku' adjective (archaic)",
19
19
  "adj-t" => "`taru' adjective",
@@ -34,7 +34,7 @@ module Eiwa
34
34
  "chem" => "chemistry term",
35
35
  "chn" => "children's language",
36
36
  "col" => "colloquialism",
37
- "comp" => "computer terminology",
37
+ "comp" => "computing",
38
38
  "conj" => "conjunction",
39
39
  "cop" => "copula",
40
40
  "cop-da" => "copula",
@@ -101,6 +101,7 @@ module Eiwa
101
101
  "quote" => "quotation",
102
102
  "rare" => "rare",
103
103
  "rkb" => "Ryuukyuu-ben",
104
+ "rK" => "rarely used kanji form",
104
105
  "sens" => "sensitive",
105
106
  "shogi" => "shogi term",
106
107
  "sl" => "slang",
data/lib/eiwa/tag/any.rb CHANGED
@@ -10,7 +10,7 @@ module Eiwa
10
10
  end
11
11
 
12
12
  def add_characters(s)
13
- @characters ||= ""
13
+ @characters ||= +""
14
14
  @characters << s.chomp
15
15
  end
16
16
 
data/lib/eiwa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eiwa
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,30 +1,34 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eiwa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-03-12 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: nokogiri
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - '='
16
+ - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: 1.14.5
18
+ version: 1.19.4
19
+ - - "<"
20
+ - !ruby/object:Gem::Version
21
+ version: '2'
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
23
25
  requirements:
24
- - - '='
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: 1.19.4
29
+ - - "<"
25
30
  - !ruby/object:Gem::Version
26
- version: 1.14.5
27
- description:
31
+ version: '2'
28
32
  email:
29
33
  - searls@gmail.com
30
34
  executables: []
@@ -34,6 +38,7 @@ files:
34
38
  - ".github/workflows/ruby.yml"
35
39
  - ".gitignore"
36
40
  - ".standard.yml"
41
+ - CHANGELOG.md
37
42
  - Gemfile
38
43
  - Gemfile.lock
39
44
  - LICENSE.txt
@@ -69,7 +74,6 @@ homepage: https://github.com/searls/eiwa
69
74
  licenses:
70
75
  - MIT
71
76
  metadata: {}
72
- post_install_message:
73
77
  rdoc_options: []
74
78
  require_paths:
75
79
  - lib
@@ -77,15 +81,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
77
81
  requirements:
78
82
  - - ">="
79
83
  - !ruby/object:Gem::Version
80
- version: '0'
84
+ version: '3.2'
81
85
  required_rubygems_version: !ruby/object:Gem::Requirement
82
86
  requirements:
83
87
  - - ">="
84
88
  - !ruby/object:Gem::Version
85
89
  version: '0'
86
90
  requirements: []
87
- rubygems_version: 3.5.4
88
- signing_key:
91
+ rubygems_version: 3.6.9
89
92
  specification_version: 4
90
93
  summary: Parses the JMDict Japanese-English dictionary
91
94
  test_files: []