meteor 0.9.9.0 → 0.9.11

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: 44f0769bd5122d05e1fa025620a663590e01682ed91f0df6a97ee16179991345
4
- data.tar.gz: 76a7e658e3102717c1bc6447378a914c85ad82c96d091bd37506b622f1877e92
3
+ metadata.gz: 746d2cf123fdfe0e16e35b98d0db6d93a589c6969e368deb3c1fa5d1f6e6f531
4
+ data.tar.gz: 650b5091644a51df83332dbaf7f12f3566a831d31eb782dabd251e5b605ed7e2
5
5
  SHA512:
6
- metadata.gz: 93acc94e943e01b72f093bdc89ec4cb30e4b66f4f60cf892884aafaf1de3c5a8276e3aa04b062623c1223e814431e6e21971eec512d1a6fc8a2dc0236626a593
7
- data.tar.gz: d7930e3a667e9a6fd9f8edbaaca0d59498113c31d2a58682fc428e4f715b041825aeb9238cb0b9ab4f32a97736f42283209b3bdcd98fe839d855c2fc620e23a4
6
+ metadata.gz: a0ee75c46b58f1d369b7accbd40bbc3019d93946cf27baf9b5d6df4dc16e721db0c028720b57dec879d73eed009233c80108b5e2744d56f5bd9eca56b94b93a5
7
+ data.tar.gz: d7be7688ccdf930853534596d04e0a8617d703f17a1b1fd4ea7910eab73d080b07f3ca40dca2b1433a42317a03bbdd41435b3903ef6ac8e3b812738ee94da4a5
data/README.md CHANGED
@@ -1,18 +1,21 @@
1
1
 
2
- Meteor
2
+ # Meteor
3
+
3
4
  ==================
4
5
  A lightweight HTML & XML Parser
5
6
 
6
7
  ```shell
7
8
  gem install meteor #gem installation
8
9
  ```
10
+
9
11
  ```shell
10
- #archive installation
12
+ # archive installation
11
13
  gem build meteor.gemspec
12
14
  gem install meteor-*.gem
13
15
  ```
14
16
 
15
17
  ## Explanation
18
+
16
19
  This libarary is lightweight HTML parser.
17
20
  This can use as XML parser.
18
21
  This may be false parser.
@@ -39,19 +42,23 @@ DOMのように全体をオブジェクトのツリー構造に変換するの
39
42
  必要は全くありません。)
40
43
 
41
44
  ## API
45
+
42
46
  http://rubydoc.info/github/asip/meteor/frames
43
47
 
44
48
  ## Gem
49
+
45
50
  https://rubygems.org/gems/meteor
46
51
 
47
52
  ## Examples
53
+
48
54
  https://github.com/asip/meteor/tree/master/demo
49
55
 
50
56
  ## License
57
+
51
58
  Licensed under the LGPL V2.1.
52
59
 
53
60
  ## Author
54
61
  Yasumasa Ashida (ys.ashida@gmail.com)
55
62
 
56
63
  ## Copyright
57
- (c) 2008-2021 Yasumasa Ashida
64
+ (c) 2008-2023 Yasumasa Ashida
@@ -4,14 +4,14 @@
4
4
  #require 'rubygems'
5
5
  require 'meteor'
6
6
 
7
- Meteor::ElementFactory.link(:html5,"ml/sample_5.html", 'UTF-8')
8
- root = Meteor::ElementFactory.element('/ml/sample_5')
7
+ Meteor::ElementFactory.link(:html,"ml/sample_html.html", 'UTF-8')
8
+ root = Meteor::ElementFactory.element('/ml/sample_html')
9
9
 
10
10
  start_time = Time.new.to_f
11
11
 
12
12
  elm_hello = root.element(id: 'hello')
13
- elm_hello['color'] = 'red' #elm_hello.attr(color: 'red')
14
- #elm_hello['color'] = nil #elm_hello.remove_attr('color')
13
+ elm_hello['class'] = 'red' #elm_hello.attr(class: 'red')
14
+ #elm_hello['class'] = nil #elm_hello.remove_attr('class')
15
15
 
