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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b44ec3dc5c9c5da7b79fbdb147e7a15b224aae67
4
- data.tar.gz: 1e7f8629084e2436b3f9378e5b9ecd93b2a88803
3
+ metadata.gz: 86ce6b8dccc7db97c4702df3cca0c68e38019d67
4
+ data.tar.gz: 82516e1b2c6a5c551b1b0e4da94f5fbd8ed4ec8f
5
5
  SHA512:
6
- metadata.gz: ee3c7b0a2466f87941aee01ed2db3a7740578b5225923e416089c03d887adf5e9a83a6dbb48e4dde353e6b6faddc6bdb299866c1f326286464d48ce728e7a779
7
- data.tar.gz: 79af591e6902a2ed5cf800a727d92a1b010829c2cb4f087d18c00692c7ccc65441ad73b33d78c11b0fb8a258b1f34a1f6da654f7c6b3380d200d81354fb51d59
6
+ metadata.gz: 1f2674026f2486a7143d95485aa1d8adb54a2df87534fd132cf6e2da848555ca4a5f9c0490bb23d78e1a4ff22eb3f020b05e0837108ff9008900365e619e60d7
7
+ data.tar.gz: 34b88203f7e8f3a6201ba52571e6905ed5f5d416090451e1f28dfd6c20bcb1996d7001fb856f5a8c7a3b483cee85f81ba588df0e583565d334b49ef22e06254b
@@ -1,4 +1,6 @@
1
1
  language: ruby
2
+ rvm:
3
+ - 2.2.2
2
4
  cache: bundler
3
5
  branches:
4
6
  only:
@@ -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/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
@@ -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
- if !File.exists?(File.join(site.dest, "uml/#{name}.svg"))
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
@@ -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.2'
24
+ VERSION = '1.3'
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-plantuml
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.2'
4
+ version: '1.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko