dokkit 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (178) hide show
  1. data/History.txt +4 -0
  2. data/Manifest.txt +125 -0
  3. data/README.txt +53 -0
  4. data/Rakefile +25 -167
  5. data/bin/dokkit +4 -60
  6. data/lib/dokkit/app.rb +63 -192
  7. data/lib/dokkit/builtintask.rb +85 -0
  8. data/lib/dokkit/cachemanager.rb +61 -0
  9. data/lib/dokkit/cleantask.rb +51 -0
  10. data/lib/dokkit/consolelog.rb +42 -0
  11. data/lib/dokkit/defaults.rb +19 -0
  12. data/lib/dokkit/document.rb +221 -0
  13. data/lib/dokkit/dokkitlib.rb +68 -0
  14. data/lib/dokkit/extension/extension.rb +15 -0
  15. data/lib/dokkit/extension/filehelper.rb +25 -0
  16. data/lib/dokkit/fileselection.rb +44 -0
  17. data/lib/dokkit/filters/all.rb +18 -0
  18. data/lib/dokkit/filters/base.rb +18 -0
  19. data/lib/dokkit/filters/deplate.rb +21 -25
  20. data/lib/dokkit/filters/maruku.rb +23 -0
  21. data/lib/dokkit/filters/nil.rb +23 -0
  22. data/lib/dokkit/filters.rb +29 -21
  23. data/lib/dokkit/logger.rb +73 -0
  24. data/lib/dokkit/model.rb +34 -0
  25. data/lib/dokkit/models/{Rakefile.tpl → simpledocument/model/Rakefile} +15 -2
  26. data/lib/dokkit/models/simpledocument/model/doc/configs/simpledocument.yaml +3 -0
  27. data/lib/dokkit/models/simpledocument/model/doc/layouts/simpledocument.html +9 -0
  28. data/lib/dokkit/models/simpledocument/model/doc/layouts/simpledocument.latex +8 -0
  29. data/lib/dokkit/models/simpledocument/model/doc/layouts/simpledocument.text +1 -0
  30. data/lib/dokkit/models/simpledocument/model/doc/pages/simpledocument.deplate +102 -0
  31. data/lib/dokkit/models/simpledocument/model/tasks/all.rb +3 -0
  32. data/lib/dokkit/models/simpledocument/model/tasks/clean.rake +3 -0
  33. data/lib/dokkit/models/simpledocument/model/tasks/render.rake +8 -0
  34. data/lib/dokkit/models/simpledocument/model/tasks/setup.rb +9 -0
  35. data/lib/dokkit/modeltask.rb +83 -0
  36. data/lib/dokkit/pathhelper.rb +46 -0
  37. data/lib/dokkit/recursivemerge.rb +59 -0
  38. data/lib/dokkit/rendertask.rb +101 -0
  39. data/lib/dokkit/resourcemanager.rb +177 -0
  40. data/lib/dokkit/taskconfig.rb +39 -0
  41. data/lib/dokkit/templatetask.rb +37 -0
  42. data/lib/dokkit.rb +2 -8
  43. data/spec/app_spec.rb +55 -0
  44. data/spec/builtintask_spec.rb +114 -0
  45. data/spec/cachemanager_spec.rb +107 -0
  46. data/spec/cleantask_spec.rb +72 -0
  47. data/spec/consolelog_spec.rb +69 -0
  48. data/{tests/data/projects/simple-document → spec/data/test_build}/Rakefile +8 -8
  49. data/spec/data/test_build/doc/configs/document_1.yaml +3 -0
  50. data/spec/data/test_build/doc/configs/required.yaml +3 -0
  51. data/spec/data/test_build/doc/configs/subdir/document_4.yaml +3 -0
  52. data/spec/data/test_build/doc/layouts/document_1.html +9 -0
  53. data/spec/data/test_build/doc/layouts/document_1.latex +8 -0
  54. data/spec/data/test_build/doc/layouts/document_with_partials.html +9 -0
  55. data/spec/data/test_build/doc/layouts/layout +0 -0
  56. data/spec/data/test_build/doc/layouts/layout.html +8 -0
  57. data/spec/data/test_build/doc/layouts/layout.html.backup +8 -0
  58. data/spec/data/test_build/doc/layouts/nested.html +3 -0
  59. data/spec/data/test_build/doc/layouts/partials/partial.html +4 -0
  60. data/spec/data/test_build/doc/pages/COMMON.yaml +6 -0
  61. data/spec/data/test_build/doc/pages/document_1 +20 -0
  62. data/spec/data/test_build/doc/pages/document_1.dep +4 -0
  63. data/spec/data/test_build/doc/pages/document_1.yaml +11 -0
  64. data/spec/data/test_build/doc/pages/document_2 +9 -0
  65. data/spec/data/test_build/doc/pages/document_2.dep +0 -0
  66. data/spec/data/test_build/doc/pages/document_2.yaml +6 -0
  67. data/spec/data/test_build/doc/pages/document_3 +13 -0
  68. data/spec/data/test_build/doc/pages/document_5.exclude +0 -0
  69. data/spec/data/test_build/doc/pages/document_7 +4 -0
  70. data/spec/data/test_build/doc/pages/document_7.yaml +5 -0
  71. data/spec/data/test_build/doc/pages/document_extended +1 -0
  72. data/spec/data/test_build/doc/pages/document_nested +6 -0
  73. data/spec/data/test_build/doc/pages/document_nested.yaml +5 -0
  74. data/spec/data/test_build/doc/pages/document_nolayout.ext +3 -0
  75. data/spec/data/test_build/doc/pages/document_nolayout.yaml +2 -0
  76. data/spec/data/test_build/doc/pages/document_with_partials +3 -0
  77. data/spec/data/test_build/doc/pages/document_with_partials.yaml +2 -0
  78. data/spec/data/test_build/doc/pages/partials/COMMON.yaml +5 -0
  79. data/spec/data/test_build/doc/pages/partials/circular_partial +2 -0
  80. data/spec/data/test_build/doc/pages/partials/circular_partial.yaml +3 -0
  81. data/spec/data/test_build/doc/pages/partials/partial +2 -0
  82. data/spec/data/test_build/doc/pages/subdir/COMMON.yaml +2 -0
  83. data/spec/data/test_build/doc/pages/subdir/document_4 +11 -0
  84. data/spec/data/test_build/doc/pages/subdir/subdir/COMMON.yaml +2 -0
  85. data/spec/data/test_build/doc/pages/subdir/subdir/document_6 +3 -0
  86. data/spec/data/test_build/tasks/all.rb +3 -0
  87. data/spec/data/test_build/tasks/clean.rake +3 -0
  88. data/spec/data/test_build/tasks/render.rake +8 -0
  89. data/spec/data/test_build/tasks/setup.rb +9 -0
  90. data/spec/data/test_build/tasks/template.rake +3 -0
  91. data/spec/data/test_build/templates/layouts/layout +0 -0
  92. data/spec/data/test_build/templates/pages/template +0 -0
  93. data/spec/document_spec.rb +321 -0
  94. data/spec/dokkitlib_spec.rb +63 -0
  95. data/spec/filehelper_spec.rb +34 -0
  96. data/spec/fileselection_spec.rb +101 -0
  97. data/spec/filter_base_spec.rb +29 -0
  98. data/spec/filter_deplate_spec.rb +48 -0
  99. data/spec/filter_maruku_spec.rb +29 -0
  100. data/spec/filter_nil_spec.rb +30 -0
  101. data/spec/filters_spec.rb +37 -0
  102. data/spec/logger_spec.rb +150 -0
  103. data/spec/model_spec.rb +45 -0
  104. data/spec/pathhelper_spec.rb +62 -0
  105. data/spec/recursivemerge_spec.rb +91 -0
  106. data/spec/rendertask_spec.rb +374 -0
  107. data/spec/spec_helper.rb +61 -0
  108. data/spec/taskconfig_spec.rb +45 -0
  109. data/spec/templatetask_spec.rb +72 -0
  110. data/tasks/annotations.rake +30 -0
  111. data/tasks/doc.rake +49 -0
  112. data/tasks/gem.rake +89 -0
  113. data/tasks/manifest.rake +41 -0
  114. data/tasks/rubyforge.rake +57 -0
  115. data/tasks/setup.rb +151 -0
  116. data/tasks/spec.rake +40 -0
  117. data/tasks/svn.rake +44 -0
  118. data/tasks/test.rake +40 -0
  119. metadata +188 -161
  120. data/CHANGES +0 -26
  121. data/LICENSE +0 -674
  122. data/README +0 -32
  123. data/lib/dokkit/#render_task_factory.rb# +0 -94
  124. data/lib/dokkit/dokkittasks.rb +0 -99
  125. data/lib/dokkit/hash.rb +0 -41
  126. data/lib/dokkit/models/share/builtin.rf +0 -28
  127. data/lib/dokkit/page.rb +0 -195
  128. data/lib/dokkit/render_task_factory.rb +0 -91
  129. data/tests/data/output/simple_document/README +0 -57
  130. data/tests/data/output/simple_document/Rakefile +0 -7
  131. data/tests/data/output/simple_document/doc/config/simple_document.yaml +0 -5
  132. data/tests/data/output/simple_document/doc/pages/simple_document.dpl +0 -12
  133. data/tests/data/output/website_project/README +0 -49
  134. data/tests/data/output/website_project/Rakefile +0 -82
  135. data/tests/data/output/website_project/doc/layouts/normal.thtml +0 -38
  136. data/tests/data/output/website_project/doc/pages/COMMON.rb +0 -9
  137. data/tests/data/output/website_project/doc/pages/deplate.dplhtml +0 -9
  138. data/tests/data/output/website_project/doc/pages/index.rb +0 -10
  139. data/tests/data/output/website_project/doc/pages/index.thtml +0 -12
  140. data/tests/data/output/website_project/doc/res/images/rote-tiny.png +0 -0
  141. data/tests/data/projects/simple-document/README +0 -57
  142. data/tests/data/projects/simple-document/doc/config/author.yaml +0 -4
  143. data/tests/data/projects/simple-document/doc/config/model.yaml +0 -18
  144. data/tests/data/projects/simple-document/doc/config/simple_document.yaml +0 -6
  145. data/tests/data/projects/simple-document/doc/layouts/another_simple_document.html +0 -8
  146. data/tests/data/projects/simple-document/doc/layouts/another_simple_document.tex +0 -10
  147. data/tests/data/projects/simple-document/doc/layouts/layout_with_custom_name.html +0 -8
  148. data/tests/data/projects/simple-document/doc/layouts/semantic.cache +0 -23
  149. data/tests/data/projects/simple-document/doc/pages/COMMON.yaml +0 -23
  150. data/tests/data/projects/simple-document/doc/pages/another_simple_document.dpl +0 -12
  151. data/tests/data/projects/simple-document/doc/pages/simple_document.dpl +0 -12
  152. data/tests/data/projects/simple-document/doc/pages/simple_document_without_layout.dpl +0 -12
  153. data/tests/data/projects/simple-document/doc/pages/subdir/COMMON.yaml +0 -4
  154. data/tests/data/projects/simple-document/doc/pages/subdir/simple_document_in_subdir.dpl +0 -12
  155. data/tests/data/projects/simple-document/doc/pages/subdir/simple_document_in_subdir.yaml +0 -3
  156. data/tests/data/projects/simple-document/doc/pages/subdir/subdir/COMMON.yaml +0 -2
  157. data/tests/data/projects/simple-document/doc/pages/subdir/subdir/another_simple_document_in_subdir.dpl +0 -12
  158. data/tests/data/projects/simple-document/doc/pages/yet_another_simple_document.dpl +0 -12
  159. data/tests/data/projects/simple-document/doc/pages/yet_another_simple_document.yaml +0 -8
  160. data/tests/gem_tests.rb +0 -4
  161. data/tests/spec_page.rb +0 -25
  162. data/tests/test.rb +0 -2
  163. data/tests/test_application.rb +0 -40
  164. data/tests/test_builtin_tasks.rb +0 -37
  165. data/tests/test_config.rb +0 -108
  166. data/tests/test_core.rb +0 -12
  167. data/tests/test_dokkit_commandline.rb +0 -18
  168. data/tests/test_exception.rb +0 -7
  169. data/tests/test_filters.rb +0 -46
  170. data/tests/test_layout.rb +0 -64
  171. data/tests/test_options.rb +0 -33
  172. data/tests/test_project_tasks.rb +0 -48
  173. data/tests/test_recursive_merge.rb +0 -42
  174. data/tests/test_task_factory.rb +0 -38
  175. /data/{CONTRIBUTORS → lib/dokkit/models/simpledocument/model/doc/data/css/style.css} +0 -0
  176. /data/{DONE → spec/data/test_build/doc/data/resource} +0 -0
  177. /data/{TODO → spec/data/test_build/doc/data/resource.exclude} +0 -0
  178. /data/{tests/pages/test.dpltex → spec/data/test_build/doc/data/subdir/resource.insubdir} +0 -0