16
16
  elm_hello2 = root.element(id: 'hello2')
17
17
  elm_hello2.content = 'Hello,Tester' #elm_hello2.content('Hello,Tester')
@@ -6,15 +6,15 @@ require 'meteor'
6
6
 
7
7
  #Meteor::ElementFactory.link(:html4,'ml/sample_4.html', 'UTF-8')
8
8
  Meteor::ElementFactory.options= {type: :html4}
9
- Meteor::ElementFactory.link('ml/sample_4.html')
9
+ Meteor::ElementFactory.link('ml/sample_html4.html')
10
10
 
11
- root = Meteor::ElementFactory.element('/ml/sample_4')
11
+ root = Meteor::ElementFactory.element('/ml/sample_html4')
12
12
 
13
13
  start_time = Time.new.to_f
14
14
 
15
15
  elm_hello = root.element(id: 'hello')
16
- elm_hello['color'] = 'red' #elm_hello.attr(color: 'red')
17
- #elm_hello['color'] = nil #elm_hello.remove_attr('color')
16
+ elm_hello['class'] = 'red' #elm_hello.attr(class: 'red')
17
+ #elm_hello['class'] = nil #elm_hello.remove_attr('class')
18
18
 
19
19
  elm_hello2 = root.element(id: 'hello2')
20
20
  elm_hello2.content = 'Hello,Tester' #elm_hello2.content('Hello,Tester')
@@ -0,0 +1,32 @@
1
+ <html lang="ja">
2
+ <head>
3
+ <title>HTMLテスト</title>
4
+ <meta http-equiv="Content-Type" charset="utf-8" content="text/html; charset=UTF-8">
5
+ </head>
6
+
7
+ <body>
8
+ <div id="hello" class="black">Hello,World</div>
9
+ <div id="hello2">Hello,World</div>
10
+ <!-- @quark id="hello3" -->Hello,World<!-- /@quark -->
11
+ <form>
12
+ <input id="text1" name="text1" type="text">
13
+
14
+ <input id="radio1" type="radio">
15
+
16
+ <select name="select1">
17
+ <option id="option1">オプション</option>
18
+ </select>
19
+
20
+ <select id="select2">
21
+ <option id="option2">オプション</option>
22
+ </select>
23
+ </form>
24
+
25
+ <table>
26
+ <tr id="loop">
27
+ <td id="aa"></td><td id="bb"></td><td id="cc"></td>
28
+ </tr>
29
+ </table>
30
+
31
+ </body>
32
+ </html>
@@ -0,0 +1,40 @@
1
+ <html lang="ja">
2
+ <head>
3
+ <title>HTMLテスト</title>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
+ </head>
6
+
7
+ <body>
8
+ <div id="hello" class="black">Hello,World</div>
9
+ <div id="hello2">Hello,World</div>
10
+ <!-- @quark id="hello3" -->Hello,World<!-- /@quark -->
11
+ <form>
12
+ <input id="text1" type="text" >
13
+
14
+ <input id="radio1" type="radio" class="test">
15
+
16
+ <select id="select1">
17
+ <option id="option1">オプション</option>
18
+ </select>
19
+
20
+ <select id="select2">
21
+ <option id="option2">オプション</option>
22
+ </select>
23
+ </form>
24
+
25
+ <table>
26
+ <tr id="loop">
27
+ <td id="aa"></td><td id="bb"></td><td id="cc"></td>
28
+ </tr>
29
+ </table>
30
+
31
+ <div id="sample" style="background-color: aliceblue;" >
32
+ <div>test</div>
33
+ </div>
34
+
35
+ <div id="sample2" style="background-color: aliceblue;" class="test">
36
+ <div>test</div>
37
+ </div>
38
+
39
+ </body>
40
+ </html>
@@ -1,13 +1,13 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <html>
2
+ <html lang="ja">
3
3
  <head>
4
4
  <title>HTMLテスト</title>
5
5
  <meta http-equiv="Content-Type" charset="utf-8" content="text/html; charset=UTF-8"/>
6
6
  </head>
7
7
 
