dowl 0.6 → 0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dowl.rb +2 -1
- data/lib/dowl/generator.rb +5 -0
- data/lib/dowl/schema.rb +7 -5
- metadata +19 -3
data/lib/dowl.rb
CHANGED
data/lib/dowl/generator.rb
CHANGED
@@ -7,6 +7,11 @@ module DOWL
|
|
7
7
|
@schema = schema
|
8
8
|
if schema.introduction
|
9
9
|
@introduction = File.read(schema.introduction)
|
10
|
+
if schema.introduction.end_with?(".md")
|
11
|
+
renderer = Redcarpet::Render::HTML.new({})
|
12
|
+
markdown = Redcarpet::Markdown.new(renderer, {})
|
13
|
+
@introduction = markdown.render(@introduction)
|
14
|
+
end
|
10
15
|
end
|
11
16
|
end
|
12
17
|
|
data/lib/dowl/schema.rb
CHANGED
@@ -23,11 +23,13 @@ module DOWL
|
|
23
23
|
model.load!
|
24
24
|
|
25
25
|
dir = File.dirname(file)
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
26
|
+
if File.exists?(File.join(dir, "introduction.html"))
|
27
|
+
return Schema.new(model, File.join(dir, "introduction.html"))
|
28
|
+
elsif File.exists?( File.join(dir, "introduction.md"))
|
29
|
+
return Schema.new(model, File.join(dir, "introduction.md"))
|
30
|
+
else
|
31
|
+
return Schema.new(model)
|
32
|
+
end
|
31
33
|
end
|
32
34
|
|
33
35
|
def init()
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dowl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.7'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03
|
12
|
+
date: 2013-06-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mocha
|
@@ -43,7 +43,23 @@ dependencies:
|
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '1.0'
|
46
|
-
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: redcarpet
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 2.2.2
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.2.2
|
62
|
+
description: Generate simple HTML documentation for subset of RDFS/OWL
|
47
63
|
email: leigh@ldodds.com
|
48
64
|
executables:
|
49
65
|
- dowl
|