livetext 0.8.5 → 0.8.6
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/{README.ltx → README.lt3} +4 -4
- data/README.md +4 -4
- data/bin/livetext +2 -2
- data/dsl/tutorial.rb +1 -1
- data/lib/livetext.rb +1 -1
- data/livetext.gemspec +1 -1
- data/test/data/basic_formatting/{source.ltx → source.lt3} +0 -0
- data/test/data/block_comment/{source.ltx → source.lt3} +0 -0
- data/test/data/comments_ignored_1/{source.ltx → source.lt3} +0 -0
- data/test/data/copy_is_raw/{source.ltx → source.lt3} +0 -0
- data/test/data/def_method/{source.ltx → source.lt3} +0 -0
- data/test/data/error_inc_line_num/expected-error.txt +1 -1
- data/test/data/error_inc_line_num/{file2.ltx → file2.lt3} +0 -0
- data/test/data/error_inc_line_num/{source.ltx → source.lt3} +1 -1
- data/test/data/error_invalid_name/expected-error.txt +1 -1
- data/test/data/error_invalid_name/{source.ltx → source.lt3} +0 -0
- data/test/data/error_line_num/expected-error.txt +1 -1
- data/test/data/error_line_num/{source.ltx → source.lt3} +0 -0
- data/test/data/error_mismatched_end/expected-error.txt +1 -1
- data/test/data/error_mismatched_end/{source.ltx → source.lt3} +0 -0
- data/test/data/error_missing_end/expected-error.txt +1 -1
- data/test/data/error_missing_end/{source.ltx → source.lt3} +0 -0
- data/test/data/error_name_not_permitted/expected-error.txt +1 -1
- data/test/data/error_name_not_permitted/{source.ltx → source.lt3} +0 -0
- data/test/data/error_no_such_copy/expected-error.txt +1 -1
- data/test/data/error_no_such_copy/{source.ltx → source.lt3} +0 -0
- data/test/data/error_no_such_inc/expected-error.txt +1 -1
- data/test/data/error_no_such_inc/{source.ltx → source.lt3} +1 -1
- data/test/data/error_no_such_mixin/expected-error.txt +1 -1
- data/test/data/error_no_such_mixin/{source.ltx → source.lt3} +0 -0
- data/test/data/example_alpha/{source.ltx → source.lt3} +0 -0
- data/test/data/example_alpha2/{source.ltx → source.lt3} +0 -0
- data/test/data/fixit +1 -1
- data/test/data/functions/{source.ltx → source.lt3} +0 -0
- data/test/data/hello_world/{source.ltx → source.lt3} +0 -0
- data/test/data/more_complex_vars/{source.ltx → source.lt3} +0 -0
- data/test/data/raw_lines/{source.ltx → source.lt3} +0 -0
- data/test/data/raw_text_block/{source.ltx → source.lt3} +0 -0
- data/test/data/simple_copy/{source.ltx → source.lt3} +0 -0
- data/test/data/simple_include/{source.ltx → source.lt3} +0 -0
- data/test/data/simple_mixin/{source.ltx → source.lt3} +0 -0
- data/test/data/simple_vars/{source.ltx → source.lt3} +0 -0
- data/test/data/single_raw_line/{source.ltx → source.lt3} +0 -0
- data/test/newtest +4 -4
- data/test/test.rb +2 -2
- metadata +30 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccbb6c5bb5591e575c3eab18a1cafa12d682d04c
|
4
|
+
data.tar.gz: 47e908c7a6444708875145e8209967a90e2211b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53f4bbaf8caaad456df488f408f597bbce5b783bb33c43712794e9aa7a90f9d174b4df5eb11832137b9dadc7b39e25beba392850791eb7fb605b347af24ece8c
|
7
|
+
data.tar.gz: cd678db2de3f11631b6e557a253bc5adbf12537f94fad77d907e6217adb18ddb7ddb64c69b4c34468552c304eb32eee24e1578aa13bd8346820486c1a1217853
|
data/{README.ltx → README.lt3}
RENAMED
@@ -64,8 +64,8 @@ The command `.end is special, marking the end of a body of text. Some commands m
|
|
64
64
|
a block of lines rather than just a few parameters. (A text block is like a here-document.)
|
65
65
|
There is no method name corresponding to the `.end command.
|
66
66
|
|
67
|
-
The file extension I've chosen is `.
|
68
|
-
README is a `.
|
67
|
+
The file extension I've chosen is `.lt3 (though this may change). *Note: The source for this
|
68
|
+
README is a `.lt3 file which uses its own little _[ad hoc] library (called ``tutorial.rb). Refer to
|
69
69
|
the repo to see these.
|
70
70
|
|
71
71
|
.section Syntax, comments, and more
|
@@ -143,7 +143,7 @@ names are essentially the same as the names of the dot-commands, with occasional
|
|
143
143
|
`banner %% Print a "noticeable" message to the screen
|
144
144
|
`quit %% End processing and exit
|
145
145
|
`nopass %% Don't pass lines through (just honor commands)
|
146
|
-
`include %% Read and process another file (typically a `.
|
146
|
+
`include %% Read and process another file (typically a `.lt3 file)
|
147
147
|
`debug %% Turn on debugging
|
148
148
|
`nopara %% Turn off the "blank line implies new paragraph" switch
|
149
149
|
`newpage %% Start a new output page
|
@@ -279,7 +279,7 @@ def alpha
|
|
279
279
|
end
|
280
280
|
.end
|
281
281
|
|
282
|
-
Now the `.
|
282
|
+
Now the `.lt3 file can be written this way:
|
283
283
|
|
284
284
|
.code
|
285
285
|
.mixin mylib
|
data/README.md
CHANGED
@@ -73,8 +73,8 @@ a block of lines rather than just a few parameters. (A text block is like a here
|
|
73
73
|
There is no method name corresponding to the <tt>.end</tt> command.
|
74
74
|
<p>
|
75
75
|
|
76
|
-
The file extension I've chosen is <tt>.
|
77
|
-
README is a <tt>.
|
76
|
+
The file extension I've chosen is <tt>.lt3</tt> (though this may change). <b>Note:</b> The source for this
|
77
|
+
README is a <tt>.lt3</tt> file which uses its own little <i>ad hoc</i> library (called <tt>tutorial</tt>.rb). Refer to
|
78
78
|
the repo to see these.
|
79
79
|
<p>
|
80
80
|
|
@@ -236,7 +236,7 @@ names are essentially the same as the names of the dot-commands, with occasional
|
|
236
236
|
<td width=3%><td width=10%><tt>nopass</tt> %% Don't pass lines through (just honor commands)</td><td></td>
|
237
237
|
</tr>
|
238
238
|
<tr>
|
239
|
-
<td width=3%><td width=10%><tt>include</tt> %% Read and process another file (typically a <tt>.
|
239
|
+
<td width=3%><td width=10%><tt>include</tt> %% Read and process another file (typically a <tt>.lt3</tt> file)</td><td></td>
|
240
240
|
</tr>
|
241
241
|
<tr>
|
242
242
|
<td width=3%><td width=10%><tt>debug</tt> %% Turn on debugging</td><td></td>
|
@@ -846,7 +846,7 @@ in here (and nothing else).
|
|
846
846
|
end
|
847
847
|
end
|
848
848
|
</pre>
|
849
|
-
Now the <tt>.
|
849
|
+
Now the <tt>.lt3</tt> file can be written this way:
|
850
850
|
<p>
|
851
851
|
|
852
852
|
<pre>
|
data/bin/livetext
CHANGED
data/dsl/tutorial.rb
CHANGED
@@ -75,7 +75,7 @@ end
|
|
75
75
|
def testcase
|
76
76
|
name = _args.first
|
77
77
|
_puts "\n<font size=+1><b>Test: </font><font size=+2><tt>#{name}</tt></font></b></h3><br>"
|
78
|
-
src, exp = "#{Data}/#{name}/source.
|
78
|
+
src, exp = "#{Data}/#{name}/source.lt3", "{Data}/#{name}/expected-output.txt"
|
79
79
|
@_args = [src, exp] # Better way to do this??
|
80
80
|
put_table(src, exp)
|
81
81
|
_puts "<br>"
|
data/lib/livetext.rb
CHANGED
data/livetext.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
|
18
18
|
# Files...
|
19
19
|
main = Find.find("bin").to_a + Find.find("lib").to_a + Find.find("dsl").to_a
|
20
|
-
misc = %w[./README.
|
20
|
+
misc = %w[./README.lt3 ./README.md livetext.gemspec]
|
21
21
|
test = Find.find("test").to_a
|
22
22
|
|
23
23
|
s.files = main + misc + test
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1 +1 @@
|
|
1
|
-
Error: Name 'foobar' is unknown (at file2.
|
1
|
+
Error: Name 'foobar' is unknown (at file2.lt3 line 5)
|
File without changes
|
@@ -1 +1 @@
|
|
1
|
-
Error: Illegal name 'to_s' (at source.
|
1
|
+
Error: Illegal name 'to_s' (at source.lt3 line 5)
|
File without changes
|
@@ -1 +1 @@
|
|
1
|
-
Error: Name 'foobar' is unknown (at source.
|
1
|
+
Error: Name 'foobar' is unknown (at source.lt3 line 4)
|
File without changes
|
@@ -1 +1 @@
|
|
1
|
-
Error: Mismatched 'end' (at source.
|
1
|
+
Error: Mismatched 'end' (at source.lt3 line 6)
|
File without changes
|
@@ -1 +1 @@
|
|
1
|
-
Error: Expecting .end, found end of file (at source.
|
1
|
+
Error: Expecting .end, found end of file (at source.lt3 line 6)
|
File without changes
|
@@ -1 +1 @@
|
|
1
|
-
Error: Name 'class' is not permitted (at source.
|
1
|
+
Error: Name 'class' is not permitted (at source.lt3 line 4)
|
File without changes
|
@@ -1 +1 @@
|
|
1
|
-
Error: No such file 'nosuchfile.txt' to copy (at source.
|
1
|
+
Error: No such file 'nosuchfile.txt' to copy (at source.lt3 line 5)
|
File without changes
|
@@ -1 +1 @@
|
|
1
|
-
Error: No such include file 'nosuchinc.
|
1
|
+
Error: No such include file 'nosuchinc.lt3' (at source.lt3 line 5)
|
@@ -1 +1 @@
|
|
1
|
-
Error: No such mixin 'nosuchthing' (at source.
|
1
|
+
Error: No such mixin 'nosuchthing' (at source.lt3 line 6)
|
File without changes
|
File without changes
|
File without changes
|
data/test/data/fixit
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/newtest
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
mkdir test/data/$1
|
2
2
|
|
3
|
-
# actual-error.txt actual-output.txt expected-error.txt expected-output.txt source.
|
3
|
+
# actual-error.txt actual-output.txt expected-error.txt expected-output.txt source.lt3
|
4
4
|
|
5
5
|
cd test/data/$1
|
6
6
|
|
7
7
|
touch expected-output.txt expected-error.txt
|
8
8
|
|
9
|
-
vi source.
|
9
|
+
vi source.lt3
|
10
10
|
|
11
|
-
livetext source.
|
11
|
+
livetext source.lt3 >expected-output.txt 2>expected-error.txt
|
12
12
|
|
13
|
-
vi -O source.
|
13
|
+
vi -O source.lt3 expected-output.txt expected-error.txt
|
14
14
|
|
data/test/test.rb
CHANGED
@@ -51,7 +51,7 @@ class TestingLivetext < MiniTest::Test
|
|
51
51
|
|
52
52
|
def external_files(base)
|
53
53
|
Dir.chdir(base) do
|
54
|
-
src, out, exp = "source.
|
54
|
+
src, out, exp = "source.lt3", "actual-output.txt", "expected-output.txt"
|
55
55
|
err, erx = "actual-error.txt", "expected-error.txt"
|
56
56
|
cmd = "../../../bin/livetext #{src} >#{out} 2>#{err}"
|
57
57
|
system(cmd)
|
@@ -79,7 +79,7 @@ call external_files.
|
|
79
79
|
The external_files method works this way:
|
80
80
|
- If the test (caller) method is test_my_silly_feature, then we will
|
81
81
|
look for a directory called data/my_silly_feature
|
82
|
-
- In here, there must be a source.
|
82
|
+
- In here, there must be a source.lt3, expected-output.txt, and expected-error.txt
|
83
83
|
- Technically, any of these can be empty
|
84
84
|
- We run livetext on the source and compare actual vs expected (stdout, stderr)
|
85
85
|
- The "real" output gets checked first
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: livetext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A smart text processor extensible in Ruby
|
14
14
|
email: rubyhacker@gmail.com
|
@@ -17,7 +17,7 @@ executables:
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
-
- "./README.
|
20
|
+
- "./README.lt3"
|
21
21
|
- "./README.md"
|
22
22
|
- bin/livetext
|
23
23
|
- dsl/bookish.rb
|
@@ -38,91 +38,91 @@ files:
|
|
38
38
|
- test/cleanup
|
39
39
|
- test/data/basic_formatting/expected-error.txt
|
40
40
|
- test/data/basic_formatting/expected-output.txt
|
41
|
-
- test/data/basic_formatting/source.
|
41
|
+
- test/data/basic_formatting/source.lt3
|
42
42
|
- test/data/block_comment/expected-error.txt
|
43
43
|
- test/data/block_comment/expected-output.txt
|
44
|
-
- test/data/block_comment/source.
|
44
|
+
- test/data/block_comment/source.lt3
|
45
45
|
- test/data/comments_ignored_1/expected-error.txt
|
46
46
|
- test/data/comments_ignored_1/expected-output.txt
|
47
|
-
- test/data/comments_ignored_1/source.
|
47
|
+
- test/data/comments_ignored_1/source.lt3
|
48
48
|
- test/data/copy_is_raw/expected-error.txt
|
49
49
|
- test/data/copy_is_raw/expected-output.txt
|
50
50
|
- test/data/copy_is_raw/rawtext.inc
|
51
|
-
- test/data/copy_is_raw/source.
|
51
|
+
- test/data/copy_is_raw/source.lt3
|
52
52
|
- test/data/crap
|
53
53
|
- test/data/def_method/expected-error.txt
|
54
54
|
- test/data/def_method/expected-output.txt
|
55
|
-
- test/data/def_method/source.
|
55
|
+
- test/data/def_method/source.lt3
|
56
56
|
- test/data/error_inc_line_num/expected-error.txt
|
57
57
|
- test/data/error_inc_line_num/expected-output.txt
|
58
|
-
- test/data/error_inc_line_num/file2.
|
59
|
-
- test/data/error_inc_line_num/source.
|
58
|
+
- test/data/error_inc_line_num/file2.lt3
|
59
|
+
- test/data/error_inc_line_num/source.lt3
|
60
60
|
- test/data/error_invalid_name/expected-error.txt
|
61
61
|
- test/data/error_invalid_name/expected-output.txt
|
62
|
-
- test/data/error_invalid_name/source.
|
62
|
+
- test/data/error_invalid_name/source.lt3
|
63
63
|
- test/data/error_line_num/expected-error.txt
|
64
64
|
- test/data/error_line_num/expected-output.txt
|
65
|
-
- test/data/error_line_num/source.
|
65
|
+
- test/data/error_line_num/source.lt3
|
66
66
|
- test/data/error_mismatched_end/expected-error.txt
|
67
67
|
- test/data/error_mismatched_end/expected-output.txt
|
68
|
-
- test/data/error_mismatched_end/source.
|
68
|
+
- test/data/error_mismatched_end/source.lt3
|
69
69
|
- test/data/error_missing_end/expected-error.txt
|
70
70
|
- test/data/error_missing_end/expected-output.txt
|
71
|
-
- test/data/error_missing_end/source.
|
71
|
+
- test/data/error_missing_end/source.lt3
|
72
72
|
- test/data/error_name_not_permitted/expected-error.txt
|
73
73
|
- test/data/error_name_not_permitted/expected-output.txt
|
74
|
-
- test/data/error_name_not_permitted/source.
|
74
|
+
- test/data/error_name_not_permitted/source.lt3
|
75
75
|
- test/data/error_no_such_copy/expected-error.txt
|
76
76
|
- test/data/error_no_such_copy/expected-output.txt
|
77
|
-
- test/data/error_no_such_copy/source.
|
77
|
+
- test/data/error_no_such_copy/source.lt3
|
78
78
|
- test/data/error_no_such_inc/expected-error.txt
|
79
79
|
- test/data/error_no_such_inc/expected-output.txt
|
80
|
-
- test/data/error_no_such_inc/source.
|
80
|
+
- test/data/error_no_such_inc/source.lt3
|
81
81
|
- test/data/error_no_such_mixin/expected-error.txt
|
82
82
|
- test/data/error_no_such_mixin/expected-output.txt
|
83
|
-
- test/data/error_no_such_mixin/source.
|
83
|
+
- test/data/error_no_such_mixin/source.lt3
|
84
84
|
- test/data/example_alpha/expected-error.txt
|
85
85
|
- test/data/example_alpha/expected-output.txt
|
86
|
-
- test/data/example_alpha/source.
|
86
|
+
- test/data/example_alpha/source.lt3
|
87
87
|
- test/data/example_alpha2/expected-error.txt
|
88
88
|
- test/data/example_alpha2/expected-output.txt
|
89
|
-
- test/data/example_alpha2/source.
|
89
|
+
- test/data/example_alpha2/source.lt3
|
90
90
|
- test/data/fixit
|
91
91
|
- test/data/functions/expected-error.txt
|
92
92
|
- test/data/functions/expected-output.txt
|
93
|
-
- test/data/functions/source.
|
93
|
+
- test/data/functions/source.lt3
|
94
94
|
- test/data/hello_world/expected-error.txt
|
95
95
|
- test/data/hello_world/expected-output.txt
|
96
|
-
- test/data/hello_world/source.
|
96
|
+
- test/data/hello_world/source.lt3
|
97
97
|
- test/data/lines.txt
|
98
98
|
- test/data/more_complex_vars/expected-error.txt
|
99
99
|
- test/data/more_complex_vars/expected-output.txt
|
100
|
-
- test/data/more_complex_vars/source.
|
100
|
+
- test/data/more_complex_vars/source.lt3
|
101
101
|
- test/data/raw_lines/expected-error.txt
|
102
102
|
- test/data/raw_lines/expected-output.txt
|
103
|
-
- test/data/raw_lines/source.
|
103
|
+
- test/data/raw_lines/source.lt3
|
104
104
|
- test/data/raw_text_block/expected-error.txt
|
105
105
|
- test/data/raw_text_block/expected-output.txt
|
106
106
|
- test/data/raw_text_block/rawtext.inc
|
107
|
-
- test/data/raw_text_block/source.
|
107
|
+
- test/data/raw_text_block/source.lt3
|
108
108
|
- test/data/simple_copy/expected-error.txt
|
109
109
|
- test/data/simple_copy/expected-output.txt
|
110
110
|
- test/data/simple_copy/simplefile.inc
|
111
|
-
- test/data/simple_copy/source.
|
111
|
+
- test/data/simple_copy/source.lt3
|
112
112
|
- test/data/simple_include/expected-error.txt
|
113
113
|
- test/data/simple_include/expected-output.txt
|
114
114
|
- test/data/simple_include/simplefile.inc
|
115
|
-
- test/data/simple_include/source.
|
115
|
+
- test/data/simple_include/source.lt3
|
116
116
|
- test/data/simple_mixin/expected-error.txt
|
117
117
|
- test/data/simple_mixin/expected-output.txt
|
118
118
|
- test/data/simple_mixin/simple_mixin.rb
|
119
|
-
- test/data/simple_mixin/source.
|
119
|
+
- test/data/simple_mixin/source.lt3
|
120
120
|
- test/data/simple_vars/expected-error.txt
|
121
121
|
- test/data/simple_vars/expected-output.txt
|
122
|
-
- test/data/simple_vars/source.
|
122
|
+
- test/data/simple_vars/source.lt3
|
123
123
|
- test/data/single_raw_line/expected-error.txt
|
124
124
|
- test/data/single_raw_line/expected-output.txt
|
125
|
-
- test/data/single_raw_line/source.
|
125
|
+
- test/data/single_raw_line/source.lt3
|
126
126
|
- test/newtest
|
127
127
|
- test/test.rb
|
128
128
|
- test/try.lt
|