8
- <body bgcolor="#FFFFFF" text="#000000">
9
- <font id="hello" color="#000000">Hello,World</font>
10
- <font id="hello2">Hello,World</font>
8
+ <body>
9
+ <div id="hello" class="black">Hello,World</div>
10
+ <div id="hello2">Hello,World</div>
11
11
  <!-- @quark id="hello3" -->Hello,World<!-- /@quark -->
12
12
  <form>
13
13
  <input id="text1" type="text" />
@@ -15,19 +15,19 @@
15
15
  <input id="radio1" type="radio" />
16
16
 
17
17
  <select>
18
- <option id="option1">オプション</option>
18
+ <option id="option1">オプション</option>
19
19
  </select>
20
20
 
21
21
  <select id="select2">
22
- <option id="option2">オプション</option>
22
+ <option id="option2">オプション</option>
23
23
  </select>
24
24
  </form>
25
25
 
26
26
  <table>
27
- <tr id="loop">
28
- <td id="aa"></td><td id="bb"></td><td id="cc"></td>
29
- </tr>
27
+ <tr id="loop">
28
+ <td id="aa"></td><td id="bb"></td><td id="cc"></td>
29
+ </tr>
30
30
  </table>
31
31
 
32
32
  </body>
33
- </html>
33
+ </html>
@@ -1,13 +1,13 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <html>
2
+ <html lang="ja">
3
3
  <head>
4
4
  <title>HTMLテスト</title>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
6
6
  </head>
7
7
 
8
- <body bgcolor="#FFFFFF" text="#000000">
9
- <font id="hello" color="#000000">Hello,World</font>
10
- <font id="hello2">Hello,World</font>
8
+ <body>
9
+ <div id="hello" class="black">Hello,World</div>
10
+ <div id="hello2">Hello,World</div>
11
11
  <!-- @quark id="hello3" -->Hello,World<!-- /@quark -->
12
12
  <form>
13
13
  <input id="text1" type="text" />
@@ -15,19 +15,19 @@
15
15
  <input id="radio1" type="radio" />
16
16
 
17
17
  <select>
18
- <option id="option1">オプション</option>
18
+ <option id="option1">オプション</option>
19
19
  </select>
20
20
 
21
21
  <select id="select2">
22
- <option id="option2">オプション</option>
22
+ <option id="option2">オプション</option>
23
23
  </select>
24
24
  </form>
25
25
 
26
26
  <table>
27
- <tr id="loop">
28
- <td id="aa"></td><td id="bb"></td><td id="cc"></td>
29
- </tr>
27
+ <tr id="loop">
28
+ <td id="aa"></td><td id="bb"></td><td id="cc"></td>
29
+ </tr>
30
30
  </table>
31
31
 
32
32
  </body>
33
- </html>
33
+ </html>
@@ -4,15 +4,15 @@
4
4
  #require 'rubygems'
5
5
  require 'meteor'
6
6
 
7
- Meteor::ElementFactory.link(:xhtml5,'ml/sample_x5.html', 'UTF-8')
8
- root = Meteor::ElementFactory.element('/ml/sample_x5')
7
+ Meteor::ElementFactory.link(:xhtml,'ml/sample_xhtml.html', 'UTF-8')
8
+ root = Meteor::ElementFactory.element('/ml/sample_xhtml')
9
9
 
10
10
  startTime = Time.new.to_f
11
11
 
12
12
  elm_hello = root.element(id: 'hello')
13
- elm_hello['color'] = 'red' #elm_hello.attr(color: "red")
14
- #elm_hello['color'] = nil #elm_hello.remove_attr('color')
15
- #elm_hello.attr(color: nil)
13
+ elm_hello['class'] = 'red' #elm_hello.attr(class: "red")
14
+ #elm_hello['class'] = nil #elm_hello.remove_attr('class')
15
+ #elm_hello.attr(class: nil)
16
16
 
17
17
  elm_hello2 = root.element(id: 'hello2')
18
18
  elm_hello2.content = "Hello,Tester" #elm_hello2.content("Hello,Tester")
@@ -4,14 +4,14 @@
4
4
  #require 'rubygems'
5
5
  require 'meteor'
