meteor 0.9.43 → 0.9.44
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 +20 -27
- data/lib/meteor/ml/html4/parser_impl.rb +5 -7
- 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: ebd554983ecc3081fd55707f6282c3a639609c5cd6e100b7e75d0e7c46b457bb
|
|
4
|
+
data.tar.gz: 3c6734e06ac743d78871fc71efda67a3a1bbd9d6bac519563d02c45a4b90daee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: da148763b7573f7700eac92e3873c45be1c3cc474e10aaf823c1725c178d54500553d7940d65d00ef62b183fd7b003ad5a101583ca2b847ec35466f754d110f1
|
|
7
|
+
data.tar.gz: 1e1ab49831f262ea795e14d3e0a786cdfce3f63799888fda983fdb14d90e778bdd8d86d0c44b158c45e4fbea154d17938a605ff6b741190d41a3abd26f437f23
|
data/ChangeLog
CHANGED
data/Gemfile.lock
CHANGED
data/lib/meteor/core/kernel.rb
CHANGED
|
@@ -393,11 +393,8 @@ module Meteor
|
|
|
393
393
|
# @param [true,false] quote flag (クオート・フラグ)
|
|
394
394
|
# @return [Meteor::Element] element (要素)
|
|
395
395
|
def element_three(name, attr_name, attr_value, quote = true) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity,Style/OptionalBooleanParameter
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
else
|
|
399
|
-
quote_name(name)
|
|
400
|
-
end
|
|
396
|
+
quote_name(name)
|
|
397
|
+
quote_attribute(attr_name, attr_value) if quote
|
|
401
398
|
|
|
402
399
|
@pattern_cc_one = element_pattern_three
|
|
403
400
|
|
|
@@ -455,13 +452,6 @@ module Meteor
|
|
|
455
452
|
|
|
456
453
|
private :element_pattern_three
|
|
457
454
|
|
|
458
|
-
def quote_element_three(name, attr_name, attr_value)
|
|
459
|
-
quote_name(name)
|
|
460
|
-
quote_attribute(attr_name, attr_value)
|
|
461
|
-
end
|
|
462
|
-
|
|
463
|
-
private :quote_element_three
|
|
464
|
-
|
|
465
455
|
def element_normal_three_one(name) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
|
466
456
|
# puts @res.captures.length
|
|
467
457
|
case @res.captures.length
|
|
@@ -816,7 +806,8 @@ module Meteor
|
|
|
816
806
|
# @return [Meteor::Element] element (要素)
|
|
817
807
|
#
|
|
818
808
|
def element_five(name, attr_name1, attr_value1, attr_name2, attr_value2) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
|
|
819
|
-
|
|
809
|
+
quote_name(name)
|
|
810
|
+
quote_attribute_one_two(attr_name1, attr_value1, attr_name2, attr_value2)
|
|
820
811
|
|
|
821
812
|
@pattern_cc_one = "<#{@_name}(\\s[^<>]*(?:#{@_attr_name1}=\"#{@_attr_value1}\"[^<>]*#{@_attr_name2}=\"#{@_attr_value2}\"|#{@_attr_name2}=\"#{@_attr_value2}\"[^<>]*#{@_attr_name1}=\"#{@_attr_value1}\")[^<>]*)\\/>|<#{@_name}(\\s[^<>]*(?:#{@_attr_name1}=\"#{@_attr_value1}\"[^<>]*#{@_attr_name2}=\"#{@_attr_value2}\"|#{@_attr_name2}=\"#{@_attr_value2}\"[^<>]*#{@_attr_name1}=\"#{@_attr_value1}\")[^<>]*)>(((?!(#{@_name}[^<>]*>)).)*)<\\/#{@_name}>" # rubocop:disable Layout/LineLength
|
|
822
813
|
|
|
@@ -868,15 +859,26 @@ module Meteor
|
|
|
868
859
|
|
|
869
860
|
private :element_five
|
|
870
861
|
|
|
871
|
-
def
|
|
872
|
-
|
|
862
|
+
def quote_attribute_one_two(attr_name1, attr_value1, attr_name2, attr_value2)
|
|
863
|
+
quote_attribute_one(attr_name1, attr_value1)
|
|
864
|
+
quote_attribute_two(attr_name2, attr_value2)
|
|
865
|
+
end
|
|
866
|
+
|
|
867
|
+
private :quote_attribute_one_two
|
|
868
|
+
|
|
869
|
+
def quote_attribute_one(attr_name1, attr_value1)
|
|
873
870
|
@_attr_name1 = Regexp.quote(attr_name1)
|
|
874
|
-
@_attr_name2 = Regexp.quote(attr_name2)
|
|
875
871
|
@_attr_value1 = Regexp.quote(attr_value1)
|
|
872
|
+
end
|
|
873
|
+
|
|
874
|
+
private :quote_attribute_one
|
|
875
|
+
|
|
876
|
+
def quote_attribute_two(attr_name2, attr_value2)
|
|
876
877
|
@_attr_value2 = Regexp.quote(attr_value2)
|
|
878
|
+
@_attr_name2 = Regexp.quote(attr_name2)
|
|
877
879
|
end
|
|
878
880
|
|
|
879
|
-
private :
|
|
881
|
+
private :quote_attribute_two
|
|
880
882
|
|
|
881
883
|
def element_normal_five_one(name) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
|
882
884
|
# @res.to_a.each_with_index do |capture, i|
|
|
@@ -1013,7 +1015,7 @@ module Meteor
|
|
|
1013
1015
|
# @return [Meteor::Element] element (要素)
|
|
1014
1016
|
#
|
|
1015
1017
|
def element_four(attr_name1, attr_value1, attr_name2, attr_value2) # rubocop:disable Metrics/MethodLength
|
|
1016
|
-
|
|
1018
|
+
quote_attribute_one_two(attr_name1, attr_value1, attr_name2, attr_value2)
|
|
1017
1019
|
|
|
1018
1020
|
element_pattern_four
|
|
1019
1021
|
|
|
@@ -1038,15 +1040,6 @@ module Meteor
|
|
|
1038
1040
|
|
|
1039
1041
|
private :element_four
|
|
1040
1042
|
|
|
1041
|
-
def quote_element_four(attr_name1, attr_value1, attr_name2, attr_value2)
|
|
1042
|
-
@_attr_name1 = Regexp.quote(attr_name1)
|
|
1043
|
-
@_attr_name2 = Regexp.quote(attr_name2)
|
|
1044
|
-
@_attr_value1 = Regexp.quote(attr_value1)
|
|
1045
|
-
@_attr_value2 = Regexp.quote(attr_value2)
|
|
1046
|
-
end
|
|
1047
|
-
|
|
1048
|
-
private :quote_element_four
|
|
1049
|
-
|
|
1050
1043
|
def element_pattern_four
|
|
1051
1044
|
@pattern_cc = "<([^<>\"]*)\\s[^<>]*(?:#{@_attr_name1}=\"#{@_attr_value1}\"[^<>]*#{@_attr_name2}=\"#{@_attr_value2}\"|#{@_attr_name2}=\"#{@_attr_value2}\"[^<>]*#{@_attr_name1}=\"#{@_attr_value1}\")" # rubocop:disable Layout/LineLength
|
|
1052
1045
|
end
|
|
@@ -223,11 +223,8 @@ module Meteor
|
|
|
223
223
|
# @return [Meteor::Element] element (要素)
|
|
224
224
|
#
|
|
225
225
|
def element_three(name, attr_name, attr_value, quote = true) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity,Style/OptionalBooleanParameter
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
else
|
|
229
|
-
quote_name(name)
|
|
230
|
-
end
|
|
226
|
+
quote_name(name)
|
|
227
|
+
quote_attribute(attr_name, attr_value) if quote
|
|
231
228
|
|
|
232
229
|
# case of void element (空要素の場合(<->内容あり要素の場合))
|
|
233
230
|
if match?(MATCH_TAG, name)
|
|
@@ -311,7 +308,8 @@ module Meteor
|
|
|
311
308
|
# @return [Meteor::Element] element (要素)
|
|
312
309
|
#
|
|
313
310
|
def element_five(name, attr_name1, attr_value1, attr_name2, attr_value2) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
|
|
314
|
-
|
|
311
|
+
quote_name(name)
|
|
312
|
+
quote_attribute_one_two(attr_name1, attr_value1, attr_name2, attr_value2)
|
|
315
313
|
|
|
316
314
|
# case of void element (空要素の場合(<->内容あり要素の場合))
|
|
317
315
|
if match?(MATCH_TAG, name)
|
|
@@ -381,7 +379,7 @@ module Meteor
|
|
|
381
379
|
# @return [Meteor::Element] element (要素)
|
|
382
380
|
#
|
|
383
381
|
def element_four(attr_name1, attr_value1, attr_name2, attr_value2) # rubocop:disable Metrics/MethodLength
|
|
384
|
-
|
|
382
|
+
quote_attribute_one_two(attr_name1, attr_value1, attr_name2, attr_value2)
|
|
385
383
|
|
|
386
384
|
@pattern_cc = "<([^<>\"]*)\\s([^<>]*(?:#{@_attr_name1}=\"#{@_attr_value1}\"[^<>]*#{@_attr_name2}=\"#{@_attr_value2}\"|#{@_attr_name2}=\"#{@_attr_value2}\"[^<>]*#{@_attr_name1}=\"#{@_attr_value1}\")[^<>]*)>" # rubocop:disable Layout/LineLength
|
|
387
385
|
|
data/lib/meteor.rb
CHANGED
|
@@ -37,11 +37,11 @@ require 'meteor/ml/xml/parser_impl'
|
|
|
37
37
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
38
38
|
#
|
|
39
39
|
# @author Yasumasa Ashida
|
|
40
|
-
# @version 0.9.
|
|
40
|
+
# @version 0.9.44
|
|
41
41
|
#
|
|
42
42
|
|
|
43
43
|
module Meteor
|
|
44
|
-
VERSION = '0.9.
|
|
44
|
+
VERSION = '0.9.44'
|
|
45
45
|
|
|
46
46
|
# require 'fileutils'
|
|
47
47
|
|