data/History.txt ADDED
@@ -0,0 +1,4 @@
1
+ == 0.3.0 / 2008-01-09
2
+
3
+ * Completely removed any dependency from rote.
4
+
data/Manifest.txt ADDED
@@ -0,0 +1,125 @@
1
+ History.txt
2
+ Manifest.txt
3
+ README.txt
4
+ Rakefile
5
+ bin/dokkit
6
+ lib/dokkit.rb
7
+ lib/dokkit/app.rb
8
+ lib/dokkit/builtintask.rb
9
+ lib/dokkit/cachemanager.rb
10
+ lib/dokkit/cleantask.rb
11
+ lib/dokkit/consolelog.rb
12
+ lib/dokkit/defaults.rb
13
+ lib/dokkit/deplate/fmt/html-notemplate.rb
14
+ lib/dokkit/deplate/fmt/latex-notemplate.rb
15
+ lib/dokkit/document.rb
16
+ lib/dokkit/dokkitlib.rb
17
+ lib/dokkit/extension/extension.rb
18
+ lib/dokkit/extension/filehelper.rb
19
+ lib/dokkit/fileselection.rb
20
+ lib/dokkit/filters.rb
21
+ lib/dokkit/filters/all.rb
22
+ lib/dokkit/filters/base.rb
23
+ lib/dokkit/filters/deplate.rb
24
+ lib/dokkit/filters/maruku.rb
25
+ lib/dokkit/filters/nil.rb
26
+ lib/dokkit/logger.rb
27
+ lib/dokkit/model.rb
28
+ lib/dokkit/models/simpledocument/model/Rakefile
29
+ lib/dokkit/models/simpledocument/model/doc/layouts/simpledocument.html
30
+ lib/dokkit/models/simpledocument/model/doc/layouts/simpledocument.latex
31
+ lib/dokkit/models/simpledocument/model/doc/layouts/simpledocument.text
32
+ lib/dokkit/models/simpledocument/model/doc/pages/simpledocument.deplate
33
+ lib/dokkit/models/simpledocument/model/doc/configs/simpledocument.yaml
34
+ lib/dokkit/models/simpledocument/model/doc/data/css/style.css
35
+ lib/dokkit/models/simpledocument/model/tasks/all.rb
36
+ lib/dokkit/models/simpledocument/model/tasks/clean.rake
37
+ lib/dokkit/models/simpledocument/model/tasks/render.rake
38
+ lib/dokkit/models/simpledocument/model/tasks/setup.rb
39
+ lib/dokkit/modeltask.rb
40
+ lib/dokkit/pathhelper.rb
41
+ lib/dokkit/recursivemerge.rb
42
+ lib/dokkit/rendertask.rb
43
+ lib/dokkit/resourcemanager.rb
44
+ lib/dokkit/taskconfig.rb
45
+ lib/dokkit/templatetask.rb
46
+ spec/app_spec.rb
47
+ spec/builtintask_spec.rb
48
+ spec/cachemanager_spec.rb
49
+ spec/cleantask_spec.rb
50
+ spec/consolelog_spec.rb
51
+ spec/data/test_build/Rakefile
52
+ spec/data/test_build/doc/configs/document_1.yaml
53
+ spec/data/test_build/doc/configs/required.yaml
54
+ spec/data/test_build/doc/configs/subdir/document_4.yaml
55
+ spec/data/test_build/doc/data/resource
56
+ spec/data/test_build/doc/data/resource.exclude
57
+ spec/data/test_build/doc/data/subdir/resource.insubdir
58
+ spec/data/test_build/doc/layouts/document_1.html
59
+ spec/data/test_build/doc/layouts/document_1.latex
60
+ spec/data/test_build/doc/layouts/document_with_partials.html
61
+ spec/data/test_build/doc/layouts/layout
62
+ spec/data/test_build/doc/layouts/layout.html
63
+ spec/data/test_build/doc/layouts/layout.html.backup
64
+ spec/data/test_build/doc/layouts/nested.html
65
+ spec/data/test_build/doc/layouts/partials/partial.html
66
+ spec/data/test_build/doc/pages/COMMON.yaml
67
+ spec/data/test_build/doc/pages/document_1
68
+ spec/data/test_build/doc/pages/document_1.dep
69
+ spec/data/test_build/doc/pages/document_1.yaml
70
+ spec/data/test_build/doc/pages/document_2
71
+ spec/data/test_build/doc/pages/document_2.dep
72
+ spec/data/test_build/doc/pages/document_2.yaml
73
+ spec/data/test_build/doc/pages/document_3
74
+ spec/data/test_build/doc/pages/document_5.exclude
75
+ spec/data/test_build/doc/pages/document_7
76
+ spec/data/test_build/doc/pages/document_7.yaml
77
+ spec/data/test_build/doc/pages/document_extended
78
+ spec/data/test_build/doc/pages/document_nested
79
+ spec/data/test_build/doc/pages/document_nested.yaml
80
+ spec/data/test_build/doc/pages/document_nolayout.ext
81
+ spec/data/test_build/doc/pages/document_nolayout.yaml
82
+ spec/data/test_build/doc/pages/document_with_partials
83
+ spec/data/test_build/doc/pages/document_with_partials.yaml
84
+ spec/data/test_build/doc/pages/partials/COMMON.yaml
85
+ spec/data/test_build/doc/pages/partials/circular_partial
86
+ spec/data/test_build/doc/pages/partials/circular_partial.yaml
87
+ spec/data/test_build/doc/pages/partials/partial
88
+ spec/data/test_build/doc/pages/subdir/COMMON.yaml
89
+ spec/data/test_build/doc/pages/subdir/document_4
90
+ spec/data/test_build/doc/pages/subdir/subdir/COMMON.yaml
91
+ spec/data/test_build/doc/pages/subdir/subdir/document_6
92
+ spec/data/test_build/tasks/all.rb
93
+ spec/data/test_build/tasks/clean.rake
94
+ spec/data/test_build/tasks/render.rake
95
+ spec/data/test_build/tasks/setup.rb
96
+ spec/data/test_build/tasks/template.rake
97
+ spec/data/test_build/templates/layouts/layout
98
+ spec/data/test_build/templates/pages/template
99
+ spec/document_spec.rb
100
+ spec/dokkitlib_spec.rb
101
+ spec/filehelper_spec.rb
102
+ spec/fileselection_spec.rb
103
+ spec/filter_base_spec.rb
104
+ spec/filter_deplate_spec.rb
105
+ spec/filter_maruku_spec.rb
106
+ spec/filter_nil_spec.rb
107
+ spec/filters_spec.rb
108
+ spec/logger_spec.rb
109
+ spec/model_spec.rb
110
+ spec/pathhelper_spec.rb
111
+ spec/recursivemerge_spec.rb
112
+ spec/rendertask_spec.rb
113
+ spec/spec_helper.rb
114
+ spec/taskconfig_spec.rb
115
+ spec/templatetask_spec.rb
116
+ tasks/annotations.rake
117
+ tasks/doc.rake
118
+ tasks/gem.rake
119
+ tasks/manifest.rake
120
+ tasks/rubyforge.rake
121
+ tasks/setup.rb
122
+ tasks/spec.rake
123
+ tasks/svn.rake
124
+ tasks/test.rake
125
+
data/README.txt ADDED
@@ -0,0 +1,53 @@
1
+ dokkit
2
+ by Andrea Fazzi
3
+ http://dokkit.rubyforge.org
4
+
5
+ == DESCRIPTION:
6
+
7
+ dokkit is a document generator. It was inspired by rote but now
8
+ it is completely independent from it. dokkit uses
9
+ filters like deplate to generate output in a large variety of formats (tex, html,
10
+ docbook, plain text, ...).
11
+
12
+ For more information please execute:
13
+
14
+ dokkit --help
15
+
16
+ == FEATURES/PROBLEMS:
17
+
18
+ dokkit key features are:
19
+
20
+ * a smart task system based on rake
21
+ * a consistent documentation per-model framework organized in templates, layouts, ruby classes, configuration files, resources
22
+ * a powerful templating system based on ERB
23
+ * a simple and flexible configuration system based on YAML
24
+
25
+ == SYNOPSIS:
26
+
27
+ dokkit [options] [task]
28
+
29
+ == REQUIREMENTS:
30
+
31
+ * deplate >= 0.8.0
32
+ * rake >= 0.8.1
33
+
34
+ == INSTALL:
35
+
36
+ sudo gem install dokkit
37
+
38
+ == LICENSE:
39
+
40
+ Copyright (c) 2008 Andrea Fazzi
41
+
42
+ This program is free software: you can redistribute it and/or modify
43
+ it under the terms of the GNU General Public License as published by
44
+ the Free Software Foundation, either version 3 of the License, or
45
+ (at your option) any later version.
46
+
47
+ This program is distributed in the hope that it will be useful,
48
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
49
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50
+ GNU General Public License for more details.
51
+
52
+ You should have received a copy of the GNU General Public License
53
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
data/Rakefile CHANGED
@@ -1,167 +1,25 @@
1
- # Rakefile for dokkit
2
- #
3
- # (C) 2006, 2007 Andrea Fazzi <andrea.fazzi@alca.le.it> (and contributors).
4
- #
5
-
6
- $:.unshift('lib')
7
-
8
- require 'rake/gempackagetask'
9
- require 'rake/contrib/rubyforgepublisher'
10
- require 'rake/clean'
11
- require 'rake/testtask'
12
- require 'rake/rdoctask'
13
-
14
- # Versioning scheme: MAJOR.MINOR.PATCH
15
- # MAJOR bumps when API is broken backwards
16
- # MINOR bumps when the API is broken backwards in a very slight/subtle (but not fatal) way
17
- # -OR when a new release is made and propaganda is sent out.
18
- # PATCH is bumped for every API addition and/or bugfix (ideally for every commit)
19
- # Later DamageControl can bump PATCH automatically.
20
- #
21
- # REMEMBER TO KEEP PKG_VERSION IN SYNC WITH THE CHANGES FILE!
22
- #
23
- # Determine the current version of the software
24
-
25
- if `ruby -Ilib ./bin/dokkit --version` =~ /\S+$/
26
- CURRENT_VERSION = $&
27
- else
28
- CURRENT_VERSION = "0.0.0"
29
- end
30
-
31
- PKG_NAME = "dokkit"
32
- PKG_VERSION = CURRENT_VERSION
33
- PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
34
- PKG_FILES = FileList.new( ['lib/**/*', 'bin/*', '[A-Z]*', 'tests/**/*'] ) do |fl|
35
- fl.exclude(/TEMPLATE\./).to_a
36
- end
37
-
38
- task :default => [:gem]
39
-
40
- rd = Rake::RDocTask.new do |rd|
41
- rd.title = "dokkit"
42
- rd.main = "README"
43
- rd.rdoc_files.include("[A-Z]*", "lib/**/*.rb", "tests/*.rb")
44
- rd.rdoc_dir = "doc/rdoc"
45
- end
46
-
47
- task :man do
48
- sh "rd2 -r rd/rd2man-lib.rb bin/dokkit | gzip > doc/man/dokkit.1.gz"
49
- end
50
-
51
- # ====================================================================
52
- # Create a task that will package the software into distributable
53
- # tar, zip and gem files.
54
-
55
- spec = Gem::Specification.new do |s|
56
-
57
- #### Basic information.
58
-
59
- s.name = PKG_NAME
60
- s.version = PKG_VERSION
61
- s.summary = "Ruby Documentation toolKit"
62
- s.description = <<-EOF
63
- dokkit is an open source document generator based on rote.
64
- EOF
65
-
66
- s.files = PKG_FILES.to_a
67
- s.require_path = 'lib'
68
- s.autorequire = 'dokkit'
69
- s.bindir = "bin" # Use these for applications.
70
- s.executables = ["dokkit"]
71
- s.default_executable = "dokkit"
72
-
73
- s.add_dependency('deplate', '>= 0.8')
74
- s.add_dependency('rote', '>= 0.3.4')
75
- s.add_dependency('rake')
76
- s.add_dependency('syntax')
77
-
78
- #### Documentation and testing.
79
-
80
- s.has_rdoc = true
81
- s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
82
- s.rdoc_options <<
83
- '--title' << 'dokkit' <<
84
- '--main' << 'README' <<
85
- '--line-numbers'
86
-
87
- #### Author and project details.
88
-
89
- s.author = "Andrea Fazzi"
90
- s.email = "andrea.fazzi@alca.le.it"
91
- s.homepage = "http://dokkit.rubyforge.org/"
92
- s.rubyforge_project = "dokkit"
93
- end
94
-
95
- desc "Build Gem"
96
- Rake::GemPackageTask.new(spec) do |pkg|
97
- pkg.need_zip = true
98
- pkg.need_tar = true
99
- end
100
-
101
- # Support Tasks ------------------------------------------------------
102
-
103
- desc "Look for TODO and FIXME tags in the code"
104
- task :todo do
105
- Pathname.new(File.dirname(__FILE__)).egrep(/#.*(FIXME|TODO|TBD|DEPRECATED)/) do |match|
106
- puts match
107
- end
108
- end
109
-
110
- task :release => [:verify_env_vars, :release_files, :publish_doc, :publish_news]
111
-
112
- task :verify_env_vars do
113
- raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
114
- raise "RUBYFORGE_PASSWORD environment variable not set!" unless ENV['RUBYFORGE_PASSWORD']
115
- end
116
-
117
- task :publish_doc => [:rdoc] do
118
- if user = ENV['RUBYFORGE_USER']
119
- Rake::SshDirPublisher.new(
120
- "#{user}@rubyforge.org",
121
- "/var/www/gforge-projects/dokkit/rdoc/",
122
- "doc/rdoc/"
123
- ).upload
124
- else
125
- $stderr << "Skipping documentation upload - Need to set RUBYFORGE_USER to your rubyforge.org user name\n"
126
- end
127
- end
128
-
129
- desc "Release files on RubyForge"
130
- task :release_files => [:gem] do
131
- require 'meta_project'
132
- require 'rake/contrib/xforge'
133
- release_files = FileList[
134
- "pkg/#{PKG_FILE_NAME}.gem"
135
- ]
136
-
137
- Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new('dokkit')) do |release|
138
- # Never hardcode user name and password in the Rakefile!
139
- release.user_name = ENV['RUBYFORGE_USER']
140
- release.password = ENV['RUBYFORGE_PASSWORD']
141
- release.files = release_files.to_a
142
- release.release_name = "#{PKG_NAME} #{PKG_VERSION}"
143
- # The rest of the options are defaults (among others, release_notes and release_changes, parsed from CHANGES)
144
- end
145
- end
146
-
147
- desc "Publish news on RubyForge"
148
- task :publish_news => [:gem] do
149
- release_files = FileList[
150
- "pkg/#{PKG_FILE_NAME}.gem"
151
- ]
152
- Rake::XForge::NewsPublisher.new(MetaProject::Project::XForge::RubyForge.new('dokkit')) do |news|
153
- # Never hardcode user name and password in the Rakefile!
154
- news.user_name = ENV['RUBYFORGE_USER']
155
- news.password = ENV['RUBYFORGE_PASSWORD']
156
- end
157
- end
158
-
159
- desc "Tag the working tree and copy it to dokkit-core/tags/REL_X_Y_Z on RubyForge"
160
- task :tag do
161
- reltag = "REL_#{PKG_VERSION.gsub(/\./, '_')}"
162
- puts "Tagging current head with [#{reltag}]"
163
- sh "svn copy ./ svn+ssh://#{ENV['RUBYFORGE_USER']}@rubyforge.org/var/svn/dokkit/dokkit-core/tags/#{reltag}/ -m \"tag #{reltag}\"" if ENV['RUBYFORGE_USER']
164
- end
165
-
166
-
167
-
1
+ # Look in the tasks/setup.rb file for the various options that can be
2
+ # configured in this Rakefile. The .rake files in the tasks directory
3
+ # are where the options are used.
4
+
5
+ load 'tasks/setup.rb'
6
+
7
+ ensure_in_path 'lib'
8
+ require 'dokkit'
9
+
10
+ task :default => 'spec:run'
11
+
12
+ PROJ.name = 'dokkit'
13
+ PROJ.version = Dokkit::DOKKITVERSION
14
+ PROJ.summary = 'dokkit is an open source document generator'
15
+ PROJ.authors = 'Andrea Fazzi'
16
+ PROJ.email = 'andrea.fazzi@alca.le.it'
17
+ PROJ.url = 'http://dokkit.rubyforge.org'
18
+ PROJ.description = paragraphs_of('README.txt', 1).join("\n\n")
19
+ PROJ.changes = paragraphs_of('History.txt', 0..1).join("\n\n")
20
+ PROJ.rubyforge_name = 'dokkit'
21
+ #FIXME: set version numbers for the dependencies below.
22
+ PROJ.dependencies = ['deplate', 'rake', 'maruku']
23
+ PROJ.spec_opts << ['--format', 'specdoc', '--color']
24
+
25
+ # EOF
data/bin/dokkit CHANGED
@@ -1,63 +1,7 @@
1
- #
2
- # File 'dokkit' created on 09 ott 2007 at 15:57:46.
3
- #
4
- # See 'dokkit.rb' or LICENSE for licence information.
5
- #
6
- # (c)2006, 2007 Andrea Fazzi <andrea.fazzi@alca.le.it> (and contributors).
7
- #
8
- # Commandline launcher for Dokkit.
9
- # Get set up with library paths, however we're installed.
10
- #
1
+ #!/usr/bin/env ruby
11
2
 