6
6
 
7
- Meteor::ElementFactory.link(:xhtml4,'ml/sample_x4.html', 'UTF-8')
8
- root = Meteor::ElementFactory.element('/ml/sample_x4')
7
+ Meteor::ElementFactory.link(:xhtml4,'ml/sample_xhtml4.html', 'UTF-8')
8
+ root = Meteor::ElementFactory.element('/ml/sample_xhtml4')
9
9
 
10
10
  startTime = Time.new.to_f
11
11
 
12
12
  elm_hello = root.element("id","hello")
13
- elm_hello['color'] = 'red' #elm_hello.attr(color: "red")
14
- #elm_hello['color'] = nil #elm_hello.remove_attr('color')
13
+ elm_hello['class'] = 'red' #elm_hello.attr(class: "red")
14
+ #elm_hello['class'] = nil #elm_hello.remove_attr('class')
15
15
 
16
16
  elm_hello2 = root.element(id: "hello2")
17
17
  elm_hello2.content = "Hello,Tester" #elm_hello2.content("Hello,Tester")
data/lib/meteor.rb CHANGED
@@ -23,7 +23,7 @@
23
23
 
24
24
  module Meteor
25
25
 
26
- VERSION = '0.9.9.0'.freeze
26
+ VERSION = '0.9.11'.freeze
27
27
 
28
28
  #require 'fileutils'
29
29
 
@@ -37,11 +37,10 @@ module Meteor
37
37
  SEVEN = 7
38
38
 
39
39
  HTML = ZERO
40
- HTML5 = ONE
41
- XHTML5 = TWO
42
- HTML4 = THREE
43
- XHTML4 = FOUR
44
- XML = FIVE
40
+ XHTML = ONE
41
+ HTML4 = TWO
42
+ XHTML4 = THREE
43
+ XML = FOUR
45
44
 
46
45
  #
47
46
  # Element Class (要素クラス)
@@ -242,7 +241,7 @@ module Meteor
242
241
  if @document_sync
243
242
  @document_sync = false
244
243
  case @parser.doc_type
245
- when Parser::HTML, Parser::HTML5, Parser::HTML4
244
+ when Parser::HTML, Parser::HTML4
246
245
  if @cx
247
246
  #@pattern_cc = '' << SET_CX_1 << elm.name << SPACE << elm.attributes << SET_CX_2 << elm.mixed_content << SET_CX_3 << elm.name << SET_CX_4
248
247
  @document = "<!-- @#{@name} #{@attributes} -->#{@mixed_content}<!-- /@#{@name} -->"
@@ -255,7 +254,7 @@ module Meteor
255
254
  #@document = "<#{@name}#{@attributes}>"
256
255
  end
257
256
  end
258
- when Parser::XHTML4, Parser::XHTML5, Parser::XML
257
+ when Parser::XHTML, Parser::XHTML4, Parser::XML
259
258
  if @cx
260
259
  #@pattern_cc = '' << SET_CX_1 << elm.name << SPACE << elm.attributes << SET_CX_2 << elm.mixed_content << SET_CX_3 << elm.name << SET_CX_4
261
260
  @document = "<!-- @#{@name} #{@attributes} -->#{@mixed_content}<!-- /@#{@name} -->"
@@ -777,11 +776,10 @@ module Meteor
777
776
  #
778
777
  class Parser
779
778
  HTML = ZERO
780
- HTML5 = ONE
781
- XHTML5 = TWO
782
- HTML4 = THREE
783
- XHTML4 = FOUR
784
- XML = FIVE
779
+ XHTML = ONE
780
+ HTML4 = TWO
781
+ XHTML4 = THREE
782
+ XML = FOUR
785
783
  end
786
784
 
787
785
  #
@@ -1013,14 +1011,14 @@ module Meteor
1013
1011
  xhtml4 = Meteor::Ml::Xhtml4::ParserImpl.new
1014
1012
  xhtml4.read(File.expand_path(relative_path, @root), enc)
1015
1013
  @cache[relative_url] = xhtml4
