meteor 0.9.26 → 0.9.27

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: a6776307290552674dcb55922ddc18ed004c4b79c1176c80ddd9f60ad87b0b1d
4
- data.tar.gz: ec1e5797f5e09c537603b7ac67866cd51ab0cbbd80f6dd30074d9e43642b0fb4
3
+ metadata.gz: 767fbc8cbdae6e5e7b833b4618639e278d8ed48d9983a629a4d766e8a2b83bc9
4
+ data.tar.gz: a99c9054bf591fbd5853ac3a4e0fc5d172841fc239941b9dba0425a39b9c922c
5
5
  SHA512:
6
- metadata.gz: f9b7bdd39d61dc47cf3929eda3a4b9a08399d3b72223b6ac9a392ebce76566b11872bb6a186e73f793fa58e2b897ead3fd2e4aeb3cac08c8a08f3eae5731c9d6
7
- data.tar.gz: 940e99265e10e13149cc4fc0bd50732d8ee9b1f3c7a66dfcc2ecf012fc8e7602b016041ae6453b444085dfcdfe97be6fb6f7fc4818050015c06df5872925c5f0
6
+ metadata.gz: fb1c32cfdc1445b8e2be9270f5e0621806dd5941da921969506adda5eaeb1093e9c4b8f861ab387928ba284e1ae790c2b812089b3fa56fb3ff2f53658104a689
7
+ data.tar.gz: 1c137770bb6bcb351154798916c251097b2a862e78e7b5d236bbc47fa2aec9fb7f9eaacf2a34a25b7bd8c2fe8fef3d2e9e638bb00aa5f9b3f45a17a595596127
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.9.27 / 2026-06-30 Yasumasa Ashida <ys.ashida@gmail.com>
2
+
3
+ * Refactoring
4
+
1
5
  == 0.9.26 / 2026-06-30 Yasumasa Ashida <ys.ashida@gmail.com>
2
6
 
3
7
  * Refactoring
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- meteor (0.9.26)
4
+ meteor (0.9.27)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -40,25 +40,26 @@ module Meteor
40
40
  end
41
41
 
42
42
  #
43
- # @overload add_str(type, relative_url, doc)
43
+ # @overload add_template(type, relative_url, doc)
44
44
  # add parser (パーサを追加する)
45
45
  # @param [Integer] type type of parser (パーサ・タイプ)
46
46
  # @param [String] relative_url relative URL (相対URL)
47
47
  # @param [String] doc document (ドキュメント)
48
48
  # @return [Meteor::Parser] parser (パーサ)
49
- # @overload add_str(relative_url, doc)
49
+ # @overload add_template(relative_url, doc)
50
50
  # add parser (パーサを追加する)
51
51
  # @param [String] relative_url relative URL (相対URL)
52
52
  # @param [String] doc document (ドキュメント)
53
53
  # @return [Meteor::Parser] parser (パーサ)
54
54
  #
55
- def self.add_str(*args)
56
- @@pf.add_str(args)
55
+ def self.add_template(*args)
56
+ @@pf.add_template(args)
57
57
  end
58
58
 
59
59
  class << self
60
60
  alias_method :link, :add
61
- alias_method :link_str, :add_str
61
+ alias_method :add_str, :add_template
62
+ alias_method :link_str, :add_template
62
63
  end
63
64
 
64
65
  #
@@ -161,17 +161,17 @@ module Meteor
161
161
  def add(*args)
162
162
  case args.length
163
163
  when 1
164
- add_1(args[0])
164
+ add_file_1(args[0])
165
165
  when 2
166
166
  if args[0].kind_of?(Integer) || args[0].kind_of?(Symbol)
167
- add_2_n(args[0], args[1])
167
+ add_file_2_n(args[0], args[1])
168
168
  elsif args[0].kind_of?(String)
169
- add_2_s(args[0], args[1])
169
+ add_file_2_s(args[0], args[1])
170
170
  else
171
171
  raise ArgumentError
172
172
  end
173
173
  when 3
174
- add_3(args[0], args[1], args[2])
174
+ add_file_3(args[0], args[1], args[2])
175
175
  else
176
176
  raise ArgumentError
177
177
  end
@@ -210,7 +210,7 @@ module Meteor
210
210
  # @param [String] enc character encoding (文字エンコーディング)
211
211
  # @return [Meteor::Parser] parser(パーサ)
212
212
  #
213
- def add_3(type, relative_path, enc = "UTF-8")
213
+ def add_file_3(type, relative_path, enc = "UTF-8")
214
214
  ps = new_parser(type)
215
215
  ps.read(File.expand_path(relative_path, @root), enc)
216
216
 
@@ -218,7 +218,7 @@ module Meteor
218
218
  @cache[relative_url] = ps
219
219
  end
220
220
 
221
- private :add_3
221
+ private :add_file_3
222
222
 
223
223
  #
224
224
  # add parser (パーサを追加する)
@@ -226,11 +226,11 @@ module Meteor
226
226
  # @param [String] relative_path relative file path (相対ファイルパス)
227
227
  # @return [Meteor::Parser] parser (パーサ)
228
228
  #
229
- def add_2_n(type, relative_path)
230
- add_3(type, relative_path, @enc)
229
+ def add_file_2_n(type, relative_path)
230
+ add_file_3(type, relative_path, @enc)
231
231
  end
232
232
 
233
- private :add_2_n
233
+ private :add_file_2_n
234
234
 
235
235
  #
236
236
  # add parser (パーサを追加する)
@@ -238,22 +238,79 @@ module Meteor
238
238
  # @param [String] enc character encoding (文字エンコーディング)
