-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meta data #22
base: master
Are you sure you want to change the base?
Meta data #22
Conversation
@@ -28,8 +28,9 @@ def call(stream_name, event_data, expected_version = nil) | |||
def create_event(event_data) | |||
type = event_data.event_type | |||
data = event_data.data | |||
meta_data = event_data.meta_data if event_data.respond_to?(:meta_data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why meta_data
? I would prefer metadata
as this is just a single word
@@ -13,18 +13,19 @@ def call(entries) | |||
private | |||
|
|||
def create_event(entry) | |||
return nil unless entry['data'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -10,10 +10,10 @@ module Api | |||
describe '#append_to_stream' do | |||
|
|||
it "should handle one event" do | |||
event = Event.new('event_type', { data: 1 }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are adding new thing here - so why changing existing tests instead of just adding a new one ?
Thanks @mpraglowski for your time and comments. |
Makes it possible to append meta_data to events.