Skip to content

Commit

Permalink
change name
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienAndreo committed Jan 8, 2019
1 parent 1f134c8 commit ba1cd5c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
17 changes: 9 additions & 8 deletions jekyll-plantuml.gemspec → jekyll-plantumlext.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.rubygems_version = '2.2.2'
s.required_ruby_version = '>= 1.9.3'
s.name = 'jekyll-plantuml'
s.version = PlantUML::VERSION
s.name = 'jekyll-plantumlext'
s.version = PlantUMLExt::VERSION
s.license = 'MIT'
s.summary = "Jekyll PlantUML Automation"
s.description = "PlantUML diagrams in Jekyll pages"
s.authors = ["Yegor Bugayenko"]
s.email = '[email protected]'
s.homepage = 'http://github.com/yegor256/jekyll-plantuml'
s.files = `git ls-files`.split($/)
s.summary = "Jekyll PlantUML Automation Extended"
s.description = "PlantUML diagrams in Jekyll pages with link support"
s.authors = ["Sébastien Andreo"]
s.email = '[email protected]'
s.homepage = 'https://github.com/SebastienAndreo/jekyll-plantuml'
#s.files = `git ls-files`.split($/)
s.files = `ls`.split($/)
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
s.test_files = s.files.grep(%r{^(test|spec|features)/})
s.rdoc_options = ["--charset=UTF-8"]
Expand Down
10 changes: 7 additions & 3 deletions lib/jekyll-plantuml.rb → lib/jekyll-plantumlext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
require 'fileutils'

module Jekyll
class PlantumlBlock < Liquid::Block
class PlantumlExtBlock < Liquid::Block
def initialize(tag_name, markup, tokens)
super
Jekyll.logger.debug "Do initialize"
@html = (markup or '').strip
end

Expand All @@ -39,6 +40,8 @@ def render(context)
if File.exists?(svg)
puts "File #{svg} already exists (#{File.size(svg)} bytes)"
else

Jekyll.logger.debug 'Do Something'
FileUtils.mkdir_p(File.dirname(uml))
File.open(uml, 'w') { |f|
f.write("@startuml\n")
Expand All @@ -52,9 +55,10 @@ def render(context)
puts "File #{svg} created (#{File.size(svg)} bytes)"
end
end
"<p><object data='#{site.baseurl}/uml/#{name}.svg' type="image/svg+xml" #{@html}></object></p>"
"<p><object data='#{site.baseurl}/uml/#{name}.svg' type='image/svg+xml' #{@html}></object></p>"
end
end
end

Liquid::Template.register_tag('plantuml', Jekyll::PlantumlBlock)
Jekyll.logger.debug 'Call Register tag'
Liquid::Template.register_tag('plantumlext', Jekyll::PlantumlExtBlock)
6 changes: 3 additions & 3 deletions lib/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# (The MIT License)
#
# Copyright (c) 2014-2017 Yegor Bugayenko
# Copyright (c) 2014-2019 Sébastien Andreo
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the 'Software'), to deal
Expand All @@ -20,6 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

module PlantUML
VERSION = '1.0.snapshot'
module PlantUMLExt
VERSION = '0.1'
end

0 comments on commit ba1cd5c

Please sign in to comment.