mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Merge pull request #1223 from colinsurprenant/markdown
replace bluecloth with kramdown pure-ruby markdown parser
This commit is contained in:
commit
e1bd6a1365
3 changed files with 28 additions and 25 deletions
27
Makefile
27
Makefile
|
@ -8,7 +8,7 @@ ELASTICSEARCH_VERSION=1.0.1
|
|||
WITH_JRUBY=java -jar $(shell pwd)/$(JRUBY) -S
|
||||
JRUBY=vendor/jar/jruby-complete-$(JRUBY_VERSION).jar
|
||||
JRUBY_URL=http://jruby.org.s3.amazonaws.com/downloads/$(JRUBY_VERSION)/jruby-complete-$(JRUBY_VERSION).jar
|
||||
JRUBY_CMD=java -jar $(JRUBY)
|
||||
JRUBY_CMD=bin/logstash env java -jar $(JRUBY)
|
||||
|
||||
ELASTICSEARCH_URL=http://download.elasticsearch.org/elasticsearch/elasticsearch
|
||||
ELASTICSEARCH=vendor/jar/elasticsearch-$(ELASTICSEARCH_VERSION)
|
||||
|
@ -138,7 +138,7 @@ vendor/jar: | vendor
|
|||
vendor-jruby: $(JRUBY)
|
||||
|
||||
$(JRUBY): | vendor/jar
|
||||
$(QUIET)echo " ==> Downloading jruby $(JRUBY_VERSION)"
|
||||
$(QUIET)echo "=> Downloading jruby $(JRUBY_VERSION)"
|
||||
$(QUIET)$(DOWNLOAD_COMMAND) $@ $(JRUBY_URL)
|
||||
|
||||
vendor/jar/elasticsearch-$(ELASTICSEARCH_VERSION).tar.gz: | wget-or-curl vendor/jar
|
||||
|
@ -218,10 +218,14 @@ vendor/ua-parser/regexes.yaml: | vendor/ua-parser/
|
|||
$(QUIET)$(DOWNLOAD_COMMAND) $@ https://raw.github.com/tobie/ua-parser/master/regexes.yaml
|
||||
|
||||
.PHONY: test
|
||||
test: | $(JRUBY) vendor-elasticsearch vendor-geoip vendor-collectd
|
||||
GEM_HOME= GEM_PATH= bin/logstash deps
|
||||
GEM_HOME= GEM_PATH= bin/logstash rspec --order rand --fail-fast $(TESTS)
|
||||
test: QUIET_OUTPUT=
|
||||
test: | $(JRUBY) vendor-elasticsearch vendor-geoip vendor-collectd vendor-gems
|
||||
$(SPEC_ENV) bin/logstash rspec $(SPEC_OPTS) --order rand --fail-fast $(TESTS)
|
||||
|
||||
.PHONY: reporting-test
|
||||
reporting-test: SPEC_ENV=JRUBY_OPTS=--debug COVERAGE=TRUE
|
||||
reporting-test: SPEC_OPTS=--format CI::Reporter::RSpec
|
||||
reporting-test: | test
|
||||
|
||||
.PHONY: docs
|
||||
docs: docgen doccopy docindex
|
||||
|
@ -256,21 +260,20 @@ 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)$(JRUBY_CMD) docs/docgen.rb -o build/docs $<
|
||||
$(QUIET)sed -i -e 's/%VERSION%/$(VERSION)/g' $@
|
||||
$(QUIET)sed -i -e 's/%ELASTICSEARCH_VERSION%/$(ELASTICSEARCH_VERSION)/g' $@
|
||||
build/docs/filters/%.html: lib/logstash/filters/%.rb docs/docgen.rb docs/plugin-doc.html.erb | build/docs/filters
|
||||
$(QUIET)ruby docs/docgen.rb -o build/docs $<
|
||||
$(QUIET)$(JRUBY_CMD) docs/docgen.rb -o build/docs $<
|
||||
$(QUIET)sed -i -e 's/%VERSION%/$(VERSION)/g' $@
|
||||
$(QUIET)sed -i -e 's/%ELASTICSEARCH_VERSION%/$(ELASTICSEARCH_VERSION)/g' $@
|
||||
build/docs/outputs/%.html: lib/logstash/outputs/%.rb docs/docgen.rb docs/plugin-doc.html.erb | build/docs/outputs
|
||||
$(QUIET)ruby docs/docgen.rb -o build/docs $<
|
||||
$(QUIET)$(JRUBY_CMD) docs/docgen.rb -o build/docs $<
|
||||
$(QUIET)sed -i -e 's/%VERSION%/$(VERSION)/g' $@
|
||||
$(QUIET)sed -i -e 's/%ELASTICSEARCH_VERSION%/$(ELASTICSEARCH_VERSION)/g' $@
|
||||
build/docs/codecs/%.html: lib/logstash/codecs/%.rb docs/docgen.rb docs/plugin-doc.html.erb | build/docs/codecs
|
||||
$(QUIET)ruby docs/docgen.rb -o build/docs $<
|
||||
$(QUIET)$(JRUBY_CMD) docs/docgen.rb -o build/docs $<
|
||||
$(QUIET)sed -i -e 's/%VERSION%/$(VERSION)/g' $@
|
||||
|
||||
build/docs/%: docs/% lib/logstash/version.rb Makefile
|
||||
|
@ -288,7 +291,7 @@ build/docs/%: docs/% lib/logstash/version.rb Makefile
|
|||
build/docs/index.html: $(addprefix build/docs/,$(subst lib/logstash/,,$(subst .rb,.html,$(PLUGIN_FILES))))
|
||||
build/docs/index.html: docs/generate_index.rb lib/logstash/version.rb docs/index.html.erb Makefile
|
||||
@echo "Building documentation index.html"
|
||||
$(QUIET)ruby $< build/docs > $@
|
||||
$(QUIET)$(JRUBY_CMD) $< build/docs > $@
|
||||
$(QUIET)sed -i -e 's/%VERSION%/$(VERSION)/g' $@
|
||||
$(QUIET)sed -i -e 's/%ELASTICSEARCH_VERSION%/$(ELASTICSEARCH_VERSION)/g' $@
|
||||
|
||||
|
@ -329,7 +332,7 @@ JIRA_VERSION_ID=10820
|
|||
releaseNote:
|
||||
-$(QUIET)rm releaseNote.html
|
||||
$(QUIET)curl -si "https://logstash.jira.com/secure/ReleaseNote.jspa?version=$(JIRA_VERSION_ID)&projectId=10020" | sed -n '/<textarea.*>/,/<\/textarea>/p' | grep textarea -v >> releaseNote.html
|
||||
$(QUIET)ruby pull_release_note.rb
|
||||
$(QUIET)$(JRUBY_CMD) pull_release_note.rb
|
||||
|
||||
package: build/logstash-$(VERSION).tar.gz
|
||||
(cd pkg; \
|
||||
|
|
|
@ -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