logstash/logstash — pull request #62 by crankycoder (2011-10-28 00:58:25+00:00)
Title: first pull request ever

Hi guys,

This is my first pull request ever - not quite sure if I'm doing this right.

Sorry for the long list of commits, this is also the first time I've used git for anything.

Mostly, this patch fixes the test command so that I can do stuff like this:

$ java -jar lib/logstash-1.1.0beta4-monolithic.jar test --pluginpath src

Summary of changes:

1) added ffi-rzmq for 0mq support
2) added ruby-debug so that i can run a debugger in my plugins as I'm doing development
3) extended the 'test' command to take an optional --pluginpath argument to load input/filter/output plugins
4) the test command will also autohunt test cases in the specified pluginpath and add them to the test suite
5) I removed the logger assignment in filters/grok to the Grok Pile - this was causing test failures for me as the logger doesn't actually exist
6) skipped 2 tests which assume PDT for datetime stamps which do not specify a timezone. I didn't know what should be considered 'correct' behavior - I think it's largely a matter of taste. My personal preference is that no timezone should default to UTC.
7) added mocha for mock testing

I've added mocha for mocks testing. It seems to work pretty decently for me, and we're using it now to do unittests on the plugins in logstash-metlog.

The actual 0mq input plugin is in my logstash-metlog project, but we haven't finished doing heavy testing on it yet, but I think the changes in this pull request are mostly 'ok'.