12
- =begin
13
-
14
- = NAME
15
- dokkit - Ruby Documentation toolKit
16
-
17
- = SYNOPSIS
18
-
19
- dokkit [options] [task1] .. [taskN]
20
-
21
- = DESCRIPTION
22
-
23
- dokkit is a documentation environment. It is based on rote and it uses deplate to generate output in a large variety of formats (tex, html, docbook, plain text, ...).
24
-
25
- For more information please execute:
26
-
27
- $ dokkit --help
28
-
29
- = OPTIONS
30
-
31
- For a complete list of the options please execute:
32
-
33
- $ dokkit --help
34
-
35
- = AUTHOR
36
-
37
- Andrea Fazzi <andrea.fazzi@alca.le.it>
38
-
39
- = SEE ALSO
40
-
41
- ruby(1)
42
-
43
- =end
44
-
45
- def croak
46
- puts "Cannot locate Dokkit libraries - Do you need to set $DOKKIT_LIB?"
47
- exit(1)
48
- end
49
-
50
- begin
51
- require 'rubygems'
52
- rescue LoadError
53
- nil # just ignore, don't use gems
54
- end
55
-
56
- require 'dokkit'
57
- require 'dokkit/app'
58
-
59
- croak unless Dokkit.dokkit_lib
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'dokkit'))
60
4
 
5
+ # Put your code here
61
6
  Dokkit.application.run
62
-
63
-
7
+ # EOF