dokkit 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES ADDED
@@ -0,0 +1,12 @@
1
+ = Dokkit Changelog
2
+
3
+ == Version 0.1.1
4
+
5
+ This release add the implementation of a configuration system for project models based on YAML.
6
+
7
+ * First implementation of configuration system based on YAML.
8
+ * Added release support with MetaProject.
9
+
10
+ == Version 0.1.0
11
+
12
+ This is the first release of dokkit a Ruby Documentation ToolKit.
data/Rakefile CHANGED
@@ -8,55 +8,126 @@ rescue LoadError
8
8
  nil # optional
9
9
  end
10
10
 
11
- require 'rake'
11
+ $:.unshift('lib')
12
+ require 'meta_project'
13
+ require 'rake/gempackagetask'
14
+ require 'rake/contrib/rubyforgepublisher'
15
+ require 'rake/contrib/xforge'
12
16
  require 'rake/clean'
13
17
  require 'rake/testtask'
14
18
  require 'rake/rdoctask'
15
- require 'rake/gempackagetask'
16
19
 
17
- CLOBBER.include('html')
18
- CLOBBER.include('tex')
20
+ # Versioning scheme: MAJOR.MINOR.PATCH
21
+ # MAJOR bumps when API is broken backwards
22
+ # MINOR bumps when the API is broken backwards in a very slight/subtle (but not fatal) way
23
+ # -OR when a new release is made and propaganda is sent out.
24
+ # PATCH is bumped for every API addition and/or bugfix (ideally for every commit)
25
+ # Later DamageControl can bump PATCH automatically.
26
+ #
27
+ # REMEMBER TO KEEP PKG_VERSION IN SYNC WITH THE CHANGES FILE!
28
+ PKG_NAME = "dokkit"
29
+ PKG_VERSION = "0.1.1"
30
+ PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
31
+ PKG_FILES = FileList['lib/**/*', 'bin/*', '[A-Z]*', 'tests/*', 'tests/**/**'].exclude(/alca/).to_a
32
+
19
33
 
20
- Rake::RDocTask.new do |rd|
34
+ task :default => [:gem]
35
+
36
+ rd = Rake::RDocTask.new do |rd|
21
37
  rd.main = "README"
22
38
  rd.rdoc_files.include("README", "lib/**/*.rb", "tests/*.rb")
23
39
  rd.rdoc_dir = "apidoc"
24
40
  rd.options.push('-d').push('-F')
25
41
  end
26
42
 
27
- desc "Run basic tests"
28
- Rake::TestTask.new("test_units") { |t|
29
- t.pattern = 'tests/ts_*.rb'
30
- t.verbose = true
31
- #t.warning = true
32
- }
43
+ # ====================================================================
44
+ # Create a task that will package the Rake software into distributable
45
+ # tar, zip and gem files.
33
46
 
34
47
  spec = Gem::Specification.new do |s|
35
- s.platform = Gem::Platform::RUBY
36
- s.summary = "Ruby Documentation ToolKit."
37
- s.name = 'dokkit'
38
- s.version = '0.1.0'
39
-
40
- s.add_dependency('deplate', '>= 0.8')
41
- s.add_dependency('rote', '>= 0.3.2.2')
42
- s.add_dependency('rake')
43
- s.add_dependency('syntax')
48
+
49
+ #### Basic information.
44
50
 
45
- s.has_rdoc = true
46
- s.test_file = 'tests/gem_tests.rb'
51
+ s.name = PKG_NAME
52
+ s.version = PKG_VERSION
53
+ s.summary = "Ruby Documentation ToolKit"
54
+ s.description = <<-EOF
55
+ dokkit is an open source documentation environment based on ruby.
56
+ EOF
47
57
 
58
+ s.files = PKG_FILES.to_a
48
59
  s.require_path = 'lib'
49
60
  s.autorequire = 'dokkit'
50
- s.bindir = 'bin'
51
- s.executables << 'dokkit'
52
- s.extra_rdoc_files << 'README'
53
- s.files = FileList['lib/**/*', 'bin/*', '[A-Z]*', 'tests/*', 'tests/**/**'].exclude(/alca/).to_a
54
- s.description = <<-EOF
55
- Dokkit is a documentation toolkit based on Rote.
56
- EOF
61
+
62
+ #### Documentation and testing.
63
+
64
+ s.has_rdoc = true
65
+ s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
66
+ s.rdoc_options <<
67
+ '--title' << 'Dokkit' <<
68
+ '--main' << 'README' <<
69
+ '--line-numbers'
70
+
71
+ #### Author and project details.
72
+
73
+ s.author = "Andrea Fazzi"
74
+ s.email = "andrea.fazzi@alca.le.it"
75
+ s.homepage = "http://dokkit.rubyforge.org"
76
+ s.rubyforge_project = "dokkit"
57
77
  end
