jekyll-plantuml 1.2 → 1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/LICENSE.txt +1 -1
- data/Rakefile +1 -1
- data/lib/jekyll-plantuml.rb +7 -4
- data/lib/version.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86ce6b8dccc7db97c4702df3cca0c68e38019d67
|
4
|
+
data.tar.gz: 82516e1b2c6a5c551b1b0e4da94f5fbd8ed4ec8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f2674026f2486a7143d95485aa1d8adb54a2df87534fd132cf6e2da848555ca4a5f9c0490bb23d78e1a4ff22eb3f020b05e0837108ff9008900365e619e60d7
|
7
|
+
data.tar.gz: 34b88203f7e8f3a6201ba52571e6905ed5f5d416090451e1f28dfd6c20bcb1996d7001fb856f5a8c7a3b483cee85f81ba588df0e583565d334b49ef22e06254b
|
data/.travis.yml
CHANGED
data/LICENSE.txt
CHANGED
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# (The MIT License)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014 Yegor Bugayenko
|
3
|
+
# Copyright (c) 2014-2016 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
data/lib/jekyll-plantuml.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# (The MIT License)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014 Yegor Bugayenko
|
3
|
+
# Copyright (c) 2014-2016 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -27,12 +27,14 @@ module Jekyll
|
|
27
27
|
class PlantumlBlock < Liquid::Block
|
28
28
|
def initialize(tag_name, markup, tokens)
|
29
29
|
super
|
30
|
+
@html = (markup or '').strip
|
30
31
|
end
|
31
32
|
|
32
33
|
def render(context)
|
33
34
|
site = context.registers[:site]
|
34
35
|
name = Digest::MD5.hexdigest(super)
|
35
|
-
|
36
|
+
file = File.join(site.dest, "uml/#{name}.svg")
|
37
|
+
if !File.exists?(file)
|
36
38
|
uml = File.join(site.source, "uml/#{name}.uml")
|
37
39
|
FileUtils.mkdir_p(File.dirname(uml))
|
38
40
|
File.open(uml, 'w') { |f|
|
@@ -44,9 +46,10 @@ module Jekyll
|
|
44
46
|
site.static_files << Jekyll::StaticFile.new(
|
45
47
|
site, site.source, 'uml', "#{name}.svg"
|
46
48
|
)
|
49
|
+
puts "File #{file} created (#{File.size(file)} bytes)"
|
47
50
|
end
|
48
|
-
"<p><img src='/uml/#{name}.svg'
|
49
|
-
alt='PlantUML diagram' class='plantuml'/></p>"
|
51
|
+
"<p><img src='/uml/#{name}.svg' #{@html}
|
52
|
+
alt='PlantUML SVG diagram' class='plantuml'/></p>"
|
50
53
|
end
|
51
54
|
end
|
52
55
|
end
|
data/lib/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# (The MIT License)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014 Yegor Bugayenko
|
3
|
+
# Copyright (c) 2014-2016 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -21,5 +21,5 @@
|
|
21
21
|
# SOFTWARE.
|
22
22
|
|
23
23
|
module PlantUML
|
24
|
-
VERSION = '1.
|
24
|
+
VERSION = '1.3'
|
25
25
|
end
|