meteor 0.9.23 → 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: 280d6970523834a12f7c71dc862add46a45f23ba59f2d7339ee23633323edfa3
4
- data.tar.gz: 86badb6f85c41fb0c664b8d154c46865e95999634106cac57d01c6db364b9ae9
3
+ metadata.gz: 80d59c6205221bcf3bcc849a8c70a7689eea1a91341531255341d60d58891a02
4
+ data.tar.gz: eda5a84623011d29c4c842836123f0f39f81682a9dbfa40b2f1fe84bb4c8f91d
5
5
  SHA512:
6
- metadata.gz: e72c280022b57f63af5b25dd2c98c9ce9a9ed88259112ce4a177112af8ebe2edfb23acbb78dac4831e1284f92146c81015d99e46ec975439d1fbc2c4a46b5c30
7
- data.tar.gz: 042247ef84e70b88e82025308f15fae566f2f2175a14bf5cc490565fb70f45456b06a6fcee41f73ed483a935b6d2a3f711d90a27f05fb63c18e92ab6ecf95051
6
+ metadata.gz: d3a61991ed0eac2ce67ab6832ecfaca5ba6149996cf901ae474387e3143eb89c64163a439fb599470a68ef0f4ded6558fb2c02cce0270d37a235e344f757e2e3
7
+ data.tar.gz: b3051e52c18ea7a590e149e20d49437aacfc149de2b427698d004819264031006870fe23239b35bb606d53db4b8d21fa99d9f2fadb2568024a460ea6ba182cc8
data/ChangeLog CHANGED
@@ -1,3 +1,9 @@
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
+
1
7
  == 0.9.23 / 2026-06-21 Yasumasa Ashida <ys.ashida@gmail.com>
2
8
 
3
9
  * Refactoring
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- meteor (0.9.23)
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)
@@ -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
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.23
39
+ # @version 0.9.24
40
40
  #
41
41
 
42
42
  module Meteor
43
- VERSION = "0.9.23"
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.23
4
+ version: 0.9.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasumasa Ashida