rb8-trepanning 0.1.5 → 0.1.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.
Files changed (52) hide show
  1. data/CHANGES +18 -4
  2. data/ChangeLog +100 -87
  3. data/Makefile +23 -4
  4. data/README.textile +3 -3
  5. data/Rakefile +26 -20
  6. data/app/complete.rb +13 -13
  7. data/app/default.rb +8 -8
  8. data/app/display.rb +7 -7
  9. data/app/frame.rb +8 -8
  10. data/app/irb.rb +15 -15
  11. data/app/options.rb +25 -25
  12. data/app/run.rb +16 -8
  13. data/app/util.rb +7 -7
  14. data/bin/trepan8 +2 -2
  15. data/check-filter.rb +21 -0
  16. data/interface.rb +4 -4
  17. data/interface/user.rb +11 -11
  18. data/io.rb +18 -19
  19. data/io/input.rb +14 -12
  20. data/lib/debugger.rb +3 -1
  21. data/lib/trepanning.rb +30 -28
  22. data/processor.rb +41 -38
  23. data/processor/command.rb +9 -9
  24. data/processor/command/alias.rb +6 -6
  25. data/processor/command/down.rb +1 -2
  26. data/processor/command/edit.rb +12 -8
  27. data/processor/command/eval.rb +7 -7
  28. data/processor/command/info_subcmd/macro.rb +6 -6
  29. data/processor/command/info_subcmd/program.rb +5 -1
  30. data/processor/command/macro.rb +6 -6
  31. data/processor/command/show_subcmd/abbrev.rb +2 -2
  32. data/processor/command/up.rb +1 -2
  33. data/processor/complete.rb +120 -0
  34. data/processor/default.rb +13 -9
  35. data/processor/load_cmds.rb +18 -97
  36. data/processor/location.rb +34 -31
  37. data/processor/msg.rb +5 -5
  38. data/processor/validate.rb +44 -35
  39. data/test/data/break_loop_bug.right +2 -2
  40. data/test/data/edit.cmd +1 -1
  41. data/test/data/edit.right +7 -1
  42. data/test/data/printvar.right +2 -2
  43. data/test/data/raise.right +0 -1
  44. data/test/data/trace-mingw.right +28 -0
  45. data/test/integration/.gitignore +1 -0
  46. data/test/integration/test-raise.rb +10 -1
  47. data/test/integration/test-trace.rb +10 -6
  48. data/test/unit/test-app-options.rb +9 -3
  49. data/test/unit/test-app-run.rb +8 -1
  50. data/test/unit/test-cmd-alias.rb +2 -2
  51. data/test/unit/test-proc-default.rb +34 -0
  52. metadata +10 -6
data/CHANGES CHANGED
@@ -1,3 +1,17 @@
1
+ Mar 31, 2013 (0.1.6)
2
+
3
+ - Command completion includes macro names. Some completion output is now
4
+ sorted
5
+
6
+ - Small document fixes. Some trailing blanks removed from source-code
7
+
8
+ - More Windows and MinGW tolerance
9
+
10
+
11
+ Aug 08, 2012 (0.1.5)
12
+ - Incompatible change: Remove aliases 'd' and 'u' for down and up
13
+ respectively. gdb uses 'u' and 'd' to mean something different.
14
+
1
15
  Oct 27, 2011 (0.1.4)
2
16
 
3
17
  - POSIX shell -x (long form: --trace) fixed
@@ -17,7 +31,7 @@ New features
17
31
  - tab completion (more complete on MRI 1.8.7 rb-readline gem used)
18
32
  - parsetree (if ParseTree installed)
19
33
 
20
- New commands from trepanning:
34
+ New commands from trepanning:
21
35
  - gdb-like "confirm" to turn on/off prompting of dangerous commands
22
36
  - "eval" and "eval?" without args to run parts of the current source line
23
37
  - macros
@@ -26,16 +40,16 @@ New commands from trepanning:
26
40
  - unique command abbrev (or not if "set abbrev off")
27
41
  - new "!" suffix on "quit" and "kill" command, e.g. "q!", to avoid prompting.
28
42
 
29
- Incompatibilities:
43
+ Incompatibilities:
30
44
  - autoeval is on by default
31
45
  - ";;" separates debugger commands so you can use ";" in eval
