dokkit 0.4.4 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +135 -3
- data/Manifest.txt +9 -2
- data/README.txt +35 -17
- data/Rakefile +12 -8
- data/lib/dokkit.rb +1 -1
- data/lib/dokkit/cache/cache.rb +6 -1
- data/lib/dokkit/environment.rb +1 -0
- data/lib/dokkit/environment/basic.rb +148 -122
- data/lib/dokkit/environment/container.rb +35 -0
- data/lib/dokkit/environment/helpers.rb +43 -0
- data/lib/dokkit/environment/helpers/fileselection.rb +17 -6
- data/lib/dokkit/factory/factory.rb +4 -4
- data/lib/dokkit/filters.rb +1 -0
- data/lib/dokkit/filters/maruku.rb +9 -1
- data/lib/dokkit/filters/yaml.rb +26 -0
- data/lib/dokkit/logging.rb +1 -1
- data/lib/dokkit/resource/document.rb +141 -142
- data/lib/dokkit/resource/extensions/builtin.rb +2 -0
- data/lib/dokkit/resource/extensions/url.rb +1 -1
- data/lib/dokkit/resource/filenamehelper.rb +5 -1
- data/lib/dokkit/tasklib.rb +5 -0
- data/lib/dokkit/tasklib/base.rb +36 -0
- data/lib/dokkit/tasklib/clean.rb +12 -19
- data/lib/dokkit/tasklib/render.rb +20 -24
- data/lib/models/simple/setup/setup.rb +5 -3
- data/tasks/ann.rake +81 -0
- data/tasks/bones.rake +21 -0
- data/tasks/gem.rake +67 -30
- data/tasks/git.rake +41 -0
- data/tasks/manifest.rake +30 -22
- data/tasks/notes.rake +28 -0
- data/tasks/post_load.rake +39 -0
- data/tasks/{doc.rake → rdoc.rake} +11 -9
- data/tasks/rubyforge.rake +12 -12
- data/tasks/setup.rb +189 -72
- data/tasks/spec.rake +24 -9
- data/tasks/svn.rake +15 -11
- data/tasks/test.rake +7 -9
- metadata +14 -7
- data/tasks/annotations.rake +0 -30
data/tasks/spec.rake
CHANGED
@@ -1,29 +1,46 @@
|
|
1
1
|
# $Id$
|
2
2
|
|
3
3
|
if HAVE_SPEC_RAKE_SPECTASK
|
4
|
+
require 'spec/rake/verify_rcov'
|
4
5
|
|
5
6
|
namespace :spec do
|
6
7
|
|
7
8
|
desc 'Run all specs with basic output'
|
8
9
|
Spec::Rake::SpecTask.new(:run) do |t|
|
9
|
-
t.
|
10
|
-
t.
|
10
|
+
t.ruby_opts = PROJ.ruby_opts
|
11
|
+
t.spec_opts = PROJ.spec.opts
|
12
|
+
t.spec_files = PROJ.spec.files
|
13
|
+
t.libs += PROJ.libs
|
11
14
|
end
|
12
15
|
|
13
16
|
desc 'Run all specs with text output'
|
14
17
|
Spec::Rake::SpecTask.new(:specdoc) do |t|
|
15
|
-
t.
|
16
|
-
t.
|
18
|
+
t.ruby_opts = PROJ.ruby_opts
|
19
|
+
t.spec_opts = PROJ.spec.opts + ['--format', 'specdoc']
|
20
|
+
t.spec_files = PROJ.spec.files
|
21
|
+
t.libs += PROJ.libs
|
17
22
|
end
|
18
23
|
|
19
24
|
if HAVE_RCOV
|
20
25
|
desc 'Run all specs with RCov'
|
21
26
|
Spec::Rake::SpecTask.new(:rcov) do |t|
|
22
|
-
t.
|
23
|
-
t.
|
27
|
+
t.ruby_opts = PROJ.ruby_opts
|
28
|
+
t.spec_opts = PROJ.spec.opts
|
29
|
+
t.spec_files = PROJ.spec.files
|
30
|
+
t.libs += PROJ.libs
|
24
31
|
t.rcov = true
|
25
|
-
t.
|
32
|
+
t.rcov_dir = PROJ.rcov.dir
|
33
|
+
t.rcov_opts = PROJ.rcov.opts + ['--exclude', 'spec']
|
26
34
|
end
|
35
|
+
|
36
|
+
RCov::VerifyTask.new(:verify) do |t|
|
37
|
+
t.threshold = PROJ.rcov.threshold
|
38
|
+
t.index_html = File.join(PROJ.rcov.dir, 'index.html')
|
39
|
+
t.require_exact_threshold = PROJ.rcov.threshold_exact
|
40
|
+
end
|
41
|
+
|
42
|
+
task :verify => :rcov
|
43
|
+
remove_desc_for_task %w(spec:clobber_rcov)
|
27
44
|
end
|
28
45
|
|
29
46
|
end # namespace :spec
|
@@ -33,8 +50,6 @@ task :spec => 'spec:run'
|
|
33
50
|
|
34
51
|
task :clobber => 'spec:clobber_rcov' if HAVE_RCOV
|
35
52
|
|
36
|
-
remove_desc_for_task %w(spec:clobber_rcov)
|
37
|
-
|
38
53
|
end # if HAVE_SPEC_RAKE_SPECTASK
|
39
54
|
|
40
55
|
# EOF
|
data/tasks/svn.rake
CHANGED
@@ -1,32 +1,36 @@
|
|
1
1
|
# $Id$
|
2
2
|
|
3
|
+
if HAVE_SVN
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
unless PROJ.svn_root
|
5
|
+
unless PROJ.svn.root
|
7
6
|
info = %x/svn info ./
|
8
7
|
m = %r/^Repository Root:\s+(.*)$/.match(info)
|
9
|
-
PROJ.
|
8
|
+
PROJ.svn.root = (m.nil? ? '' : m[1])
|
10
9
|
end
|
11
|
-
PROJ.
|
10
|
+
PROJ.svn.root = File.join(PROJ.svn.root, PROJ.svn.path) unless PROJ.svn.path.empty?
|
12
11
|
|
13
12
|
namespace :svn do
|
14
13
|
|
14
|
+
# A prerequisites task that all other tasks depend upon
|
15
|
+
task :prereqs
|
16
|
+
|
15
17
|
desc 'Show tags from the SVN repository'
|
16
|
-
task :show_tags do |t|
|
17
|
-
tags = %x/svn list #{File.join(PROJ.
|
18
|
+
task :show_tags => 'svn:prereqs' do |t|
|
19
|
+
tags = %x/svn list #{File.join(PROJ.svn.root, PROJ.svn.tags)}/
|
18
20
|
tags.gsub!(%r/\/$/, '')
|
21
|
+
tags = tags.split("\n").sort {|a,b| b <=> a}
|
19
22
|
puts tags
|
20
23
|
end
|
21
24
|
|
22
25
|
desc 'Create a new tag in the SVN repository'
|
23
|
-
task :create_tag do |t|
|
26
|
+
task :create_tag => 'svn:prereqs' do |t|
|
24
27
|
v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z'
|
25
28
|
abort "Versions don't match #{v} vs #{PROJ.version}" if v != PROJ.version
|
26
29
|
|
27
|
-
|
30
|
+
svn = PROJ.svn
|
31
|
+
trunk = File.join(svn.root, svn.trunk)
|
28
32
|
tag = "%s-%s" % [PROJ.name, PROJ.version]
|
29
|
-
tag = File.join(
|
33
|
+
tag = File.join(svn.root, svn.tags, tag)
|
30
34
|
msg = "Creating tag for #{PROJ.name} version #{PROJ.version}"
|
31
35
|
|
32
36
|
puts "Creating SVN tag '#{tag}'"
|
@@ -39,6 +43,6 @@ end # namespace :svn
|
|
39
43
|
|
40
44
|
task 'gem:release' => 'svn:create_tag'
|
41
45
|
|
42
|
-
end # if PROJ.svn
|
46
|
+
end # if PROJ.svn.path
|
43
47
|
|
44
48
|
# EOF
|
data/tasks/test.rake
CHANGED
@@ -6,23 +6,23 @@ namespace :test do
|
|
6
6
|
|
7
7
|
Rake::TestTask.new(:run) do |t|
|
8
8
|
t.libs = PROJ.libs
|
9
|
-
t.test_files = if test
|
10
|
-
else PROJ.
|
9
|
+
t.test_files = if test(?f, PROJ.test.file) then [PROJ.test.file]
|
10
|
+
else PROJ.test.files end
|
11
11
|
t.ruby_opts += PROJ.ruby_opts
|
12
|
-
t.ruby_opts += PROJ.
|
12
|
+
t.ruby_opts += PROJ.test.opts
|
13
13
|
end
|
14
14
|
|
15
15
|
if HAVE_RCOV
|
16
16
|
desc 'Run rcov on the unit tests'
|
17
17
|
task :rcov => :clobber_rcov do
|
18
|
-
opts = PROJ.
|
19
|
-
|
20
|
-
|
18
|
+
opts = PROJ.rcov.opts.dup << '-o' << PROJ.rcov.dir
|
19
|
+
opts = opts.join(' ')
|
20
|
+
files = if test(?f, PROJ.test.file) then [PROJ.test.file]
|
21
|
+
else PROJ.test.files end
|
21
22
|
files = files.join(' ')
|
22
23
|
sh "#{RCOV} #{files} #{opts}"
|
23
24
|
end
|
24
25
|
|
25
|
-
desc 'Remove rcov products'
|
26
26
|
task :clobber_rcov do
|
27
27
|
rm_r 'coverage' rescue nil
|
28
28
|
end
|
@@ -35,6 +35,4 @@ task :test => 'test:run'
|
|
35
35
|
|
36
36
|
task :clobber => 'test:clobber_rcov' if HAVE_RCOV
|
37
37
|
|
38
|
-
remove_desc_for_task %w(test:clobber_rcov)
|
39
|
-
|
40
38
|
# EOF
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dokkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrea Fazzi
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-08-
|
12
|
+
date: 2008-08-22 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -28,7 +28,7 @@ dependencies:
|
|
28
28
|
requirements:
|
29
29
|
- - ">="
|
30
30
|
- !ruby/object:Gem::Version
|
31
|
-
version:
|
31
|
+
version: 0.8.1
|
32
32
|
version:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: maruku
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: "0"
|
41
41
|
version:
|
42
|
-
description: "
|
42
|
+
description: "With dokkit you can: * generate static websites * generate many types of documents in many formats * write your documents using a simple wiki syntax and obtain high quality output (with pdflatex) * generate different output formats from the same source document * use models to quickly generate the documents you want (technical report, howto, guides, presentation, website, etc.) * simply derive new documentation models from the existing ones * simply modify existing models to fit your needs For more information about dokkit visit the website[http://dokkit.rubyforge.org/]"
|
43
43
|
email: andrea.fazzi@alca.le.it
|
44
44
|
executables:
|
45
45
|
- dokkit
|
@@ -61,6 +61,7 @@ files:
|
|
61
61
|
- lib/dokkit/cache/cache.rb
|
62
62
|
- lib/dokkit/environment.rb
|
63
63
|
- lib/dokkit/environment/basic.rb
|
64
|
+
- lib/dokkit/environment/container.rb
|
64
65
|
- lib/dokkit/environment/helpers.rb
|
65
66
|
- lib/dokkit/environment/helpers/extmap.rb
|
66
67
|
- lib/dokkit/environment/helpers/fileselection.rb
|
@@ -73,6 +74,7 @@ files:
|
|
73
74
|
- lib/dokkit/filters/maruku.rb
|
74
75
|
- lib/dokkit/filters/nil.rb
|
75
76
|
- lib/dokkit/filters/tidy.rb
|
77
|
+
- lib/dokkit/filters/yaml.rb
|
76
78
|
- lib/dokkit/hash.rb
|
77
79
|
- lib/dokkit/logging.rb
|
78
80
|
- lib/dokkit/logging/logger.rb
|
@@ -87,6 +89,7 @@ files:
|
|
87
89
|
- lib/dokkit/resource/extensions/url.rb
|
88
90
|
- lib/dokkit/resource/filenamehelper.rb
|
89
91
|
- lib/dokkit/tasklib.rb
|
92
|
+
- lib/dokkit/tasklib/base.rb
|
90
93
|
- lib/dokkit/tasklib/clean.rb
|
91
94
|
- lib/dokkit/tasklib/render.rb
|
92
95
|
- lib/models/simple/Rakefile
|
@@ -98,10 +101,14 @@ files:
|
|
98
101
|
- lib/models/simple/doc/layouts/simple.text
|
99
102
|
- lib/models/simple/doc/pages/simple.deplate
|
100
103
|
- lib/models/simple/setup/setup.rb
|
101
|
-
- tasks/
|
102
|
-
- tasks/
|
104
|
+
- tasks/ann.rake
|
105
|
+
- tasks/bones.rake
|
103
106
|
- tasks/gem.rake
|
107
|
+
- tasks/git.rake
|
104
108
|
- tasks/manifest.rake
|
109
|
+
- tasks/notes.rake
|
110
|
+
- tasks/post_load.rake
|
111
|
+
- tasks/rdoc.rake
|
105
112
|
- tasks/rubyforge.rake
|
106
113
|
- tasks/setup.rb
|
107
114
|
- tasks/spec.rake
|
@@ -133,6 +140,6 @@ rubyforge_project: dokkit
|
|
133
140
|
rubygems_version: 1.1.1
|
134
141
|
signing_key:
|
135
142
|
specification_version: 2
|
136
|
-
summary: dokkit is an open source document generator
|
143
|
+
summary: dokkit is an open source document generator that is suitable for static website generation too.
|
137
144
|
test_files: []
|
138
145
|
|
data/tasks/annotations.rake
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
# $Id$
|
2
|
-
|
3
|
-
if HAVE_BONES
|
4
|
-
|
5
|
-
desc "Enumerate all annotations"
|
6
|
-
task :notes do
|
7
|
-
Bones::AnnotationExtractor.enumerate(
|
8
|
-
PROJ, "OPTIMIZE|FIXME|TODO", :tag => true)
|
9
|
-
end
|
10
|
-
|
11
|
-
namespace :notes do
|
12
|
-
desc "Enumerate all OPTIMIZE annotations"
|
13
|
-
task :optimize do
|
14
|
-
Bones::AnnotationExtractor.enumerate(PROJ, "OPTIMIZE")
|
15
|
-
end
|
16
|
-
|
17
|
-
desc "Enumerate all FIXME annotations"
|
18
|
-
task :fixme do
|
19
|
-
Bones::AnnotationExtractor.enumerate(PROJ, "FIXME")
|
20
|
-
end
|
21
|
-
|
22
|
-
desc "Enumerate all TODO annotations"
|
23
|
-
task :todo do
|
24
|
-
Bones::AnnotationExtractor.enumerate(PROJ, "TODO")
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
end # if HAVE_BONES
|
29
|
-
|
30
|
-
# EOF
|