1016
- when Parser::HTML, :html, Parser::HTML5, :html5
1017
- html5 = Meteor::Ml::Html5::ParserImpl.new
1018
- html5.read(File.expand_path(relative_path, @root), enc)
1019
- @cache[relative_url] = html5
1020
- when Parser::XHTML5, :xhtml5
1021
- xhtml5 = Meteor::Ml::Xhtml5::ParserImpl.new
1022
- xhtml5.read(File.expand_path(relative_path, @root), enc)
1023
- @cache[relative_url] = xhtml5
1014
+ when Parser::HTML, :html, :html5
1015
+ html = Meteor::Ml::Html::ParserImpl.new
1016
+ html.read(File.expand_path(relative_path, @root), enc)
1017
+ @cache[relative_url] = html
1018
+ when Parser::XHTML, :xhtml, :xhtml5
1019
+ xhtml = Meteor::Ml::Xhtml::ParserImpl.new
1020
+ xhtml.read(File.expand_path(relative_path, @root), enc)
1021
+ @cache[relative_url] = xhtml
1024
1022
  when Parser::XML, :xml
1025
1023
  xml = Meteor::Ml::Xml::ParserImpl.new
1026
1024
  xml.read(File.expand_path(relative_path, @root), enc)
@@ -1043,12 +1041,12 @@ module Meteor
1043
1041
  case type
1044
1042
  when Parser::HTML4, :html4
1045
1043
  ps = Meteor::Ml::Html4::ParserImpl.new
1046
- when Parser::XHTML, :xhtml
1044
+ when Parser::XHTML4, :xhtml4
1047
1045
  ps = Meteor::Ml::Xhtml4::ParserImpl.new
1048
- when Parser::HTML, :html, Parser::HTML5, :html5
1049
- ps = Meteor::Ml::Html5::ParserImpl.new
1050
- when Parser::XHTML5, :xhtml5
1051
- ps = Meteor::Ml::Xhtml5::ParserImpl.new
1046
+ when Parser::HTML, :html, :html5
1047
+ ps = Meteor::Ml::Html::ParserImpl.new
1048
+ when Parser::XHTML, :xhtml, :xhtml5
1049
+ ps = Meteor::Ml::Xhtml::ParserImpl.new
1052
1050
  when Parser::XML, :xml
1053
1051
  ps = Meteor::Ml::Xml::ParserImpl.new
1054
1052
  end
@@ -1073,12 +1071,12 @@ module Meteor
1073
1071
  case @type
1074
1072
  when Parser::HTML4, :html4
1075
1073
  ps = Meteor::Ml::Html4::ParserImpl.new
1076
- when Parser::XHTML, :xhtml
1074
+ when Parser::XHTML4, :xhtml4
1077
1075
  ps = Meteor::Ml::Xhtml4::ParserImpl.new
1078
- when Parser::HTML, :html, Parser::HTML5, :html5
1079
- ps = Meteor::Ml::Html5::ParserImpl.new
1080
- when Parser::XHTML5, :xhtml5
1081
- ps = Meteor::Ml::Xhtml5::ParserImpl.new
1076
+ when Parser::HTML, :html
1077
+ ps = Meteor::Ml::Html::ParserImpl.new
1078
+ when Parser::XHTML, :xhtml
1079
+ ps = Meteor::Ml::Xhtml::ParserImpl.new
1082
1080
  when Parser::XML, :xml
1083
1081
  ps = Meteor::Ml::Xml::ParserImpl.new
1084
1082
  end
@@ -1104,10 +1102,10 @@ module Meteor
1104
1102
  ps = Meteor::Ml::Html4::ParserImpl.new
1105
1103
  when Parser::XHTML, :xhtml
1106
1104
  ps = Meteor::Ml::Xhtml4::ParserImpl.new
1107
- when Parser::HTML, :html, Parser::HTML5, :html5
1108
- ps = Meteor::Ml::Html5::ParserImpl.new
1109
- when Parser::XHTML5, :xhtml5
1110
- ps = Meteor::Ml::Xhtml5::ParserImpl.new
1105
+ when Parser::HTML, :html
1106
+ ps = Meteor::Ml::Html::ParserImpl.new
1107
+ when Parser::XHTML, :xhtml
1108
+ ps = Meteor::Ml::Xhtml::ParserImpl.new
1111
1109
  when Parser::XML, :xml