58
78
 
79
+ desc "Build Gem"
59
80
  Rake::GemPackageTask.new(spec) do |pkg|
60
81
  pkg.need_zip = true
61
82
  pkg.need_tar = true
62
- end
83
+ end
84
+
85
+ # Support Tasks ------------------------------------------------------
86
+
87
+ desc "Look for TODO and FIXME tags in the code"
88
+ task :todo do
89
+ Pathname.new(File.dirname(__FILE__)).egrep(/#.*(FIXME|TODO|TBD|DEPRECATED)/) do |match|
90
+ puts match
91
+ end
92
+ end
93
+
94
+ task :release => [:verify_env_vars, :release_files, :publish_doc, :publish_news]
95
+
96
+ task :verify_env_vars do
97
+ raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
98
+ raise "RUBYFORGE_PASSWORD environment variable not set!" unless ENV['RUBYFORGE_PASSWORD']
99
+ end
100
+
101
+ task :publish_doc do
102
+ publisher = Rake::RubyForgePublisher.new('dokkit', ENV['RUBYFORGE_USER'])
103
+ publisher.upload
104
+ end
105
+
106
+ desc "Release files on RubyForge"
107
+ task :release_files => [:gem] do
108
+ release_files = FileList[
109
+ "pkg/#{PKG_FILE_NAME}.gem"
110
+ ]
111
+
112
+ Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new('dokkit')) do |release|
113
+ # Never hardcode user name and password in the Rakefile!
114
+ release.user_name = ENV['RUBYFORGE_USER']
115
+ release.password = ENV['RUBYFORGE_PASSWORD']
116
+ release.files = release_files.to_a
117
+ release.release_name = "#{PKG_NAME} #{PKG_VERSION}"
118
+ # The rest of the options are defaults (among others, release_notes and release_changes, parsed from CHANGES)
119
+ end
120
+ end
121
+
122
+ desc "Publish news on RubyForge"
123
+ task :publish_news => [:gem] do
124
+ release_files = FileList[
125
+ "pkg/#{PKG_FILE_NAME}.gem"
126
+ ]
127
+
128
+ Rake::XForge::NewsPublisher.new(MetaProject::Project::XForge::RubyForge.new('dokkit')) do |news|
129
+ # Never hardcode user name and password in the Rakefile!
130
+ news.user_name = ENV['RUBYFORGE_USER']
131
+ news.password = ENV['RUBYFORGE_PASSWORD']
132
+ end
133
+ end
data/Rakefile.old ADDED
@@ -0,0 +1,62 @@
1
+ # Standard Rakefile for custom Dokkit build
2
+ #
3
+ #
4
+
5
+ begin
6
+ require 'rubygems'
7
+ rescue LoadError
8
+ nil # optional
9
+ end
10
+
11
+ require 'rake'
12
+ require 'rake/clean'
13
+ require 'rake/testtask'
14
+ require 'rake/rdoctask'
15
+ require 'rake/gempackagetask'
16
+
17
+ CLOBBER.include('html')
18
+ CLOBBER.include('tex')
19
+
20
+ Rake::RDocTask.new do |rd|
21
+ rd.main = "README"
22
+ rd.rdoc_files.include("README", "lib/**/*.rb", "tests/*.rb")
23
+ rd.rdoc_dir = "apidoc"
24
+ rd.options.push('-d').push('-F')
25
+ end
26
+
27
+ desc "Run basic tests"
28
+ Rake::TestTask.new("test_units") { |t|
29
+ t.pattern = 'tests/ts_*.rb'
30
+ t.verbose = true
31
+ #t.warning = true
32
+ }
33
+
34
+ spec = Gem::Specification.new do |s|
35
+ s.platform = Gem::Platform::RUBY
36
+ s.summary = "Ruby Documentation ToolKit."
37
+ s.name = 'dokkit'
38
+ s.version = '0.1.0'
39
+
40
+ s.add_dependency('deplate', '>= 0.8')
41
+ s.add_dependency('rote', '>= 0.3.2.2')
42
+ s.add_dependency('rake')
43
+ s.add_dependency('syntax')
44
+
45
+ s.has_rdoc = true
46
+ s.test_file = 'tests/gem_tests.rb'
47
+
48
+ s.require_path = 'lib'
49
+ s.autorequire = 'dokkit'
50
+ s.bindir = 'bin'
51
+ s.executables << 'dokkit'
52
+ s.extra_rdoc_files << 'README'
53
+ s.files = FileList['lib/**/*', 'bin/*', '[A-Z]*', 'tests/*', 'tests/**/**'].exclude(/alca/).to_a
54
+ s.description = <<-EOF
55
+ Dokkit is a documentation toolkit based on Rote.
56
+ EOF
57
+ end
58
+
59
+ Rake::GemPackageTask.new(spec) do |pkg|
60
+ pkg.need_zip = true
61
+ pkg.need_tar = true
62
+ end
@@ -29,7 +29,7 @@ module Rote
29
29
  begin
