livetext 0.8.5 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/{README.ltx → README.lt3} +4 -4
  3. data/README.md +4 -4
  4. data/bin/livetext +2 -2
  5. data/dsl/tutorial.rb +1 -1
  6. data/lib/livetext.rb +1 -1
  7. data/livetext.gemspec +1 -1
  8. data/test/data/basic_formatting/{source.ltx → source.lt3} +0 -0
  9. data/test/data/block_comment/{source.ltx → source.lt3} +0 -0
  10. data/test/data/comments_ignored_1/{source.ltx → source.lt3} +0 -0
  11. data/test/data/copy_is_raw/{source.ltx → source.lt3} +0 -0
  12. data/test/data/def_method/{source.ltx → source.lt3} +0 -0
  13. data/test/data/error_inc_line_num/expected-error.txt +1 -1
  14. data/test/data/error_inc_line_num/{file2.ltx → file2.lt3} +0 -0
  15. data/test/data/error_inc_line_num/{source.ltx → source.lt3} +1 -1
  16. data/test/data/error_invalid_name/expected-error.txt +1 -1
  17. data/test/data/error_invalid_name/{source.ltx → source.lt3} +0 -0
  18. data/test/data/error_line_num/expected-error.txt +1 -1
  19. data/test/data/error_line_num/{source.ltx → source.lt3} +0 -0
  20. data/test/data/error_mismatched_end/expected-error.txt +1 -1
  21. data/test/data/error_mismatched_end/{source.ltx → source.lt3} +0 -0
  22. data/test/data/error_missing_end/expected-error.txt +1 -1
  23. data/test/data/error_missing_end/{source.ltx → source.lt3} +0 -0
  24. data/test/data/error_name_not_permitted/expected-error.txt +1 -1
  25. data/test/data/error_name_not_permitted/{source.ltx → source.lt3} +0 -0
  26. data/test/data/error_no_such_copy/expected-error.txt +1 -1
  27. data/test/data/error_no_such_copy/{source.ltx → source.lt3} +0 -0
  28. data/test/data/error_no_such_inc/expected-error.txt +1 -1
  29. data/test/data/error_no_such_inc/{source.ltx → source.lt3} +1 -1
  30. data/test/data/error_no_such_mixin/expected-error.txt +1 -1
  31. data/test/data/error_no_such_mixin/{source.ltx → source.lt3} +0 -0
  32. data/test/data/example_alpha/{source.ltx → source.lt3} +0 -0
  33. data/test/data/example_alpha2/{source.ltx → source.lt3} +0 -0
  34. data/test/data/fixit +1 -1
  35. data/test/data/functions/{source.ltx → source.lt3} +0 -0
  36. data/test/data/hello_world/{source.ltx → source.lt3} +0 -0
  37. data/test/data/more_complex_vars/{source.ltx → source.lt3} +0 -0
  38. data/test/data/raw_lines/{source.ltx → source.lt3} +0 -0
  39. data/test/data/raw_text_block/{source.ltx → source.lt3} +0 -0
  40. data/test/data/simple_copy/{source.ltx → source.lt3} +0 -0
  41. data/test/data/simple_include/{source.ltx → source.lt3} +0 -0
  42. data/test/data/simple_mixin/{source.ltx → source.lt3} +0 -0
  43. data/test/data/simple_vars/{source.ltx → source.lt3} +0 -0
  44. data/test/data/single_raw_line/{source.ltx → source.lt3} +0 -0
  45. data/test/newtest +4 -4
  46. data/test/test.rb +2 -2
  47. metadata +30 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b697d944ae6248d005be016d8701114c8711f49d
4
- data.tar.gz: ba85a6ffafe40efba4784f0d9c69e1e4a1235c9e
3
+ metadata.gz: ccbb6c5bb5591e575c3eab18a1cafa12d682d04c
4
+ data.tar.gz: 47e908c7a6444708875145e8209967a90e2211b6
5
5
  SHA512:
6
- metadata.gz: cfe6fc8d087f9843a95d470d98c998053a2332a08d661ce88c6d9c67f6e79d34f58c35045dab1b9bc0c3bb8c81ad1b6ef3502b5a53571d0cda1158d9af9274ba
7
- data.tar.gz: 17d97c0c7bb70a0bbc6fd2fd32201a35bf884d4b332a5ee86e2e64832149ec469119cb327f0a6644289a1ac0bfa6f6f67d921f6efc0c87bb8f5ed04438519e4f
6
+ metadata.gz: 53f4bbaf8caaad456df488f408f597bbce5b783bb33c43712794e9aa7a90f9d174b4df5eb11832137b9dadc7b39e25beba392850791eb7fb605b347af24ece8c
7
+ data.tar.gz: cd678db2de3f11631b6e557a253bc5adbf12537f94fad77d907e6217adb18ddb7ddb64c69b4c34468552c304eb32eee24e1578aa13bd8346820486c1a1217853
@@ -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 `.ltx (though this may change). *Note: The source for this
68
- README is a `.ltx file which uses its own little _[ad hoc] library (called ``tutorial.rb). Refer to
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 `.ltx file)
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 `.ltx file can be written this way:
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>.ltx</tt> (though this may change). <b>Note:</b> The source for this
77
- README is a <tt>.ltx</tt> file which uses its own little <i>ad hoc</i> library (called <tt>tutorial</tt>.rb). Refer to
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>.ltx</tt> file)</td><td></td>
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>.ltx</tt> file can be written this way:
849
+ Now the <tt>.lt3</tt> file can be written this way:
850
850
  <p>
