diff --git a/jekyll-plantuml.gemspec b/jekyll-plantumlext.gemspec similarity index 63% rename from jekyll-plantuml.gemspec rename to jekyll-plantumlext.gemspec index 8026a6d..2eb883c 100644 --- a/jekyll-plantuml.gemspec +++ b/jekyll-plantumlext.gemspec @@ -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 = 'yegor@tpc2.com' - 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 = 'sebastien@andreo.eu' + 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"] diff --git a/lib/jekyll-plantuml.rb b/lib/jekyll-plantumlext.rb similarity index 85% rename from lib/jekyll-plantuml.rb rename to lib/jekyll-plantumlext.rb index bbb71df..cb33779 100644 --- a/lib/jekyll-plantuml.rb +++ b/lib/jekyll-plantumlext.rb @@ -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 @@ -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") @@ -52,9 +55,10 @@ def render(context) puts "File #{svg} created (#{File.size(svg)} bytes)" end end - "

" + "

" end end end -Liquid::Template.register_tag('plantuml', Jekyll::PlantumlBlock) +Jekyll.logger.debug 'Call Register tag' +Liquid::Template.register_tag('plantumlext', Jekyll::PlantumlExtBlock) diff --git a/lib/version.rb b/lib/version.rb index 1e0b86e..54b97be 100644 --- a/lib/version.rb +++ b/lib/version.rb @@ -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 @@ -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