trepanning 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. data/ChangeLog +354 -0
  2. data/NEWS +21 -0
  3. data/Rakefile +27 -20
  4. data/app/cmd_parse.kpeg +20 -4
  5. data/app/cmd_parse.rb +11 -10
  6. data/app/cmd_parser.rb +119 -55
  7. data/app/complete.rb +1 -0
  8. data/app/core.rb +3 -3
  9. data/app/disassemble.rb +13 -3
  10. data/app/file.rb +2 -1
  11. data/app/frame.rb +3 -1
  12. data/app/mock.rb +3 -0
  13. data/app/options.rb +48 -31
  14. data/app/util.rb +50 -0
  15. data/interface/base_intf.rb +4 -0
  16. data/interface/client.rb +4 -0
  17. data/interface/script.rb +1 -1
  18. data/interface/server.rb +4 -0
  19. data/interface/user.rb +5 -0
  20. data/io/input.rb +3 -2
  21. data/io/null_output.rb +7 -1
  22. data/processor/breakpoint.rb +3 -2
  23. data/processor/command/base/subcmd.rb +1 -1
  24. data/processor/command/base/submgr.rb +4 -1
  25. data/processor/command/base/subsubcmd.rb +2 -2
  26. data/processor/command/base/subsubmgr.rb +1 -1
  27. data/processor/command/break.rb +7 -3
  28. data/processor/command/complete.rb +1 -0
  29. data/processor/command/continue.rb +1 -1
  30. data/processor/command/disassemble.rb +1 -1
  31. data/processor/command/edit.rb +35 -14
  32. data/processor/command/enable.rb +5 -3
  33. data/processor/command/eval.rb +35 -14
  34. data/processor/command/exit.rb +2 -0
  35. data/processor/command/help.rb +0 -9
  36. data/processor/command/help/command.txt +37 -27
  37. data/processor/command/help/examples.txt +16 -0
  38. data/processor/command/help/suffixes.txt +17 -0
  39. data/processor/command/info.rb +1 -1
  40. data/processor/command/info_subcmd/args.rb +7 -13
  41. data/processor/command/info_subcmd/breakpoints.rb +8 -2
  42. data/processor/command/info_subcmd/frame.rb +2 -0
  43. data/processor/command/info_subcmd/globals.rb +63 -0
  44. data/processor/command/info_subcmd/iseq.rb +3 -1
  45. data/processor/command/info_subcmd/locals.rb +16 -15
  46. data/processor/command/{show_subcmd → info_subcmd}/macro.rb +7 -7
  47. data/processor/command/info_subcmd/program.rb +2 -0
  48. data/processor/command/info_subcmd/registers.rb +5 -1
  49. data/processor/command/info_subcmd/registers_subcmd/dfp.rb +2 -3
  50. data/processor/command/info_subcmd/registers_subcmd/helper.rb +8 -9
  51. data/processor/command/info_subcmd/registers_subcmd/lfp.rb +10 -5
  52. data/processor/command/info_subcmd/registers_subcmd/pc.rb +9 -4
  53. data/processor/command/info_subcmd/registers_subcmd/sp.rb +4 -5
  54. data/processor/command/info_subcmd/ruby.rb +3 -1
  55. data/processor/command/info_subcmd/source.rb +78 -0
  56. data/processor/command/info_subcmd/stack.rb +23 -0
  57. data/processor/command/kill.rb +4 -6
  58. data/processor/command/list.rb +118 -120
  59. data/processor/command/macro.rb +1 -1
  60. data/processor/command/parsetree.rb +56 -0
  61. data/processor/command/pp.rb +40 -0
  62. data/processor/command/pr.rb +1 -2
  63. data/processor/command/quit.rb +2 -1
  64. data/processor/command/set_subcmd/abbrev.rb +24 -0
  65. data/processor/command/set_subcmd/auto_subcmd/eval.rb +1 -2
  66. data/processor/command/set_subcmd/auto_subcmd/irb.rb +2 -3
  67. data/processor/command/set_subcmd/auto_subcmd/list.rb +2 -3
  68. data/processor/command/set_subcmd/highlight.rb +8 -2
  69. data/processor/command/set_subcmd/reload.rb +41 -0
  70. data/processor/command/set_subcmd/timer.rb +8 -18
  71. data/processor/command/set_subcmd/trace.rb +2 -2
  72. data/processor/command/set_subcmd/trace_subcmd/buffer.rb +2 -2
  73. data/processor/command/set_subcmd/trace_subcmd/print.rb +3 -3
  74. data/processor/command/{irb.rb → shell.rb} +9 -6
  75. data/processor/command/show_subcmd/abbrev.rb +19 -0
  76. data/processor/command/show_subcmd/directories.rb +21 -0
  77. data/processor/command/show_subcmd/hidelevel.rb +1 -1
  78. data/processor/command/show_subcmd/highlight.rb +2 -1
  79. data/processor/command/show_subcmd/reload.rb +17 -0
  80. data/processor/command/show_subcmd/timer.rb +17 -0
  81. data/processor/command/show_subcmd/trace_subcmd/buffer.rb +1 -1
  82. data/processor/command/source.rb +15 -14
  83. data/processor/command/tbreak.rb +20 -0
  84. data/processor/command/watchg.rb +114 -0
  85. data/processor/default.rb +43 -41
  86. data/processor/display.rb +3 -2
  87. data/processor/eval.rb +5 -3
  88. data/processor/eventbuf.rb +3 -2
  89. data/processor/frame.rb +12 -3
  90. data/processor/hook.rb +3 -2
  91. data/processor/load_cmds.rb +186 -179
  92. data/processor/location.rb +154 -159
  93. data/processor/main.rb +44 -16
  94. data/processor/mock.rb +0 -11
  95. data/processor/msg.rb +3 -1
  96. data/processor/running.rb +3 -2
  97. data/processor/validate.rb +25 -4
  98. data/processor/virtual.rb +32 -0
  99. data/test/data/debugger-stop.right +1 -0
  100. data/test/data/fname-with-blank.right +1 -0
  101. data/test/example/gcd.rb +1 -0
  102. data/test/functional/{test-trace-var.rb → test-watchg.rb} +15 -4
  103. data/test/unit/cmd-helper.rb +0 -3
  104. data/test/unit/test-app-cmd_parser.rb +2 -2
  105. data/test/unit/test-app-file.rb +1 -0
  106. data/test/unit/test-app-frame.rb +1 -1
  107. data/test/unit/test-app-util.rb +21 -0
  108. data/test/unit/test-base-cmd.rb +4 -6
  109. data/test/unit/test-base-subcmd.rb +1 -4
  110. data/test/unit/test-base-submgr.rb +1 -2
  111. data/test/unit/test-base-subsubcmd.rb +0 -4
  112. data/test/unit/test-cmd-edit.rb +33 -0
  113. data/test/unit/test-cmd-parse_list_cmd.rb +33 -0
  114. data/test/unit/test-completion.rb +1 -1
  115. data/test/unit/test-proc-frame.rb +4 -1
  116. data/test/unit/test-proc-load_cmds.rb +2 -1
  117. data/test/unit/test-proc-location.rb +9 -26
  118. data/test/unit/test-proc-main.rb +1 -4
  119. data/test/unit/test-proc-validate.rb +28 -18
  120. data/test/unit/test-subcmd-help.rb +0 -4
  121. data/trepanning.gemspec +1 -1
  122. metadata +27 -10
  123. data/processor/command/set_subcmd/trace_subcmd/var.rb +0 -57
