hermann/spec
R. Tyler Croy 9bfd7ad2e6 Tie Hermann::Result#value to the underlying reactor to bring values up to Ruby
This ensures that we're getting async values out of librdkafka into the calling
Ruby thread. Currently errors aren't being brought up properly, but we're getting there

Example:

    [14:47:30] tyler:Hermann git:(issues/11-producer-feedback*) $ pry -I lib -r 'hermann/producer'
    [1] pry(main)> p = Hermann::Producer.new('topic', 'kafka0.REDACTED.com:6667')
    => #<Hermann::Producer:0x00000803b3b450
    @brokers="kafka0.REDACTED.com:6667",
    @children=[],
    @internal=#<Hermann::Lib::Producer:0x00000803b3b3d8>,
    @topic="topic">
    [2] pry(main)> r = p.push('hello world!')
    => #<Hermann::Result:0x00000803b8cb20
    @producer=
    #<Hermann::Producer:0x00000803b3b450
    @brokers="kafka0.REDACTED.com:6667",
    @children=[#<Hermann::Result:0x00000803b8cb20 ...>],
    @internal=#<Hermann::Lib::Producer:0x00000803b3b3d8>,
    @topic="topic">,
    @reason=nil,
    @state=:unfulfilled,
    @value=nil>
    [3] pry(main)> r.state
    => :unfulfilled
    [4] pry(main)> r.value
    ticking rdkafka reactor
    ticked
    => "hello world!"
    [5] pry(main)> r.state
    => :fulfilled
    [6] pry(main)> r.rejected?
    => false
    [7] pry(main)>
    [14:47:56] tyler:Hermann git:(issues/11-producer-feedback*) $

Fixes #11
2014-09-04 14:51:41 -07:00
..
hermann_lib An initial pass at exposign the asynchronous nature of librdkafka up into Ruby 2014-09-03 14:19:09 -07:00
consumer_spec.rb Properly raise an exception when the consumer is given an empty topic 2014-08-30 15:30:11 -07:00
hermann_spec.rb Add some basic test cases to make sure that at least the library is getting loaded 2014-08-28 16:20:46 -07:00
producer_spec.rb Tie Hermann::Result#value to the underlying reactor to bring values up to Ruby 2014-09-04 14:51:41 -07:00
result_spec.rb Tie Hermann::Result#value to the underlying reactor to bring values up to Ruby 2014-09-04 14:51:41 -07:00
spec_helper.rb Default to documentation format 2014-08-28 21:17:44 -07:00