30
30
  File.open(tfn, 'w+') do |f|
31
31
  # new page, run extension block, render out, throw away
32
- f << Page.new(fn,pages.dir,layout_dir,config_dir,&blk).render
32
+ f << Page.new(fn,pages.dir,layout_dir,config_dir || pages.dir,&blk).render
33
33
  end
34
34
  rescue => e
35
35
  # Oops... Unlink file and dump backtrace
@@ -13,7 +13,7 @@ module Rote
13
13
 
14
14
  class Page
15
15
 
16
- alias dokkitpage_initialize initialize
16
+ alias old_initialize initialize
17
17
 
18
18
  def initialize(template_name, pages_dir = '.', layout_dir = pages_dir, config_dir = pages_dir, &block)
19
19
 
@@ -29,7 +29,7 @@ module Rote
29
29
  @total_price = 0
30
30
  @vat_price = 0
31
31
 
32
- dokkitpage_initialize(template_name, pages_dir, layout_dir, config_dir, &block)
32
+ old_initialize(template_name, pages_dir, layout_dir, config_dir, &block)
33
33
  calc_prices
34
34
  end
35
35
 
@@ -1,3 +1,3 @@
1
- title: Techinical Report
2
- author: john Doe
1
+ title: Technical Report
2
+ author: John Doe
3
3
 
@@ -47,22 +47,22 @@ ws = Rote::DocTask.new(:doc) do |site|
47
47
 
48
48
  site.ext_mapping(/thtml|textile/, 'html') do |page|
49
49
  page.extend Format::HTML
50
- page.page_filter Filters::RedCloth.new
50
+ page.page_filter Rote::Filters::RedCloth.new
51
51
  end
52
52
 
53
53
  site.ext_mapping(/mhtml|markdown/, 'html') do |page|
54
54
  page.extend Format::HTML
55
- page.page_filter Filters::BlueCloth.new
55
+ page.page_filter Rote::Filters::BlueCloth.new
56
56
  end
57
57
 
58
58
  site.ext_mapping(/rdhtml|rdoc/, 'html') do |page|
59
59
  page.extend Format::HTML
60
- page.page_filter Filters::RDoc.new
60
+ page.page_filter Rote::Filters::RDoc.new
61
61
  end
62
62
 
63
63
  site.ext_mapping(/dplhtml/, 'html') do |page|
64
64
  page.extend Format::HTML
65
- page.page_filter Dokkit::Filters::Deplate.new('html-snippet')
65
+ page.page_filter Dokkit::Filters::Deplate.new('html-notemplate')
66
66
  end
67
67
 
68
68
  site.ext_mapping(/html/, 'html') do |page|
metadata CHANGED
@@ -3,15 +3,15 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: dokkit
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.0
6
+ version: 0.1.1
7
7
  date: 2006-12-07 00:00:00 +01:00
8
- summary: Ruby Documentation ToolKit.
8
+ summary: Ruby Documentation ToolKit
9
9
  require_paths:
10
10
  - lib
11
- email:
12
- homepage:
13
- rubyforge_project:
14
- description: Dokkit is a documentation toolkit based on Rote.
11
+ email: andrea.fazzi@alca.le.it
12
+ homepage: http://dokkit.rubyforge.org
13
+ rubyforge_project: dokkit
14
+ description: dokkit is an open source documentation environment based on ruby.
15
15
  autorequire: dokkit
16
16
  default_executable:
17
17
  bindir: bin
@@ -25,8 +25,8 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
25
25
  platform: ruby
26
26
  signing_key:
27
27
  cert_chain:
28
- authors: []
29
-
28
+ authors:
29
+ - Andrea Fazzi
30
30
  files:
31
31
  - lib/dokkit
32
32
  - lib/dokkit.rb
@@ -99,7 +99,6 @@ files:
99
99
  - lib/dokkit/projects/website/doc
100
100
  - lib/dokkit/projects/website/Rakefile
101
101
  - lib/dokkit/projects/website/README
102
- - lib/dokkit/projects/website/html
103
102
  - lib/dokkit/projects/website/doc/pages
104
103
  - lib/dokkit/projects/website/doc/res
