meteor 0.9.22 → 0.9.24

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: ec1fa5d45083f5b41c12374b02afa97f609abfd602cadb73b5b02634ef7eb899
4
- data.tar.gz: c23916a4fb90c750ae8a7cec4566bd8fa264b12eb02b31fdd28f638d7aedf21d
3
+ metadata.gz: 80d59c6205221bcf3bcc849a8c70a7689eea1a91341531255341d60d58891a02
4
+ data.tar.gz: eda5a84623011d29c4c842836123f0f39f81682a9dbfa40b2f1fe84bb4c8f91d
5
5
  SHA512:
6
- metadata.gz: 2001c1c0e0308fbebd123f242e2f553e3231f22ba7f6b2e8ceed25ef438a1cd6d758d955f64e07edecfaa1ad85ddb8454a139eca0cc8bc5f1c608cab72fa0616
7
- data.tar.gz: 5af3fa38323c059cd3308a6aa3e80d804081233486956aec32bd816d79b3e3a42ae541506eaf8ca0dc0f721765ae5d9c234b124b22695b673e263f5cecfbf1b7
6
+ metadata.gz: d3a61991ed0eac2ce67ab6832ecfaca5ba6149996cf901ae474387e3143eb89c64163a439fb599470a68ef0f4ded6558fb2c02cce0270d37a235e344f757e2e3
7
+ data.tar.gz: b3051e52c18ea7a590e149e20d49437aacfc149de2b427698d004819264031006870fe23239b35bb606d53db4b8d21fa99d9f2fadb2568024a460ea6ba182cc8
data/ChangeLog CHANGED
@@ -1,3 +1,13 @@
1
+ == 0.9.24 / 2026-06-22 Yasumasa Ashida <ys.ashida@gmail.com>
2
+
3
+ * Refactoring
4
+ * Add Meteor::Element#unsafe_content=
5
+ * Fix Meteor::Ml::Html4::ParserImpl
6
+
7
+ == 0.9.23 / 2026-06-21 Yasumasa Ashida <ys.ashida@gmail.com>
8
+
9
+ * Refactoring
10
+
1
11
  == 0.9.22 / 2026-06-21 Yasumasa Ashida <ys.ashida@gmail.com>
2
12
 
3
13
  * Refactoring
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- meteor (0.9.22)
4
+ meteor (0.9.24)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/demo/html.rb CHANGED
@@ -43,6 +43,8 @@ elm_text1["required"] = true
43
43
  # elm_select1['multiple'] = true # elm_select1.attr(multiple: true)
44
44
  # puts elm_select1['multiple'] # puts elm_select1.attr('multiple')
45
45
 
46
+ # elm_select1.unsafe_content = "<option id=\"option12\">オプション12</option>"
47
+
46
48
  # elm_option1 = root.element('option', id: 'option1')
47
49
  # elm_option1['selected'] = true # elm_option1.attr(selected: true)
48
50
  # elm_option1['selected'] = nil # elm_option1.remove_attr('selected')
@@ -95,6 +97,7 @@ end_time = Time.new.to_f
95
97
  puts(root.document)
96
98
 
97
99
  elms = root.elements("tr", id: "loop")
100
+ # elms = root.elements("tr")
98
101
  # elms = root.elements('input', id: 'radio1', type: 'radio')
99
102
  # elms = root.css('input[id=radio1][type=radio]')