239
239
  # @return [Meteor::Parser] parser (パーサ)
240
240
  #
241
- def add_2_s(relative_path, enc)
242
- add_3(@type, relative_path, enc)
241
+ def add_file_2_s(relative_path, enc)
242
+ add_file_3(@type, relative_path, enc)
243
243
  end
244
244
 
245
- private :add_2_s
245
+ private :add_file_2_s
246
246
 
247
247
  #
248
248
  # add parser (パーサを追加する)
249
249
  # @param [String] relative_path relative file path (相対ファイルパス)
250
250
  # @return [Meteor::Parser] parser (パーサ)
251
251
  #
252
- def add_1(relative_path)
253
- add_3(@type, relative_path, @enc)
252
+ def add_file_1(relative_path)
253
+ add_file_3(@type, relative_path, @enc)
254
254
  end
255
255
 
256
- private :add_1
256
+ private :add_file_1
257
+
258
+ #
259
+ # @overload add_template(type, relative_url, doc)
260
+ # add parser (パーサを追加する)
261
+ # @param [Integer,Symbol] type type of parser (パーサ・タイプ)
262
+ # @param [String] relative_url relative URL (相対URL)
263
+ # @param [String] doc document (ドキュメント)
264
+ # @return [Meteor::Parser] parser (パーサ)
265
+ # @overload add_template(relative_url, doc)
266
+ # add parser (パーサを追加する)
267
+ # @param [String] relative_url relative URL (相対URL)
268
+ # @param [String] doc document (ドキュメント)
269
+ # @return [Meteor::Parser] parser (パーサ)
270
+ #
271
+ def add_template(*args)
272
+ case args.length
273
+ when 2
274
+ add_template_2(args[0], args[1])
275
+ when 3
276
+ add_template_3(args[0], args[1], args[2])
277
+ else
278
+ raise ArgumentError
279
+ end
280
+ end
281
+
282
+ #
283
+ # add parser (パーサを追加する)
284
+ # @param [Integer,Symbol] type type of parser (パーサ・タイプ)
285
+ # @param [String] relative_url relative URL (相対URL)
286
+ # @param [String] doc document (ドキュメント)
287
+ # @return [Meteor::Parser] parser (パーサ)
288
+ #
289
+ def add_template_3(type, relative_url, doc)
290
+ ps = new_parser(type)
291
+ ps.document = doc
292
+ ps.parse
293
+
294
+ @cache[relative_url] = ps
295
+ end
296
+
297
+ private :add_template_3
298
+
299
+ #
300
+ # add parser (パーサを追加する)
301
+ # @param [String] relative_url relative URL (相対URL)
302
+ # @param [String] doc document (ドキュメント)
303
+ # @return [Meteor::Parser] parser (パーサ)
304
+ #
305
+ def add_template_2(relative_url, doc)
306
+ add_template_3(@type, relative_url, doc)
307
+ end
308
+
309
+ private :add_template_2
310
+
311
+ alias_method :link_str, :add_template
312
+ alias_method :add_str, :add_template
313
+ alias_method :parser_str, :add_template
257
314
 
258
315
  #
259
316
  #@overload parser(key)
@@ -315,62 +372,6 @@ module Meteor
315
372
  parser_1(key).root_element
316
373
  end
317
374
 
318
- #
319
- # @overload add_str(type, relative_url, doc)
320
- # add parser (パーサを追加する)
321
- # @param [Integer] type type of parser (パーサ・タイプ)
322
- # @param [String] relative_url relative URL (相対URL)
323
- # @param [String] doc document (ドキュメント)
324
- # @return [Meteor::Parser] parser (パーサ)
325
- # @overload add_str(relative_url, doc)
326
- # add parser (パーサを追加する)
327
- # @param [String] relative_url relative URL (相対URL)
328
- # @param [String] doc document (ドキュメント)
329
- # @return [Meteor::Parser] parser (パーサ)
330
- #
331
- def add_str(*args)
332
- case args.length
333
- when 2
334
- add_str_2(args[0], args[1])
335
- when 3
336
- add_str_3(args[0], args[1], args[2])
337
- else
338
- raise ArgumentError
339
- end
340
- end
341
-
342
- #
343
- # add parser (パーサを追加する)
344
- # @param [Integer,Symbol] type type of parser (パーサ・タイプ)
345
- # @param [String] relative_url relative URL (相対URL)
346
- # @param [String] doc document (ドキュメント)
347
- # @return [Meteor::Parser] parser (パーサ)
348
- #
349
- def add_str_3(type, relative_url, doc)
350
- ps = new_parser(type)
351
- ps.document = doc
352
- ps.parse
353
-
354
- @cache[relative_url] = ps
355
- end
356
-
357
- private :add_str_3
358
-
359
- #
360
- # add parser (パーサを追加する)
361
- # @param [String] relative_url relative URL (相対URL)
362
- # @param [String] doc document (ドキュメント)
363
- # @return [Meteor::Parser] parser (パーサ)
364
- #
365
- def add_str_2(relative_url, doc)
366
- add_str_3(@type, relative_url, doc)
367
- end
368
-
369
- private :add_str_2
370
-
371
- alias_method :link_str, :add_str
372
- alias_method :parser_str, :add_str
373
-
374
375
  def new_parser(type)
375
376
  case type
376
377
  when Parser::HTML, :html
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.26
39
+ # @version 0.9.27
40
40
  #
41
41
 
42
42
  module Meteor
43
- VERSION = "0.9.26"
43
+ VERSION = "0.9.27"
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.26
4
+ version: 0.9.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasumasa Ashida