data/ChangeLog CHANGED
@@ -1,3 +1,357 @@
1
+ 2011-06-09 rocky <rockyb@rubyforge.org>
2
+
3
+ * processor/command/info_subcmd/globals.rb,
4
+ processor/command/info_subcmd/source.rb: Add "info globals" and
5
+ "info source".
6
+
7
+ 2011-06-09 rocky <rockyb@rubyforge.org>
8
+
9
+ * processor/command/help/command.txt,
10
+ processor/command/help/examples.txt,
11
+ processor/command/help/suffixes.txt: Add more syntax help.
12
+ Specifically break out examples and describe suffixes.
13
+
14
+ 2011-06-09 rocky <rockyb@rubyforge.org>
15
+
16
+ * Rakefile: Better file cleanup. Sync with rb8-trepanning.
17
+
18
+ 2011-06-09 rocky <rockyb@rubyforge.org>
19
+
20
+ * processor/command/set_subcmd/timer.rb,
21
+ processor/command/show_subcmd/timer.rb: Add "show timer". Sync "set
22
+ timer" with rb8-trepanning.
23
+
24
+ 2011-06-09 rocky <rockyb@rubyforge.org>
25
+
26
+ * processor/command/source.rb: Sync source.rb with rb8-trepanning.
27
+ More complete complete.
28
+
29
+ 2011-06-08 rocky <rockyb@rubyforge.org>
30
+
31
+ * processor/command/info_subcmd/args.rb,
32
+ processor/command/set_subcmd/highlight.rb: highlight: sync with
33
+ rb8-trepanning and rbx-trepanning. args.rb: small changes.
34
+
35
+ 2011-06-08 rocky <rockyb@rubyforge.org>
36
+
37
+ * processor/command/parsetree.rb: Remove debug output
38
+
39
+ 2011-06-08 rocky <rockyb@rubyforge.org>
40
+
41
+ * app/cmd_parse.rb, processor/command/parsetree.rb: Initial try at
42
+ "parsetree" command via parsetree19.
43
+
44
+ 2011-06-08 rocky <rockyb@rubyforge.org>
45
+
46
+ * processor/command/info_subcmd/macro.rb, processor/command/pp.rb:
47
+ Add rudimentary pp (pretty-print) command.
48
+
49
+ 2011-06-08 rocky <rockyb@rubyforge.org>
50
+
51
+ * processor/command/pr.rb: Don't need to require eval here.
52
+
53
+ 2011-06-07 rocky <rockyb@rubyforge.org>
54
+
55
+ * processor/command/shell.rb: Doc change to syn with rb8-trepanning
56
+
57
+
58
+ 2011-06-05 rocky <rockyb@rubyforge.org>
59
+
60
+ * test/unit/test-cmd-edit.rb: Add an "edit" command unit test.
61
+
62
+ 2011-06-05 rocky <rockyb@rubyforge.org>
63
+
64
+ Merge branch 'master' of github.com:rocky/rb-trepanning
65
+
66
+ 2011-06-05 rocky <rockyb@rubyforge.org>
67
+
68
+ * app/options.rb: Sync options processing with rb8-trepanning. Added
69
+ option --cd --incliude --debug, and --require.
70
+
71
+ 2011-06-04 rocky <rockyb@rubyforge.org>
72
+
73
+ Merge branch 'master' of github.com:rocky/rb-trepanning
74
+ Conflicts: processor/command/help/command.txt
75
+
76
+ 2011-06-04 rocky <rockyb@rubyforge.org>
77
+
78
+ * interface/script.rb: Sync with rb8-trepanning.
79
+
80
+ 2011-06-04 rocky <rockyb@rubyforge.org>
81
+
82
+ * processor/command/edit.rb, processor/command/help/command.txt:
83
+ Work on edit command via rb8-trepanning.
84
+
85
+ 2011-06-04 rocky <rockyb@rubyforge.org>
86
+
87
+ * processor/command/help/command.txt: command syntax help yet again.
88
+
89
+
90
+ 2011-06-04 rocky <rockyb@rubyforge.org>
91
+
92
+ * app/util.rb, processor/command/disassemble.rb,
93
+ processor/command/set_subcmd/abbrev.rb,
94
+ processor/command/show_subcmd/abbrev.rb, processor/default.rb,
95
+ processor/main.rb, test/unit/test-app-util.rb: Allow unique
96
+ abbreviations of commands. See set/show abbrev. Sync with
97
+ rbx-trepanning
98
+
99
+ 2011-06-04 rocky <rockyb@rubyforge.org>
100
+
101
+ * processor/command/macro.rb: See prior
102
+
103
+ 2011-06-04 rocky <rockyb@rubyforge.org>
104
+
105
+ * processor/command/show_subcmd/macro.rb: SHow macro -> info macro
106
+ as gdb has it.
107
+
108
+ 2011-06-04 rocky <rockyb@rubyforge.org>
109
+
110
+ * processor/command/info_subcmd/locals.rb: Longer docstring for
111
+ "info locals" .
112
+
113
+ 2011-06-04 rocky <rockyb@rubyforge.org>
114
+
115
+ * processor/command/info_subcmd/args.rb,
116
+ processor/command/info_subcmd/locals.rb: DRY code.
117
+
118
+ 2011-06-04 rocky <rockyb@rubyforge.org>
119
+
120
+ * processor/command/list.rb, processor/default.rb,
121
+ processor/location.rb: Move reload_on_change to be part of settings.
122
+ class Trepan class ... -> class Trepan::...
123
+
124
+ 2011-06-03 rocky <rockyb@rubyforge.org>
125
+
126
+ Merge branch 'master' of github.com:rocky/rb-trepanning
127
+
128
+ 2011-06-03 rocky <rockyb@rubyforge.org>
129
+
130
+ * interface/client.rb, interface/server.rb, interface/user.rb: Add
131
+ closed? method to make sure both input and output are closed.
132
+
133
+ 2011-06-02 rocky <rockyb@rubyforge.org>
134
+
135
+ * processor/command/set_subcmd/auto_subcmd/eval.rb,
136
+ processor/command/set_subcmd/auto_subcmd/irb.rb,
137
+ processor/command/set_subcmd/auto_subcmd/list.rb: DRY code. Sync
138
+ with rbx-trepanning and rb8-trepanning.
139
+
140
+ 2011-06-02 rocky <rockyb@rubyforge.org>
141
+
142
+ Merge branch 'master' of github.com:rocky/rb-trepanning
143
+
144
+ 2011-06-02 rocky <rockyb@rubyforge.org>
145
+
146
+ * processor/command/break.rb, processor/command/continue.rb,
147
+ processor/command/tbreak.rb: Add "tbreak" - set a temporary
148
+ breakpoint. gdb has it.
149
+
150
+ 2011-06-02 rocky <rockyb@rubyforge.org>
151
+
152
+ * processor/command/show_subcmd/highlight.rb: Small doc change
153
+
154
+ 2011-06-02 rocky <rockyb@rubyforge.org>
155
+
156
+ * processor/command/show_subcmd/hidelevel.rb,
157
+ processor/command/show_subcmd/highlight.rb,
158
+ processor/command/show_subcmd/macro.rb: Go over min abbrev and doc
159
+ string for some "show" commands.
160
+
161
+ 2011-06-02 rocky <rockyb@rubyforge.org>
162
+
163
+ * processor/command/info_subcmd/stack.rb: Add "info stack". Gdb has
164
+ it.
165
+
166
+ 2011-06-02 rocky <rockyb@rubyforge.org>
167
+
168
+ * processor/virtual.rb: Add stripped down version of I/O routines.
169
+ Sync with rbx-trepanning.
170
+
171
+ 2011-06-02 rocky <rockyb@rubyforge.org>
172
+
173
+ * processor/virtual.rb, test/unit/test-proc-location.rb:
174
+ test-proc-location.rb: don't need to worry about order of includes
175
+ now.
176
+
177
+ 2011-06-01 rocky <rockyb@rubyforge.org>
178
+
179
+ * app/cmd_parser.rb, processor/virtual.rb, test/unit/cmd-helper.rb,
180
+ test/unit/test-base-cmd.rb, test/unit/test-base-subcmd.rb,
181
+ test/unit/test-base-subsubcmd.rb, test/unit/test-proc-main.rb,
182
+ test/unit/test-subcmd-help.rb: Sync with rbx-trepanning and
183
+ rb8-trepanning. Basically simplfy some things and remove some
184
+ FIXME's.
185
+
186
+ 2011-05-28 rocky <rockyb@rubyforge.org>
187
+
188
+ Merge branch 'master' of github.com:rocky/rb-trepanning
189
+
190
+ 2011-05-28 rocky <rockyb@rubyforge.org>
191
+
192
+ * processor/mock.rb: Sync with rbx-trepanning
193
+
194
+ 2011-05-28 rocky <rockyb@rubyforge.org>
195
+
196
+ * processor/breakpoint.rb, processor/command/complete.rb,
197
+ processor/command/exit.rb, processor/default.rb,
198
+ processor/display.rb, processor/eval.rb, processor/eventbuf.rb,
199
+ processor/frame.rb, processor/hook.rb, processor/load_cmds.rb,
200
+ processor/location.rb, processor/main.rb, processor/msg.rb,
201
+ processor/running.rb, processor/validate.rb, processor/virtual.rb:
202
+ Ensure Trepan::CmdProcessor has a consistent initialize interface.
203
+ Fix up standalone code for "complete" command. Change $0 in loading
204
+ so as not to interfere with __FILE__ = $. Sync with rb8-trepanning.
205
+
206
+
207
+ 2011-05-27 rocky <rockyb@rubyforge.org>
208
+
209
+ * app/util.rb, processor/command/eval.rb, processor/load_cmds.rb,
210
+ test/unit/test-app-util.rb: Handle eval? completion for the empty
211
+ string.
212
+
213
+ 2011-05-27 rocky <rockyb@rubyforge.org>
214
+
215
+ * processor/command/eval.rb: completion for eval with nothing is the
216
+ current source text. More later...
217
+
218
+ 2011-05-27 rocky <rockyb@rubyforge.org>
219
+
220
+ * Rakefile: Prefer reqiure_relative when relevant
221
+
222
+ 2011-05-26 rocky <rockyb@rubyforge.org>
223
+
224
+ * processor/default.rb: Correct mispelling for a (currently) unused
225
+ directory
226
+
227
+ 2011-05-21 rocky <rockyb@rubyforge.org>
228
+
229
+ * processor/command/shell.rb: Small change to Sync better with
230
+ rbx-trepanning.
231
+
232
+ 2011-05-21 rocky <rockyb@rubyforge.org>
233
+
234
+ * processor/command/irb.rb, processor/command/shell.rb,
235
+ test/unit/test-completion.rb: debugger command "irb" -> "shell" with
236
+ command alias "irb". This way debugger commands can be more uniform
237
+ across all of the debuggers I work on (i.e. python, and POSIX
238
+ shell).
239
+
240
+ 2011-05-13 rocky <rockyb@rubyforge.org>
241
+
242
+ * io/input.rb, processor/command/help.rb,
243
+ processor/command/info_subcmd/ruby.rb, processor/command/kill.rb,
244
+ processor/main.rb: Reduce ruby warnings.
245
+
246
+ 2011-05-09 rocky <rockyb@rubyforge.org>
247
+
248
+ * processor/command/enable.rb, processor/main.rb: main.rb: in
249
+ autoeval, intercept NameError and call it an "undefined debugger
250
+ command". I think this will be less confusing. enable.rb; revise
251
+ command help.
252
+
253
+ 2011-04-19 rocky <rockyb@rubyforge.org>
254
+
255
+ * processor/command/base/submgr.rb, processor/command/info.rb,
256
+ processor/command/info_subcmd/args.rb,
257
+ processor/command/info_subcmd/frame.rb,
258
+ processor/command/info_subcmd/iseq.rb,
259
+ processor/command/info_subcmd/locals.rb,
260
+ processor/command/info_subcmd/program.rb,
261
+ processor/command/info_subcmd/registers_subcmd/helper.rb,
262
+ processor/command/info_subcmd/ruby.rb: Add argument checking to
263
+ subcmds. Finish adding argument parameters to "info" commands.
264
+
265
+ 2011-04-18 rocky <rockyb@rubyforge.org>
266
+
267
+ * app/disassemble.rb, processor/command/info_subcmd/breakpoints.rb,
268
+ processor/command/info_subcmd/registers.rb,
269
+ processor/command/info_subcmd/registers_subcmd/dfp.rb,
270
+ processor/command/info_subcmd/registers_subcmd/helper.rb,
271
+ processor/command/info_subcmd/registers_subcmd/lfp.rb,
272
+ processor/command/info_subcmd/registers_subcmd/pc.rb,
273
+ processor/command/info_subcmd/registers_subcmd/sp.rb: disassemble:
274
+ Handle case where CodeRay isn't installed but highight requested
275
+ registers.rb: handle min_args/max_args helper.rb: redo parameter so
276
+ it takes a single arg or nil/empty string lfp.rb, pc.rb, sp.rb: set
277
+ min/max args, more help and DRY code.
278
+
279
+ 2011-04-18 rocky <rockyb@rubyforge.org>
280
+
281
+ * Rakefile, app/frame.rb,
282
+ processor/command/info_subcmd/registers_subcmd/helper.rb,
283
+ test/unit/test-app-frame.rb: Track changes in rb-threadframe in
284
+ trying to straighten out C return values.
285
+
286
+ 2011-04-17 rocky <rockyb@rubyforge.org>
287
+
288
+ * processor/command/quit.rb, test/data/debugger-stop.right: Show
289
+ termination message more.
290
+
291
+ 2011-04-16 rocky <rockyb@rubyforge.org>
292
+
293
+ * app/options.rb, interface/base_intf.rb, io/null_output.rb,
294
+ processor/command/kill.rb, processor/command/quit.rb,
295
+ test/data/debugger-stop.right, test/data/fname-with-blank.right: Add
296
+ termination message to interface finalization routine. Implement
297
+ NullOutput closed?
298
+
299
+ 2011-04-15 rocky <rockyb@rubyforge.org>
300
+
301
+ * processor/command/kill.rb, processor/command/quit.rb,
302
+ processor/frame.rb, processor/main.rb,
303
+ test/data/debugger-stop.right, test/unit/test-proc-frame.rb: Add
304
+ termination message and show frame number when adjusting frame.
305
+ Should be useful for front-ends which may want to parse this
306
+ information.
307
+
308
+ 2011-03-31 rocky <rockyb@rubyforge.org>
309
+
310
+ * processor/command/eval.rb: Add LHS assignment stripping to eval?
311
+
312
+ 2011-03-31 rocky <rockyb@rubyforge.org>
313
+
314
+ * app/file.rb, test/unit/test-proc-validate.rb: Address Slight bug
315
+ in find_scripts
316
+
317
+ 2011-03-31 rocky <rockyb@rubyforge.org>
318
+
319
+ * processor/location.rb: Fix location-remap filename breakage from
320
+ to recent changes.
321
+
322
+ 2011-03-31 rocky <rockyb@rubyforge.org>
323
+
324
+ * processor/command/eval.rb, test/example/gcd.rb: eval?: def
325
+ foo(a,b) -> [a,b] although we do not stop and defs
326
+
327
+ 2011-03-30 rocky <rockyb@rubyforge.org>
328
+
329
+ * processor/command/list.rb,
330
+ processor/command/show_subcmd/directories.rb,
331
+ processor/location.rb, processor/validate.rb,
332
+ test/unit/test-base-submgr.rb, test/unit/test-proc-load_cmds.rb,
333
+ test/unit/test-proc-validate.rb: Add "show directories". Sync with
334
+ rbx-trepanning.
335
+
336
+ 2011-03-29 rocky <rockyb@rubyforge.org>
337
+
338
+ * app/cmd_parse.kpeg, app/cmd_parse.rb, app/cmd_parser.rb,
339
+ processor/command/list.rb, processor/location.rb,
340
+ processor/validate.rb, test/unit/test-app-cmd_parser.rb,
341
+ test/unit/test-cmd-parse_list_cmd.rb,
342
+ test/unit/test-proc-validate.rb: Redo list command to use kpeg
343
+ parsing. Shouild be more powerful and more maintainable.
344
+
345
+ 2011-03-28 rocky <rockyb@rubyforge.org>
346
+
347
+ * app/options.rb, trepanning.gemspec: Argh! trace revision needs to
348
+ be at least 0.5, not 0.4.
349
+
350
+ 2011-03-28 rocky <rockyb@rubyforge.org>
351
+
352
+ * ChangeLog, NEWS, Rakefile, app/cmd_parse.rb, app/options.rb,
353
+ processor/validate.rb: Get ready for release 1.2
354
+
1
355
  2011-03-23 rocky <rockyb@rubyforge.org>