32
46
  - some possibliy lesser-used commands have been dropped. If people notice,
33
47
  they can be reinstated.
34
48
  - p is now pr to avoid eval confusion with Ruby's "p" method
35
49
  - dropped support for annotations and ruby-debug emacs. Use newer emacs-dbgr
36
- - some commands have been moved to closer match gdb:
50
+ - some commands have been moved to closer match gdb:
37
51
  * threads -> info threads
38
- * reload -> set reload
52
+ * reload -> set reload
39
53
  * trace -> set trace
40
54
 
41
55
  This sort of works for an unpatched MRI 1.9. Better is a patched MRI
data/ChangeLog CHANGED
@@ -1,3 +1,72 @@
1
+ 2013-03-31 rocky <rockyb@rubyforge.org>
2
+
3
+ * Rakefile, app/complete.rb, app/default.rb, app/options.rb,
4
+ app/run.rb, app/util.rb, interface.rb, interface/user.rb,
5
+ io/input.rb, lib/debugger.rb, lib/trepanning.rb, processor.rb,
6
+ processor/command.rb, processor/command/alias.rb,
7
+ processor/command/edit.rb, processor/command/eval.rb,
8
+ processor/command/info_subcmd/macro.rb, processor/command/macro.rb,
9
+ processor/complete.rb, processor/default.rb,
10
+ processor/load_cmds.rb, processor/location.rb, processor/msg.rb,
11
+ processor/validate.rb, test/data/edit.cmd, test/data/edit.right,
12
+ test/data/trace-mingw.right, test/integration/test-trace.rb,
13
+ test/unit/test-app-options.rb, test/unit/test-app-run.rb,
14
+ test/unit/test-cmd-alias.rb, test/unit/test-proc-default.rb: Add
15
+ macro to list of completions, some completion sorting with multiple
16
+ results. MinGW tolerance. Minor doc typos. Strip some trailing
17
+ blanks and update copyrights. Sync with rb-trepanning.
18
+
19
+ 2012-08-25 rocky <rockyb@rubyforge.org>
20
+
21
+ * CHANGES, processor/command/down.rb, processor/command/up.rb:
22
+ Remove aliases 'd' and 'u'.
23
+
24
+ 2012-08-05 rocky <rockyb@rubyforge.org>
25
+
26
+ * processor/command/show_subcmd/abbrev.rb: Doc string typo
27
+
28
+ 2012-06-29 rocky <rockyb@rubyforge.org>
29
+
30
+ * test/data/raise.right, test/integration/test-raise.rb: raise
31
+ output sometimes appears in a different order
32
+
33
+ 2012-06-28 rocky <rockyb@rubyforge.org>
34
+
35
+ * bin/trepan8, processor.rb,
36
+ processor/command/info_subcmd/program.rb, processor/location.rb,
37
+ test/data/break_loop_bug.right, test/data/printvar.right:
38
+ --post-mortem works. Need a test though.
39
+
40
+ 2012-06-25 rocky <rockyb@rubyforge.org>
41
+
42
+ * Rakefile, io/input.rb: Sync with rb-trepanning
43
+
44
+ 2012-06-22 rocky <rockyb@rubyforge.org>
45
+
46
+ * Makefile, Rakefile, check-filter.rb, test/integration/.gitignore:
47
+ Rakefile: sync up better with rb-trepanning. Makefile: add
48
+ check-short and comment targets.k check-filter.rb: reduce garbage
49
+ output on tests.
50
+
51
+ 2012-06-21 rocky <rockyb@rubyforge.org>
52
+
53
+ * README.textile: FixREADME typo
54
+
55
+ 2012-03-09 R. Bernstein <rocky.bernstein@gmail.com>
56
+
57
+ * : Merge pull request #2 from Erkan-Yilmaz/master remove the )'s
58
+
59
+ 2012-03-01 rocky <rockyb@rubyforge.org>
60
+
61
+ * app/options.rb, test/integration/test-trace.rb, trepan8.gemspec:
62
+ Rerelease the last version removing the platform in the gem name.
63
+ This should allow MSWindows 1.8.7 to find this gem on gemcutter.org
64
+
65
+ 2011-10-27 rocky <rockyb@rubyforge.org>
66
+
67
+ * CHANGES, ChangeLog, Makefile, app/options.rb: Get ready for 0.1.4
68
+ release
69
+
1
70
  2011-10-15 rocky <rockyb@rubyforge.org>
