rbx-linecache 0.44-universal-rubinius
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.
- data/AUTHORS +1 -0
- data/COPYING +340 -0
- data/ChangeLog +379 -0
- data/NEWS +35 -0
- data/README +50 -0
- data/Rakefile +82 -0
- data/lib/linecache.rb +498 -0
- data/lib/tracelines.rb +58 -0
- data/test/data/begin1.rb +3 -0
- data/test/data/begin2.rb +3 -0
- data/test/data/begin3.rb +6 -0
- data/test/data/block1.rb +7 -0
- data/test/data/block2.rb +4 -0
- data/test/data/case1.rb +6 -0
- data/test/data/case2.rb +5 -0
- data/test/data/case3.rb +5 -0
- data/test/data/case4.rb +4 -0
- data/test/data/case5.rb +10 -0
- data/test/data/class1.rb +5 -0
- data/test/data/comments1.rb +6 -0
- data/test/data/def1.rb +9 -0
- data/test/data/each1.rb +3 -0
- data/test/data/end.rb +3 -0
- data/test/data/for1.rb +4 -0
- data/test/data/if1.rb +4 -0
- data/test/data/if2.rb +4 -0
- data/test/data/if3.rb +9 -0
- data/test/data/if4.rb +14 -0
- data/test/data/if5.rb +7 -0
- data/test/data/if6.rb +4 -0
- data/test/data/if7.rb +8 -0
- data/test/data/match.rb +3 -0
- data/test/data/match3.rb +5 -0
- data/test/data/match3a.rb +6 -0
- data/test/data/not-lit.rb +6 -0
- data/test/lnum-diag.rb +130 -0
- data/test/parse-show.rb +14 -0
- data/test/rcov-bug.rb +10 -0
- data/test/short-file +2 -0
- data/test/short-file2 +0 -0
- data/test/test-linecache.rb +167 -0
- data/test/test-lnum.rb +32 -0
- data/test/test-tracelines.rb +40 -0
- metadata +134 -0
data/ChangeLog
ADDED
@@ -0,0 +1,379 @@
|
|
1
|
+
2010-11-21 01:56 Rocky Bernstein
|
2
|
+
|
3
|
+
* lib/linecache.rb, test/test-linecache.rb: Handle rubinius script
|
4
|
+
to temp file remapping.
|
5
|
+
|
6
|
+
2010-11-16 05:08 Rocky Bernstein
|
7
|
+
|
8
|
+
* lib/linecache.rb, test/test-linecache.rb: Start caching script
|
9
|
+
locations which are what we can use for eval strings
|
10
|
+
and presumably other autogenerated things.
|
11
|
+
|
12
|
+
2010-10-27 16:40 Rocky Bernstein
|
13
|
+
|
14
|
+
* NEWS: What's up
|
15
|
+
|
16
|
+
2010-10-27 16:40 Rocky Bernstein
|
17
|
+
|
18
|
+
* ChangeLog, lib/linecache.rb: Get ready for release 0.43.
|
19
|
+
|
20
|
+
2010-09-27 19:50 Rocky Bernstein
|
21
|
+
|
22
|
+
* lib/tracelines.rb, test/data/block2.rb, test/data/class1.rb,
|
23
|
+
test/data/def1.rb, test/data/each1.rb, test/data/end.rb,
|
24
|
+
test/data/for1.rb, test/data/if4.rb, test/data/if7.rb,
|
25
|
+
test/data/match3.rb, test/data/match3a.rb, test/data/not-lit.rb,
|
26
|
+
test/test-lnum.rb: Add in line numbers for child methods.
|
27
|
+
|
28
|
+
2010-09-27 19:04 Rocky Bernstein
|
29
|
+
|
30
|
+
* test/data/begin2.rb, test/data/begin3.rb, test/data/block1.rb,
|
31
|
+
test/data/block2.rb, test/data/case1.rb, test/data/case2.rb,
|
32
|
+
test/data/case3.rb, test/data/case4.rb, test/data/class1.rb,
|
33
|
+
test/data/comments1.rb, test/data/for1.rb, test/data/if1.rb,
|
34
|
+
test/data/if2.rb, test/data/if4.rb, test/data/if5.rb,
|
35
|
+
test/data/if6.rb, test/data/if7.rb, test/test-linecache.rb,
|
36
|
+
test/test-lnum.rb, test/test-tracelines.rb: Use
|
37
|
+
CompiledMethod#method#lines more correctly. Thanks to Evan
|
38
|
+
Pheonix.
|
39
|
+
|
40
|
+
2010-09-27 14:16 Rocky Bernstein
|
41
|
+
|
42
|
+
* lib/linecache.rb: Merge linecache-tf changes in
|
43
|
+
|
44
|
+
2010-09-27 13:54 Rocky Bernstein
|
45
|
+
|
46
|
+
* .gemspec: Forgot to add this too.
|
47
|
+
|
48
|
+
2010-09-27 13:53 Rocky Bernstein
|
49
|
+
|
50
|
+
* test/short-file2: Forgot to add this
|
51
|
+
|
52
|
+
2010-09-27 02:18 Rocky Bernstein
|
53
|
+
|
54
|
+
* NEWS, Rakefile, VERSION, ext, lib/linecache.rb,
|
55
|
+
lib/tracelines.rb, test/test-linecache.rb, test/test-lnum.rb,
|
56
|
+
test/test-tracelines.rb: Rough port for Rubinius 1.0.1/1.1
|
57
|
+
|
58
|
+
2010-09-26 23:59 Rocky Bernstein
|
59
|
+
|
60
|
+
* .: A branch for Rubinius.
|
61
|
+
|
62
|
+
2009-08-05 05:04 mark-moseley
|
63
|
+
|
64
|
+
* minor cleanup
|
65
|
+
|
66
|
+
2009-02-09 01:16 Rocky Bernstein
|
67
|
+
|
68
|
+
* Another doc typo.
|
69
|
+
|
70
|
+
2009-02-08 17:19 Rocky Bernstein
|
71
|
+
|
72
|
+
* Update doc.
|
73
|
+
|
74
|
+
2009-02-08 02:07 Rocky Bernstein
|
75
|
+
|
76
|
+
* Comparing wrong fields in stat comparison.
|
77
|
+
|
78
|
+
2009-02-07 09:21 Rocky Bernstein
|
79
|
+
|
80
|
+
* Another doc typo.
|
81
|
+
|
82
|
+
2009-02-07 02:31 Rocky Bernstein
|
83
|
+
|
84
|
+
* Add ',' to doc comment.
|
85
|
+
|
86
|
+
2009-02-06 04:47 Rocky Bernstein
|
87
|
+
|
88
|
+
* Update documentation.
|
89
|
+
|
90
|
+
2009-02-02 11:24 Rocky Bernstein
|
91
|
+
|
92
|
+
* Move in the right trunk. Or perhaps we'll blow out everything?
|
93
|
+
Figers are crossed....
|
94
|
+
|
95
|
+
2008-06-12 11:29 Rocky Bernstein
|
96
|
+
|
97
|
+
* 0.43 release - small change for MSwin32 - allow sfinding an
|
98
|
+
extension in lib rather than ext.
|
99
|
+
|
100
|
+
2008-06-12 00:04 Rocky Bernstein
|
101
|
+
|
102
|
+
* Look in lib as well as ext for trace_nums. Win32 puts it in lib.
|
103
|
+
|
104
|
+
2008-04-11 02:54 Rocky Bernstein
|
105
|
+
|
106
|
+
* Wasn't listing extension to for C compilation?
|
107
|
+
|
108
|
+
2008-04-10 20:06 Rocky Bernstein
|
109
|
+
|
110
|
+
* What's new for 0.41.
|
111
|
+
|
112
|
+
2008-04-10 20:02 Rocky Bernstein
|
113
|
+
|
114
|
+
* Forgot to add test/data to the gem.
|
115
|
+
|
116
|
+
2008-04-10 02:15 Rocky Bernstein
|
117
|
+
|
118
|
+
*
|
119
|
+
|
120
|
+
2008-03-28 15:04 Rocky Bernstein
|
121
|
+
|
122
|
+
* More if tests
|
123
|
+
|
124
|
+
2008-03-09 23:24 Rocky Bernstein
|
125
|
+
|
126
|
+
* Deal with Depricated win32.
|
127
|
+
|
128
|
+
2008-03-05 02:01 Rocky Bernstein
|
129
|
+
|
130
|
+
* Add rubyforge_upload task -- code from ruby-memory-profiler.
|
131
|
+
|
132
|
+
2008-03-04 22:47 Rocky Bernstein
|
133
|
+
|
134
|
+
* Ooops - forgot to credit Ryan Davis and ParseTree.
|
135
|
+
|
136
|
+
2008-02-10 13:59 Rocky Bernstein
|
137
|
+
|
138
|
+
* Go over Rakefile and doc for 0.3 release.
|
139
|
+
|
140
|
+
2008-01-29 21:51 Rocky Bernstein
|
141
|
+
|
142
|
+
* Interface change. Don't know why this didn't get updated before.
|
143
|
+
|
144
|
+
2008-01-28 15:35 Rocky Bernstein
|
145
|
+
|
146
|
+
* Change line number return from a Set to an Array.
|
147
|
+
|
148
|
+
2008-01-27 11:24 Rocky Bernstein
|
149
|
+
|
150
|
+
* Handle defined? node. Add "if" weirdness test.
|
151
|
+
|
152
|
+
2008-01-27 04:26 Rocky Bernstein
|
153
|
+
|
154
|
+
* Verify that the 'else' doesn't appear in a trace.
|
155
|
+
|
156
|
+
2008-01-27 04:21 Rocky Bernstein
|
157
|
+
|
158
|
+
* Was not showing blocks after when's.
|
159
|
+
|
160
|
+
2008-01-27 04:03 Rocky Bernstein
|
161
|
+
|
162
|
+
* trace_nums.c, block1.c, block2.c: bug in handling blocks
|
163
|
+
lnum-diag.rb: more graceful about not finding the source.
|
164
|
+
if4.rb: note weirdness in the way comparison works.
|
165
|
+
|
166
|
+
2008-01-27 02:11 Rocky Bernstein
|
167
|
+
|
168
|
+
* Finish adding all tree nodes. Work on case nodes some more.
|
169
|
+
lnum-diag.rb: add options to turn on and off various parts.
|
170
|
+
|
171
|
+
2008-01-26 11:12 Rocky Bernstein
|
172
|
+
|
173
|
+
* Add comment test and situation where no lines traced.
|
174
|
+
|
175
|
+
2008-01-26 11:08 Rocky Bernstein
|
176
|
+
|
177
|
+
* Add class, scope and module nodes.
|
178
|
+
|
179
|
+
2008-01-26 10:18 Rocky Bernstein
|
180
|
+
|
181
|
+
* Add more tree nodes.
|
182
|
+
|
183
|
+
2008-01-26 02:09 Rocky Bernstein
|
184
|
+
|
185
|
+
* Add Debugger.init which intializes things that rdebug does. This
|
186
|
+
allows a restart even though rdebug wasn't called initially.
|
187
|
+
|
188
|
+
2008-01-25 03:50 Rocky Bernstein
|
189
|
+
|
190
|
+
* Some code cleanup.
|
191
|
+
|
192
|
+
2008-01-25 02:50 Rocky Bernstein
|
193
|
+
|
194
|
+
* Work over case, when and match3.
|
195
|
+
|
196
|
+
2008-01-25 00:17 Rocky Bernstein
|
197
|
+
|
198
|
+
* Trace just line numbers for now until we get a better handle on
|
199
|
+
things.
|
200
|
+
|
201
|
+
2008-01-24 13:36 Rocky Bernstein
|
202
|
+
|
203
|
+
* Need recursion in more places because of block continuation
|
204
|
+
nodes.
|
205
|
+
Add nodes needed so we don't complain about rcov-bug.rb:
|
206
|
+
NODE_MATCH3, NODE_LASN, and NODE_STR (and those similar to that).
|
207
|
+
|
208
|
+
2008-01-24 04:09 Rocky Bernstein
|
209
|
+
|
210
|
+
* Fix bug if print_file == false
|
211
|
+
|
212
|
+
2008-01-24 04:04 Rocky Bernstein
|
213
|
+
|
214
|
+
* Add more operatiors. Go over existing ones and add more tests of
|
215
|
+
them.
|
216
|
+
|
217
|
+
2008-01-23 19:17 Rocky Bernstein
|
218
|
+
|
219
|
+
* What's up.
|
220
|
+
|
221
|
+
2008-01-23 19:12 Rocky Bernstein
|
222
|
+
|
223
|
+
* Don't assume we have expected line numbers.
|
224
|
+
|
225
|
+
2008-01-23 19:05 Rocky Bernstein
|
226
|
+
|
227
|
+
* A conversion-error bug.
|
228
|
+
|
229
|
+
2008-01-23 19:04 Rocky Bernstein
|
230
|
+
|
231
|
+
* variable name typo.
|
232
|
+
|
233
|
+
2008-01-23 19:03 Rocky Bernstein
|
234
|
+
|
235
|
+
* lnum-diag.rb and parse-show.rb - some diagnostic tools.
|
236
|
+
|
237
|
+
2008-01-23 16:06 Rocky Bernstein
|
238
|
+
|
239
|
+
* Show add_lines level, nicer formatting including \n for end.
|
240
|
+
|
241
|
+
2008-01-23 15:32 Rocky Bernstein
|
242
|
+
|
243
|
+
* Generalized routine to test everything in lnum-data
|
244
|
+
|
245
|
+
2008-01-23 12:07 Rocky Bernstein
|
246
|
+
|
247
|
+
* ParseTree is broken for our purposes. Having custom code for
|
248
|
+
getting
|
249
|
+
the trace line numbers is going remove a lot of headaches down
|
250
|
+
the line.
|
251
|
+
|
252
|
+
2008-01-20 21:37 Rocky Bernstein
|
253
|
+
|
254
|
+
* Add trace_line_numbers to save/get line numbers which we can set
|
255
|
+
breakpoints
|
256
|
+
on.
|
257
|
+
|
258
|
+
2008-01-20 16:31 Rocky Bernstein
|
259
|
+
|
260
|
+
* Add module TraceLineNumbers for extracting the stoppable lines in
|
261
|
+
a
|
262
|
+
Ruby program.
|
263
|
+
|
264
|
+
2008-01-19 15:55 Rocky Bernstein
|
265
|
+
|
266
|
+
* Allow nil to mean the same file. More tests.
|
267
|
+
|
268
|
+
2008-01-19 15:45 Rocky Bernstein
|
269
|
+
|
270
|
+
* Start remap_file_lines: ability to remap file ranges.
|
271
|
+
|
272
|
+
2008-01-17 22:25 Rocky Bernstein
|
273
|
+
|
274
|
+
* lines -> size. Add empty? Add remap_file.
|
275
|
+
|
276
|
+
2008-01-17 20:05 Rocky Bernstein
|
277
|
+
|
278
|
+
* Add method to get the number of lines in a cached file.
|
279
|
+
|
280
|
+
2008-01-17 19:42 Rocky Bernstein
|
281
|
+
|
282
|
+
* Add convenience method for testing presence in SCRIPT_LINES__.
|
283
|
+
|
284
|
+
2008-01-17 07:30 Rocky Bernstein
|
285
|
+
|
286
|
+
* Add path method and test.
|
287
|
+
|
288
|
+
2008-01-17 06:54 Rocky Bernstein
|
289
|
+
|
290
|
+
* Add @@full2file_cache_key. getlines wasn't returning the right
|
291
|
+
value sometimes.
|
292
|
+
Make return from checkcache meaningful. Change return value of
|
293
|
+
upate_cache().
|
294
|
+
test-linecache.rb: was testing for buggy behavior!
|
295
|
+
VERSION: now in 0.3 - hope we get it right this time.
|
296
|
+
|
297
|
+
2008-01-16 12:51 Rocky Bernstein
|
298
|
+
|
299
|
+
* Add cached_files.
|
300
|
+
|
301
|
+
2008-01-16 01:30 Rocky Bernstein
|
302
|
+
|
303
|
+
* Update news for 0.2 release.
|
304
|
+
|
305
|
+
2008-01-15 22:43 Rocky Bernstein
|
306
|
+
|
307
|
+
* Remove debug line.
|
308
|
+
|
309
|
+
2008-01-15 22:42 Rocky Bernstein
|
310
|
+
|
311
|
+
* Fix some syntax errors.
|
312
|
+
|
313
|
+
2008-01-15 22:40 Rocky Bernstein
|
314
|
+
|
315
|
+
* Add routine to save and get SHA1.
|
316
|
+
|
317
|
+
2008-01-15 22:16 Rocky Bernstein
|
318
|
+
|
319
|
+
* Add cached? and stat methods to determine in a file is cached and
|
320
|
+
get
|
321
|
+
File.stat from it.
|
322
|
+
|
323
|
+
2008-01-15 08:49 Rocky Bernstein
|
324
|
+
|
325
|
+
* Don't ever modify SCRIPT_LINES__. And until SCRIPT_LINES__ is
|
326
|
+
fixed,
|
327
|
+
don't read from it. Corrections to comments.
|
328
|
+
|
329
|
+
2008-01-14 12:27 Rocky Bernstein
|
330
|
+
|
331
|
+
* Add parameter to getline and getlines to reload file on change.
|
332
|
+
Add
|
333
|
+
option on clear_file_cache to clear out SCRIPT_LINES__ as well.
|
334
|
+
TESTS ARE NEEDED.
|
335
|
+
Update to version 0.2.
|
336
|
+
|
337
|
+
2008-01-14 03:41 Rocky Bernstein
|
338
|
+
|
339
|
+
* Use SCRIPT_LINES__ if we can.
|
340
|
+
|
341
|
+
2007-12-10 16:24 Rocky Bernstein
|
342
|
+
|
343
|
+
* release 0.1
|
344
|
+
|
345
|
+
2007-12-09 17:47 Rocky Bernstein
|
346
|
+
|
347
|
+
* Make Ruby 1.9 compatible.
|
348
|
+
|
349
|
+
2007-12-09 17:17 Rocky Bernstein
|
350
|
+
|
351
|
+
* Better tests mean more bugs found. "rake" defaults now to "test".
|
352
|
+
|
353
|
+
2007-12-09 14:10 Rocky Bernstein
|
354
|
+
|
355
|
+
* Add VERSION to gem.
|
356
|
+
|
357
|
+
2007-12-09 14:09 Rocky Bernstein
|
358
|
+
|
359
|
+
* Change classname to something more appropriate.
|
360
|
+
|
361
|
+
2007-12-09 13:41 Rocky Bernstein
|
362
|
+
|
363
|
+
* . : ignore doc and pkg
|
364
|
+
Rakefile: clean now does clobber_rdoc and clobber_package, i.e.
|
365
|
+
removes
|
366
|
+
the doc and pkg directories.
|
367
|
+
|
368
|
+
2007-12-09 13:15 Rocky Bernstein
|
369
|
+
|
370
|
+
* NEWS, README, linecache.rb: Add $Id$ line
|
371
|
+
test-linecache.rb: make executable
|
372
|
+
Rakefile: Correct documentation
|
373
|
+
|
374
|
+
2007-12-09 12:58 Rocky Bernstein
|
375
|
+
|
376
|
+
* Initial import of LineCache, a module for reading and caching
|
377
|
+
lines.
|
378
|
+
This time to trunk.
|
379
|
+
|
data/NEWS
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
December 25 2010
|
2
|
+
- Handle Rubinius eval_source to temp file remapping.
|
3
|
+
|
4
|
+
October 27 2010
|
5
|
+
- First gemcutter rubinius release
|
6
|
+
|
7
|
+
|
8
|
+
0.43
|
9
|
+
06-12-08
|
10
|
+
- tolerance for finding windows extension in lib rather than ext.
|
11
|
+
|
12
|
+
0.41
|
13
|
+
- add test/data/* to gem.
|
14
|
+
|
15
|
+
0.4
|
16
|
+
- Credit Ryan Davis and ParseTree.
|
17
|
+
|
18
|
+
0.3
|
19
|
+
- Add tracelines: get line numbers that can be stopped at.
|
20
|
+
|
21
|
+
- Add routines to allow line-number
|
22
|
+
remapping and filename remapping.
|
23
|
+
|
24
|
+
- Add access methods to get the number of lines in a file.
|
25
|
+
|
26
|
+
0.2
|
27
|
+
- Make this work with ruby-debug-base. Add reload-on-change parameters.
|
28
|
+
add checkcache, cache, cached? sha1, and stat methods.
|
29
|
+
|
30
|
+
- Use SCRIPT_LINES__.
|
31
|
+
|
32
|
+
0.1
|
33
|
+
|
34
|
+
- Initial release of LineCache, a module for reading and caching lines.
|
35
|
+
|
data/README
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
= LineCache - A module to read and cache file information of a Ruby program.
|
2
|
+
|
3
|
+
== SYNOPSIS
|
4
|
+
|
5
|
+
The LineCache module allows one to get any line from any file, caching
|
6
|
+
the lines and file information on first access to the file. Although
|
7
|
+
the file may be any file, the common use is when the file is a Ruby
|
8
|
+
script since parsing of the file is done to figure out where the
|
9
|
+
statement boundaries are.
|
10
|
+
|
11
|
+
The routines here may be is useful when a small random sets of lines
|
12
|
+
are read from a single file, in particular in a debugger to show
|
13
|
+
source lines.
|
14
|
+
|
15
|
+
== Summary
|
16
|
+
|
17
|
+
require 'linecache'
|
18
|
+
lines = LineCache::getlines('/tmp/myruby.rb')
|
19
|
+
# The following lines have same effect as the above.
|
20
|
+
$: << '/tmp'
|
21
|
+
Dir.chdir('/tmp') {lines = LineCache::getlines('myruby.rb')
|
22
|
+
|
23
|
+
line = LineCache::getline('/tmp/myruby.rb', 6)
|
24
|
+
# Note lines[6] == line (if /tmp/myruby.rb has 6 lines)
|
25
|
+
|
26
|
+
LineCache::clear_file_cache
|
27
|
+
LineCache::clear_file_cache('/tmp/myruby.rb')
|
28
|
+
LineCache::update_cache # Check for modifications of all cached files.
|
29
|
+
|
30
|
+
== Credits
|
31
|
+
|
32
|
+
This is a port of the module of the same name from the Python distribution.
|
33
|
+
|
34
|
+
The idea for how TraceLineNumbers works, and some code was taken
|
35
|
+
from ParseTree by Ryan Davis.
|
36
|
+
|
37
|
+
== Other stuff
|
38
|
+
|
39
|
+
Author:: Rocky Bernstein <rockyb@rubyforge.net>
|
40
|
+
License:: Copyright (c) 2007, 2008 Rocky Bernstein
|
41
|
+
Released under the GNU GPL 2 license
|
42
|
+
|
43
|
+
== Warranty
|
44
|
+
|
45
|
+
This program is distributed in the hope that it will be useful,
|
46
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
47
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
48
|
+
GNU General Public License for more details.
|
49
|
+
|
50
|
+
$Id: README 169 2009-02-08 17:19:33Z rockyb $
|
data/Rakefile
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# Are we Rubinius 1.1.1 or 1.2?
|
3
|
+
raise RuntimeError, 'This package is for Rubinius only! (1.2, 1.2.1dev)' unless
|
4
|
+
Object.constants.include?('Rubinius') &&
|
5
|
+
Rubinius.constants.include?('VM') &&
|
6
|
+
%w(1.2 1.2.1dev).member?(Rubinius::VERSION)
|
7
|
+
|
8
|
+
require 'rubygems'
|
9
|
+
require 'rake/gempackagetask'
|
10
|
+
require 'rake/rdoctask'
|
11
|
+
require 'rake/testtask'
|
12
|
+
|
13
|
+
ROOT_DIR = File.dirname(__FILE__)
|
14
|
+
require File.join %W(#{ROOT_DIR} lib linecache)
|
15
|
+
|
16
|
+
def gemspec
|
17
|
+
@gemspec ||= eval(File.read('.gemspec'), binding, '.gemspec')
|
18
|
+
end
|
19
|
+
|
20
|
+
desc "Build the gem"
|
21
|
+
task :package=>:gem
|
22
|
+
task :gem=>:gemspec do
|
23
|
+
Dir.chdir(ROOT_DIR) do
|
24
|
+
sh "gem build .gemspec"
|
25
|
+
FileUtils.mkdir_p 'pkg'
|
26
|
+
FileUtils.mv("#{gemspec.name}-#{gemspec.version}-universal-rubinius.gem",
|
27
|
+
'pkg')
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
task :default => [:test]
|
32
|
+
|
33
|
+
desc 'Install the gem locally'
|
34
|
+
task :install => :package do
|
35
|
+
Dir.chdir(ROOT_DIR) do
|
36
|
+
sh %{gem install --local pkg/#{gemspec.name}-#{gemspec.version}}
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
desc "Create a GNU-style ChangeLog via svn2cl"
|
41
|
+
task :ChangeLog do
|
42
|
+
system("svn2cl --authors=svn2cl_usermap")
|
43
|
+
end
|
44
|
+
|
45
|
+
desc 'Test units - the smaller tests'
|
46
|
+
Rake::TestTask.new(:'test') do |t|
|
47
|
+
t.test_files = FileList['test/test-*.rb']
|
48
|
+
# t.pattern = 'test/**/*test-*.rb' # instead of above
|
49
|
+
t.verbose = true
|
50
|
+
end
|
51
|
+
|
52
|
+
desc "Generate the gemspec"
|
53
|
+
task :generate do
|
54
|
+
puts gemspec.to_ruby
|
55
|
+
end
|
56
|
+
|
57
|
+
desc "Validate the gemspec"
|
58
|
+
task :gemspec do
|
59
|
+
gemspec.validate
|
60
|
+
end
|
61
|
+
|
62
|
+
# --------- RDoc Documentation ------
|
63
|
+
desc "Generate rdoc documentation"
|
64
|
+
Rake::RDocTask.new("rdoc") do |rdoc|
|
65
|
+
rdoc.rdoc_dir = 'doc'
|
66
|
+
rdoc.title = "rbx-linecache #{LineCache::VERSION} Documentation"
|
67
|
+
rdoc.rdoc_files.include(%w(lib/*.rb))
|
68
|
+
end
|
69
|
+
|
70
|
+
desc "Same as rdoc"
|
71
|
+
task :doc => :rdoc
|
72
|
+
|
73
|
+
task :clobber_package do
|
74
|
+
FileUtils.rm_rf File.join(ROOT_DIR, 'pkg')
|
75
|
+
end
|
76
|
+
|
77
|
+
task :clobber_rdoc do
|
78
|
+
FileUtils.rm_rf File.join(ROOT_DIR, 'doc')
|
79
|
+
end
|
80
|
+
|
81
|
+
desc "Remove built files"
|
82
|
+
task :clean => [:clobber_package, :clobber_rdoc]
|