Permalink
Commits on May 30, 2017
  1. Update README.md

    karmajunkie committed May 30, 2017
Commits on Feb 5, 2016
Commits on Jan 27, 2016
Commits on Jun 19, 2014
Commits on Jun 18, 2014
  1. Version bump

    karmajunkie committed Jun 18, 2014
Commits on May 26, 2014
  1. Version bump

    karmajunkie committed May 26, 2014
  2. Version bump

    karmajunkie committed May 26, 2014
    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

    karmajunkie committed May 26, 2014
    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

    karmajunkie committed Apr 15, 2014
  2. Event routing support

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

    karmajunkie committed Apr 14, 2014
Commits on Apr 10, 2014
Commits on Apr 7, 2014
Commits on Apr 4, 2014
  1. Introducing repository

    karmajunkie committed Apr 4, 2014
Commits on Apr 1, 2014
  1. Fleshing out the readme

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

    karmajunkie committed Mar 30, 2014
    Safely prepend Publisher initializers
  2. Lazy load ivars previously created in initializers

    ntl committed Mar 30, 2014
    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. Safely prepend Publisher initializers

    ntl committed Mar 29, 2014
    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
    `Publisher#initialize`.
    
    Consider:
    
        module Foo
          def initialize(*args)
            puts "Foo: #{args.inspect}"
            super
          end
        end
    
        class A
          include Foo
          def initialize(arg)
            puts "A: #{arg}"
          end
        end
    
        class B
          prepend Foo
          def initilaize(arg)
            puts "B: #{arg}"
          end
        end
    
    In the case of `A`, since `Foo` is attached via `#include`, the
    initializer defined in `Foo` is essentially ignored:
    
        irb(main):046:0> A.new :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
    `B#initialize`:
    
        irb(main):045:0> B.new :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

    karmajunkie committed Mar 30, 2014
    Add default rake task to run proofs
Commits on Mar 29, 2014
Commits on Mar 27, 2014
Commits on Mar 26, 2014
  1. New test and a bug fix

    karmajunkie committed Mar 26, 2014
  2. Fuzzy event comparison

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

    karmajunkie committed Mar 24, 2014
    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)