1112
1110
  ps = Meteor::Ml::Xml::ParserImpl.new
1113
1111
  else
@@ -1161,10 +1159,10 @@ module Meteor
1161
1159
  Meteor::Ml::Html4::ParserImpl.new(@pif)
1162
1160
  when Meteor::Parser::XHTML4
1163
1161
  Meteor::Ml::Xhtml4::ParserImpl.new(@pif)
1164
- when Meteor::Parser::HTML, Meteor::Parser::HTML5
1165
- Meteor::Ml::Html5::ParserImpl.new(@pif)
1166
- when Meteor::Parser::XHTML5
1167
- Meteor::Ml::Xhtml5::ParserImpl.new(@pif)
1162
+ when Meteor::Parser::HTML
1163
+ Meteor::Ml::Html::ParserImpl.new(@pif)
1164
+ when Meteor::Parser::XHTML
1165
+ Meteor::Ml::Xhtml::ParserImpl.new(@pif)
1168
1166
  when Meteor::Parser::XML
1169
1167
  Meteor::Ml::Xml::ParserImpl.new(@pif)
1170
1168
  end
@@ -1216,12 +1214,12 @@ module Meteor
1216
1214
  case type
1217
1215
  when Parser::HTML4, :html
1218
1216
  ps = Meteor::Ml::Html4::ParserImpl.new
1219
- when Parser::XHTML, :xhtml
1217
+ when Parser::XHTML4, :xhtml4
1220
1218
  ps = Meteor::Ml::Xhtml4::ParserImpl.new
1221
- when Parser::HTML, :html, Parser::HTML5, :html5
1222
- ps = Meteor::Ml::Html5::ParserImpl.new
1223
- when Parser::XHTML5, :xhtml5
1224
- ps = Meteor::Ml::Xhtml5::ParserImpl.new
1219
+ when Parser::HTML, :html
1220
+ ps = Meteor::Ml::Html::ParserImpl.new
1221
+ when Parser::XHTML, :xhtml
1222
+ ps = Meteor::Ml::Xhtml::ParserImpl.new
1225
1223
  when Parser::XML, :xml
1226
1224
  ps = Meteor::Ml::Xml::ParserImpl.new
1227
1225
  end
@@ -1245,10 +1243,10 @@ module Meteor
1245
1243
  ps = Meteor::Ml::Html4::ParserImpl.new
1246
1244
  when Parser::XHTML, :xhtml
1247
1245
  ps = Meteor::Ml::Xhtml4::ParserImpl.new
1248
- when Parser::HTML, :html, Parser::HTML5, :html5
1249
- ps = Meteor::Ml::Html5::ParserImpl.new
1250
- when Parser::XHTML5, :xhtml5
1251
- ps = Meteor::Ml::Xhtml5::ParserImpl.new
1246
+ when Parser::HTML, :html
1247
+ ps = Meteor::Ml::Html::ParserImpl.new
1248
+ when Parser::XHTML, :xhtml
1249
+ ps = Meteor::Ml::Xhtml::ParserImpl.new
1252
1250
  when Parser::XML, :xml
1253
1251
  ps = Meteor::Ml::Xml::ParserImpl.new
1254
1252
  end
@@ -3898,10 +3896,10 @@ module Meteor
3898
3896
  Meteor::Ml::Html4::ParserImpl.new
3899
3897
  when Parser::XHTML4
3900
3898
  Meteor::Ml::Xhtml4::ParserImpl.new
3901
- when Parser::HTML, Parser::HTML5
3902
- Meteor::Ml::Html5::ParserImpl.new
3903
- when Parser::XHTML5
3904
- Meteor::Ml::Xhtml5::ParserImpl.new
3899
+ when Parser::HTML
3900
+ Meteor::Ml::Html::ParserImpl.new
3901
+ when Parser::XHTML
3902
+ Meteor::Ml::Xhtml::ParserImpl.new
3905
3903
  when Parser::XML