2
71
 
3
72
  * app/display.rb, processor/command/undisplay.rb: Sync with
@@ -5,15 +74,7 @@
5
74
 
6
75
  2011-10-14 rocky <rockyb@rubyforge.org>
7
76
 
8
- I hate conflicted merges
9
-
10
- 2011-10-14 rocky <rockyb@rubyforge.org>
11
-
12
- * app/display.rb, processor/command/disable.rb,
13
- processor/command/display.rb, processor/command/enable.rb,
14
- processor/command/set_subcmd/auto.rb, processor/display.rb: Sync
15
- with rb-trepanning and rbx-trepanning although enable/disable
16
- display numbers not supported yet.
77
+ * : I hate conflicted merges
17
78
 
18
79
  2011-10-09 rocky <rockyb@rubyforge.org>
19
80
 
@@ -24,15 +85,8 @@
24
85
 
25
86
  2011-10-09 rocky <rockyb@rubyforge.org>
26
87
 
27
- Merge branch 'master' of github.com:rocky/rb8-trepanning
28
-
29
- 2011-10-09 rocky <rockyb@rubyforge.org>
30
-
31
- * app/options.rb, app/run.rb, bin/trepan8, lib/trepanning.rb,
32
- processor.rb, processor/old-processor.rb, test/data/trace.cmd,
33
- test/data/trace.right, test/integration/helper.rb,
34
- test/integration/test-trace.rb: trepan8 --trace option (-x) works
35
- again.
88
+ * : commit ca0c592f43d92d09241cde78c936c8c789a483fb Author: rocky
89
+ <rockyb@rubyforge.org> Date: Sun Oct 9 11:54:38 2011 -0400
36
90
 
37
91
  2011-09-27 rocky <rockyb@rubyforge.org>
38
92
 
@@ -49,7 +103,6 @@
49
103
  * processor/command/show_subcmd/alias.rb,
50
104
  processor/command/show_subcmd/aliases.rb: show alias => show aliases
51
105
 
52
-
53
106
  2011-09-25 rocky <rockyb@rubyforge.org>
54
107
 
55
108
  * processor/command/finish.rb, processor/command/unalias.rb: Sync
@@ -90,22 +143,8 @@
90
143
 
91
144
  2011-08-28 rocky <rockyb@rubyforge.org>
92
145
 
93
- Merge branch 'master' of github.com:rocky/rb8-trepanning
94
-
95
- 2011-08-28 rocky <rockyb@rubyforge.org>
96
-
97
- * interface.rb, interface/base_intf.rb, interface/script.rb,
98
- interface/server.rb, interface/user.rb, io.rb, io/base_io.rb,
99
- io/input.rb, io/null_output.rb, io/string_array.rb,
100
- io/tcpclient.rb, io/tcpserver.rb, lib/trepanning.rb, processor.rb,
101
- processor/command/base/subcmd.rb, processor/command/exit.rb,
102
- processor/command/help.rb, processor/help.rb,
103
- processor/location.rb, processor/main.rb, processor/mock.rb,
104
- processor/msg.rb, processor/old-processor.rb,
105
- processor/processor.rb, processor/subcmd.rb, processor/validate.rb,
106
- test/unit/test-proc-eval.rb, test/unit/test-subcmd-help.rb: Partial
107
- sync with rbx-trepanning: interface/base_intf.rb -> interface.rb
108
- base_io -> io.rb processor/main.rb -> processor.b
146
+ * : commit 111fed37cc53fde73f2a366d1bcfcb35df498823 Author: rocky
147
+ <rockyb@rubyforge.org> Date: Sun Aug 28 02:26:33 2011 -0400
109
148
 
110
149
  2011-08-28 rocky <rockyb@rubyforge.org>
111
150
 
@@ -134,7 +173,6 @@
134
173
  * app/run.rb: backticks work differently between 1.9.2 and 1.8.7?
135
174
  Can't do an inspect on a string and have the shell drop the quotes.
136
175
 
137
-
138
176
  2011-06-21 rocky <rockyb@rubyforge.org>
139
177
 
140
178
  * app/run.rb, app/util.rb, processor/command/info_subcmd/files.rb:
