meteor 0.9.29 → 0.9.30

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: 2e7bbbbb46bd4185313d53f8417e93bccfe236b093d40c10a73cd08d988b04da
4
- data.tar.gz: 703926ee08938f9d6848eb1b63fbd00a5158ebc30e05d8a13318434ec827d268
3
+ metadata.gz: 50c95ae971722d36e7d3e198d73f043fd44e65be5f7fc0ccd437d813d6a172e0
4
+ data.tar.gz: 6797ee8ac69369f4dd2b5b369bddded751bc6feb9d039c03a0346903bc417543
5
5
  SHA512:
6
- metadata.gz: 2b7a77a7686b6d458a1c75f74ccbf38872bb9ef7fbcef394ed0867f87bdb01ee82a2ccb234ddc741428160d274a0325c35b98b2b342aa31f0036eedc6b86dfb7
7
- data.tar.gz: b919cf8ffa6858169d5b08b65e6ba72408d71d9f7d05137877cffc295f78a14c1d57e57e47f9f8209e34636e8b48600e400d41904e22f3d9d0e466b0e9b7f9b0
6
+ metadata.gz: 9015aa8aa74e4dc6684196694c1af631bda8f2cf809f8c4012d92609d5d33aa3e8b9945cd8374fe6ffe1825a01925f148ed85c7af783b7888ef5dff851a3dc65
7
+ data.tar.gz: 2ce12093acf7b2dff79106714bc912318a287dc31b196f9a79e6bddaebebda2bc31ce7851e10e9a976c565dffdcbddde38bcbc1aae3b284a4fc8e2b9c7438ef2
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.9.30 / 2026-07-02 Yasumasa Ashida <ys.ashida@gmail.com>
2
+
3
+ * Refactor Meteor::Core::Util::PatternCache
4
+
1
5
  == 0.9.29 / 2026-07-02 Yasumasa Ashida <ys.ashida@gmail.com>
2
6
 
3
7
  * Refactor Meteor::RootElement
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- meteor (0.9.29)
4
+ meteor (0.9.30)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1581,7 +1581,7 @@ module Meteor
1581
1581
  # attribute search (属性検索)
1582
1582
  # @res = @pattern.match(elm.attributes)
1583
1583
 
1584
- # (検索対象属性の存在判定)
1584
+ # Attribute existence check (属性の存在判定)
1585
1585
  if elm.attributes.include?(String.new(" ") << attr_name << "=\"")
1586
1586
  @_attr_value = attr_value
1587
1587
 
@@ -29,79 +29,45 @@ module Meteor
29
29
  def self.get(*args)
30
30
  case args.length
31
31
  when ONE
32
- # get_1(args[0])
33
- if @@regex_cache[args[0].to_sym]
34
- @@regex_cache[args[0].to_sym]
35
- else
36
- @@regex_cache[args[0].to_sym] = Regexp.new(args[0], Regexp::MULTILINE)
37
- end
38
-
32
+ get_1(args[0])
39
33
  when TWO
40
- # get_2(args[0], args[1])
41
- if @@regex_cache[args[0].to_sym]
42
- @@regex_cache[args[0].to_sym]
43
- else
44
- @@regex_cache[args[0].to_sym] = Regexp.new(args[0], args[1])
45
- end
34
+ get_2(args[0], args[1])
46
35
  else
47
36
  raise ArgumentError
48
37
  end
49
38
  end
50
39
 
51
- ##
52
- ## get pattern (パターンを取得する)
53
- ## @param [String] regex regular expression (正規表現)
54
- ## @return [Regexp] pattern (パターン)
55
- ##
56
- # def self.get_1(regex)
57
- # ## pattern = @@regex_cache[regex]
58
- # ##
59
- # ## if pattern == nil
60
- # # if regex.kind_of?(String)
61
- # if !@@regex_cache[regex.to_sym]
62
- # # pattern = Regexp.new(regex)
63
- # # @@regex_cache[regex] = pattern
64
- # @@regex_cache[regex.to_sym] = Regexp.new(regex, Regexp::MULTILINE)
65
- # end
66
40
  #
67
- # # return pattern
68
- # @@regex_cache[regex.to_sym]
69
- # ## elsif regex.kind_of?(Symbol)
70
- # ## if !@@regex_cache[regex]
71
- # ## @@regex_cache[regex.object_id] = Regexp.new(regex.to_s, Regexp::MULTILINE)
72
- # ## end
73
- # ##
74
- # ## @@regex_cache[regex]
75
- # # end
76
- # end
41
+ # get pattern (パターンを取得する)
42
+ # @param [String] regex regular expression (正規表現)
43
+ # @return [Regexp] pattern (パターン)
44
+ #
45
+ def self.get_1(regex)
46
+ if @@regex_cache[regex.to_sym]
47
+ @@regex_cache[regex.to_sym]
48
+ else
49
+ @@regex_cache[regex.to_sym] = Regexp.new(regex, Regexp::MULTILINE)
50
+ end
51
+ end
77
52
 
78
- ##
79
- ## get pattern (パターンを取得する)
80
- ## @param [String] regex (正規表現)
81
- ## @param [Integer] option (オプション)
82
- ## @return [Regexp] psttern (パターン)
83
- ##
84
- # def self.get_2(regex, option)
85
- # ## pattern = @@regex_cache[regex]
86
- # ##
87
- # ## if pattern == nil
88
- # # if regex.kind_of?(String)
89
- # if !@@regex_cache[regex.to_sym]
90
- # # pattern = Regexp.new(regex)
91
- # # @@regex_cache[regex] = pattern
92
- # @@regex_cache[regex.to_sym] = Regexp.new(regex, option,"UTF-8")
93
- # end
94
53
  #
95
- # # return pattern
96
- # @@regex_cache[regex.to_sym]
97
- # ## elsif regex.kind_of?(Symbol)
98
- # ## if !@@regex_cache[regex]
99
- # ## @@regex_cache[regex] = Regexp.new(regex.to_s, option,"UTF-8")
100
- # ## end
101
- # ##
102
- # ## @@regex_cache[regex]
103
- # # end
104
- # end
54
+ # get pattern (パターンを取得する)
55
+ # @param [String] regex (正規表現)
56
+ # @param [Integer] option (オプション)
57
+ # @return [Regexp] psttern (パターン)
58
+ #
59
+ def self.get_2(regex, option)
60
+ if @@regex_cache[regex.to_sym]
61
+ @@regex_cache[regex.to_sym]
62
+ else
63
+ @@regex_cache[regex.to_sym] = Regexp.new(regex, option)
64
+ end
65
+ end
66
+
67
+ class << self
68
+ private :get_1
69
+ private :get_2
70
+ end
105
71
  end
106
72
  end
107
73
  end
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.29
39
+ # @version 0.9.30
40
40
  #
41
41
 
42
42
  module Meteor
43
- VERSION = "0.9.29"
43
+ VERSION = "0.9.30"
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.29
4
+ version: 0.9.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasumasa Ashida