dokkit 0.4.4 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.spec_opts = PROJ.spec_opts
10
- t.spec_files = PROJ.specs
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.spec_opts = PROJ.spec_opts + ['--format', 'specdoc']
16
- t.spec_files = PROJ.specs
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.spec_opts = PROJ.spec_opts
23
- t.spec_files = PROJ.specs
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.rcov_opts = PROJ.rcov_opts + ['--exclude', 'spec']
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
@@ -1,32 +1,36 @@
1
1
  # $Id$
2
2
 
3
+ if HAVE_SVN
3
4
 
4
- if PROJ.svn and system("svn --version 2>&1 > #{DEV_NULL}")
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.svn_root = (m.nil? ? '' : m[1])
8
+ PROJ.svn.root = (m.nil? ? '' : m[1])
10
9
  end
11
- PROJ.svn_root = File.join(PROJ.svn_root, PROJ.svn) if String === PROJ.svn
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.svn_root, PROJ.svn_tags)}/
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
- trunk = File.join(PROJ.svn_root, PROJ.svn_trunk)
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(PROJ.svn_root, PROJ.svn_tags, tag)
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
@@ -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 ?f, PROJ.test_file then [PROJ.test_file]
10
- else PROJ.tests end
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.test_opts
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.rcov_opts.join(' ')
19
- files = if test ?f, PROJ.test_file then [PROJ.test_file]
20
- else PROJ.tests end
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.4
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-10 00:00:00 +00:00
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: "0"
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: "== DESCRIPTION: dokkit is a document generator. It was inspired by rote but now it is completely independent from it. dokkit uses filters like deplate and maruku to generate output in a large variety of formats (tex, html, docbook, plain text, ...)."
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/annotations.rake
102
- - tasks/doc.rake
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
 
@@ -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