@@ -273,7 +311,6 @@
273
311
 
274
312
  * ChangeLog, Rakefile, app/options.rb: Get ready for 0.1.3 release.
275
313
 
276
-
277
314
  2011-06-11 rocky <rockyb@rubyforge.org>
278
315
 
279
316
  * Rakefile: I run rubinius on this too often.
@@ -400,11 +437,8 @@
400
437
 
401
438
  2011-06-09 rocky <rockyb@rubyforge.org>
402
439
 
403
- Merge branch 'master' of github.com:rocky/rb8-trepanning
404
-
405
- 2011-06-09 rocky <rockyb@rubyforge.org>
406
-
407
- * README.textile: List optional dependencies
440
+ * : commit 18abe668f1fbe70156c5cb6a544c9a33bc6c959f Author: rocky
441
+ <rockyb@rubyforge.org> Date: Thu Jun 9 10:51:45 2011 -0400
408
442
 
409
443
  2011-06-09 rocky <rockyb@rubyforge.org>
410
444
 
@@ -428,11 +462,11 @@
428
462
  2011-06-08 rocky <rockyb@rubyforge.org>
429
463
 
430
464
  * test/unit/test-app-options.rb: Allow rb-readline which does
431
- command completion better. Silence multiple constant initialization
432
- warnings via require irb and require readline. highlight, callstyle:
433
- add completion args Rakefile: fix standalone by getting Ruby
434
- location. test-app-options: remove --help test until we deal with
435
- the fact --help exits
465
+ command completion better. Silence multiple constant initialization
466
+ warnings via require irb and require readline. highlight,
467
+ callstyle: add completion args Rakefile: fix standalone by getting
468
+ Ruby location. test-app-options: remove --help test until we deal
469
+ with the fact --help exits
436
470
 
437
471
  2011-06-08 rocky <rockyb@rubyforge.org>
438
472
 
@@ -466,29 +500,18 @@
466
500
 
467
501
  2011-06-08 rocky <rockyb@rubyforge.org>
468
502
 
469
- Merge branch 'master' of github.com:rocky/rb8-trepanning
503
+ * : commit 8d69811c15836fb4725454f2b5168662066d6093 Author: rocky
504
+ <rockyb@rubyforge.org> Date: Wed Jun 8 14:08:46 2011 -0400
470
505
 
471
506
  2011-06-08 rocky <rockyb@rubyforge.org>
472
507
 
473
- * interface/user.rb: History file is in .trepan8_hist
508
+ * : commit a213642f6f58371268d3610a1641df2aacb88749 Author: rocky
509
+ <rockyb@rubyforge.org> Date: Wed Jun 8 14:04:09 2011 -0400
474
510
 
475
511
  2011-06-08 rocky <rockyb@rubyforge.org>
476
512
 
477
- Merge branch 'master' of github.com:rocky/rb8-trepanning
478
-
479
- 2011-06-08 rocky <rockyb@rubyforge.org>
480
-
481
- * test/data/file-with-space.cmd, test/data/file-with-space.right:
482
- Forgot to add file
483
-
484
- 2011-06-08 rocky <rockyb@rubyforge.org>
485
-
486
- Merge branch 'master' of github.com:rocky/rb8-trepanning
487
-
488
- 2011-06-08 rocky <rockyb@rubyforge.org>
489
-
490
- * test/integration/test-file-with-space.rb: Convert
491
- test-file-with-spaces from ruby-debug.
513
+ * : commit fa5291ae097f48b39dafa280183cf07c273a6fff Author: rocky
514
+ <rockyb@rubyforge.org> Date: Wed Jun 8 07:00:08 2011 -0400
492
515
 
493
516
  2011-06-07 rocky <rockyb@rubyforge.org>
494
517
 
@@ -513,7 +536,6 @@
513
536
  test/data/source.right, test/data/trepan8-save.1,
514
537
  test/integration/test-source.rb: Convert source test from ruby-debug
515
538
 
516
-
517
539
  2011-06-07 rocky <rockyb@rubyforge.org>
518
540
 
519
541
  * data/irbrc, lib/trepanning.rb, processor/command/catch.rb,
@@ -590,8 +612,8 @@
590
612
  test/integration/test-dollar-0.rb.try,
591
613
  test/integration/test-edit.rb, test/integration/test-raise.rb,