2
356
 
3
357
  * app/core.rb, app/frame.rb, processor/command/edit.rb,
data/NEWS CHANGED
@@ -1,3 +1,24 @@
1
+ June 12, 2011 (0.1.3) Fleetwood Release
2
+ - Add debugger commands:
3
+ * tbreak (is in gdb)
4
+ * info globals (is in ruby-debug)
5
+ * info locals (is in gdb)
6
+ * info source (is in gdb)
7
+ * info stack (is in gdb, same as backtrace)
8
+ * info macro (in in gdb; remove show macro)
9
+ * show timer (set timer was already there)
10
+ * parsetree
11
+ * pp (is in ruby-debug)
12
+ * set/show reload (is in ruby-debug)
13
+
14
+ - Add options from ruby-debug:
15
+ * --cd
16
+ * --include
17
+ * --require
18
+ * --debug
19
+ - fix bugs, and improve help
20
+
21
+
1
22
  March 28, 2011 (0.1.2)
2
23
  - Release to correct threadrame and trace package dependencies
3
24
  - add "edit" command
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rubygems'
4
4
 
5
5
  ROOT_DIR = File.dirname(__FILE__)
6
6
  Gemspec_filename='trepanning.gemspec'
7
- require File.join %W(#{ROOT_DIR} app options)
7
+ require_relative './app/options'
8
8
 
9
9
  def gemspec
10
10
  @gemspec ||= eval(File.read(Gemspec_filename), binding, Gemspec_filename)
@@ -21,7 +21,7 @@ task :gem=>:gemspec do
21
21
  end
22
22
  end
23
23
 
24
- desc "Install the gem locally"
24
+ desc 'Install the gem locally'
25
25
  task :install => :gem do
26
26
  Dir.chdir(ROOT_DIR) do
27
27
  sh %{gem install --local pkg/#{gemspec.file_name}}
@@ -42,7 +42,7 @@ task :check => :test
42
42
 
43
43
  require 'rbconfig'
44
44
 
45
- def run_standalone_ruby_files(list)
45
+ def run_standalone_ruby_files(list, opts={})
46
46
  puts '*' * 40
47
47
  list.each do |ruby_file|
48
48
  system(RbConfig.ruby, ruby_file)
@@ -98,20 +98,20 @@ task :test do
98
98
  end.compact
99
99
 
100
100
  exceptions.each {|e| puts e;puts e.backtrace }
101
- raise "Test failures" unless exceptions.empty?
101
+ raise 'Test failures' unless exceptions.empty?
102
102
  end
103
103
 
104
- desc "Run each Ruby app file in standalone mode."
104
+ desc 'Run each Ruby app file in standalone mode.'
105
105
  task :'check:app' do
106
106
  run_standalone_ruby_file(File.join(%W(#{ROOT_DIR} app)))
107
107
  end
108
108
 
109
- desc "Run each command in standalone mode."
109
+ desc 'Run each command in standalone mode.'
110
110
  task :'check:commands' do
111
111
  run_standalone_ruby_file(File.join(%W(#{ROOT_DIR} processor command)))
112
112
  end
113
113
 
114
- desc "Run each of the sub-sub commands in standalone mode."
114
+ desc 'Run each of the sub-sub commands in standalone mode.'
115
115
  task :'check:sub:commands' do
116
116
  p "#{ROOT_DIR}/processor/command/*_subcmd/*_subcmd/*.rb"
117
117
  Dir.glob("#{ROOT_DIR}/processor/command/*_subcmd").each do |sub_dir|
@@ -119,38 +119,38 @@ task :'check:sub:commands' do
119
119
  end
120
120
  end
121
121
 
122
- desc "Run each of the sub-sub commands in standalone mode."
122
+ desc 'Run each of the sub-sub commands in standalone mode.'
123
123
  task :'check:subsub:commands' do
124
124
  subsub_files = FileList["#{ROOT_DIR}/processor/command/*_subcmd/*_subcmd/*.rb"]
125
125
  run_standalone_ruby_files(subsub_files)
126
126
  end
127
127
 
128
- desc "Run each processor Ruby file in standalone mode."
128
+ desc 'Run each processor Ruby file in standalone mode.'
129
129
  task :'check:lib' do
130
130
  run_standalone_ruby_file(File.join(%W(#{ROOT_DIR} lib)))
131
131
  end
132
132
 
133
- desc "Run each processor Ruby file in standalone mode."
133
+ desc 'Run each processor Ruby file in standalone mode.'
134
134
  task :'check:processor' do
135
135
  run_standalone_ruby_file(File.join(%W(#{ROOT_DIR} processor)))
136
136
  end
137
137
 
138
- desc "Run each processor Ruby file in standalone mode."
138
+ desc 'Run each processor Ruby file in standalone mode.'
139
139
  task :'check:unit' do
140
140
  run_standalone_ruby_file(File.join(%W(#{ROOT_DIR} test unit)))
141
141
  end
142
142
 
143
- desc "Run functional tests in standalone mode."
143
+ desc 'Run functional tests in standalone mode.'
144
144
  task :'check:functional' do
145
145
  run_standalone_ruby_file(File.join(%W(#{ROOT_DIR} test functional)))
146
146
  end
147
147
 
148
- desc "Run command parser grammar."
148
+ desc 'Run command parser grammar.'
149
149
  task :'check:cmd_parse' do
150
150
  sh "kpeg --test --debug #{File.join(ROOT_DIR, %w(app cmd_parse.kpeg))}"
151
151
  end
152
152
 
153
- desc "Generate command parser."
153
+ desc 'Generate command parser.'
154
154
  task :'cmd_parse' do
155
155
  require 'tmpdir'
156
156
  temp_file =
@@ -163,7 +163,7 @@ task :'cmd_parse' do
163
163
  end
164
164
 
165
165
  task :'check:integration' do
166
- run_standalone_ruby_file(File.join(%W(#{ROOT_DIR} test integration)))
166
+ run_standalone_ruby_files(FileList['test/integration/**/test-*.rb'])
167
167
  end
168
168
 
169
169
  task :check => %w(check:lib check:processor check:commands).map{|c| c.to_sym}
@@ -171,12 +171,12 @@ task :check => %w(check:lib check:processor check:commands).map{|c| c.to_sym}
171
171
  desc "Default action is same as 'test'."
172
172
  task :default => :test
173
173
 
174
- desc "Generate the gemspec"
174
+ desc 'Generate the gemspec'
175
175
  task :generate do
176
176
  puts gemspec.to_ruby
177
177
  end
178
178
 
179
- desc "Validate the gemspec"
179
+ desc 'Validate the gemspec'
180
180
  task :gemspec do
181
181
  gemspec.validate
182
182
  end
@@ -194,7 +194,7 @@ Rake::RDocTask.new("rdoc") do |rdoc|
194
194
  ))
195
195
  end
196
196
 
197
- desc "Same as rdoc"
197
+ desc 'Same as rdoc'
198
198
  task :doc => :rdoc
199
199
 
200
200
  task :clobber_package do
@@ -205,9 +205,16 @@ task :clobber_rdoc do
205
205
  FileUtils.rm_rf File.join(ROOT_DIR, 'doc')
206
206
  end
207
207
 
208
+ desc 'Remove residue from running patch'
208
209
  task :rm_patch_residue do
209
210
  FileUtils.rm_rf FileList['**/*.{rej,orig}'].to_a
210
211
  end
211
212
 
212
- desc "Remove built files"
213
- task :clean => [:clobber_package, :clobber_rdoc, :rm_patch_residue]
213
+ desc 'Remove ~ backup files'
214
+ task :rm_tilde_backups do
215
+ FileUtils.rm_rf Dir.glob('**/*~'), :verbose => true
216
+ end
217
+
218
+ desc 'Remove built files'
219
+ task :clean => [:clobber_package, :clobber_rdoc, :rm_patch_residue,
220
+ :rm_tilde_backups]