100
103
  elms.each { |elm|
@@ -1934,7 +1934,7 @@ module Meteor
1934
1934
  # CX tag search pattern (CXタグ検索用パターン)
1935
1935
  # @pattern_cc = String.new('') << "<!--\\s@" << @_name << '\\s([^<>]*id="'
1936
1936
  # @pattern_cc << id << '"[^<>]*)-->(((?!(<!--\\s/@' << @_name << ")).)*)<!--\\s/@" << @_name << "\\s-->"
1937
- # @pattern_cc = "<!--\\s@#{tag}\\s([^<>]*id=\"#{id}\"[^<>]*)-->(((?!(<!--\\s\\/@#{tag})).)*)<!--\\s\\/@#{tag}\\s-->"
1937
+ # @pattern_cc = "<!--\\s@#{@_name}\\s([^<>]*id=\"#{@_id}\"[^<>]*)-->(((?!(<!--\\s\\/@#{@_name})).)*)<!--\\s\\/@#{@_name}\\s-->"
1938
1938
  @pattern_cc = "<!--\\s@#{@_name}\\s([^<>]*id=\"#{@_id}\"[^<>]*)-->(((?!(<!--\\s/@#{@_name})).)*)<!--\\s/@#{@_name}\\s-->"
1939
1939
 
1940
1940
  @pattern = Meteor::Core::Util::PatternCache.get(@pattern_cc)
@@ -53,8 +53,8 @@ module Meteor
53
53
  attr_accessor :copy
54
54
  attr_accessor :removed
55
55
 
56
- alias :tag :name
57
- alias :tag= :name=
56
+ alias_method :tag, :name
57
+ alias_method :tag=, :name=
58
58
 
59
59
  #
60
60
  # initializer (イニシャライザ)
@@ -291,7 +291,7 @@ module Meteor
291
291
  end
292
292
  end
293
293
 
294
- alias :child :element
294
+ alias_method :child, :element
295
295
 
296
296
  #
297
297
  # get elements (要素を取得する)
@@ -349,7 +349,7 @@ module Meteor
349
349
  @parser.find(selector)
350
350
  end
351
351
 
352
- alias :css :find
352
+ alias_method :css, :find
353
353
 
354
354
  #
355
355
  # get cx(comment extension) tag (CX(コメント拡張)タグを取得する)
@@ -455,7 +455,7 @@ module Meteor
455
455
  @parser.content(self, *args)
456
456
  end
457
457
 
458
- alias :text :content
458
+ alias_method :text, :content
459
459
 
460
460
  #
461
461
  # set content of element (要素の内容をセットする)
@@ -466,7 +466,18 @@ module Meteor
466
466
  @parser.content(self, value)
467
467
  end
468
468
 
469
- alias :text= :content=
469
+ alias_method :text=, :content=
470
+
471
+ #
472
+ # set content of element (要素の内容をセットする)
473
+ # @param [String] value content (要素の内容)
474
+ # @return [Meteor::Element] element (要素)
475
+ #
476
+ def unsafe_content=(value)
477
+ @parser.content(self, value, false)
478
+ end
479
+
480
+ alias_method :unsafe_text=, :unsafe_content=
470
481
 
471
482
  #
472
483
  # set attribute (属性をセットする)
@@ -514,7 +525,7 @@ module Meteor
514
525
  @parser.flash
515
526
  end
516
527
 
517
- alias :flush :flash
528
+ alias_method :flush, :flash
518
529
 
519
530
  #
520
531
  # @overload execute(hook)
@@ -124,7 +124,7 @@ module Meteor
124
124
  #
125
125
  def analyze_ml
126
126
  analyze_content_type
127
- analyze_kaigyo_code
127
+ analyze_newline
128
128
 
129
129
  @res = nil
130
130
  end
@@ -168,7 +168,7 @@ module Meteor
168
168
  #
169
169
  # analuze document , set newline (ドキュメントをパースし、改行コードをセットする)
170
170
  #
171
- def analyze_kaigyo_code
171
+ def analyze_newline
172
172
  for a in KAIGYO_CODE
173
173
  if @root.document.include?(a)
174
174
  @root.kaigyo_code = a
@@ -177,7 +177,7 @@ module Meteor
177
177
  end
178
178
  end
179
179
 
180
- protected :analyze_kaigyo_code
180
+ protected :analyze_newline
181
181
 
182
182
  #
183
183
  # get element using tag name (要素のタグ名で検索し、要素を取得する)
@@ -207,13 +207,14 @@ module Meteor
207
207
  # content-rich element search pattern (内容あり要素検索用パターン()
208
208
  # @pattern_cc = String.new('') << "<" << @_name << '(|\\s[^<>]*)>(((?!(' << @_name
209
209
  # @pattern_cc << '[^<>]*>)).)*)<\\/' << @_name << '>'
210
- @pattern_cc = "<#{@_name}(|\\s[^<>]*)>(((?!(#{tag}[^<>]*>)).)*)<\\/#{@_name}>"
210
+ @pattern_cc = "<#{@_name}(|\\s[^<>]*)>(((?!(#{@_name}[^<>]*>)).)*)<\\/#{@_name}>"
211
211
 
212
212
  @pattern = Meteor::Core::Util::PatternCache.get(@pattern_cc)
213
213
  # search of content-rich element (内容あり要素検索)
214
214
  @res = @pattern.match(@root.document)
215
215
  # case of content-rich element (内容あり要素の場合)
216
216
  if @res
217
+ @on_search = true
217
218
  element_with_1(name)
218
219
  else
219
220
  if @error_check
@@ -120,7 +120,7 @@ module Meteor
120
120
  #
121
121
  def analyze_ml
122
122
  analyze_content_type
123
- analyze_kaigyo_code
123
+ analyze_newline
124
124
  @res = nil
125
125
  end
126
126
 
@@ -163,7 +163,7 @@ module Meteor
163
163
  #
164
164
  # analyze document , set newline (ドキュメントをパースし、改行コードをセットする)
165
165
  #
166
- def analyze_kaigyo_code
166
+ def analyze_newline
167
167
  for a in KAIGYO_CODE
168
168
  if @root.document.include?(a)
169
169
  @root.kaigyo_code = a
@@ -171,7 +171,7 @@ module Meteor
171
171
  end
172
172
  end
173
173
 
174
- private :analyze_kaigyo_code
174
+ private :analyze_newline
175
175
 
176
176
  def edit_attrs_(elm, attr_name, attr_value)
177
177
  if is_match("selected", attr_name) && is_match("option", elm.name)
@@ -76,7 +76,7 @@ module Meteor
76
76
  # analyze document (ドキュメントをパースする)
77
77
  #
78
78
  def analyze_ml
79
- analyze_kaigyo_code
79
+ analyze_newline
80
80
  analyze_content_type
81
81
 
82
82
  @res = nil
@@ -95,7 +95,7 @@ module Meteor
95
95
  #
96
96
  # analuze document , set newline (ドキュメントをパースし、改行コードをセットする)
97
97
  #
98
- def analyze_kaigyo_code
98
+ def analyze_newline
99
99
  for a in KAIGYO_CODE
100
100
  if @root.document.include?(a)
101
101
  @root.kaigyo_code = a
@@ -104,7 +104,7 @@ module Meteor
104
104
  end
105
105
  end
106
106
 
107
- private :analyze_kaigyo_code
107
+ private :analyze_newline
108
108
 
109
109
  #
110
110
  # analyze document , set content type (ドキュメントをパースし、コンテントタイプをセットする)
data/lib/meteor.rb CHANGED
@@ -36,11 +36,11 @@ require "meteor/ml/xml/parser_impl"
36
36
  # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
37
37
  #
38
38
  # @author Yasumasa Ashida
39
- # @version 0.9.22
39
+ # @version 0.9.24
40
40
  #
41
41
 
42
42
  module Meteor
43
- VERSION = "0.9.22"
43
+ VERSION = "0.9.24"
44
44
 
45
45
  # require 'fileutils'
46
46
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meteor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.22
4
+ version: 0.9.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasumasa Ashida