592
614
  test/integration/test-raise.rb.try: Get first integration test
593
- working. "set debug testing" beefed up for the task. Add --basename
594
- option. Remove --annotate remnant and some debug output.
615
+ working. "set debug testing" beefed up for the task. Add --basename option. Remove --annotate remnant and some debug
616
+ output.
595
617
 
596
618
  2011-06-05 rocky <rockyb@rubyforge.org>
597
619
 
@@ -607,9 +629,8 @@
607
629
  bin/.gitignore, bin/trepan8, lib/trepanning.rb,
608
630
  processor/command/set_subcmd/highlight.rb: options processing done
609
631
  in app/processing rather than bin/trepan8 as other trepanning
610
- debugger do. Options processing is I think a little less convoluted
611
- now with the replacement of an ostruct for a hash. "set highlight
612
- reset" sets highight on in addition to resetting.
632
+ debugger do. Options processing is I think a little less convoluted
633
+ now with the replacement of an ostruct for a hash. "set highlight reset" sets highight on in addition to resetting.
613
634
 
614
635
  2011-06-05 rocky <rockyb@rubyforge.org>
615
636
 
@@ -629,7 +650,6 @@
629
650
 
630
651
  * processor/command/help/command.txt: command syntax help yet again.
631
652
 
632
-
633
653
  2011-06-04 rocky <rockyb@rubyforge.org>
634
654
 
635
655
  * test/unit/test-proc-load_cmds.rb: Add load_cmds unit test.
@@ -669,7 +689,7 @@
669
689
 
670
690
  * processor/command/list.rb, processor/default.rb,
671
691
  processor/location.rb, trepan8.gemspec: list.rb, repan8.gemspec:
672
- support for syntax highlighting. default.rb, location.rb: move
692
+ support for syntax highlighting. default.rb, location.rb: move
673
693
  reload_on_change to be a setting.
674
694
 
675
695
  2011-06-04 rocky <rockyb@rubyforge.org>
@@ -679,15 +699,8 @@
679
699
 
680
700
  2011-06-03 rocky <rockyb@rubyforge.org>
681
701
 
682
- Merge branch 'master' of
683
- /srv/gitosis/repositories/rb8-trepanning Conflicts:
684
- processor/main.rb
685
-
686
- 2011-06-03 rocky <rockyb@rubyforge.org>
687
-
688
- * app/interface.rb, bin/trepan8, io/input.rb, lib/trepanning.rb,
689
- processor/location.rb, processor/main.rb, processor/processor.rb:
690
- Use newer style inteface stack for startup scripts.
702
+ * : commit db4eb72715abd212b8056579357e11bf3109cb12 Author: rocky
703
+ <rockyb@rubyforge.org> Date: Fri Jun 3 19:21:05 2011 -0400
691
704
 
692
705
  2011-06-03 rocky <rockyb@rubyforge.org>
693
706
 
@@ -775,7 +788,7 @@
775
788
  processor/command/restart.rb, processor/command/up.rb,
776
789
  processor/location.rb, processor/main.rb, processor/mock.rb,
777
790
  test/unit/test-proc-location.rb: Add proc/location test which finds
778
- bugs and code to improve. add "restart" and "info stack" commands.
791
+ bugs and code to improve. add "restart" and "info stack" commands.
779
792
  Demo code now for "backtrace" and "up".
780
793
 
781
794
  2011-06-02 rocky <rockyb@rubyforge.org>
@@ -852,8 +865,8 @@
852
865
  test/integration/helper.rb, test/integration/test-dollar-0.rb,
853
866
  test/integration/test-edit.rb, test/integration/test-raise.rb: Push
854
867
  towards getting integration tests working. Add "set/show autoeval"
855
- and "set debug test". processor.rb: handle # comments and autoeval.
856
- help.rb: remove extraneous \n.
868
+ and "set debug test". processor.rb: handle # comments and
869
+ autoeval. help.rb: remove extraneous \n.
857
870
 
858
871
  2011-05-31 rocky <rockyb@rubyforge.org>
859
872
 
@@ -944,7 +957,7 @@
944
957
  processor/eval.rb, processor/load_cmds.rb, processor/location.rb,
945
958
  processor/running.rb, processor/validate.rb, processor/virtual.rb:
