Local generation of html doc for pluggin?

is there a way to generate the html doc for an under development pluggin ?
I would like to check it before pushing it to git

regards

Eric

As an example, I will show you how to go about doing so with an existing plugin (logstash-input-jdbc)

  • make sure you have Logstash cloned locally.
git clone git@github.com:elastic/logstash.git
cd logstash
rake bootstrap
  • you will want to install your developmental plugin into this Logstash
# add this line to your Gemfile in the Logstash repo
gem "logstash-input-jdbc", :path => "/your/local/logstash-input-jdbc"
  • now, install the added plugin gem
# from logstash repo directory
rake vendor:gems
  • now that we have our desired plugin installed, we can use docgen to generate our asciidoc
# from logstash repo directory
bin/logstash docgen ./vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-1.0.0/lib/logstash/inputs/jdbc.rb > jdbc.asciidoc

this will output your documentation into a file called jdbc.asciidoc and you can view this using your favorite asciidoc previewer.

Let me know how that worked out for you!

thanks,

it worked smoothly.

with this minimal step.

build logstash from git clone and then

bin/logstash docgen /path/to/local/file/to/document/file.rb > doc.asciidoc

I just skipped the rake vendor:gems step.

ah, well I suppose that path can be arbitrary in that way.

there is also a -o flag for docgen to specify an output directory instead of outputing to standard out.

glad to see it worked out for you!