dokkit 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Manifest.txt +125 -0
- data/README.txt +53 -0
- data/Rakefile +25 -167
- data/bin/dokkit +4 -60
- data/lib/dokkit/app.rb +63 -192
- data/lib/dokkit/builtintask.rb +85 -0
- data/lib/dokkit/cachemanager.rb +61 -0
- data/lib/dokkit/cleantask.rb +51 -0
- data/lib/dokkit/consolelog.rb +42 -0
- data/lib/dokkit/defaults.rb +19 -0
- data/lib/dokkit/document.rb +221 -0
- data/lib/dokkit/dokkitlib.rb +68 -0
- data/lib/dokkit/extension/extension.rb +15 -0
- data/lib/dokkit/extension/filehelper.rb +25 -0
- data/lib/dokkit/fileselection.rb +44 -0
- data/lib/dokkit/filters/all.rb +18 -0
- data/lib/dokkit/filters/base.rb +18 -0
- data/lib/dokkit/filters/deplate.rb +21 -25
- data/lib/dokkit/filters/maruku.rb +23 -0
- data/lib/dokkit/filters/nil.rb +23 -0
- data/lib/dokkit/filters.rb +29 -21
- data/lib/dokkit/logger.rb +73 -0
- data/lib/dokkit/model.rb +34 -0
- data/lib/dokkit/models/{Rakefile.tpl → simpledocument/model/Rakefile} +15 -2
- data/lib/dokkit/models/simpledocument/model/doc/configs/simpledocument.yaml +3 -0
- data/lib/dokkit/models/simpledocument/model/doc/layouts/simpledocument.html +9 -0
- data/lib/dokkit/models/simpledocument/model/doc/layouts/simpledocument.latex +8 -0
- data/lib/dokkit/models/simpledocument/model/doc/layouts/simpledocument.text +1 -0
- data/lib/dokkit/models/simpledocument/model/doc/pages/simpledocument.deplate +102 -0
- data/lib/dokkit/models/simpledocument/model/tasks/all.rb +3 -0
- data/lib/dokkit/models/simpledocument/model/tasks/clean.rake +3 -0
- data/lib/dokkit/models/simpledocument/model/tasks/render.rake +8 -0
- data/lib/dokkit/models/simpledocument/model/tasks/setup.rb +9 -0
- data/lib/dokkit/modeltask.rb +83 -0
- data/lib/dokkit/pathhelper.rb +46 -0
- data/lib/dokkit/recursivemerge.rb +59 -0
- data/lib/dokkit/rendertask.rb +101 -0
- data/lib/dokkit/resourcemanager.rb +177 -0
- data/lib/dokkit/taskconfig.rb +39 -0
- data/lib/dokkit/templatetask.rb +37 -0
- data/lib/dokkit.rb +2 -8
- data/spec/app_spec.rb +55 -0
- data/spec/builtintask_spec.rb +114 -0
- data/spec/cachemanager_spec.rb +107 -0
- data/spec/cleantask_spec.rb +72 -0
- data/spec/consolelog_spec.rb +69 -0
- data/{tests/data/projects/simple-document → spec/data/test_build}/Rakefile +8 -8
- data/spec/data/test_build/doc/configs/document_1.yaml +3 -0
- data/spec/data/test_build/doc/configs/required.yaml +3 -0
- data/spec/data/test_build/doc/configs/subdir/document_4.yaml +3 -0
- data/spec/data/test_build/doc/layouts/document_1.html +9 -0
- data/spec/data/test_build/doc/layouts/document_1.latex +8 -0
- data/spec/data/test_build/doc/layouts/document_with_partials.html +9 -0
- data/spec/data/test_build/doc/layouts/layout +0 -0
- data/spec/data/test_build/doc/layouts/layout.html +8 -0
- data/spec/data/test_build/doc/layouts/layout.html.backup +8 -0
- data/spec/data/test_build/doc/layouts/nested.html +3 -0
- data/spec/data/test_build/doc/layouts/partials/partial.html +4 -0
- data/spec/data/test_build/doc/pages/COMMON.yaml +6 -0
- data/spec/data/test_build/doc/pages/document_1 +20 -0
- data/spec/data/test_build/doc/pages/document_1.dep +4 -0
- data/spec/data/test_build/doc/pages/document_1.yaml +11 -0
- data/spec/data/test_build/doc/pages/document_2 +9 -0
- data/spec/data/test_build/doc/pages/document_2.dep +0 -0
- data/spec/data/test_build/doc/pages/document_2.yaml +6 -0
- data/spec/data/test_build/doc/pages/document_3 +13 -0
- data/spec/data/test_build/doc/pages/document_5.exclude +0 -0
- data/spec/data/test_build/doc/pages/document_7 +4 -0
- data/spec/data/test_build/doc/pages/document_7.yaml +5 -0
- data/spec/data/test_build/doc/pages/document_extended +1 -0
- data/spec/data/test_build/doc/pages/document_nested +6 -0
- data/spec/data/test_build/doc/pages/document_nested.yaml +5 -0
- data/spec/data/test_build/doc/pages/document_nolayout.ext +3 -0
- data/spec/data/test_build/doc/pages/document_nolayout.yaml +2 -0
- data/spec/data/test_build/doc/pages/document_with_partials +3 -0
- data/spec/data/test_build/doc/pages/document_with_partials.yaml +2 -0
- data/spec/data/test_build/doc/pages/partials/COMMON.yaml +5 -0
- data/spec/data/test_build/doc/pages/partials/circular_partial +2 -0
- data/spec/data/test_build/doc/pages/partials/circular_partial.yaml +3 -0
- data/spec/data/test_build/doc/pages/partials/partial +2 -0
- data/spec/data/test_build/doc/pages/subdir/COMMON.yaml +2 -0
- data/spec/data/test_build/doc/pages/subdir/document_4 +11 -0
- data/spec/data/test_build/doc/pages/subdir/subdir/COMMON.yaml +2 -0
- data/spec/data/test_build/doc/pages/subdir/subdir/document_6 +3 -0
- data/spec/data/test_build/tasks/all.rb +3 -0
- data/spec/data/test_build/tasks/clean.rake +3 -0
- data/spec/data/test_build/tasks/render.rake +8 -0
- data/spec/data/test_build/tasks/setup.rb +9 -0
- data/spec/data/test_build/tasks/template.rake +3 -0
- data/spec/data/test_build/templates/layouts/layout +0 -0
- data/spec/data/test_build/templates/pages/template +0 -0
- data/spec/document_spec.rb +321 -0
- data/spec/dokkitlib_spec.rb +63 -0
- data/spec/filehelper_spec.rb +34 -0
- data/spec/fileselection_spec.rb +101 -0
- data/spec/filter_base_spec.rb +29 -0
- data/spec/filter_deplate_spec.rb +48 -0
- data/spec/filter_maruku_spec.rb +29 -0
- data/spec/filter_nil_spec.rb +30 -0
- data/spec/filters_spec.rb +37 -0
- data/spec/logger_spec.rb +150 -0
- data/spec/model_spec.rb +45 -0
- data/spec/pathhelper_spec.rb +62 -0
- data/spec/recursivemerge_spec.rb +91 -0
- data/spec/rendertask_spec.rb +374 -0
- data/spec/spec_helper.rb +61 -0
- data/spec/taskconfig_spec.rb +45 -0
- data/spec/templatetask_spec.rb +72 -0
- data/tasks/annotations.rake +30 -0
- data/tasks/doc.rake +49 -0
- data/tasks/gem.rake +89 -0
- data/tasks/manifest.rake +41 -0
- data/tasks/rubyforge.rake +57 -0
- data/tasks/setup.rb +151 -0
- data/tasks/spec.rake +40 -0
- data/tasks/svn.rake +44 -0
- data/tasks/test.rake +40 -0
- metadata +188 -161
- data/CHANGES +0 -26
- data/LICENSE +0 -674
- data/README +0 -32
- data/lib/dokkit/#render_task_factory.rb# +0 -94
- data/lib/dokkit/dokkittasks.rb +0 -99
- data/lib/dokkit/hash.rb +0 -41
- data/lib/dokkit/models/share/builtin.rf +0 -28
- data/lib/dokkit/page.rb +0 -195
- data/lib/dokkit/render_task_factory.rb +0 -91
- data/tests/data/output/simple_document/README +0 -57
- data/tests/data/output/simple_document/Rakefile +0 -7
- data/tests/data/output/simple_document/doc/config/simple_document.yaml +0 -5
- data/tests/data/output/simple_document/doc/pages/simple_document.dpl +0 -12
- data/tests/data/output/website_project/README +0 -49
- data/tests/data/output/website_project/Rakefile +0 -82
- data/tests/data/output/website_project/doc/layouts/normal.thtml +0 -38
- data/tests/data/output/website_project/doc/pages/COMMON.rb +0 -9
- data/tests/data/output/website_project/doc/pages/deplate.dplhtml +0 -9
- data/tests/data/output/website_project/doc/pages/index.rb +0 -10
- data/tests/data/output/website_project/doc/pages/index.thtml +0 -12
- data/tests/data/output/website_project/doc/res/images/rote-tiny.png +0 -0
- data/tests/data/projects/simple-document/README +0 -57
- data/tests/data/projects/simple-document/doc/config/author.yaml +0 -4
- data/tests/data/projects/simple-document/doc/config/model.yaml +0 -18
- data/tests/data/projects/simple-document/doc/config/simple_document.yaml +0 -6
- data/tests/data/projects/simple-document/doc/layouts/another_simple_document.html +0 -8
- data/tests/data/projects/simple-document/doc/layouts/another_simple_document.tex +0 -10
- data/tests/data/projects/simple-document/doc/layouts/layout_with_custom_name.html +0 -8
- data/tests/data/projects/simple-document/doc/layouts/semantic.cache +0 -23
- data/tests/data/projects/simple-document/doc/pages/COMMON.yaml +0 -23
- data/tests/data/projects/simple-document/doc/pages/another_simple_document.dpl +0 -12
- data/tests/data/projects/simple-document/doc/pages/simple_document.dpl +0 -12
- data/tests/data/projects/simple-document/doc/pages/simple_document_without_layout.dpl +0 -12
- data/tests/data/projects/simple-document/doc/pages/subdir/COMMON.yaml +0 -4
- data/tests/data/projects/simple-document/doc/pages/subdir/simple_document_in_subdir.dpl +0 -12
- data/tests/data/projects/simple-document/doc/pages/subdir/simple_document_in_subdir.yaml +0 -3
- data/tests/data/projects/simple-document/doc/pages/subdir/subdir/COMMON.yaml +0 -2
- data/tests/data/projects/simple-document/doc/pages/subdir/subdir/another_simple_document_in_subdir.dpl +0 -12
- data/tests/data/projects/simple-document/doc/pages/yet_another_simple_document.dpl +0 -12
- data/tests/data/projects/simple-document/doc/pages/yet_another_simple_document.yaml +0 -8
- data/tests/gem_tests.rb +0 -4
- data/tests/spec_page.rb +0 -25
- data/tests/test.rb +0 -2
- data/tests/test_application.rb +0 -40
- data/tests/test_builtin_tasks.rb +0 -37
- data/tests/test_config.rb +0 -108
- data/tests/test_core.rb +0 -12
- data/tests/test_dokkit_commandline.rb +0 -18
- data/tests/test_exception.rb +0 -7
- data/tests/test_filters.rb +0 -46
- data/tests/test_layout.rb +0 -64
- data/tests/test_options.rb +0 -33
- data/tests/test_project_tasks.rb +0 -48
- data/tests/test_recursive_merge.rb +0 -42
- data/tests/test_task_factory.rb +0 -38
- /data/{CONTRIBUTORS → lib/dokkit/models/simpledocument/model/doc/data/css/style.css} +0 -0
- /data/{DONE → spec/data/test_build/doc/data/resource} +0 -0
- /data/{TODO → spec/data/test_build/doc/data/resource.exclude} +0 -0
- /data/{tests/pages/test.dpltex → spec/data/test_build/doc/data/subdir/resource.insubdir} +0 -0
@@ -1,49 +0,0 @@
|
|
1
|
-
This is the auto-generated Rote documentation source.
|
2
|
-
|
3
|
-
To render it using Rote's command-line wrapper (ignoring the included
|
4
|
-
Rakefile), type:
|
5
|
-
|
6
|
-
rote doc
|
7
|
-
|
8
|
-
from the top-level directory (this one).
|
9
|
-
|
10
|
-
To render using the included Rakefile (the result is the same in either
|
11
|
-
case) type instead:
|
12
|
-
|
13
|
-
rake doc
|
14
|
-
|
15
|
-
If you prefer, you can omit the 'doc' task, since it is configured
|
16
|
-
as the default.
|
17
|
-
|
18
|
-
In either case, you should see some output as the pages are rendered
|
19
|
-
and resources copied, and get output in a (created) 'html' directory.
|
20
|
-
Once you have rendered the site, running the command again will appear
|
21
|
-
to do nothing, because only changed resources are re-rendered. To
|
22
|
-
start over:
|
23
|
-
|
24
|
-
(rote|rake) clobber
|
25
|
-
|
26
|
-
Alternatively, modify the page or resource files, and rerun the first
|
27
|
-
command to transform only the modified resource.
|
28
|
-
|
29
|
-
WHAT NEXT?
|
30
|
-
|
31
|
-
+ See what else you can do by typing:
|
32
|
-
|
33
|
-
(rote|rake) --tasks
|
34
|
-
|
35
|
-
rote --usage ( with the command-line wrapper )
|
36
|
-
|
37
|
-
+ Modify the included page template and layout to suit your needs.
|
38
|
-
|
39
|
-
+ Edit the included Rakefile to add or change tasks, or delete it
|
40
|
-
if you're sticking with the command-line wrapper.
|
41
|
-
|
42
|
-
+ Add more pages and layouts.
|
43
|
-
|
44
|
-
+ Start Rote in monitor mode, and have your changes rendered as
|
45
|
-
you work:
|
46
|
-
|
47
|
-
(rote|rake) doc_monitor
|
48
|
-
|
49
|
-
|
@@ -1,82 +0,0 @@
|
|
1
|
-
# Standard Rakefile for custom Rote build
|
2
|
-
#
|
3
|
-
# Generated from:
|
4
|
-
# $Id: Rakefile 160 2006-01-05 21:05:44Z roscopeco $
|
5
|
-
#
|
6
|
-
begin
|
7
|
-
require 'rubygems'
|
8
|
-
rescue LoadError
|
9
|
-
nil # optional
|
10
|
-
end
|
11
|
-
|
12
|
-
require 'rake'
|
13
|
-
require 'rake/clean'
|
14
|
-
require 'rote/format'
|
15
|
-
require 'dokkit'
|
16
|
-
require 'dokkit/filters'
|
17
|
-
|
18
|
-
include Rote
|
19
|
-
include Dokkit
|
20
|
-
|
21
|
-
# Create a set of tasks with the prefix 'doc' to build the
|
22
|
-
# documentation set. The directory layout is as for the
|
23
|
-
# command-line wrapper (but can be changed of course).
|
24
|
-
#
|
25
|
-
# This creates the following tasks:
|
26
|
-
#
|
27
|
-
# * doc - transform/copy all modified pages / resources
|
28
|
-
# * doc_pages - transform all modified pages
|
29
|
-
# * doc_res - copy all modified resources
|
30
|
-
# * doc_monitor - Start monitor mode, transform changed files automatically
|
31
|
-
#
|
32
|
-
# * [html/**/*] - Transform single page / resource unconditionally
|
33
|
-
#
|
34
|
-
# * clobber_doc - Remove output (hooks into main 'clobber' task)
|
35
|
-
#
|
36
|
-
# In addition to these tasks, you may also wish to define a 'doc_refresh' task
|
37
|
-
# to be run whenever modified resources are processed in monitor mode.
|
38
|
-
ws = Rote::DocTask.new(:doc) do |site|
|
39
|
-
site.output_dir = 'html'
|
40
|
-
site.layout_dir = 'doc/layouts'
|
41
|
-
site.config_dir = 'doc/config'
|
42
|
-
|
43
|
-
site.pages.dir = 'doc/pages'
|
44
|
-
site.pages.include('**/*')
|
45
|
-
|
46
|
-
site.res.dir = 'doc/res'
|
47
|
-
site.res.include('**/*')
|
48
|
-
|
49
|
-
site.ext_mapping(/thtml|textile/, 'html') do |page|
|
50
|
-
page.extend Format::HTML
|
51
|
-
page.page_filter Rote::Filters::RedCloth.new
|
52
|
-
end
|
53
|
-
|
54
|
-
site.ext_mapping(/mhtml|markdown/, 'html') do |page|
|
55
|
-
page.extend Format::HTML
|
56
|
-
page.page_filter Rote::Filters::BlueCloth.new
|
57
|
-
end
|
58
|
-
|
59
|
-
site.ext_mapping(/rdhtml|rdoc/, 'html') do |page|
|
60
|
-
page.extend Format::HTML
|
61
|
-
page.page_filter Rote::Filters::RDoc.new
|
62
|
-
end
|
63
|
-
|
64
|
-
site.ext_mapping(/dplhtml/, 'html') do |page|
|
65
|
-
page.extend Format::HTML
|
66
|
-
page.page_filter Dokkit::Filters::Deplate.new('html-notemplate')
|
67
|
-
end
|
68
|
-
|
69
|
-
site.ext_mapping(/html/, 'html') do |page|
|
70
|
-
page.extend Format::HTML
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
task :default => [:doc]
|
75
|
-
|
76
|
-
# import user-level tasks
|
77
|
-
import "#{ENV['HOME']}/.rotetasks.rf" if File.exists?("#{ENV['HOME']}/.rotetasks.rf")
|
78
|
-
import 'local.rf' if File.exists?('local.rf')
|
79
|
-
|
80
|
-
# TODO Define your custom tasks here
|
81
|
-
|
82
|
-
|
@@ -1,38 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
# This is the 'normal' layout. It can be selected with:
|
3
|
-
#
|
4
|
-
# layout 'normal'
|
5
|
-
#
|
6
|
-
# in page code. If the page itself doesn't have an '.html'
|
7
|
-
# extension, you will need to use:
|
8
|
-
#
|
9
|
-
# layout 'normal.html'
|
10
|
-
#
|
11
|
-
# instead.
|
12
|
-
#
|
13
|
-
# Here we just add basic HTML wrap-up, use the custom var
|
14
|
-
# (@page_title) to get the title, and insert content where
|
15
|
-
# we want it with @content_for_layout.
|
16
|
-
%>
|
17
|
-
<html>
|
18
|
-
<head>
|
19
|
-
<%# Use our custom vars for the title %>
|
20
|
-
<title><%= @page_title + ' - ' + @site_title %></title>
|
21
|
-
</head>
|
22
|
-
|
23
|
-
<body>
|
24
|
-
<h1><%= @page_title %></h1>
|
25
|
-
|
26
|
-
<%# Insert page content #%>
|
27
|
-
<%= @content_for_layout %>
|
28
|
-
|
29
|
-
<p align='center'><hr width='80%'></p>
|
30
|
-
<p align='right'>
|
31
|
-
<span style='font-size: 8pt; color: #7c7c90'>Generated with</span><br/>
|
32
|
-
|
33
|
-
<%# use the link_rel helper to make absolute links relative to current page #%>
|
34
|
-
<a href='http://rote.rubyforge.org/' target='_blank'><img src='<%= link_rel '/images/rote-tiny.png' %>' alt='Rote'/></a>
|
35
|
-
</p>
|
36
|
-
</body>
|
37
|
-
</html>
|
38
|
-
|
@@ -1,9 +0,0 @@
|
|
1
|
-
# Shared code for all pages below this directory.
|
2
|
-
#
|
3
|
-
# This is executed for every file transformed, in the binding of
|
4
|
-
# the appropriate Rote::Page instance. Individual page sources
|
5
|
-
# ([pagename].rb) override anything defined here.
|
6
|
-
#
|
7
|
-
# Any COMMON.rb files found in directories above this will also
|
8
|
-
# be loaded.
|
9
|
-
@site_title = "My site"
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# Page code for the 'index' page. We call a few methods to
|
2
|
-
# set layout and formatting, and then create a custom variable
|
3
|
-
# for use in the layout.
|
4
|
-
|
5
|
-
# Apply the 'normal' layout
|
6
|
-
layout 'normal'
|
7
|
-
|
8
|
-
# Set a custom var for use in our layout
|
9
|
-
@page_title = 'A sample page'
|
10
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
This is a *sample* page.
|
2
|
-
|
3
|
-
<%# insert an image with relative path, using Textile !img! markup #%>
|
4
|
-
It has a very small image:
|
5
|
-
!<%= link_rel '/images/rote-tiny.png' %>!
|
6
|
-
|
7
|
-
(Which is the same as the one at the bottom)
|
8
|
-
|
9
|
-
* You should
|
10
|
-
* Replace this
|
11
|
-
* With your doc.
|
12
|
-
|
Binary file
|
@@ -1,57 +0,0 @@
|
|
1
|
-
This is 'simple_document' a simple document model included in the core
|
2
|
-
distribution of dokkit. Check http://rubyforge.org/dokkit/ for other
|
3
|
-
models.
|
4
|
-
|
5
|
-
To modify this document simply edit 'doc/pages/simple_document.dpl'. To get further
|
6
|
-
information about the wiki syntax to be used please check http://deplate.sf.net/
|
7
|
-
|
8
|
-
To render this document in html, type:
|
9
|
-
|
10
|
-
dokkit render_html
|
11
|
-
|
12
|
-
from any subdirectory contained in the top-level directory (this one).
|
13
|
-
|
14
|
-
To render this document in TeX, type:
|
15
|
-
|
16
|
-
dokkit render_tex
|
17
|
-
|
18
|
-
In either case, you should get the output in a (created) 'output'
|
19
|
-
directory:
|
20
|
-
|
21
|
-
in 'output/html' you get html output
|
22
|
-
in 'output/tex' you get tex output
|
23
|
-
|
24
|
-
... and so on...
|
25
|
-
|
26
|
-
Once you have rendered the document, running the command again will appear
|
27
|
-
to do nothing, because only changed resources are re-rendered. To
|
28
|
-
clean the output and start over:
|
29
|
-
|
30
|
-
dokkit clobber
|
31
|
-
|
32
|
-
Alternatively, modify the page or resource files, and rerun
|
33
|
-
|
34
|
-
dokkit render_html
|
35
|
-
|
36
|
-
or
|
37
|
-
|
38
|
-
dokkit render_tex
|
39
|
-
|
40
|
-
to transform only the modified resource.
|
41
|
-
|
42
|
-
* WHAT'S NEXT?
|
43
|
-
|
44
|
-
- See what else you can do by typing:
|
45
|
-
|
46
|
-
dokkit --tasks
|
47
|
-
|
48
|
-
- Modify the configuration of the document by editing
|
49
|
-
'doc/config/simple_document.yaml'
|
50
|
-
|
51
|
-
- Create a new document by typing:
|
52
|
-
|
53
|
-
dokkit create_new_page new_document
|
54
|
-
|
55
|
-
For further information about dokkit see http://dokkit.rubyforge.org/
|
56
|
-
|
57
|
-
|
@@ -1,18 +0,0 @@
|
|
1
|
-
#----------------------------------------------------------------------
|
2
|
-
#
|
3
|
-
# model.yaml created on 19 set 2007 at 22:37:25.
|
4
|
-
# See 'dokkit.rb' or LICENSE for licence information.
|
5
|
-
#
|
6
|
-
# (c)2007 Andrea Fazzi (and contributors).
|
7
|
-
#
|
8
|
-
# This is a config file for the current document. This file is written
|
9
|
-
# using YAML so you can easily modify it using YAML syntax. For further
|
10
|
-
# information about YAML please visit http://yaml.org.
|
11
|
-
#
|
12
|
-
#----------------------------------------------------------------------
|
13
|
-
|
14
|
-
model:
|
15
|
-
name: simpledocument
|
16
|
-
version: 0.1.0
|
17
|
-
language: en
|
18
|
-
|
@@ -1,23 +0,0 @@
|
|
1
|
-
;; Object layouts/
|
2
|
-
;; SEMANTICDB Tags save file
|
3
|
-
(semanticdb-project-database-file "layouts/"
|
4
|
-
:tables (list
|
5
|
-
(semanticdb-table "layout_with_custom_name.html"
|
6
|
-
:major-mode 'html-mode
|
7
|
-
:tags '(("" section nil nil [81 142]) ("" section nil nil [142 147]))
|
8
|
-
:file "layout_with_custom_name.html"
|
9
|
-
:pointmax 194
|
10
|
-
:unmatched-syntax 'nil
|
11
|
-
)
|
12
|
-
(semanticdb-table "another_simple_document.html"
|
13
|
-
:major-mode 'html-mode
|
14
|
-
:tags '(("" section nil nil [64 125]) ("" section nil nil [125 130]))
|
15
|
-
:file "another_simple_document.html"
|
16
|
-
:pointmax 177
|
17
|
-
:unmatched-syntax 'nil
|
18
|
-
)
|
19
|
-
)
|
20
|
-
:file "semantic.cache"
|
21
|
-
:semantic-tag-version "2.0pre3"
|
22
|
-
:semanticdb-version "2.0pre3"
|
23
|
-
)
|
@@ -1,23 +0,0 @@
|
|
1
|
-
#-------------------------------------------------------------------------
|
2
|
-
#
|
3
|
-
# COMMON.yaml created on 01 ott 2007 at 15:21:20.
|
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
|
-
# This is a config file for the current document. This file is written
|
9
|
-
# using YAML so you can easily modify it using YAML syntax. For further
|
10
|
-
# information about YAML please visit http://yaml.org/.
|
11
|
-
#
|
12
|
-
#-------------------------------------------------------------------------
|
13
|
-
|
14
|
-
document:
|
15
|
-
title: A common title for document in pages dir
|
16
|
-
author:
|
17
|
-
name: John
|
18
|
-
surname: Doe
|
19
|
-
common_key: A common value for documents in pages dir
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
data/tests/gem_tests.rb
DELETED
data/tests/spec_page.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'spec'
|
3
|
-
require 'dokkit'
|
4
|
-
|
5
|
-
context 'A new page' do
|
6
|
-
|
7
|
-
setup do
|
8
|
-
@config_page_complete = { :fn => 'test.dpltex',
|
9
|
-
:layout_dir => 'layouts/',
|
10
|
-
:pages_dir => 'pages/',
|
11
|
-
:config_dir => 'config'
|
12
|
-
}
|
13
|
-
|
14
|
-
@config_page_incomplete = { :fn => 'test.dpltex', :pages_dir => 'pages/' }
|
15
|
-
end
|
16
|
-
|
17
|
-
specify 'should be correctly initialized if fn, layout_dir, pages_dir and config_dir are given' do
|
18
|
-
Rote::Page.new(@config_page_complete)
|
19
|
-
end
|
20
|
-
|
21
|
-
specify 'should have correct defaults for pages_dir, layout_dir and config_dir' do
|
22
|
-
Rote::Page.new(@config_page_incomplete)
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
data/tests/test.rb
DELETED
data/tests/test_application.rb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# File 'test_application.rb' created on 22 Oct 2007 at 16:25:05.
|
3
|
-
# See 'dokkit.rb' or +LICENSE+ for licence information.
|
4
|
-
#
|
5
|
-
# (c)2006, 2007 Andrea Fazzi <andrea.fazzi@alca.le.it> (and contributors).
|
6
|
-
#
|
7
|
-
# To execute this unit test run:
|
8
|
-
#
|
9
|
-
# ruby test/test_application.rb
|
10
|
-
#
|
11
|
-
|
12
|
-
require 'rubygems'
|
13
|
-
require 'test/unit'
|
14
|
-
require 'dokkit'
|
15
|
-
require 'dokkit/app'
|
16
|
-
|
17
|
-
$LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__),'../lib'))
|
18
|
-
|
19
|
-
class TestApplication < Test::Unit::TestCase
|
20
|
-
def setup
|
21
|
-
end
|
22
|
-
def teardown
|
23
|
-
end
|
24
|
-
# The tests below need dokkit-model-simple-document gem to pass.
|
25
|
-
# Run:
|
26
|
-
# $ gem install dokkit-model-simpledocument
|
27
|
-
# to install the simpledocument model.
|
28
|
-
def test_fetch_models
|
29
|
-
assert(File.exists?(Dokkit.fetch_models['simple-document']))
|
30
|
-
end
|
31
|
-
def test_model_dir
|
32
|
-
assert(File.exists?(Dokkit.model_dir('simple-document')))
|
33
|
-
end
|
34
|
-
def test_model_layout_dir
|
35
|
-
assert(File.exists?(Dokkit.model_layout_dir('simple-document')))
|
36
|
-
end
|
37
|
-
def test_config_dir
|
38
|
-
assert(File.exists?(Dokkit.model_config_dir('simple-document')))
|
39
|
-
end
|
40
|
-
end
|
data/tests/test_builtin_tasks.rb
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'test/unit'
|
3
|
-
require 'dokkit'
|
4
|
-
require 'dokkit/app'
|
5
|
-
require 'rake'
|
6
|
-
|
7
|
-
|
8
|
-
$LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__),'../lib'))
|
9
|
-
|
10
|
-
class TestBuiltinTask < Test::Unit::TestCase
|
11
|
-
OUTPUT_DIR = 'tests/data/output'
|
12
|
-
def setup
|
13
|
-
ARGV.clear
|
14
|
-
end
|
15
|
-
def test_builtin_task
|
16
|
-
Dokkit.application.init
|
17
|
-
Dokkit.application.define_builtin_tasks
|
18
|
-
assert_equal('create', Dokkit.application['create'].to_s)
|
19
|
-
end
|
20
|
-
def test_create_default_project_task
|
21
|
-
Dokkit.application.init
|
22
|
-
Dokkit.application.define_builtin_tasks
|
23
|
-
ARGV.push("create", "#{OUTPUT_DIR}/simple_document")
|
24
|
-
Dokkit.application.run
|
25
|
-
dir_content = Dir["#{OUTPUT_DIR}/simple_document/*"]
|
26
|
-
assert(!dir_content.empty? && !dir_content.include?('lib'))
|
27
|
-
end
|
28
|
-
def test_create_website_task
|
29
|
-
Dokkit.application.init
|
30
|
-
Dokkit.application.do_option('--project',"website")
|
31
|
-
Dokkit.application.define_builtin_tasks
|
32
|
-
ARGV.push("create", "#{OUTPUT_DIR}/website_project")
|
33
|
-
Dokkit.application.run
|
34
|
-
assert(Dir["#{OUTPUT_DIR}/website_project/*"].size > 1)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|