Skip to content

Commit

Permalink
Stop this crazy thing.
Browse files Browse the repository at this point in the history
  • Loading branch information
mostlyobvious authored and mpraglowski committed Sep 15, 2020
1 parent fedf21d commit 4850f75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions ruby_event_store/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ GEM_VERSION = $(shell cat ../RES_VERSION)
GEM_NAME = ruby_event_store
REQUIRE = $(GEM_NAME)
IGNORE = RubyEventStore::InMemoryRepository\#append_with_synchronize \
RubyEventStore::Client\#default_clock \
RubyEventStore::Client::Within\#add_thread_subscribers \
RubyEventStore::Client::Within\#add_thread_global_subscribers \
RubyEventStore::Client::Within\#call \
Expand Down
6 changes: 5 additions & 1 deletion ruby_event_store/lib/ruby_event_store/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def initialize(repository:,
mapper: Mappers::Default.new,
subscriptions: Subscriptions.new,
dispatcher: Dispatcher.new,
clock: ->{ Time.now.utc.round(TIMESTAMP_PRECISION) })
clock: default_clock)
@repository = repository
@mapper = mapper
@broker = Broker.new(subscriptions: subscriptions, dispatcher: dispatcher)
Expand Down Expand Up @@ -313,6 +313,10 @@ def metadata=(value)
@metadata.value = value
end

def default_clock
->{ Time.now.utc.round(TIMESTAMP_PRECISION) }
end

attr_reader :repository, :mapper, :broker, :clock
end
end

0 comments on commit 4850f75

Please sign in to comment.