double_doc 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/double_doc/html_generator.rb +2 -8
- data/lib/double_doc/task.rb +2 -2
- data/lib/double_doc/version.rb +1 -1
- data/test/html_generator_test.rb +0 -4
- metadata +108 -71
@@ -41,7 +41,6 @@ module DoubleDoc
|
|
41
41
|
generated_files << dst
|
42
42
|
end
|
43
43
|
|
44
|
-
clean_other_files(generated_files)
|
45
44
|
end
|
46
45
|
|
47
46
|
def sitemap
|
@@ -73,8 +72,8 @@ module DoubleDoc
|
|
73
72
|
end
|
74
73
|
|
75
74
|
def copy_assets
|
76
|
-
if @stylesheet
|
77
|
-
FileUtils.cp(
|
75
|
+
if @stylesheet
|
76
|
+
FileUtils.cp(@stylesheet, @output_directory)
|
78
77
|
end
|
79
78
|
end
|
80
79
|
|
@@ -82,11 +81,6 @@ module DoubleDoc
|
|
82
81
|
@template ||= Erubis::Eruby.new(File.read(@template_file))
|
83
82
|
end
|
84
83
|
|
85
|
-
def clean_other_files(except)
|
86
|
-
files_to_delete = Dir.glob(@output_directory + '**/*') - except.map(&:to_s)
|
87
|
-
FileUtils.rm_rf(files_to_delete)
|
88
|
-
end
|
89
|
-
|
90
84
|
def self.convert_links_to_html!(markdown)
|
91
85
|
markdown.gsub!(/(\[[^\]]+\]\([^\)]+)\.md([^\)]*)\)/) do |match|
|
92
86
|
$1 + '.html' + $2 + ')'
|
data/lib/double_doc/task.rb
CHANGED
@@ -56,7 +56,7 @@ module DoubleDoc
|
|
56
56
|
end
|
57
57
|
|
58
58
|
desc "Generate markdown #{html_dst ? 'and HTML ' : ''}DoubleDoc documentation from #{sources.join(', ')}"
|
59
|
-
|
59
|
+
generated_task = task(task_name => destinations) do |t, args|
|
60
60
|
import_handler = DoubleDoc::ImportHandler.new(options[:root] || Rake.original_dir)
|
61
61
|
|
62
62
|
generated_md_files = []
|
@@ -89,7 +89,7 @@ module DoubleDoc
|
|
89
89
|
git_branch = `git branch | grep "*"`.match(/\* (.*)/)[1] rescue 'master'
|
90
90
|
|
91
91
|
Dir.mktmpdir do |dir|
|
92
|
-
|
92
|
+
generated_task.execute(:html_destination => dir)
|
93
93
|
html_files = Dir.glob(Pathname.new(dir) + '*.html')
|
94
94
|
|
95
95
|
`git add .`
|
data/lib/double_doc/version.rb
CHANGED
data/test/html_generator_test.rb
CHANGED
@@ -43,9 +43,5 @@ describe "the html generator" do
|
|
43
43
|
output.must_match(/<a href="params.html\?foo=bar">params<\/a>/)
|
44
44
|
output.must_match(/<a href="params.html#foo-bar">params<\/a>/)
|
45
45
|
end
|
46
|
-
|
47
|
-
it "should clean the destination for other files" do
|
48
|
-
assert !File.exist?(@destination + 'some_trash.html'), 'did not clean the destination directory'
|
49
|
-
end
|
50
46
|
end
|
51
47
|
end
|
metadata
CHANGED
@@ -1,90 +1,118 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: double_doc
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 8
|
10
|
+
version: 1.0.8
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Mick Staugaard
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
requirement: &70252209375540 !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
17
|
+
|
18
|
+
date: 2012-03-12 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
22
21
|
type: :development
|
23
22
|
prerelease: false
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: minitest
|
27
|
-
requirement: &70252209375120 !ruby/object:Gem::Requirement
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
28
24
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
32
|
+
name: guard
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
33
35
|
type: :development
|
34
36
|
prerelease: false
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: rake
|
38
|
-
requirement: &70252209374700 !ruby/object:Gem::Requirement
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
38
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
46
|
+
name: minitest
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
44
49
|
type: :runtime
|
45
50
|
prerelease: false
|
46
|
-
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: erubis
|
49
|
-
requirement: &70252209374280 !ruby/object:Gem::Requirement
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
50
52
|
none: false
|
51
|
-
requirements:
|
52
|
-
- -
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
60
|
+
name: rake
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
55
63
|
type: :runtime
|
56
64
|
prerelease: false
|
57
|
-
|
58
|
-
- !ruby/object:Gem::Dependency
|
59
|
-
name: redcarpet
|
60
|
-
requirement: &70252209373780 !ruby/object:Gem::Requirement
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
61
66
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
hash: 3
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
version: "0"
|
74
|
+
name: erubis
|
75
|
+
version_requirements: *id004
|
76
|
+
- !ruby/object:Gem::Dependency
|
66
77
|
type: :runtime
|
67
78
|
prerelease: false
|
68
|
-
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: pygments.rb
|
71
|
-
requirement: &70252209373280 !ruby/object:Gem::Requirement
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
72
80
|
none: false
|
73
|
-
requirements:
|
81
|
+
requirements:
|
74
82
|
- - ~>
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
hash: 1
|
85
|
+
segments:
|
86
|
+
- 2
|
87
|
+
- 1
|
88
|
+
version: "2.1"
|
89
|
+
name: redcarpet
|
90
|
+
version_requirements: *id005
|
91
|
+
- !ruby/object:Gem::Dependency
|
77
92
|
type: :runtime
|
78
93
|
prerelease: false
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
94
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
95
|
+
none: false
|
96
|
+
requirements:
|
97
|
+
- - ~>
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
hash: 15
|
100
|
+
segments:
|
101
|
+
- 0
|
102
|
+
- 2
|
103
|
+
version: "0.2"
|
104
|
+
name: pygments.rb
|
105
|
+
version_requirements: *id006
|
106
|
+
description: A simple framework for writing and generating beautiful documentation for your code
|
107
|
+
email:
|
83
108
|
- mick@staugaard.com
|
84
109
|
executables: []
|
110
|
+
|
85
111
|
extensions: []
|
112
|
+
|
86
113
|
extra_rdoc_files: []
|
87
|
-
|
114
|
+
|
115
|
+
files:
|
88
116
|
- lib/double_doc/doc_extractor.rb
|
89
117
|
- lib/double_doc/html_generator.rb
|
90
118
|
- lib/double_doc/html_renderer.rb
|
@@ -102,29 +130,38 @@ files:
|
|
102
130
|
- test/test_helper.rb
|
103
131
|
homepage: http://staugaard.github.com/double_doc
|
104
132
|
licenses: []
|
133
|
+
|
105
134
|
post_install_message:
|
106
135
|
rdoc_options: []
|
107
|
-
|
136
|
+
|
137
|
+
require_paths:
|
108
138
|
- lib
|
109
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
139
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
110
140
|
none: false
|
111
|
-
requirements:
|
112
|
-
- -
|
113
|
-
- !ruby/object:Gem::Version
|
114
|
-
|
115
|
-
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
hash: 3
|
145
|
+
segments:
|
146
|
+
- 0
|
147
|
+
version: "0"
|
148
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
149
|
none: false
|
117
|
-
requirements:
|
118
|
-
- -
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
hash: 3
|
154
|
+
segments:
|
155
|
+
- 0
|
156
|
+
version: "0"
|
121
157
|
requirements: []
|
158
|
+
|
122
159
|
rubyforge_project:
|
123
|
-
rubygems_version: 1.8.
|
160
|
+
rubygems_version: 1.8.17
|
124
161
|
signing_key:
|
125
162
|
specification_version: 3
|
126
163
|
summary: Documentation right where you want it
|
127
|
-
test_files:
|
164
|
+
test_files:
|
128
165
|
- test/doc_extractor_test.rb
|
129
166
|
- test/html_generator_test.rb
|
130
167
|
- test/test_helper.rb
|