guard-ronn 0.1.0
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/CHANGELOG.md +5 -0
- data/LICENSE +20 -0
- data/README.md +90 -0
- data/lib/guard/ronn/formatter.rb +22 -0
- data/lib/guard/ronn/formatter.rbc +578 -0
- data/lib/guard/ronn/inspector.rb +36 -0
- data/lib/guard/ronn/inspector.rbc +1036 -0
- data/lib/guard/ronn/runner.rb +36 -0
- data/lib/guard/ronn/runner.rbc +1011 -0
- data/lib/guard/ronn/templates/Guardfile +3 -0
- data/lib/guard/ronn/version.rb +5 -0
- data/lib/guard/ronn/version.rbc +203 -0
- data/lib/guard/ronn.rb +31 -0
- data/lib/guard/ronn.rbc +746 -0
- metadata +105 -0
data/CHANGELOG.md
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 Rémy Coutable
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
# Guard::Ronn [](http://travis-ci.org/guard/guard-ronn)
|
2
|
+
|
3
|
+
[Ronn](https://github.com/rtomayko/ronn) guard automatically build manuals when markdown source files are modified.
|
4
|
+
|
5
|
+
## Compatibility
|
6
|
+
|
7
|
+
* Compatible with Ronn 0.7.3.
|
8
|
+
* Tested on Ruby 1.8.7, 1.9.2, REE, Rubinius & JRuby.
|
9
|
+
|
10
|
+
## Install
|
11
|
+
|
12
|
+
Please be sure to have [Guard](https://github.com/guard/guard) installed before continue.
|
13
|
+
|
14
|
+
If you're using Bundler, add it to your `Gemfile` (inside the `development` or `guard` group):
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
gem 'guard-ronn'
|
18
|
+
```
|
19
|
+
|
20
|
+
and run:
|
21
|
+
|
22
|
+
```bash
|
23
|
+
$ bundle install
|
24
|
+
```
|
25
|
+
|
26
|
+
or manually install the gem:
|
27
|
+
|
28
|
+
```bash
|
29
|
+
$ gem install guard-ronn
|
30
|
+
```
|
31
|
+
|
32
|
+
Add Guard definition to your `Guardfile` by running this command:
|
33
|
+
|
34
|
+
```bash
|
35
|
+
$ guard init ronn
|
36
|
+
```
|
37
|
+
|
38
|
+
Usage
|
39
|
+
-----
|
40
|
+
|
41
|
+
Please read [Guard usage doc](https://github.com/guard/guard#readme).
|
42
|
+
|
43
|
+
By default, Guard::Ronn watch for files with the `.md` or `.markdown` extension in the `man` directory.
|
44
|
+
|
45
|
+
Guardfile
|
46
|
+
---------
|
47
|
+
|
48
|
+
``` ruby
|
49
|
+
guard 'ronn' do
|
50
|
+
watch(%r{^man/.+\.m(ark)?d(own)?$})
|
51
|
+
end
|
52
|
+
```
|
53
|
+
|
54
|
+
Please read [Guard doc](https://github.com/guard/guard#readme) for more information about the Guardfile DSL.
|
55
|
+
|
56
|
+
Options
|
57
|
+
-------
|
58
|
+
|
59
|
+
You can pass any of the standard Ronn CLI options using the `:cli` option:
|
60
|
+
|
61
|
+
``` ruby
|
62
|
+
guard 'ronn', :cli => "--html" do
|
63
|
+
# ...
|
64
|
+
end
|
65
|
+
```
|
66
|
+
|
67
|
+
### List of available options:
|
68
|
+
|
69
|
+
``` ruby
|
70
|
+
:cli => "--html" # pass arbitrary Ronn CLI arguments, default: ""
|
71
|
+
:bundler => false # don't use "bundle exec" to run the Ronn command, default: true
|
72
|
+
```
|
73
|
+
|
74
|
+
Development
|
75
|
+
-----------
|
76
|
+
|
77
|
+
* Source hosted at [GitHub](https://github.com/guard/guard-ronn)
|
78
|
+
* Report issues/Questions/Feature requests on [GitHub Issues](https://github.com/guard/guard-ronn/issues)
|
79
|
+
|
80
|
+
Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make. Also, please update the README and the CHANGELOG.
|
81
|
+
|
82
|
+
Testing
|
83
|
+
-------
|
84
|
+
|
85
|
+
`bundle exec guard` and `rake spec:portability` (to test against multiple rubies).
|
86
|
+
|
87
|
+
Author
|
88
|
+
------
|
89
|
+
|
90
|
+
[Rémy Coutable](https://github.com/rymai)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Guard
|
2
|
+
class Ronn
|
3
|
+
module Formatter
|
4
|
+
|
5
|
+
def notify(success)
|
6
|
+
::Guard::Notifier.notify(guard_message(success), :title => "Ronn results", :image => guard_image(success))
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def guard_message(success)
|
12
|
+
success ? "Manual generation done!" : "Manual generation failed!"
|
13
|
+
end
|
14
|
+
|
15
|
+
# failed | success
|
16
|
+
def guard_image(success)
|
17
|
+
success ? :success : :failed
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,578 @@
|
|
1
|
+
!RBIX
|
2
|
+
14325050222978361568
|
3
|
+
x
|
4
|
+
M
|
5
|
+
1
|
6
|
+
n
|
7
|
+
n
|
8
|
+
x
|
9
|
+
10
|
10
|
+
__script__
|
11
|
+
i
|
12
|
+
28
|
13
|
+
99
|
14
|
+
7
|
15
|
+
0
|
16
|
+
65
|
17
|
+
49
|
18
|
+
1
|
19
|
+
2
|
20
|
+
13
|
21
|
+
99
|
22
|
+
12
|
23
|
+
7
|
24
|
+
2
|
25
|
+
12
|
26
|
+
7
|
27
|
+
3
|
28
|
+
12
|
29
|
+
65
|
30
|
+
12
|
31
|
+
49
|
32
|
+
4
|
33
|
+
4
|
34
|
+
15
|
35
|
+
49
|
36
|
+
2
|
37
|
+
0
|
38
|
+
15
|
39
|
+
2
|
40
|
+
11
|
41
|
+
I
|
42
|
+
6
|
43
|
+
I
|
44
|
+
0
|
45
|
+
I
|
46
|
+
0
|
47
|
+
I
|
48
|
+
0
|
49
|
+
n
|
50
|
+
p
|
51
|
+
5
|
52
|
+
x
|
53
|
+
5
|
54
|
+
Guard
|
55
|
+
x
|
56
|
+
11
|
57
|
+
open_module
|
58
|
+
x
|
59
|
+
15
|
60
|
+
__module_init__
|
61
|
+
M
|
62
|
+
1
|
63
|
+
n
|
64
|
+
n
|
65
|
+
x
|
66
|
+
5
|
67
|
+
Guard
|
68
|
+
i
|
69
|
+
29
|
70
|
+
5
|
71
|
+
66
|
72
|
+
99
|
73
|
+
7
|
74
|
+
0
|
75
|
+
1
|
76
|
+
65
|
77
|
+
49
|
78
|
+
1
|
79
|
+
3
|
80
|
+
13
|
81
|
+
99
|
82
|
+
12
|
83
|
+
7
|
84
|
+
2
|
85
|
+
12
|
86
|
+
7
|
87
|
+
3
|
88
|
+
12
|
89
|
+
65
|
90
|
+
12
|
91
|
+
49
|
92
|
+
4
|
93
|
+
4
|
94
|
+
15
|
95
|
+
49
|
96
|
+
2
|
97
|
+
0
|
98
|
+
11
|
99
|
+
I
|
100
|
+
6
|
101
|
+
I
|
102
|
+
0
|
103
|
+
I
|
104
|
+
0
|
105
|
+
I
|
106
|
+
0
|
107
|
+
n
|
108
|
+
p
|
109
|
+
5
|
110
|
+
x
|
111
|
+
4
|
112
|
+
Ronn
|
113
|
+
x
|
114
|
+
10
|
115
|
+
open_class
|
116
|
+
x
|
117
|
+
14
|
118
|
+
__class_init__
|
119
|
+
M
|
120
|
+
1
|
121
|
+
n
|
122
|
+
n
|
123
|
+
x
|
124
|
+
4
|
125
|
+
Ronn
|
126
|
+
i
|
127
|
+
28
|
128
|
+
5
|
129
|
+
66
|
130
|
+
99
|
131
|
+
7
|
132
|
+
0
|
133
|
+
65
|
134
|
+
49
|
135
|
+
1
|
136
|
+
2
|
137
|
+
13
|
138
|
+
99
|
139
|
+
12
|
140
|
+
7
|
141
|
+
2
|
142
|
+
12
|
143
|
+
7
|
144
|
+
3
|
145
|
+
12
|
146
|
+
65
|
147
|
+
12
|
148
|
+
49
|
149
|
+
4
|
150
|
+
4
|
151
|
+
15
|
152
|
+
49
|
153
|
+
2
|
154
|
+
0
|
155
|
+
11
|
156
|
+
I
|
157
|
+
6
|
158
|
+
I
|
159
|
+
0
|
160
|
+
I
|
161
|
+
0
|
162
|
+
I
|
163
|
+
0
|
164
|
+
n
|
165
|
+
p
|
166
|
+
5
|
167
|
+
x
|
168
|
+
9
|
169
|
+
Formatter
|
170
|
+
x
|
171
|
+
11
|
172
|
+
open_module
|
173
|
+
x
|
174
|
+
15
|
175
|
+
__module_init__
|
176
|
+
M
|
177
|
+
1
|
178
|
+
n
|
179
|
+
n
|
180
|
+
x
|
181
|
+
9
|
182
|
+
Formatter
|
183
|
+
i
|
184
|
+
48
|
185
|
+
5
|
186
|
+
66
|
187
|
+
99
|
188
|
+
7
|
189
|
+
0
|
190
|
+
7
|
191
|
+
1
|
192
|
+
65
|
193
|
+
67
|
194
|
+
49
|
195
|
+
2
|
196
|
+
0
|
197
|
+
49
|
198
|
+
3
|
199
|
+
4
|
200
|
+
15
|
201
|
+
5
|
202
|
+
48
|
203
|
+
4
|
204
|
+
15
|
205
|
+
99
|
206
|
+
7
|
207
|
+
5
|
208
|
+
7
|
209
|
+
6
|
210
|
+
65
|
211
|
+
67
|
212
|
+
49
|
213
|
+
2
|
214
|
+
0
|
215
|
+
49
|
216
|
+
3
|
217
|
+
4
|
218
|
+
15
|
219
|
+
99
|
220
|
+
7
|
221
|
+
7
|
222
|
+
7
|
223
|
+
8
|
224
|
+
65
|
225
|
+
67
|
226
|
+
49
|
227
|
+
2
|
228
|
+
0
|
229
|
+
49
|
230
|
+
3
|
231
|
+
4
|
232
|
+
11
|
233
|
+
I
|
234
|
+
5
|
235
|
+
I
|
236
|
+
0
|
237
|
+
I
|
238
|
+
0
|
239
|
+
I
|
240
|
+
0
|
241
|
+
n
|
242
|
+
p
|
243
|
+
9
|
244
|
+
x
|
245
|
+
6
|
246
|
+
notify
|
247
|
+
M
|
248
|
+
1
|
249
|
+
n
|
250
|
+
n
|
251
|
+
x
|
252
|
+
6
|
253
|
+
notify
|
254
|
+
i
|
255
|
+
47
|
256
|
+
44
|
257
|
+
43
|
258
|
+
0
|
259
|
+
43
|
260
|
+
1
|
261
|
+
5
|
262
|
+
20
|
263
|
+
0
|
264
|
+
47
|
265
|
+
49
|
266
|
+
2
|
267
|
+
1
|
268
|
+
44
|
269
|
+
43
|
270
|
+
3
|
271
|
+
80
|
272
|
+
49
|
273
|
+
4
|
274
|
+
1
|
275
|
+
13
|
276
|
+
7
|
277
|
+
5
|
278
|
+
7
|
279
|
+
6
|
280
|
+
64
|
281
|
+
49
|
282
|
+
7
|
283
|
+
2
|
284
|
+
15
|
285
|
+
13
|
286
|
+
7
|
287
|
+
8
|
288
|
+
5
|
289
|
+
20
|
290
|
+
0
|
291
|
+
47
|
292
|
+
49
|
293
|
+
9
|
294
|
+
1
|
295
|
+
49
|
296
|
+
7
|
297
|
+
2
|
298
|
+
15
|
299
|
+
49
|
300
|
+
10
|
301
|
+
2
|
302
|
+
11
|
303
|
+
I
|
304
|
+
8
|
305
|
+
I
|
306
|
+
1
|
307
|
+
I
|
308
|
+
1
|
309
|
+
I
|
310
|
+
1
|
311
|
+
n
|
312
|
+
p
|
313
|
+
11
|
314
|
+
x
|
315
|
+
5
|
316
|
+
Guard
|
317
|
+
x
|
318
|
+
8
|
319
|
+
Notifier
|
320
|
+
x
|
321
|
+
13
|
322
|
+
guard_message
|
323
|
+
x
|
324
|
+
4
|
325
|
+
Hash
|
326
|
+
x
|
327
|
+
16
|
328
|
+
new_from_literal
|
329
|
+
x
|
330
|
+
5
|
331
|
+
title
|
332
|
+
s
|
333
|
+
12
|
334
|
+
Ronn results
|
335
|
+
x
|
336
|
+
3
|
337
|
+
[]=
|
338
|
+
x
|
339
|
+
5
|
340
|
+
image
|
341
|
+
x
|
342
|
+
11
|
343
|
+
guard_image
|
344
|
+
x
|
345
|
+
6
|
346
|
+
notify
|
347
|
+
p
|
348
|
+
5
|
349
|
+
I
|
350
|
+
-1
|
351
|
+
I
|
352
|
+
5
|
353
|
+
I
|
354
|
+
0
|
355
|
+
I
|
356
|
+
6
|
357
|
+
I
|
358
|
+
2f
|
359
|
+
x
|
360
|
+
78
|
361
|
+
/Users/remy/Development/Ruby/Gems/guard/guard-ronn/lib/guard/ronn/formatter.rb
|
362
|
+
p
|
363
|
+
1
|
364
|
+
x
|
365
|
+
7
|
366
|
+
success
|
367
|
+
x
|
368
|
+
17
|
369
|
+
method_visibility
|
370
|
+
x
|
371
|
+
15
|
372
|
+
add_defn_method
|
373
|
+
x
|
374
|
+
7
|
375
|
+
private
|
376
|
+
x
|
377
|
+
13
|
378
|
+
guard_message
|
379
|
+
M
|
380
|
+
1
|
381
|
+
n
|
382
|
+
n
|
383
|
+
x
|
384
|
+
13
|
385
|
+
guard_message
|
386
|
+
i
|
387
|
+
13
|
388
|
+
20
|
389
|
+
0
|
390
|
+
9
|
391
|
+
9
|
392
|
+
7
|
393
|
+
0
|
394
|
+
64
|
395
|
+
8
|
396
|
+
12
|
397
|
+
7
|
398
|
+
1
|
399
|
+
64
|
400
|
+
11
|
401
|
+
I
|
402
|
+
2
|
403
|
+
I
|
404
|
+
1
|
405
|
+
I
|
406
|
+
1
|
407
|
+
I
|
408
|
+
1
|
409
|
+
n
|
410
|
+
p
|
411
|
+
2
|
412
|
+
s
|
413
|
+
23
|
414
|
+
Manual generation done!
|
415
|
+
s
|
416
|
+
25
|
417
|
+
Manual generation failed!
|
418
|
+
p
|
419
|
+
7
|
420
|
+
I
|
421
|
+
-1
|
422
|
+
I
|
423
|
+
b
|
424
|
+
I
|
425
|
+
0
|
426
|
+
I
|
427
|
+
c
|
428
|
+
I
|
429
|
+
c
|
430
|
+
I
|
431
|
+
0
|
432
|
+
I
|
433
|
+
d
|
434
|
+
x
|
435
|
+
78
|
436
|
+
/Users/remy/Development/Ruby/Gems/guard/guard-ronn/lib/guard/ronn/formatter.rb
|
437
|
+
p
|
438
|
+
1
|
439
|
+
x
|
440
|
+
7
|
441
|
+
success
|
442
|
+
x
|
443
|
+
11
|
444
|
+
guard_image
|
445
|
+
M
|
446
|
+
1
|
447
|
+
n
|
448
|
+
n
|
449
|
+
x
|
450
|
+
11
|
451
|
+
guard_image
|
452
|
+
i
|
453
|
+
11
|
454
|
+
20
|
455
|
+
0
|
456
|
+
9
|
457
|
+
8
|
458
|
+
7
|
459
|
+
0
|
460
|
+
8
|
461
|
+
10
|
462
|
+
7
|
463
|
+
1
|
464
|
+
11
|
465
|
+
I
|
466
|
+
2
|
467
|
+
I
|
468
|
+
1
|
469
|
+
I
|
470
|
+
1
|
471
|
+
I
|
472
|
+
1
|
473
|
+
n
|
474
|
+
p
|
475
|
+
2
|
476
|
+
x
|
477
|
+
7
|
478
|
+
success
|
479
|
+
x
|
480
|
+
6
|
481
|
+
failed
|
482
|
+
p
|
483
|
+
7
|
484
|
+
I
|
485
|
+
-1
|
486
|
+
I
|
487
|
+
10
|
488
|
+
I
|
489
|
+
0
|
490
|
+
I
|
491
|
+
11
|
492
|
+
I
|
493
|
+
a
|
494
|
+
I
|
495
|
+
0
|
496
|
+
I
|
497
|
+
b
|
498
|
+
x
|
499
|
+
78
|
500
|
+
/Users/remy/Development/Ruby/Gems/guard/guard-ronn/lib/guard/ronn/formatter.rb
|
501
|
+
p
|
502
|
+
1
|
503
|
+
x
|
504
|
+
7
|
505
|
+
success
|
506
|
+
p
|
507
|
+
9
|
508
|
+
I
|
509
|
+
2
|
510
|
+
I
|
511
|
+
5
|
512
|
+
I
|
513
|
+
10
|
514
|
+
I
|
515
|
+
9
|
516
|
+
I
|
517
|
+
14
|
518
|
+
I
|
519
|
+
b
|
520
|
+
I
|
521
|
+
22
|
522
|
+
I
|
523
|
+
10
|
524
|
+
I
|
525
|
+
30
|
526
|
+
x
|
527
|
+
78
|
528
|
+
/Users/remy/Development/Ruby/Gems/guard/guard-ronn/lib/guard/ronn/formatter.rb
|
529
|
+
p
|
530
|
+
0
|
531
|
+
x
|
532
|
+
13
|
533
|
+
attach_method
|
534
|
+
p
|
535
|
+
3
|
536
|
+
I
|
537
|
+
2
|
538
|
+
I
|
539
|
+
3
|
540
|
+
I
|
541
|
+
1c
|
542
|
+
x
|
543
|
+
78
|
544
|
+
/Users/remy/Development/Ruby/Gems/guard/guard-ronn/lib/guard/ronn/formatter.rb
|
545
|
+
p
|
546
|
+
0
|
547
|
+
x
|
548
|
+
13
|
549
|
+
attach_method
|
550
|
+
p
|
551
|
+
3
|
552
|
+
I
|
553
|
+
2
|
554
|
+
I
|
555
|
+
2
|
556
|
+
I
|
557
|
+
1d
|
558
|
+
x
|
559
|
+
78
|
560
|
+
/Users/remy/Development/Ruby/Gems/guard/guard-ronn/lib/guard/ronn/formatter.rb
|
561
|
+
p
|
562
|
+
0
|
563
|
+
x
|
564
|
+
13
|
565
|
+
attach_method
|
566
|
+
p
|
567
|
+
3
|
568
|
+
I
|
569
|
+
0
|
570
|
+
I
|
571
|
+
1
|
572
|
+
I
|
573
|
+
1c
|
574
|
+
x
|
575
|
+
78
|
576
|
+
/Users/remy/Development/Ruby/Gems/guard/guard-ronn/lib/guard/ronn/formatter.rb
|
577
|
+
p
|
578
|
+
0
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Guard
|
2
|
+
class Ronn
|
3
|
+
module Inspector
|
4
|
+
class << self
|
5
|
+
def clean(paths)
|
6
|
+
paths.uniq!
|
7
|
+
paths.compact!
|
8
|
+
clear_markdown_files_list_after do
|
9
|
+
paths = paths.select { |path| markdown_file?(path) }
|
10
|
+
end
|
11
|
+
paths.reject { |p| included_in_other_path?(p, paths) }
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def markdown_file?(path)
|
17
|
+
markdown_files.include?(path)
|
18
|
+
end
|
19
|
+
|
20
|
+
def markdown_files
|
21
|
+
@markdown_files ||= Dir["man/*.{md,markdown}"]
|
22
|
+
end
|
23
|
+
|
24
|
+
def clear_markdown_files_list_after
|
25
|
+
yield
|
26
|
+
@markdown_files = nil
|
27
|
+
end
|
28
|
+
|
29
|
+
def included_in_other_path?(path, paths)
|
30
|
+
(paths - [path]).any? { |p| path.include?(p) && path.sub(p, '').include?('/') }
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|