851
851
 
852
852
  <pre>
data/bin/livetext CHANGED
@@ -4,8 +4,8 @@ require 'rubygems'
4
4
 
5
5
  require_relative '../lib/livetext'
6
6
 
7
- def handle_ltx(src)
8
- abort "Unknown file extension" unless src =~ /.ltx$/
7
+ def handle_lt3(src)
8
+ abort "Unknown file extension" unless src =~ /.lt3$/
9
9
  end
10
10
 
11
11
  # Main
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.ltx", "{Data}/#{name}/expected-output.txt"
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
@@ -1,5 +1,5 @@
1
1
  class Livetext
2
- VERSION = "0.8.5"
2
+ VERSION = "0.8.6"
3
3
  end
4
4
 
5
5
  require 'fileutils'
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.ltx ./README.md livetext.gemspec]
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
@@ -1 +1 @@
1
- Error: Name 'foobar' is unknown (at file2.ltx line 5)
1
+ Error: Name 'foobar' is unknown (at file2.lt3 line 5)
@@ -1,7 +1,7 @@
1
1
  This is my
2
2
  source file
3
3
  which includes file2 here:
4
- .include file2.ltx
4
+ .include file2.lt3
5
5
 
6
6
  And here we are
7
7
  back in the
@@ -1 +1 @@
1
- Error: Illegal name 'to_s' (at source.ltx line 5)
1
+ Error: Illegal name 'to_s' (at source.lt3 line 5)
@@ -1 +1 @@
1
- Error: Name 'foobar' is unknown (at source.ltx line 4)
1
+ Error: Name 'foobar' is unknown (at source.lt3 line 4)
File without changes
@@ -1 +1 @@
1
- Error: Mismatched 'end' (at source.ltx line 6)
1
+ Error: Mismatched 'end' (at source.lt3 line 6)
@@ -1 +1 @@
1
- Error: Expecting .end, found end of file (at source.ltx line 6)
1
+ Error: Expecting .end, found end of file (at source.lt3 line 6)
@@ -1 +1 @@
1
- Error: Name 'class' is not permitted (at source.ltx line 4)
1
+ Error: Name 'class' is not permitted (at source.lt3 line 4)
@@ -1 +1 @@
1
- Error: No such file 'nosuchfile.txt' to copy (at source.ltx line 5)
1
+ Error: No such file 'nosuchfile.txt' to copy (at source.lt3 line 5)
@@ -1 +1 @@
1
- Error: No such include file 'nosuchinc.ltx' (at source.ltx line 5)
1
+ Error: No such include file 'nosuchinc.lt3' (at source.lt3 line 5)
@@ -2,7 +2,7 @@ Make sure
2
2
  a nonexistent include
3
3
  will give an error.
4
4
 
5
- .include nosuchinc.ltx
5
+ .include nosuchinc.lt3
6
6
 
7
7
  Nothing to
8
8
  see here.
@@ -1 +1 @@
1
- Error: No such mixin 'nosuchthing' (at source.ltx line 6)
1
+ Error: No such mixin 'nosuchthing' (at source.lt3 line 6)
File without changes
File without changes
data/test/data/fixit CHANGED
@@ -2,5 +2,5 @@ cd $1
2
2
  mv $1.err actual-error.txt
3
3
  mv $1.erx expected-error.txt
4
4
  mv $1.exp expected-output.txt
5
- mv $1.ltx source.ltx
5
+ mv $1.lt3 source.lt3
6
6
  mv $1.out actual-output.txt
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.ltx
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.ltx
9
+ vi source.lt3
10
10
 
11
- livetext source.ltx >expected-output.txt 2>expected-error.txt
11
+ livetext source.lt3 >expected-output.txt 2>expected-error.txt
12
12
 
13
- vi -O source.ltx expected-output.txt expected-error.txt
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.ltx", "actual-output.txt", "expected-output.txt"
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.ltx, expected-output.txt, and expected-error.txt
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.5
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-04 00:00:00.000000000 Z
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.ltx"
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
59
- - test/data/error_inc_line_num/source.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
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.ltx
125
+ - test/data/single_raw_line/source.lt3
126
126
  - test/newtest
127
127
  - test/test.rb
128
128
  - test/try.lt