105
104
  - lib/dokkit/projects/website/doc/layouts
@@ -110,10 +109,6 @@ files:
110
109
  - lib/dokkit/projects/website/doc/res/images
111
110
  - lib/dokkit/projects/website/doc/res/images/rote-tiny.png
112
111
  - lib/dokkit/projects/website/doc/layouts/normal.thtml
113
- - lib/dokkit/projects/website/html/index.html
114
- - lib/dokkit/projects/website/html/deplate.html
115
- - lib/dokkit/projects/website/html/images
116
- - lib/dokkit/projects/website/html/images/rote-tiny.png
117
112
  - lib/dokkit/deplate/fmt
118
113
  - lib/dokkit/deplate/fmt/latex-notemplate.rb
119
114
  - lib/dokkit/deplate/fmt/html-notemplate.rb
@@ -124,54 +119,25 @@ files:
124
119
  - README
125
120
  - Rakefile
126
121
  - TODO
122
+ - Rakefile.old
123
+ - CHANGES
127
124
  - tests/gem_tests.rb
128
125
  - tests/test_filters.rb
129
- test_files:
130
- - tests/gem_tests.rb
131
- rdoc_options: []
126
+ test_files: []
132
127
 
128
+ rdoc_options:
129
+ - --title
130
+ - Dokkit
131
+ - --main
132
+ - README
133
+ - --line-numbers
133
134
  extra_rdoc_files:
134
135
  - README
135
- executables:
136
- - dokkit
136
+ executables: []
137
+
137
138
  extensions: []
138
139
 
139
140
  requirements: []
140
141
 
141
- dependencies:
142
- - !ruby/object:Gem::Dependency
143
- name: deplate
144
- version_requirement:
145
- version_requirements: !ruby/object:Gem::Version::Requirement
146
- requirements:
147
- - - ">="
148
- - !ruby/object:Gem::Version
149
- version: "0.8"
150
- version:
151
- - !ruby/object:Gem::Dependency
152
- name: rote
153
- version_requirement:
154
- version_requirements: !ruby/object:Gem::Version::Requirement
155
- requirements:
156
- - - ">="
157
- - !ruby/object:Gem::Version
158
- version: 0.3.2.2
159
- version:
160
- - !ruby/object:Gem::Dependency
161
- name: rake
162
- version_requirement:
163
- version_requirements: !ruby/object:Gem::Version::Requirement
164
- requirements:
165
- - - ">"
166
- - !ruby/object:Gem::Version
167
- version: 0.0.0
168
- version:
169
- - !ruby/object:Gem::Dependency
170
- name: syntax
171
- version_requirement:
172
- version_requirements: !ruby/object:Gem::Version::Requirement
173
- requirements:
174
- - - ">"
175
- - !ruby/object:Gem::Version
176
- version: 0.0.0
177
- version:
142
+ dependencies: []
143
+
@@ -1,21 +0,0 @@
1
- <div id="Table_of_Contents">
2
- <div id="Table_of_ContentsBlock" class="toc">
3
- <h1 class="toc">Table of Contents</h1>
4
- <ul class="toc">
5
- <li class="toc">
6
- <a href="#hd001" class="toc">1 Introduzione</a>
7
- </li>
8
- </ul>
9
- </div></div>
10
-
11
- <h1 id="hd001">1&nbsp;Introduzione</h1>
12
-
13
- Lista:
14
- <ul class="Itemize">
15
- <li class="Itemize dash">
16
- item 1
17
- </li>
18
- <li class="Itemize dash">
19
- item 2
20
- </li>
21
- </ul>
@@ -1,37 +0,0 @@
1
-
2
- <html>
3
- <head>
4
-
5
- <title>A sample page - My site</title>
6
- </head>
7
-
8
- <body>
9
- <h1>A sample page</h1>
10
-
11
-
12
- <p>This is a <strong>sample</strong> page.</p>
13
-
14
-
15
- <p>It has a very small image:
16
- <img src="images/rote-tiny.png" alt="" /></p>
17
-
18
-
19
- <p>(Which is the same as the one at the bottom)</p>
20
-
21
-
22
- <ul>
23
- <li>You should</li>
24
- <li>Replace this</li>
25
- <li>With your doc.</li>
26
- </ul>
27
-
28
- <p align='center'><hr width='80%'></p>
29
- <p align='right'>
30
- <span style='font-size: 8pt; color: #7c7c90'>Generated with</span><br/>
31
-
32
-
33
- <a href='http://rote.rubyforge.org/' target='_blank'><img src='images/rote-tiny.png' alt='Rote'/></a>
34
- </p>
35
- </body>
36
- </html>
37
-