946
959
  module Trepan; class CmdProcessor -> class Trepan::CmdProcessor
947
- which should make things more cross-implementation portable. Add
960
+ which should make things more cross-implementation portable. Add
948
961
  processor.location.rb.
949
962
 
950
963
  2011-05-29 rocky <rockyb@rubyforge.org>
@@ -1146,6 +1159,6 @@
1146
1159
 
1147
1160
  * First attempt to backport trepanning. Right now it's mostly
1148
1161
  ruby-debug w/o ruby-debug-base and separated from the main code in
1149
- git. There are some small changes towards the trepanning file system
1150
- organization. Also module Debugger is now module Trepan.
1162
+ git. There are some small changes towards the trepanning file
1163
+ system organization. Also module Debugger is now module Trepan.
1151
1164
 
data/Makefile CHANGED
@@ -1,13 +1,32 @@
1
1
  # I'll admit it -- I'm an absent-minded old-timer who has trouble
2
2
  # learning new tricks.
3
- .PHONY: all test
3
+ .PHONY: all test test-unit test-integration rmChangeLog
4
+
5
+ GIT2CL ?= git2cl
4
6
 
5
7
  all: test
6
8
 
7
- check:
9
+ #: Run unit, and integration without bloated output
10
+ check-short:
11
+ $(MAKE) check 2>&1 | ruby check-filter.rb
12
+
13
+
14
+ #: Run all tests (same as "test")
15
+ check:
8
16
  rake test
9
- test:
17
+
18
+ #: Run all tests (same as "check")
19
+ test:
10
20
  rake test
11
21
 
12
- %:
22
+ rmChangeLog:
23
+ rm ChangeLog || true
24
+
25
+ #: Create a ChangeLog from git via git log and git2cl
26
+ ChangeLog: rmChangeLog
27
+ git log --pretty --numstat --summary | $(GIT2CL) >$@
28
+
29
+ .PHONY: $(PHONY)
30
+
31
+ %:
13
32
  rake $@
@@ -18,7 +18,7 @@ There is a "google group mailing list":http://groups.google.com/group/ruby-debug
18
18
 
19
19
  h2. Installing (from git)
20
20
 
21
- bq. $ git://github.com/rocky/rb8-trepanning.git
21
+ bq. $ git clone git://github.com/rocky/rb8-trepanning.git
22
22
  $ cd rb8-trepanning
23
23
  $ rake test
24
24
  $ rake install
@@ -31,7 +31,7 @@ Over time, I gained a better understanding of what was important (to me), and I
31
31
  the code. This code base is a backport of the "trepanning debugger for
32
32
  Rubinius":https://github.com/rocky/rbx-trepanning/wiki which in turn
33
33
  is a port of the "trepanning debugger for a patched MRI YARV
34
- 1.9.2":https://github.com/rocky/rb-trepanning/wiki which is a port of "a debugger for Python":http://code.google.com/p/pydbgr/ which is a port of ruby-debug)
34
+ 1.9.2":https://github.com/rocky/rb-trepanning/wiki which is a port of "a debugger for Python":http://code.google.com/p/pydbgr/ which is a port of ruby-debug.
35
35
 
36
36
  h2. Compatibility with ruby-debug
37
37
 
@@ -55,5 +55,5 @@ The debugger needs to work in more limited environments, so there are a number p
55
55
 
56
56
  Required dependencies are the same as ruby-debug:
57
57
  * _ruby-debug-base_ -- for run-time debugging support
58
- * _linecache_ or _linecache19_ -- for caching source-code lines and figuring out breakpoint lines)
58
+ * _linecache_ or _linecache19_ -- for caching source-code lines and figuring out breakpoint lines
59
59
  * _columnize_ -- for showing commands in columns
data/Rakefile CHANGED
@@ -10,8 +10,8 @@ def gemspec
10
10
  @gemspec ||= eval(File.read(Gemspec_filename), binding, Gemspec_filename)
11
11
  end
12
12
 
13
- require 'rdoc/task'
14
- desc 'Build the gem'
13
+ require 'rubygems/package_task'
14
+ desc "Build the gem"
15
15
  task :package=>:gem
16
16
  task :gem=>:gemspec do
17
17
  Dir.chdir(ROOT_DIR) do
@@ -29,13 +29,18 @@ task :install => :gem do
29
29
  end
