plain_text 0.7.1 → 0.8
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/.gitignore +1 -0
- data/ChangeLog +11 -0
- data/Makefile +2 -1
- data/README.en.rdoc +67 -61
- data/lib/plain_text/builtin_type.rb +64 -0
- data/lib/plain_text/error.rb +6 -0
- data/lib/plain_text/part/boundary.rb +38 -28
- data/lib/plain_text/part/paragraph.rb +41 -18
- data/lib/plain_text/part/string_type.rb +90 -0
- data/lib/plain_text/part.rb +316 -275
- data/lib/plain_text/util.rb +13 -12
- data/lib/plain_text.rb +14 -10
- data/plain_text.gemspec +3 -3
- data/test/test_plain_text.rb +17 -2
- data/test/test_plain_text_parse_rule.rb +17 -3
- data/test/test_plain_text_part.rb +207 -39
- data/test/test_plain_text_split.rb +17 -2
- data/test/test_plain_text_util.rb +17 -2
- metadata +5 -5
@@ -2,11 +2,26 @@
|
|
2
2
|
|
3
3
|
# Author: M. Sakano (Wise Babel Ltd)
|
4
4
|
|
5
|
-
require 'plain_text'
|
6
|
-
|
7
5
|
$stdout.sync=true
|
8
6
|
$stderr.sync=true
|
7
|
+
|
9
8
|
# print '$LOAD_PATH=';p $LOAD_PATH
|
9
|
+
arlibbase = %w(plain_text)
|
10
|
+
|
11
|
+
arlibrelbase = arlibbase.map{|i| "../lib/"+i}
|
12
|
+
|
13
|
+
arlibrelbase.each do |elibbase|
|
14
|
+
require_relative elibbase
|
15
|
+
end # arlibbase.each do |elibbase|
|
16
|
+
|
17
|
+
print "NOTE: Running: "; p File.basename(__FILE__)
|
18
|
+
print "NOTE: Library relative paths: "; p arlibrelbase
|
19
|
+
arlibbase4full = arlibbase.map{|i| i.sub(%r@^(../)+@, "")}
|
20
|
+
puts "NOTE: Library full paths for #{arlibbase4full.inspect}: "
|
21
|
+
arlibbase4full.each do |elibbase|
|
22
|
+
ar = $LOADED_FEATURES.grep(/(^|\/)#{Regexp.quote(File.basename(elibbase))}(\.rb)?$/).uniq
|
23
|
+
print elibbase+": " if ar.empty?; p ar
|
24
|
+
end
|
10
25
|
|
11
26
|
#################################################
|
12
27
|
# Unit Test
|
@@ -2,11 +2,26 @@
|
|
2
2
|
|
3
3
|
# Author: M. Sakano (Wise Babel Ltd)
|
4
4
|
|
5
|
-
require 'plain_text/util'
|
6
|
-
|
7
5
|
$stdout.sync=true
|
8
6
|
$stderr.sync=true
|
7
|
+
|
9
8
|
# print '$LOAD_PATH=';p $LOAD_PATH
|
9
|
+
arlibbase = %w(plain_text)
|
10
|
+
|
11
|
+
arlibrelbase = arlibbase.map{|i| "../lib/"+i}
|
12
|
+
|
13
|
+
arlibrelbase.each do |elibbase|
|
14
|
+
require_relative elibbase
|
15
|
+
end # arlibbase.each do |elibbase|
|
16
|
+
|
17
|
+
print "NOTE: Running: "; p File.basename(__FILE__)
|
18
|
+
print "NOTE: Library relative paths: "; p arlibrelbase
|
19
|
+
arlibbase4full = arlibbase.map{|i| i.sub(%r@^(../)+@, "")}
|
20
|
+
puts "NOTE: Library full paths for #{arlibbase4full.inspect}: "
|
21
|
+
arlibbase4full.each do |elibbase|
|
22
|
+
ar = $LOADED_FEATURES.grep(/(^|\/)#{Regexp.quote(File.basename(elibbase))}(\.rb)?$/).uniq
|
23
|
+
print elibbase+": " if ar.empty?; p ar
|
24
|
+
end
|
10
25
|
|
11
26
|
#################################################
|
12
27
|
# Unit Test
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plain_text
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.8'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masa Sakano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This module provides utility functions and methods to handle plain text,
|
14
14
|
classes Part/Paragraph/Boundary to represent the logical structure of a document
|
@@ -37,10 +37,13 @@ files:
|
|
37
37
|
- bin/textclean
|
38
38
|
- bin/yard2md_afterclean
|
39
39
|
- lib/plain_text.rb
|
40
|
+
- lib/plain_text/builtin_type.rb
|
41
|
+
- lib/plain_text/error.rb
|
40
42
|
- lib/plain_text/parse_rule.rb
|
41
43
|
- lib/plain_text/part.rb
|
42
44
|
- lib/plain_text/part/boundary.rb
|
43
45
|
- lib/plain_text/part/paragraph.rb
|
46
|
+
- lib/plain_text/part/string_type.rb
|
44
47
|
- lib/plain_text/split.rb
|
45
48
|
- lib/plain_text/util.rb
|
46
49
|
- plain_text.gemspec
|
@@ -69,9 +72,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
69
72
|
- - ">="
|
70
73
|
- !ruby/object:Gem::Version
|
71
74
|
version: '2.0'
|
72
|
-
- - "<"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '3.2'
|
75
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
77
|
- - ">="
|