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 +4 -4
- data/ChangeLog +4 -0
- data/Gemfile.lock +1 -1
- data/lib/meteor/core/kernel.rb +1 -1
- data/lib/meteor/core/util/pattern_cache.rb +30 -64
- data/lib/meteor.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 50c95ae971722d36e7d3e198d73f043fd44e65be5f7fc0ccd437d813d6a172e0
|
|
4
|
+
data.tar.gz: 6797ee8ac69369f4dd2b5b369bddded751bc6feb9d039c03a0346903bc417543
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9015aa8aa74e4dc6684196694c1af631bda8f2cf809f8c4012d92609d5d33aa3e8b9945cd8374fe6ffe1825a01925f148ed85c7af783b7888ef5dff851a3dc65
|
|
7
|
+
data.tar.gz: 2ce12093acf7b2dff79106714bc912318a287dc31b196f9a79e6bddaebebda2bc31ce7851e10e9a976c565dffdcbddde38bcbc1aae3b284a4fc8e2b9c7438ef2
|
data/ChangeLog
CHANGED
data/Gemfile.lock
CHANGED
data/lib/meteor/core/kernel.rb
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
#
|
|
68
|
-
#
|
|
69
|
-
#
|
|
70
|
-
#
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
-
#
|
|
96
|
-
#
|
|
97
|
-
#
|
|
98
|
-
#
|
|
99
|
-
#
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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.
|
|
39
|
+
# @version 0.9.30
|
|
40
40
|
#
|
|
41
41
|
|
|
42
42
|
module Meteor
|
|
43
|
-
VERSION = "0.9.
|
|
43
|
+
VERSION = "0.9.30"
|
|
44
44
|
|
|
45
45
|
# require 'fileutils'
|
|
46
46
|
|