30
30
 
31
31
  require 'rake/testtask'
32
- require 'rbconfig'
32
+ desc "Test everything."
33
+ Rake::TestTask.new(:test) do |t|
34
+ t.libs << './lib'
35
+ t.pattern = 'test/test-*.rb'
36
+ t.verbose = true
37
+ end
38
+ task :test => :lib
33
39
 
34
- def RbConfig.ruby
35
- File.join(RbConfig::CONFIG['bindir'],
36
- RbConfig::CONFIG['RUBY_INSTALL_NAME'] +
37
- RbConfig::CONFIG['EXEEXT'])
38
- end unless defined? RbConfig.ruby
40
+ desc "same as test"
41
+ task :check => :test
42
+
43
+ require 'rbconfig'
39
44
 
40
45
  def run_standalone_ruby_files(list, opts={})
41
46
  puts '*' * 40
@@ -81,7 +86,7 @@ Rake::TestTask.new(:'test:integration') do |t|
81
86
  t.options = '--verbose' if $VERBOSE
82
87
  end
83
88
 
84
- desc 'Test everything - unit tests for now.'
89
+ desc 'Test everything - unit, and integration tests.'
85
90
  task :test do
86
91
  exceptions = %w(test:unit test:integration).collect do |task|
87
92
  begin
@@ -91,7 +96,7 @@ task :test do
91
96
  e
92
97
  end
93
98
  end.compact
94
-
99
+
95
100
  exceptions.each {|e| puts e;puts e.backtrace }
96
101
  raise 'Test failures' unless exceptions.empty?
97
102
  end
@@ -148,12 +153,12 @@ end
148
153
  desc 'Generate command parser.'
149
154
  task :'cmd_parse' do
150
155
  require 'tmpdir'
151
- temp_file =
152
- File.join(Dir.tmpdir,
156
+ temp_file =
157
+ File.join(Dir.tmpdir,
153
158
  Dir::Tmpname.make_tmpname(['cmd_parser_', '.rb'], nil))
154
159
 
155
- sh('kpeg --name CmdParse --verbose --stand-alone ' +
156
- "#{File.join(ROOT_DIR, %w(app cmd_parse.kpeg))} " +
160
+ sh("kpeg --name CmdParse --verbose --stand-alone " +
161
+ "#{File.join(ROOT_DIR, %w(app cmd_parse.kpeg))} " +
157
162
  "--output #{temp_file}")
158
163
  end
159
164
 
@@ -177,12 +182,13 @@ task :gemspec do
177
182
  end
178
183
 
179
184
  # --------- RDoc Documentation ------
180
- desc 'Generate rdoc documentation'
181
- Rake::RDocTask.new('rdoc') do |rdoc|
185
+ require 'rdoc/task'
186
+ desc "Generate rdoc documentation"
187
+ Rake::RDocTask.new("rdoc") do |rdoc|
182
188
  rdoc.rdoc_dir = 'doc'
183
189
  rdoc.title = "Trepanning #{Trepan::VERSION} Documentation"
184
190
 
185
- rdoc.rdoc_files.include(%w(lib/*.rb
191
+ rdoc.rdoc_files.include(%w(lib/*.rb
186
192
  app/*.rb intf/*.rb io/*.rb
187
193
  bin/trepan8
188
194
  ))
@@ -201,14 +207,14 @@ end
201
207
 
202
208
  desc 'Remove residue from running patch'
203
209
  task :rm_patch_residue do
204
- FileUtils.rm_rf FileList['**/*.{rej,orig}'].to_a, :verbose => true
210
+ FileUtils.rm_rf FileList['**/*.{rej,orig}'].to_a
205
211
  end
206
212
 
207
213
  desc 'Remove ~ backup files'
208
214
  task :rm_tilde_backups do
209
215
  FileUtils.rm_rf Dir.glob('**/*~'), :verbose => true
210
- FileUtils.rm_rf Dir.glob('**/*.rbc'), :verbose => true
211
216
  end
212
217
 
213
218
  desc 'Remove built files'
214
- task :clean => [:clobber_package, :clobber_rdoc, :rm_patch_residue, :rm_tilde_backups]
219
+ task :clean => [:clobber_package, :clobber_rdoc, :rm_patch_residue,
220
+ :rm_tilde_backups]