mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
replace bluecloth with kramdown pure-ruby markdown parser
This commit is contained in:
parent
357b561acc
commit
86ca8a3791
3 changed files with 13 additions and 14 deletions
1
Makefile
1
Makefile
|
@ -256,7 +256,6 @@ build/docs/tutorials/getting-started-with-logstash.md: build/docs/tutorials/gett
|
|||
build/docs/tutorials/getting-started-with-logstash.xml: docs/tutorials/getting-started-with-logstash.asciidoc | build/docs/tutorials
|
||||
$(QUIET)asciidoc -b docbook -o $@ $<
|
||||
|
||||
# bluecloth gem doesn't work on jruby. Use ruby.
|
||||
build/docs/inputs/%.html: lib/logstash/inputs/%.rb docs/docgen.rb docs/plugin-doc.html.erb | build/docs/inputs
|
||||
$(QUIET)ruby docs/docgen.rb -o build/docs $<
|
||||
$(QUIET)sed -i -e 's/%VERSION%/$(VERSION)/g' $@
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require "rubygems"
|
||||
require "erb"
|
||||
require "optparse"
|
||||
require "bluecloth" # for markdown parsing
|
||||
require "kramdown" # markdown parser
|
||||
|
||||
$: << Dir.pwd
|
||||
$: << File.join(File.dirname(__FILE__), "..", "lib")
|
||||
|
@ -66,7 +66,7 @@ class LogStashConfigDocGenerator
|
|||
@class_description = @comments.join("\n")
|
||||
clear_comments
|
||||
end # def set_class_description
|
||||
|
||||
|
||||
def add_comment(comment)
|
||||
return if comment == "encoding: utf-8"
|
||||
@comments << comment
|
||||
|
@ -84,7 +84,7 @@ class LogStashConfigDocGenerator
|
|||
# are gone from logstash.
|
||||
name = name.to_s unless name.is_a?(Regexp)
|
||||
|
||||
description = BlueCloth.new(@comments.join("\n")).to_html
|
||||
description = Kramdown::Document.new(@comments.join("\n")).to_html
|
||||
@attributes[name][:description] = description
|
||||
clear_comments
|
||||
end # def add_config
|
||||
|
@ -175,7 +175,7 @@ class LogStashConfigDocGenerator
|
|||
mixin.downcase!
|
||||
parse(File.new(File.join(File.dirname(file), "..", "plugin_mixins", "#{mixin}.rb")).read)
|
||||
end
|
||||
|
||||
|
||||
parse(code)
|
||||
|
||||
puts "Generating docs for #{file}"
|
||||
|
@ -202,7 +202,7 @@ class LogStashConfigDocGenerator
|
|||
is_contrib_plugin = @contrib_list.include?(file)
|
||||
|
||||
# descriptions are assumed to be markdown
|
||||
description = BlueCloth.new(@class_description).to_html
|
||||
description = Kramdown::Document.new(@class_description).to_html
|
||||
|
||||
klass.get_config.each do |name, settings|
|
||||
@attributes[name].merge!(settings)
|
||||
|
@ -225,7 +225,7 @@ class LogStashConfigDocGenerator
|
|||
html.gsub!("%PLUGIN%", @name)
|
||||
out.puts(html)
|
||||
end
|
||||
else
|
||||
else
|
||||
puts template.result(binding)
|
||||
end
|
||||
end # def generate
|
||||
|
@ -235,7 +235,7 @@ end # class LogStashConfigDocGenerator
|
|||
if __FILE__ == $0
|
||||
opts = OptionParser.new
|
||||
settings = {}
|
||||
opts.on("-o DIR", "--output DIR",
|
||||
opts.on("-o DIR", "--output DIR",
|
||||
"Directory to output to; optional. If not specified,"\
|
||||
"we write to stdout.") do |val|
|
||||
settings[:output] = val
|
||||
|
|
|
@ -33,7 +33,7 @@ Gem::Specification.new do |gem|
|
|||
# Input/Output/Filter dependencies
|
||||
#TODO Can these be optional?
|
||||
gem.add_runtime_dependency "awesome_print" #(MIT license)
|
||||
gem.add_runtime_dependency "aws-sdk" #{Apache 2.0 license}
|
||||
gem.add_runtime_dependency "aws-sdk" #{Apache 2.0 license}
|
||||
gem.add_runtime_dependency "addressable" #(Apache 2.0 license)
|
||||
gem.add_runtime_dependency "extlib", ["0.9.16"] #(MIT license)
|
||||
gem.add_runtime_dependency "ffi" #(LGPL-3 license)
|
||||
|
@ -99,11 +99,11 @@ Gem::Specification.new do |gem|
|
|||
gem.add_runtime_dependency "rspec" #(MIT license)
|
||||
gem.add_runtime_dependency "insist", "1.0.0" #(Apache 2.0 license)
|
||||
gem.add_runtime_dependency "rumbster" # For faking smtp in email tests (Apache 2.0 license)
|
||||
|
||||
#Development Deps
|
||||
gem.add_development_dependency "coveralls"
|
||||
gem.add_development_dependency "bluecloth"
|
||||
|
||||
#Jenkins Deps
|
||||
# Development Deps
|
||||
gem.add_development_dependency "coveralls"
|
||||
gem.add_development_dependency "kramdown" # pure-ruby markdown parser (MIT license)
|
||||
|
||||
# Jenkins Deps
|
||||
gem.add_runtime_dependency "ci_reporter"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue