Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Jun 19, 2014
Commits on Jun 18, 2014
  1. Version bump

Commits on May 26, 2014
  1. Version bump

  2. Version bump

    Breaking changes:
      the #published signature for subscribers has changed to accept a
    single paramter, the event envelope, which contains the stream id, event
    data, and metadata
  3. Adds envelope concept to track metadata

    This allows for metadata to be introduced at a couple of points:
    * at publish, by passing metadata to the publish method of the DO
    * at session creation (passing metadata to repository load)
Commits on Apr 15, 2014
  1. Version bump

  2. Event routing support

    Observers can now actually receive messages
Commits on Apr 14, 2014
  1. Adding the basic router

  2. Add a little to the README

Commits on Apr 10, 2014
  1. Set a publish time on events

Commits on Apr 7, 2014
Commits on Apr 4, 2014
  1. Introducing repository

Commits on Apr 1, 2014
  1. Fleshing out the readme

Commits on Mar 30, 2014
  1. Merge pull request #3 from ntl/prepend_publisher_initialize

    Safely prepend Publisher initializers
  2. @ntl

    Lazy load ivars previously created in initializers

    ntl committed
    This prevents the initializers in the modules from colliding with
    initializers in the included class, but *without* using Module#prepend,
    which is not available in ruby 1.9 or current jruby.
  3. @ntl

    Safely prepend Publisher initializers

    ntl committed
    This change alters `Publisher` and `EventExaminer` to use
    `Module#prepend` to inject their initializers into the call chain. The
    intention is to allow classes that include `Publisher` to include their
    own `#initialize` method that still preserves the behavior of
        module Foo
          def initialize(*args)
            puts "Foo: #{args.inspect}"
        class A
          include Foo
          def initialize(arg)
            puts "A: #{arg}"
        class B
          prepend Foo
          def initilaize(arg)
            puts "B: #{arg}"
    In the case of `A`, since `Foo` is attached via `#include`, the
    initializer defined in `Foo` is essentially ignored:
        irb(main):046:0> :foo
        A: :foo
        => #<A:0x007fae191b4a08>
    However, in `B`, since `Foo` is attacted via `#prepend`, the initializer
    actually ends up behaving as if it were a superclass method of
        irb(main):045:0> :foo
        Foo: [:foo]
        B: :foo
        => #<B:0x007fae191bca28>
    This `#prepend` trick works well for your initializers that actually
    want to inject behavior during initialization, but ultimately stay out
    of the way of any `#initialize` defined by the consuming class.
    I ran into this when I tried including `Publisher` in a class that had
    an initializer with arguments; I was seeing a "1 for 0" `ArgumentError`.
    When I dug into the proofs, I noticed that `ReplayTest` does not
    actually have an `#initialize` method of its' own.
    My initial effort at producing a failing test was to subclass
    `ReplayTest` within the specific proof for testing custom initializers;
    however, subclassing overrode the faulty behavior and thus did not
    produce a failing test. Instead, I added a constructor argument to
    override the `pkey` attribute. It seemed like the least janky way to
    introduce a failing test. If I made the proofs worse, I can try and
    think of a better way to expose the problem I was trying to solve.
    It's worth noting that this change would break ruby 1.9, which does not
    have `Module#prepend`.
  4. Merge pull request #2 from ntl/default_rake_task

    Add default rake task to run proofs
Commits on Mar 29, 2014
  1. @ntl

    Add default rake task to run proofs

    ntl committed
Commits on Mar 27, 2014
Commits on Mar 26, 2014
  1. New test and a bug fix

  2. Fuzzy event comparison

Commits on Mar 24, 2014
  1. Add a matcher for weak matches

    Instead of matching all attributes, returns true if
    all non-nil attributes of the receiver are found matching in the target
    (i.e. the event generated by the test)
Something went wrong with that request. Please try again.