3906
3904
  Meteor::Ml::Xml::ParserImpl.new
3907
3905
  else
@@ -5181,10 +5179,10 @@ module Meteor
5181
5179
 
5182
5180
  end
5183
5181
 
5184
- module Html5
5182
+ module Html
5185
5183
 
5186
5184
  #
5187
- # HTML5 parser (HTML5パーサ)
5185
+ # HTML parser (HTMLパーサ)
5188
5186
  #
5189
5187
  class ParserImpl < Meteor::Ml::Html4::ParserImpl
5190
5188
 
@@ -5220,7 +5218,7 @@ module Meteor
5220
5218
  @@match_tag = MATCH_TAG
5221
5219
  @@match_tag_sng = MATCH_TAG_SNG
5222
5220
  @@attr_logic = ATTR_LOGIC
5223
- @doc_type = Parser::HTML5
5221
+ @doc_type = Parser::HTML
5224
5222
  case args.length
5225
5223
  when ZERO
5226
5224
  #initialize_0
@@ -5325,10 +5323,10 @@ module Meteor
5325
5323
 
5326
5324
  end
5327
5325
 
5328
- module Xhtml5
5326
+ module Xhtml
5329
5327
 
5330
5328
  #
5331
- # XHTML5 parser (XHTML5パーサ)
5329
+ # XHTML parser (XHTMLパーサ)
5332
5330
  #
5333
5331
  class ParserImpl < Meteor::Ml::Xhtml4::ParserImpl
5334
5332
 
@@ -5360,7 +5358,7 @@ module Meteor
5360
5358
  def initialize(*args)
5361
5359
  super()
5362
5360
  @@attr_logic = ATTR_LOGIC
5363
- @doc_type = Parser::XHTML5
5361
+ @doc_type = Parser::XHTML
5364
5362
  case args.length
5365
5363
  when ZERO
5366
5364
  #initialize_0
data/meteor.gemspec CHANGED
@@ -11,7 +11,9 @@ Gem::Specification.new do |spec|
11
11
  spec.description = %q{A lightweight (X)HTML(5) & XML parser}
12
12
  spec.summary = %q{A lightweight (X)HTML(5) & XML parser}
