doc 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -44,18 +44,18 @@ Successor of [sdoc_all](https://github.com/toy/sdoc_all).
44
44
 
45
45
  Specify what to document using:
46
46
 
47
- - `source`: path to ruby source
48
- - `archive`: path to archive with ruby source (bzipped tar, gzipped tar or zip)
49
- - `version`: ruby version in form X.Y, X.Y.Z or X.Y.Z-pPPP. Source will be downloaded from github.com/ruby/ruby or ruby-lang.org
50
- - `binary`: command which is asked to run code to automatically determine ruby version. Source will be downloaded as for version specifier
47
+ - `source` path to ruby source
48
+ - `archive` path to archive with ruby source (bzipped tar, gzipped tar or zip)
49
+ - `version` ruby version in form X.Y, X.Y.Z or X.Y.Z-pPPP. Source will be downloaded from github.com/ruby/ruby or ruby-lang.org
50
+ - `binary` command which is asked to run code to automatically determine ruby version. Source will be downloaded as for version specifier
51
51
 
52
52
  All those specifiers accepts multiple entries. Default option is `binary`, 'ruby' binary is used if version is not specified.
53
53
 
54
54
  Other options:
55
55
 
56
- - `format`: can be `:all` to simply document all code, `:separate` to build core documentation and stdlib documentation separately and `:integrate` to integrate all stdlib to core
57
- - `except`: skip documenting certain parts (like `win32ole` and `tk`)
58
- - `index`: specify folder containing index.html to replace front page. Good place for cheat sheet or quick ref like one downloaded from [zenspider](http://www.zenspider.com/Languages/Ruby/QuickRef.html).
56
+ - `format` can be `:all` to simply document all code, `:separate` to build core documentation and stdlib documentation separately and `:integrate` to integrate all stdlib to core
57
+ - `except` skip documenting certain parts (like `win32ole` and `tk`)
58
+ - `index` specify folder containing index.html to replace front page. Good place for cheat sheet or quick ref like one downloaded from [zenspider](http://www.zenspider.com/Languages/Ruby/QuickRef.html).
59
59
 
60
60
  ### rails
61
61
 
@@ -83,4 +83,4 @@ Use `:title` to specify title, it must be a proc receiving path and returning ti
83
83
 
84
84
  ## Copyright
85
85
 
86
- Copyright (c) 2010-2011 Ivan Kuchin. See LICENSE.txt for details.
86
+ Copyright (c) 2010-2012 Ivan Kuchin. See LICENSE.txt for details.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'doc'
5
- s.version = '0.4.0'
5
+ s.version = '0.4.1'
6
6
  s.summary = %q{Get all ruby documentation in one place}
7
7
  s.description = %Q{Generate `Rakefile` with `docr` and get searchable documentation for ruby, rails, gems, plugins and all other ruby code in one place}
8
8
  s.homepage = "http://github.com/toy/#{s.name}"
@@ -7,7 +7,7 @@ module Doc
7
7
  config.check_options!([], [[:only, :except], :versions, :prerelease])
8
8
 
9
9
  [:only, :except].each do |key|
10
- config[key] = Array(config[key]).map(&:to_s) if config[key]
10
+ config[key] = Array(config[key]).flatten.map(&:to_s) if config[key]
11
11
  end
12
12
 
13
13
  @prerelease = !!config[:prerelease]
@@ -7,24 +7,30 @@ module Doc
7
7
  class Ruby
8
8
  module Stdlib
9
9
  STDLIB_CONFIG_URL = 'http://stdlib-doc.rubyforge.org/svn/trunk/data/gendoc.yaml'
10
+ STDLIB_CONFIG_NAME = 'stdlib-config.yaml'
11
+ STDLIB_CONFIG_VENDOR_PATH = FSPath(__FILE__).dirname / '../../../../vendor' / STDLIB_CONFIG_NAME
10
12
 
11
13
  def stdlib_config(update)
12
14
  if update || !read_stdlib_config
13
15
  download_stdlib_config
14
16
  end
15
- read_stdlib_config
17
+ read_stdlib_config || YAML.load_file(STDLIB_CONFIG_VENDOR_PATH)
16
18
  end
17
19
 
18
20
  def stdlib_config_path
19
- sources_dir / 'stdlib-config.yaml'
21
+ sources_dir / STDLIB_CONFIG_NAME
20
22
  end
21
23
 
22
24
  def read_stdlib_config
23
- YAML.load_file stdlib_config_path if stdlib_config_path.readable?
25
+ YAML.load_file stdlib_config_path if stdlib_config_path.size?
24
26
  end
25
27
 
26
28
  def download_stdlib_config
27
- stdlib_config_path.write(Net::HTTP.get(URI.parse(STDLIB_CONFIG_URL)))
29
+ url = URI.parse(STDLIB_CONFIG_URL)
30
+ response = Net::HTTP.start(url.host, url.port){ |http| http.get(url.path) }
31
+ if response.kind_of?(Net::HTTPSuccess)
32
+ stdlib_config_path.write(response.body)
33
+ end
28
34
  end
29
35
  end
30
36
  end
@@ -0,0 +1,692 @@
1
+ #FIELDS:
2
+ # - target: >
3
+ # The name of the target; this directory will be used to hold
4
+ # docs.
5
+ # - section: >
6
+ # 'stdlib' for standard library, 'ext' for standard library
7
+ # extensions (compiled), 'core' for core Ruby classes, 'extra'
8
+ # for others.
9
+ # - base: >
10
+ # Useful only if section is 'extra'. The base directory of the
11
+ # package.
12
+ # - extra_sources: >
13
+ # List of special files relative to base, that need to be
14
+ # RDoc'ed in addition to the obvious ones.
15
+ # - mainpage: >
16
+ # Feeds to RDoc's '--main' option. Optional.
17
+ # - desciption: >
18
+ # Description of the package for overview page.
19
+
20
+
21
+ targets:
22
+
23
+ - target: abbrev
24
+ section: stdlib
25
+ description: |
26
+ Calculates the set of unique abbreviations for a given set of strings.
27
+
28
+
29
+ - target: base64
30
+ section: stdlib
31
+ description: |
32
+ Methods for base64-encoding and -decoding strings.
33
+
34
+
35
+ - target: benchmark
36
+ section: stdlib
37
+ description: |
38
+ Contains routines for benchmarking code.
39
+
40
+
41
+ - target: cgi
42
+ section: stdlib
43
+ mainpage: cgi.rb
44
+ description: |
45
+ CGI library, including methods for query parsing, HTML generation and
46
+ session handling.
47
+
48
+
49
+ - target: complex
50
+ section: stdlib
51
+ description: |
52
+ Implements a complex number type, Complex.
53
+
54
+
55
+ - target: csv
56
+ section: stdlib
57
+ description: |
58
+ Read and write CSV (comma separated values) data.
59
+
60
+
61
+ - target: date
62
+ section: stdlib
63
+ score: 7
64
+ description: |
65
+ Implements the Date class.
66
+
67
+
68
+ - target: delegate
69
+ section: stdlib
70
+ description: |
71
+ Simplifies delegation to methods of other classes.
72
+
73
+
74
+ - target: drb
75
+ section: stdlib
76
+ mainpage: drb/drb.rb
77
+ score: 7
78
+ description: |
79
+ Distributed Ruby. Talk to objects across a network.
80
+
81
+
82
+ - target: English
83
+ section: stdlib
84
+ description: |
85
+ "English-language long names for Ruby's special variables."
86
+
87
+
88
+ - target: erb
89
+ section: stdlib
90
+ description: |
91
+ "Templating system whereby you embed Ruby code in text/HTML/..."
92
+
93
+
94
+ - target: fileutils
95
+ section: stdlib
96
+ description: |
97
+ Utility module for copying, moving, renaming files, etc.
98
+
99
+
100
+ - target: finalize
101
+ section: stdlib
102
+ description: |
103
+
104
+
105
+ - target: find
106
+ section: stdlib
107
+ description: |
108
+ Recursively descend directories.
109
+
110
+
111
+ - target: forwardable
112
+ section: stdlib
113
+ description: |
114
+ Method-level delegation.
115
+
116
+
117
+ - target: ftools
118
+ section: stdlib
119
+ description: |
120
+ Similar to, but older than, fileutils.
121
+
122
+
123
+ - target: generator
124
+ section: stdlib
125
+ description: |
126
+ Converts an internal iterator to an external iterator.
127
+
128
+
129
+ - target: getoptlong
130
+ section: stdlib
131
+ description: |
132
+ A common library for parsing command-line options. See optparse for a stronger
133
+ Ruby solution.
134
+
135
+
136
+ - target: gserver
137
+ section: stdlib
138
+ description: |
139
+ Generic server.
140
+
141
+
142
+ - target: importenv
143
+ section: stdlib
144
+ description: |
145
+ Imports environment variables as global variables.
146
+
147
+
148
+ - target: ipaddr
149
+ section: stdlib
150
+ description: |
151
+ Manipulate IP addresses.
152
+
153
+
154
+ - target: jcode
155
+ section: stdlib
156
+ description: |
157
+ Handle Japanese strings.
158
+
159
+
160
+ - target: logger
161
+ section: stdlib
162
+ description: |
163
+ Simple logging mechanism.
164
+
165
+
166
+ - target: mailread
167
+ section: stdlib
168
+ description: |
169
+
170
+
171
+ - target: mathn
172
+ section: stdlib
173
+ description: |
174
+ Make all numeric classes work well together.
175
+
176
+
177
+ - target: matrix
178
+ section: stdlib
179
+ description: |
180
+ Defines the Matrix and Vector classes.
181
+
182
+
183
+ - target: mkmf
184
+ section: stdlib
185
+ description: |
186
+ Generate Makefiles for Ruby extensions.
187
+
188
+
189
+ - target: monitor
190
+ section: stdlib
191
+ description: |
192
+ Add monitor function to an arbitrary object.
193
+
194
+
195
+ - target: mutex_m
196
+ section: stdlib
197
+ description: |
198
+
199
+
200
+ - target: net/ftp
201
+ section: stdlib
202
+ description: |
203
+ FTP library for accessing remote files.
204
+
205
+
206
+ - target: net/http
207
+ section: stdlib
208
+ description: |
209
+ HTTP library for accessing web pages.
210
+
211
+
212
+ - target: net/imap
213
+ section: stdlib
214
+ description: |
215
+ IMAP library for accessing email on a server.
216
+
217
+
218
+ - target: net/pop
219
+ section: stdlib
220
+ description: |
221
+ POP library for accessing email on a server.
222
+
223
+
224
+ - target: net/smtp
225
+ section: stdlib
226
+ description: |
227
+ SMTP library for sending email.
228
+
229
+
230
+ - target: net/telnet
231
+ section: stdlib
232
+ description: |
233
+ Telnet library for executing commands remotely.
234
+
235
+
236
+ - target: observer
237
+ section: stdlib
238
+ description: |
239
+ Implements the observer pattern; objects can be notified of changes to
240
+ other objects.
241
+
242
+
243
+ - target: open-uri
244
+ section: stdlib
245
+ description: |
246
+ Allows file-like access to URIs like "ftp://server/filename".
247
+
248
+
249
+ - target: open3
250
+ section: stdlib
251
+ description: |
252
+ Run external commands and have access to stdin, stdout, and stderr.
253
+
254
+
255
+ - target: optparse
256
+ section: stdlib
257
+ score: 6
258
+ description: |
259
+ A more advanced command-line options parsing library than getoptlong.
260
+
261
+
262
+ - target: ostruct
263
+ section: stdlib
264
+ description: |
265
+ Open structs. You can add attributes dynamically.
266
+
267
+
268
+ - target: parsedate
269
+ section: stdlib
270
+ description: |
271
+ A module for extracting date information from a String.
272
+
273
+
274
+ - target: pathname
275
+ section: stdlib
276
+ description: |
277
+ Object-oriented pathname.
278
+
279
+
280
+ - target: ping
281
+ section: stdlib
282
+ description: |
283
+ Simple 'ping' implementation.
284
+
285
+
286
+ - target: pp
287
+ section: stdlib
288
+ description: |
289
+ Implements Kernel.pp so you can pretty-print any object.
290
+
291
+
292
+ - target: prettyprint
293
+ section: stdlib
294
+ description: |
295
+ Implements a pretty-printing algorithm. See 'pp'.
296
+
297
+
298
+ - target: profile
299
+ section: stdlib
300
+ description: |
301
+ Runtime profiler.
302
+
303
+
304
+ - target: profiler
305
+ section: stdlib
306
+ description: |
307
+ Runtime profiling library.
308
+
309
+
310
+ - target: pstore
311
+ section: stdlib
312
+ description: |
313
+ Simple object-oriented database using Marshal.
314
+
315
+
316
+ - target: racc/parser
317
+ section: stdlib
318
+ description: |
319
+
320
+
321
+ - target: rational
322
+ section: stdlib
323
+ description: |
324
+ Implements a rational number type, Rational.
325
+
326
+
327
+ - target: rdoc
328
+ section: stdlib
329
+ extra_sources: rdoc/README
330
+ mainpage: rdoc/README
331
+ description: |
332
+ "Ruby's API documentation generator."
333
+
334
+
335
+ - target: readbytes
336
+ section: stdlib
337
+ description: |
338
+ Implements IO#readbytes.
339
+
340
+
341
+ - target: resolv-replace
342
+ section: stdlib
343
+ description: |
344
+
345
+
346
+ - target: resolv
347
+ section: stdlib
348
+ description: |
349
+ Find IP address from hostname, or vice versa, and more.
350
+
351
+
352
+ - target: rexml
353
+ section: stdlib
354
+ mainpage: rexml/rexml.rb
355
+ description: |
356
+ Pure-Ruby XML parser and emitter.
357
+
358
+
359
+ - target: rinda
360
+ section: stdlib
361
+ mainpage: rinda/rinda.rb
362
+ description: |
363
+ A Ruby implementation of the Linda distibuted computing paradigm.
364
+
365
+
366
+ - target: rss
367
+ section: stdlib
368
+ mainpage: rss/rss.rb
369
+ description: |
370
+ RSS (Rich Site Syndicator) parser and emitter.
371
+
372
+
373
+ - target: runit
374
+ section: stdlib
375
+ mainpage: runit/testcase.rb
376
+ description: |
377
+ Older unit testing framework. Taken over by test/unit.
378
+
379
+
380
+ - target: scanf
381
+ section: stdlib
382
+ description: |
383
+ "Analogous to C's scanf. Reads formatted data."
384
+
385
+
386
+ - target: set
387
+ section: stdlib
388
+ description: |
389
+ Implements the Set data type.
390
+
391
+
392
+ - target: shell
393
+ section: stdlib
394
+ description: |
395
+ Enables shell-like activities in plain Ruby.
396
+
397
+
398
+ - target: singleton
399
+ section: stdlib
400
+ description: |
401
+ Implements the singleton design pattern, whereby a certain class has only one
402
+ instance.
403
+
404
+
405
+ - target: soap
406
+ section: stdlib
407
+ mainpage: soap/soap.rb
408
+ description: |
409
+ Implements the SOAP protocol.
410
+
411
+
412
+ - target: sync
413
+ section: stdlib
414
+ description: |
415
+ Phase lock with counter.
416
+
417
+
418
+ - target: tempfile
419
+ section: stdlib
420
+ description: |
421
+ Create and use a temporary file.
422
+
423
+
424
+ - target: test/unit
425
+ section: stdlib
426
+ mainpage: test/unit.rb
427
+ description: |
428
+ "Ruby's standard unit testing framework."
429
+
430
+
431
+ - target: thread
432
+ section: stdlib
433
+ description: |
434
+ Support for threads, including Mutex, ConditionVariable, and Queue.
435
+
436
+
437
+ - target: thwait
438
+ section: stdlib
439
+ description: |
440
+ Thread synchronization class.
441
+
442
+
443
+ - target: time
444
+ section: stdlib
445
+ description: |
446
+ Extends built-in Time class to support various standard time formats.
447
+
448
+
449
+ - target: timeout
450
+ section: stdlib
451
+ description: |
452
+ Ensures some code completes within a certain time, or throws exception.
453
+
454
+
455
+ - target: tmpdir
456
+ section: stdlib
457
+ description: |
458
+ Retrieve temporary directory path.
459
+
460
+
461
+ - target: tracer
462
+ section: stdlib
463
+ description: |
464
+ Trace program execution.
465
+
466
+
467
+ - target: tsort
468
+ section: stdlib
469
+ description: |
470
+ Topological sorting for strongly connected components.
471
+
472
+
473
+ - target: un
474
+ section: stdlib
475
+ description: |
476
+ Utility module for file operations in command-line scripts.
477
+
478
+
479
+ - target: uri
480
+ section: stdlib
481
+ description: |
482
+ Universal Resource Identifier implementation.
483
+
484
+
485
+ - target: weakref
486
+ section: stdlib
487
+ description: |
488
+ Implements weak references.
489
+
490
+
491
+ - target: webrick
492
+ section: stdlib
493
+ description: |
494
+ A servlet container and self-contained web server.
495
+
496
+
497
+ - target: wsdl
498
+ section: stdlib
499
+ mainpage: wsdl/wsdl.rb
500
+ description: |
501
+ Web Services Description Language.
502
+
503
+
504
+ - target: xmlrpc
505
+ section: stdlib
506
+ extra_sources: xmlrpc/README.txt
507
+ mainpage: xmlrpc/README.txt
508
+ description: |
509
+ XML RPC (remote procedure call) client and server implementations.
510
+
511
+
512
+ - target: xsd
513
+ section: stdlib
514
+ mainpage: xsd/xmlparser.rb
515
+ description: |
516
+ XML Schema Definition.
517
+
518
+
519
+ - target: yaml
520
+ section: stdlib
521
+ description: |
522
+ Data serialization format designed for ease of human use.
523
+
524
+
525
+ ####
526
+ #### 'ext' targets
527
+ ####
528
+
529
+
530
+ - target: bigdecimal
531
+ section: ext
532
+ description: |
533
+ Arbitrary-precision arithmetic.
534
+
535
+
536
+ - target: curses
537
+ section: ext
538
+ description: |
539
+ Interface to the "curses" character-based interface library.
540
+
541
+
542
+ - target: dbm
543
+ section: ext
544
+ description: |
545
+ Read and write 'db' files.
546
+
547
+
548
+ - target: digest
549
+ section: ext
550
+ description: |
551
+ MD5 and SHA1 digest implementations.
552
+
553
+
554
+ - target: dl
555
+ section: ext
556
+ description: |
557
+ "Interface to the Dynamic Loader, for creating extensions."
558
+
559
+
560
+ - target: enumerator
561
+ section: ext
562
+ mainpage: Enumerable
563
+ description: |
564
+ Flexible enumeration capabilities.
565
+
566
+
567
+ - target: etc
568
+ section: ext
569
+ mainpage: Etc
570
+ description: |
571
+ Access to UNIX users and groups information.
572
+
573
+
574
+ - target: fcntl
575
+ section: ext
576
+ mainpage: Fcntl
577
+ description: |
578
+ Provides constant definitions for IO#fcntl.
579
+
580
+
581
+ - target: gdbm
582
+ section: ext
583
+ description: |
584
+ Read and write GNU 'db' files.
585
+
586
+
587
+ - target: iconv
588
+ section: ext
589
+ description: |
590
+
591
+
592
+ - target: io/wait
593
+ section: ext
594
+ description: |
595
+
596
+
597
+ - target: nkf
598
+ section: ext
599
+ description: |
600
+
601
+
602
+ - target: openssl
603
+ section: ext
604
+ description: |
605
+ Secure socket layer, including HTTP, FTP, and Telnet implementations.
606
+
607
+
608
+ - target: pty
609
+ section: ext
610
+ description: |
611
+ Executes commands as if their standard I/O is connected to ttys.
612
+
613
+
614
+ - target: racc
615
+ section: ext
616
+ description: |
617
+ "LALR(1) parser generator for Ruby."
618
+
619
+
620
+ - target: readline
621
+ section: ext
622
+ description: |
623
+ Command-line editing and history.
624
+
625
+
626
+ - target: sdbm
627
+ section: ext
628
+ description: |
629
+ Yet another 'db' file interface.
630
+
631
+
632
+ - target: socket
633
+ section: ext
634
+ description: |
635
+ Implements several socket classes for UDP, TCP, UNIX, SOCKS, as well as
636
+ a TCPServer class.
637
+
638
+
639
+ - target: stringio
640
+ section: ext
641
+ description: |
642
+ Implements StringIO, which allows IO-like operations on a String-like
643
+ object.
644
+
645
+
646
+ - target: strscan
647
+ section: ext
648
+ description: |
649
+ A fast string scanner.
650
+
651
+
652
+ - target: syck
653
+ section: ext
654
+ description: |
655
+ Fast YAML implementation.
656
+
657
+
658
+ - target: syslog
659
+ section: ext
660
+ description: |
661
+ Wrapper for UNIX Syslog system calls.
662
+
663
+
664
+ - target: tcltklib
665
+ section: ext
666
+ description: |
667
+
668
+
669
+ - target: tk
670
+ section: ext
671
+ exclude: sample
672
+ description: |
673
+
674
+
675
+ - target: Win32API
676
+ section: ext
677
+ description: |
678
+ Interface to Windows registry.
679
+
680
+
681
+ - target: win32ole
682
+ section: ext
683
+ description: |
684
+ Interface to Win32 OLE automation.
685
+
686
+
687
+ - target: zlib
688
+ section: ext
689
+ description: |
690
+ Interface to UNIX zlib (gzip streams).
691
+
692
+
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doc
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ivan Kuchin
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-22 00:00:00 Z
18
+ date: 2012-12-27 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: sdoc
@@ -126,6 +126,7 @@ files:
126
126
  - lib/doc/root_config.rb
127
127
  - lib/doc/root_merger.rb
128
128
  - lib/doc/tasks.rb
129
+ - vendor/stdlib-config.yaml
129
130
  homepage: http://github.com/toy/doc
130
131
  licenses:
131
132
  - MIT
@@ -155,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
156
  requirements: []
156
157
 
157
158
  rubyforge_project: doc
158
- rubygems_version: 1.8.13
159
+ rubygems_version: 1.8.24
159
160
  signing_key:
160
161
  specification_version: 3
161
162
  summary: Get all ruby documentation in one place