livetext 0.9.11 → 0.9.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/errors.rb +13 -0
- data/lib/formatline.rb +3 -5
- data/lib/functions.rb +6 -2
- data/lib/helpers.rb +21 -0
- data/lib/html.rb +32 -0
- data/lib/livetext/importable.rb +2 -0
- data/lib/livetext.rb +44 -42
- data/lib/parser/general.rb +38 -0
- data/lib/parser/import.rb +17 -0
- data/lib/parser/mixin.rb +46 -0
- data/lib/parser/set.rb +136 -0
- data/lib/parser/string.rb +55 -0
- data/lib/parser.rb +5 -0
- data/lib/processor.rb +22 -16
- data/lib/standard.rb +144 -292
- data/lib/userapi.rb +2 -1
- data/livetext.gemspec +1 -2
- data/test/all.rb +3 -0
- data/test/formatting.rb +2 -9
- data/test/{data → snapshots}/basic_formatting/expected-error.txt +0 -0
- data/test/{data → snapshots}/basic_formatting/expected-output.txt +0 -0
- data/test/{data → snapshots}/basic_formatting/source.lt3 +0 -0
- data/test/{data → snapshots}/block_comment/expected-error.txt +0 -0
- data/test/{data → snapshots}/block_comment/expected-output.txt +0 -0
- data/test/{data → snapshots}/block_comment/source.lt3 +0 -0
- data/test/{data → snapshots}/comments_ignored_1/expected-error.txt +0 -0
- data/test/{data → snapshots}/comments_ignored_1/expected-output.txt +0 -0
- data/test/{data → snapshots}/comments_ignored_1/source.lt3 +0 -0
- data/test/{data → snapshots}/copy_is_raw/expected-error.txt +0 -0
- data/test/{data → snapshots}/copy_is_raw/expected-output.txt +0 -0
- data/test/{data → snapshots}/copy_is_raw/rawtext.inc +0 -0
- data/test/{data → snapshots}/copy_is_raw/source.lt3 +0 -0
- data/test/{data → snapshots}/crap +0 -0
- data/test/{data → snapshots}/def_method/expected-error.txt +0 -0
- data/test/{data → snapshots}/def_method/expected-output.txt +0 -0
- data/test/{data → snapshots}/def_method/source.lt3 +0 -0
- data/test/{data/error_inc_line_num/expected-err-line1match.txt → snapshots/error_inc_line_num/actual-error.txt} +0 -0
- data/test/{data/error_inc_line_num/expected-output.txt → snapshots/error_inc_line_num/actual-output.txt} +0 -0
- data/test/{data/error_line_num → snapshots/error_inc_line_num}/expected-err-line1match.txt +0 -0
- data/test/snapshots/error_inc_line_num/expected-output.txt +13 -0
- data/test/{data → snapshots}/error_inc_line_num/file2.lt3 +0 -0
- data/test/snapshots/error_inc_line_num/out-sdiff.txt +14 -0
- data/test/{data → snapshots}/error_inc_line_num/source.lt3 +0 -0
- data/test/snapshots/error_invalid_name/actual-error.txt +10 -0
- data/test/{data/error_no_such_mixin/expected-output.txt → snapshots/error_invalid_name/actual-output.txt} +0 -0
- data/test/{data → snapshots}/error_invalid_name/expected-err-line1match.txt +0 -0
- data/test/{data → snapshots}/error_invalid_name/expected-output.txt +0 -0
- data/test/snapshots/error_invalid_name/out-sdiff.txt +6 -0
- data/test/{data → snapshots}/error_invalid_name/source.lt3 +0 -0
- data/test/snapshots/error_line_num/actual-error.txt +1 -0
- data/test/snapshots/error_line_num/actual-output.txt +5 -0
- data/test/snapshots/error_line_num/expected-err-line1match.txt +1 -0
- data/test/{data → snapshots}/error_line_num/expected-output.txt +0 -0
- data/test/snapshots/error_line_num/out-sdiff.txt +6 -0
- data/test/{data → snapshots}/error_line_num/source.lt3 +0 -0
- data/test/snapshots/error_mismatched_end/actual-error.txt +1 -0
- data/test/{data/error_mismatched_end/expected-output.txt → snapshots/error_mismatched_end/actual-output.txt} +0 -0
- data/test/{data → snapshots}/error_mismatched_end/expected-err-line1match.txt +0 -0
- data/test/snapshots/error_mismatched_end/expected-output.txt +8 -0
- data/test/snapshots/error_mismatched_end/out-sdiff.txt +9 -0
- data/test/{data → snapshots}/error_mismatched_end/source.lt3 +0 -0
- data/test/{data/error_missing_end/expected-err-line1match.txt → snapshots/error_missing_end/actual-error.txt} +0 -0
- data/test/{data/error_missing_end/expected-output.txt → snapshots/error_missing_end/actual-output.txt} +0 -0
- data/test/snapshots/error_missing_end/expected-err-line1match.txt +1 -0
- data/test/snapshots/error_missing_end/expected-output.txt +5 -0
- data/test/snapshots/error_missing_end/out-sdiff.txt +6 -0
- data/test/{data → snapshots}/error_missing_end/source.lt3 +0 -0
- data/test/{data/error_name_not_permitted/expected-output.txt → snapshots/error_name_not_permitted/OLD-exp-out} +0 -0
- data/test/{data/example_alpha/expected-error.txt → snapshots/error_name_not_permitted/expected-output.txt} +0 -0
- data/test/snapshots/error_name_not_permitted/match-error.txt +1 -0
- data/test/{data → snapshots}/error_name_not_permitted/source.lt3 +0 -0
- data/test/snapshots/error_no_such_copy/actual-error.txt +10 -0
- data/test/{data/example_alpha2/expected-error.txt → snapshots/error_no_such_copy/actual-output.txt} +0 -0
- data/test/snapshots/error_no_such_copy/expected-err-line1match.txt +1 -0
- data/test/{data → snapshots}/error_no_such_copy/expected-output.txt +0 -5
- data/test/snapshots/error_no_such_copy/out-sdiff.txt +5 -0
- data/test/{data → snapshots}/error_no_such_copy/source.lt3 +0 -0
- data/test/snapshots/error_no_such_inc/actual-error.txt +10 -0
- data/test/{data/functions/expected-error.txt → snapshots/error_no_such_inc/actual-output.txt} +0 -0
- data/test/snapshots/error_no_such_inc/expected-err-line1match.txt +1 -0
- data/test/{data → snapshots}/error_no_such_inc/expected-output.txt +0 -4
- data/test/snapshots/error_no_such_inc/out-sdiff.txt +6 -0
- data/test/{data → snapshots}/error_no_such_inc/source.lt3 +0 -0
- data/test/snapshots/error_no_such_mixin/actual-error.txt +1 -0
- data/test/snapshots/error_no_such_mixin/actual-output.txt +11 -0
- data/test/{data → snapshots}/error_no_such_mixin/expected-err-line1match.txt +0 -0
- data/test/snapshots/error_no_such_mixin/expected-output.txt +5 -0
- data/test/snapshots/error_no_such_mixin/out-sdiff.txt +12 -0
- data/test/{data → snapshots}/error_no_such_mixin/source.lt3 +0 -0
- data/test/{data/hello_world → snapshots/example_alpha}/expected-error.txt +0 -0
- data/test/{data → snapshots}/example_alpha/expected-output.txt +0 -0
- data/test/{data → snapshots}/example_alpha/source.lt3 +0 -0
- data/test/{data/more_complex_vars → snapshots/example_alpha2}/expected-error.txt +0 -0
- data/test/{data → snapshots}/example_alpha2/expected-output.txt +0 -0
- data/test/{data → snapshots}/example_alpha2/source.lt3 +0 -0
- data/test/{data → snapshots}/fixit +0 -0
- data/test/{data/predef_vars → snapshots/functions}/expected-error.txt +0 -0
- data/test/{data → snapshots}/functions/expected-output.txt +0 -0
- data/test/{data → snapshots}/functions/source.lt3 +0 -0
- data/test/{data/raw_lines → snapshots/hello_world}/expected-error.txt +0 -0
- data/test/{data → snapshots}/hello_world/expected-output.txt +0 -0
- data/test/{data → snapshots}/hello_world/source.lt3 +0 -0
- data/test/{data → snapshots}/lines.txt +0 -0
- data/test/{data/raw_text_block → snapshots/more_complex_vars}/expected-error.txt +0 -0
- data/test/{data → snapshots}/more_complex_vars/expected-output.txt +0 -0
- data/test/{data → snapshots}/more_complex_vars/source.lt3 +0 -0
- data/test/{data/simple_copy/expected-error.txt → snapshots/predef_vars/actual-error.txt} +0 -0
- data/test/snapshots/predef_vars/actual-output.txt +6 -0
- data/test/{data/simple_include → snapshots/predef_vars}/expected-error.txt +0 -0
- data/test/{data → snapshots}/predef_vars/expected-output.txt +1 -1
- data/test/snapshots/predef_vars/out-sdiff.txt +7 -0
- data/test/{data → snapshots}/predef_vars/source.lt3 +0 -0
- data/test/{data/simple_mixin → snapshots/raw_lines}/expected-error.txt +0 -0
- data/test/{data → snapshots}/raw_lines/expected-output.txt +0 -0
- data/test/{data → snapshots}/raw_lines/source.lt3 +0 -0
- data/test/{data/simple_vars → snapshots/raw_text_block}/expected-error.txt +0 -0
- data/test/{data → snapshots}/raw_text_block/expected-output.txt +0 -0
- data/test/{data → snapshots}/raw_text_block/rawtext.inc +0 -0
- data/test/{data → snapshots}/raw_text_block/source.lt3 +0 -0
- data/test/{data/single_raw_line → snapshots/simple_copy}/expected-error.txt +0 -0
- data/test/{data → snapshots}/simple_copy/expected-output.txt +0 -0
- data/test/{data → snapshots}/simple_copy/simplefile.inc +0 -0
- data/test/{data → snapshots}/simple_copy/source.lt3 +0 -0
- data/test/{data/table_with_heredocs → snapshots/simple_include}/expected-error.txt +0 -0
- data/test/{data → snapshots}/simple_include/expected-output.txt +0 -0
- data/test/{data → snapshots}/simple_include/simplefile.inc +0 -0
- data/test/{data → snapshots}/simple_include/source.lt3 +0 -0
- data/test/snapshots/simple_mixin/actual-error.txt +2 -0
- data/test/snapshots/simple_mixin/actual-output.txt +4 -0
- data/test/{data/subset.txt → snapshots/simple_mixin/expected-error.txt} +0 -0
- data/test/{data → snapshots}/simple_mixin/expected-output.txt +0 -0
- data/test/snapshots/simple_mixin/out-sdiff.txt +6 -0
- data/test/{data → snapshots}/simple_mixin/simple_mixin.rb +0 -0
- data/test/{data → snapshots}/simple_mixin/source.lt3 +0 -0
- data/test/snapshots/simple_vars/expected-error.txt +0 -0
- data/test/{data → snapshots}/simple_vars/expected-output.txt +0 -0
- data/test/{data → snapshots}/simple_vars/source.lt3 +0 -0
- data/test/snapshots/single_raw_line/expected-error.txt +0 -0
- data/test/{data → snapshots}/single_raw_line/expected-output.txt +0 -0
- data/test/{data → snapshots}/single_raw_line/source.lt3 +0 -0
- data/test/snapshots/subset.txt +0 -0
- data/test/snapshots/table_with_heredocs/expected-error.txt +0 -0
- data/test/{data → snapshots}/table_with_heredocs/expected-output.txt +0 -0
- data/test/{data → snapshots}/table_with_heredocs/source.lt3 +0 -0
- data/test/snapshots.rb +219 -0
- data/test/testlines.rb +2 -2
- data/test/unit/all.rb +3 -0
- data/test/unit/html.rb +38 -0
- data/test/unit/parse_misc.rb +60 -0
- data/test/unit/parse_set.rb +157 -0
- data/test/unit/parser/all.rb +3 -0
- data/test/unit/parser/general.rb +59 -0
- data/test/unit/parser/importable.rb +19 -0
- data/test/unit/parser/mixin.rb +19 -0
- data/test/unit/parser/set.rb +157 -0
- data/test/unit/parser/string.rb +130 -0
- data/test/unit/parser.rb +4 -0
- data/test/unit/standard.rb +23 -0
- data/test/unit/stringparser.rb +140 -0
- metadata +152 -99
- data/test/data/error_inc_line_num/FOO +0 -21
- data/test/data/error_missing_end/ERR +0 -32
- data/test/data/error_name_not_permitted/expected-error.txt +0 -1
- data/test/data/error_no_such_copy/expected-err-line1match.txt +0 -1
- data/test/data/error_no_such_inc/expected-err-line1match.txt +0 -1
- data/test/test.rb +0 -140
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
EXPECTED | ACTUAL
|
2
|
+
This is my This is my
|
3
|
+
source file source file
|
4
|
+
which includes file2 here: which includes file2 here:
|
5
|
+
This is file2 This is file2
|
6
|
+
which has an error which has an error
|
7
|
+
about an unknown command about an unknown command
|
8
|
+
in line 5 in line 5
|
9
|
+
<p> <p>
|
10
|
+
|
11
|
+
And this is file2 line 7. And this is file2 line 7.
|
12
|
+
And here we are And here we are
|
13
|
+
back in the back in the
|
14
|
+
original file. original file.
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/Users/Hal/Dropbox/topx/git/livetext/lib/helpers.rb:7:in `check_disallowed': to_s (DisallowedName)
|
2
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/standard.rb:142:in `_def'
|
3
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/livetext.rb:232:in `handle_dotcmd'
|
4
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/livetext.rb:141:in `process_line'
|
5
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/livetext.rb:203:in `block in process_file'
|
6
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/livetext.rb:200:in `loop'
|
7
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/livetext.rb:200:in `process_file'
|
8
|
+
from ../../../bin/livetext:88:in `block in <main>'
|
9
|
+
from ../../../bin/livetext:57:in `loop'
|
10
|
+
from ../../../bin/livetext:57:in `<main>'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Error: Name 'foobar' is unknown
|
@@ -0,0 +1 @@
|
|
1
|
+
Error: Name 'foobar' is unknown
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Error: Name 'end' is unknown
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Error: #<RuntimeError: Expected .end, found end of file>
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
1 /Disallowed/
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/Users/Hal/Dropbox/topx/git/livetext/lib/helpers.rb:11:in `check_file_exists': Error: file nosuchfile.txt not found (FileNotFound)
|
2
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/standard.rb:280:in `copy'
|
3
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/livetext.rb:232:in `handle_dotcmd'
|
4
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/livetext.rb:141:in `process_line'
|
5
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/livetext.rb:203:in `block in process_file'
|
6
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/livetext.rb:200:in `loop'
|
7
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/livetext.rb:200:in `process_file'
|
8
|
+
from ../../../bin/livetext:88:in `block in <main>'
|
9
|
+
from ../../../bin/livetext:57:in `loop'
|
10
|
+
from ../../../bin/livetext:57:in `<main>'
|
data/test/{data/example_alpha2/expected-error.txt → snapshots/error_no_such_copy/actual-output.txt}
RENAMED
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Error: file nosuchfile.txt not found
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/Users/Hal/Dropbox/topx/git/livetext/lib/helpers.rb:11:in `check_file_exists': Error: file nosuchinc.lt3 not found (FileNotFound)
|
2
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/standard.rb:237:in `_include'
|
3
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/livetext.rb:232:in `handle_dotcmd'
|
4
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/livetext.rb:141:in `process_line'
|
5
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/livetext.rb:203:in `block in process_file'
|
6
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/livetext.rb:200:in `loop'
|
7
|
+
from /Users/Hal/Dropbox/topx/git/livetext/lib/livetext.rb:200:in `process_file'
|
8
|
+
from ../../../bin/livetext:88:in `block in <main>'
|
9
|
+
from ../../../bin/livetext:57:in `loop'
|
10
|
+
from ../../../bin/livetext:57:in `<main>'
|
data/test/{data/functions/expected-error.txt → snapshots/error_no_such_inc/actual-output.txt}
RENAMED
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Error: file nosuchinc.lt3 not found
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Error: #<ArgumentError: wrong number of arguments (given 1, expected 0)>
|
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
|
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
|
File without changes
|
@@ -0,0 +1,7 @@
|
|
1
|
+
EXPECTED | ACTUAL
|
2
|
+
Here we go... Here we go...
|
3
|
+
File = source.lt3 File = source.lt3
|
4
|
+
FileDir = /Users/Hal/Dropbox/topx/git/livetext/test/snapsho FileDir = /Users/Hal/Dropbox/topx/git/livetext/test/snapsho
|
5
|
+
User = Hal User = Hal
|
6
|
+
Version = 0.9.12 | Version = 0.9.11
|
7
|
+
NoSuchVar = [NoSuchVar is undefined] NoSuchVar = [NoSuchVar is undefined]
|
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
|
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
|
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
|