13
13
  spec.homepage = %q{https://github.com/asip/meteor}
14
- spec.license = 'LGPL-2.1'
14
+ spec.license = 'LGPL-2.1-only'
15
+
16
+ spec.required_ruby_version = ">=3.0"
15
17
 
16
18
  spec.files = `git ls-files`.split($/)
17
19
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
@@ -20,6 +22,5 @@ Gem::Specification.new do |spec|
20
22
 
21
23
  spec.add_development_dependency "bundler", "~> 2.2"
22
24
  #spec.add_development_dependency "rake"
23
- spec.has_rdoc = 'yard'
24
25
 
25
26
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meteor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9.0
4
+ version: 0.9.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasumasa Ashida
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2021-01-06 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: bundler
@@ -36,25 +35,24 @@ files:
36
35
  - Gemfile.lock
37
36
  - README.md
38
37
  - Rakefile
39
- - demo/demo_html4.rb
40
- - demo/demo_html5.rb
41
- - demo/demo_xhtml4.rb
42
- - demo/demo_xhtml5.rb
43
- - demo/demo_xml.rb
38
+ - demo/html.rb
39
+ - demo/html4.rb
44
40
  - demo/ml/sample.xml
45
- - demo/ml/sample_4.html
46
- - demo/ml/sample_5.html
47
- - demo/ml/sample_x4.html
48
- - demo/ml/sample_x5.html
41
+ - demo/ml/sample_html.html
42
+ - demo/ml/sample_html4.html
43
+ - demo/ml/sample_xhtml.html
44
+ - demo/ml/sample_xhtml4.html
45
+ - demo/xhtml.rb
46
+ - demo/xhtml4.rb
47
+ - demo/xml.rb
49
48
  - lib/meteor.rb
50
49
  - meteor.gemspec
51
50
  - test/meteor_test.rb
52
51
  - test/test_helper.rb
53
52
  homepage: https://github.com/asip/meteor
54
53
  licenses:
55
- - LGPL-2.1
54
+ - LGPL-2.1-only
56
55
  metadata: {}
57
- post_install_message:
58
56
  rdoc_options: []
59
57
  require_paths:
60
58
  - lib
@@ -62,27 +60,26 @@ required_ruby_version: !ruby/object:Gem::Requirement
62
60
  requirements:
63
61
  - - ">="
64
62
  - !ruby/object:Gem::Version
65
- version: '0'
63
+ version: '3.0'
66
64
  required_rubygems_version: !ruby/object:Gem::Requirement
67
65
  requirements:
68
66
  - - ">="
69
67
  - !ruby/object:Gem::Version
70
68
  version: '0'
71
69
  requirements: []
72
- rubygems_version: 3.2.3
73
- signing_key:
70
+ rubygems_version: 3.6.9
74
71
  specification_version: 4
75
72
  summary: A lightweight (X)HTML(5) & XML parser
76
73
  test_files:
77
- - demo/demo_html4.rb
78
- - demo/demo_html5.rb
79
- - demo/demo_xhtml4.rb
80
- - demo/demo_xhtml5.rb
81
- - demo/demo_xml.rb
74
+ - demo/html.rb
75
+ - demo/html4.rb
82
76
  - demo/ml/sample.xml
83
- - demo/ml/sample_4.html
84
- - demo/ml/sample_5.html
85
- - demo/ml/sample_x4.html
86
- - demo/ml/sample_x5.html
77
+ - demo/ml/sample_html.html
78
+ - demo/ml/sample_html4.html
79
+ - demo/ml/sample_xhtml.html
80
+ - demo/ml/sample_xhtml4.html
81
+ - demo/xhtml.rb
82
+ - demo/xhtml4.rb
83
+ - demo/xml.rb
87
84
  - test/meteor_test.rb
88
85
  - test/test_helper.rb
@@ -1,40 +0,0 @@
1
- <html>
2
- <head>
3
- <title>HTMLテスト</title>
4
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
- </head>
6
-
7
- <body bgcolor="#FFFFFF" text="#000000">
8
- <font id="hello" color="#000000">Hello,World</font>
9
- <font id="hello2">Hello,World</font>
10
- <!-- @quark id="hello3" -->Hello,World<!-- /@quark -->
11
- <form>
12
- <input id="text1" type="text" >
13
-
14
- <input id="radio1" type="radio" class="test">
15
-
16
- <select id="select1">
17
- <option id="option1">オプション</option>
18
- </select>
19
-
20
- <select id="select2">
21
- <option id="option2">オプション</option>
22
- </select>
23
- </form>
24
-
25
- <table>
26
- <tr id="loop">
27
- <td id="aa"></td><td id="bb"></td><td id="cc"></td>
28
- </tr>
29
- </table>
30
-
31
- <div id="sample" style="test" >
32
- <div>test</div>
33
- </div>
34
-
35
- <div id="sample" style="test" class="test">
36
- <div>test</div>
37
- </div>
38
-
39
- </body>
40
- </html>
@@ -1,32 +0,0 @@
1
- <html>
2
- <head>
3
- <title>HTMLテスト</title>
4
- <meta http-equiv="Content-Type" charset="utf-8" content="text/html; charset=UTF-8">
5
- </head>
6
-
7
- <body bgcolor="#FFFFFF" text="#000000">
8
- <font id="hello" color="#000000">Hello,World</font>
9
- <font id="hello2">Hello,World</font>
10
- <!-- @quark id="hello3" -->Hello,World<!-- /@quark -->
11
- <form>
12
- <input id="text1" type="text" >
13
-
14
- <input id="radio1" type="radio">
15
-
16
- <select>
17
- <option id="option1">オプション</option>
18
- </select>
19
-
20
- <select id="select2">
21
- <option id="option2">オプション</option>
22
- </select>
23
- </form>
24
-
25
- <table>
26
- <tr id="loop">
27
- <td id="aa"></td><td id="bb"></td><td id="cc"></td>
28
- </tr>
29
- </table>
30
-
31
- </body>
32
- </html>
File without changes