yard-qed 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (7) hide show
  1. data/.ruby +44 -0
  2. data/.yardopts +8 -0
  3. data/COPYING.rdoc +31 -0
  4. data/HISTORY.rdoc +13 -0
  5. data/README.rdoc +41 -0
  6. data/lib/yard-qed.rb +31 -0
  7. metadata +80 -0
data/.ruby ADDED
@@ -0,0 +1,44 @@
1
+ ---
2
+ source:
3
+ - var
4
+ authors:
5
+ - name: Trans
6
+ email: transfire@gmail.com
7
+ copyrights:
8
+ - holder: Rubyworks
9
+ year: '2011'
10
+ replacements: []
11
+ alternatives: []
12
+ requirements:
13
+ - name: yard
14
+ - name: detroit
15
+ groups:
16
+ - build
17
+ development: true
18
+ dependencies: []
19
+ conflicts: []
20
+ repositories:
21
+ - uri: git://github.com/rubyworks/yard-qed.git
22
+ scm: git
23
+ name: upstream
24
+ resources:
25
+ home: http://rubyworks.github.com/yard-qed
26
+ code: http://github.com/rubyworks/yard-qed
27
+ mail: http://groups.google.com/group/rubyworks-mailinglist
28
+ bugs: http://github.com/rubyworks/yard-qed/issues
29
+ extra: {}
30
+ load_path:
31
+ - lib
32
+ revision: 0
33
+ created: '2011-11-18'
34
+ summary: QED plugin for YARD
35
+ title: YARD QED
36
+ version: 0.1.0
37
+ name: yard-qed
38
+ description: ! 'YARD QED is a plugin for YARD that automatically
39
+
40
+ adds a QED document directory to YARD docs as a
41
+
42
+ single document.'
43
+ organization: rubyworks
44
+ date: '2011-11-19'
@@ -0,0 +1,8 @@
1
+ --output-dir doc
2
+ --readme README.rdoc
3
+ --title "YARD QED"
4
+ --protected
5
+ --private
6
+ lib
7
+ -
8
+ [A-Z]*.*
@@ -0,0 +1,31 @@
1
+ = COPYRIGHT NOTICES
2
+
3
+ == YARD QED
4
+
5
+ Copyright:: (c) 2011 Rubyworks
6
+ License:: BSD-2-Clause
7
+ Website:: http://rubyworks.github.com/yard-qed
8
+
9
+ Copyright 2011 Rubyworks. All rights reserved.
10
+
11
+ Redistribution and use in source and binary forms, with or without
12
+ modification, are permitted provided that the following conditions are met:
13
+
14
+ * Redistributions of source code must retain the above copyright notice,
15
+ this list of conditions and the following disclaimer.
16
+
17
+ * Redistributions in binary form must reproduce the above copyright notice,
18
+ this list of conditions and the following disclaimer in the documentation
19
+ and/or other materials provided with the distribution.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY Thomas Sawyer ``AS IS'' AND ANY EXPRESS
22
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
24
+ NO EVENT SHALL Thomas Sawyer OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
25
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
28
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+
@@ -0,0 +1,13 @@
1
+ = RELEASE HISTORY
2
+
3
+ == 0.1.0 | 2011-11-19
4
+
5
+ Initial release of QED plugin for YARD. This plugin
6
+ allows YARD to generate a single QED document to be
7
+ included in the YARD documentation files, without any
8
+ need to create and track an intermediary file (via qedoc).
9
+
10
+ Changes:
11
+
12
+ * Happy 1sts.
13
+
@@ -0,0 +1,41 @@
1
+ = YARD QED
2
+
3
+ {Website}[http://github.com/rubyworks/yard-qed] |
4
+ {Source Code}[http://github.com/rubyworls/yard-qed] |
5
+ {Mailing List}[http://groups.google.com/group/rubyworks-mailinglist] |
6
+ #rubyworks
7
+
8
+
9
+ == Description
10
+
11
+ Automatically add QED docs to YARD docs without need to create
12
+ any intermediary files.
13
+
14
+
15
+ == Usage
16
+
17
+ As with most YARD plugins.
18
+
19
+ $ yardoc --plugin qed
20
+
21
+ This will look for one of the default `qed`, `demo` or `spec` directories,
22
+ and use the files located there.
23
+
24
+
25
+ == Limitations
26
+
27
+ * It is assume all your QED docs are in one format. Mixing and matching
28
+ between RDoc and Markdown might cause some rendering issues.
29
+
30
+ * There is currently no way to set
31
+ the location or file globs to anything else --patches welcome.
32
+
33
+
34
+ == Copying
35
+
36
+ Copyright (c) 2011 Rubyworks. All rights reserved.
37
+
38
+ YARD QED is distributable in accordance with the terms of
39
+ the *BSD-2-Clause* license.
40
+
41
+ See COPYING.rdoc for details.
@@ -0,0 +1,31 @@
1
+ module YARD::CodeObjects
2
+ class QEDFileObject < ExtraFileObject
3
+ #
4
+ def initialize(dirname)
5
+ self.filename = dirname
6
+ self.name = File.basename(filename).gsub(/\.[^.]+$/, '').upcase
7
+ self.attributes = SymbolHash.new(false)
8
+
9
+ files = Dir["#{dirname}/**/*{.rdoc,.md,.qed,.markdown}"]
10
+ files = files.reject{ |f| File.directory?(f) }
11
+ files = files.sort
12
+ contents = files.map{ |f| File.read(f) }.join("\n\n")
13
+
14
+ parse_contents(contents)
15
+ end
16
+ end
17
+ end
18
+
19
+ module YARD
20
+ module CLI
21
+ class Yardoc
22
+ alias run_without_qed run
23
+ def run(*args)
24
+ dir = Dir['{qed/,demo/,spec/}'].first.chomp('/')
25
+ @options[:files] << CodeObjects::QEDFileObject.new(dir)
26
+ run_without_qed(*args)
27
+ end
28
+ end
29
+ end
30
+ end
31
+
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: yard-qed
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Trans
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-11-21 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: yard
16
+ requirement: &14341000 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *14341000
25
+ - !ruby/object:Gem::Dependency
26
+ name: detroit
27
+ requirement: &14339440 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *14339440
36
+ description: ! 'YARD QED is a plugin for YARD that automatically
37
+
38
+ adds a QED document directory to YARD docs as a
39
+
40
+ single document.'
41
+ email:
42
+ - transfire@gmail.com
43
+ executables: []
44
+ extensions: []
45
+ extra_rdoc_files:
46
+ - HISTORY.rdoc
47
+ - README.rdoc
48
+ - COPYING.rdoc
49
+ files:
50
+ - .ruby
51
+ - .yardopts
52
+ - lib/yard-qed.rb
53
+ - HISTORY.rdoc
54
+ - README.rdoc
55
+ - COPYING.rdoc
56
+ homepage: http://rubyworks.github.com/yard-qed
57
+ licenses: []
58
+ post_install_message:
59
+ rdoc_options: []
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ! '>='
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ! '>='
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ requirements: []
75
+ rubyforge_project:
76
+ rubygems_version: 1.8.10
77
+ signing_key:
78
+ specification_version: 3
79
+ summary: QED plugin for YARD
80
+ test_files: []