rails_event_store 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58646a3c0ac5dc59b471a036bf3d45c1d83eaace
4
- data.tar.gz: 9f85d03e701be19f70c175da9a72ab87ffc3ad0d
3
+ metadata.gz: ebde6e3e77dd05e3b212c2328b44b66d362f5923
4
+ data.tar.gz: 2541da70d5c9d919712bf5522faee083be9397f9
5
5
  SHA512:
6
- metadata.gz: 4c2a011aacfafd8569f72f03b31c1c9289db7377d6754049dcbbf75d5e58fe6d76cdfb50724c57108837c8ee5e2b2ee9ac1ccb368871f149acdbfa68f3def1ec
7
- data.tar.gz: 2f8d29ef7dfb8f0c9e50fb43fac512246391413cced02e3bc7ae2dff5ed03deeb26d764b806a545075541349f9b684cabc84e9e32724c258748ac17394df4122
6
+ metadata.gz: 185c5d956aa53ce11eb3d49e3327fccb416ab0a5dd4e63e706c1397b8f929b631a0a972166516aea2577fa2cad17d38f8c375d604fc61ebef17de1c5522cfda3
7
+ data.tar.gz: e522a6afbb21ad88560ccf731121df2e0e7c9a37df3033527bf1bd6a89267075fe1a1d5dd4a6e40b9063770a9f581565cc925d0c2e7faa5ad1372a4e5164bc1b
@@ -1,3 +1,7 @@
1
+ ### 0.12.0 (10.08.2016)
2
+
3
+ * Change: Updated Ruby Event Store method calls according to the newer version PR #53
4
+
1
5
  ### 0.11.0 (12.07.2016)
2
6
 
3
7
  * Breaking change in domain event class (Part of PR #48)
data/Makefile CHANGED
@@ -10,7 +10,7 @@ test: ## Run tests
10
10
 
11
11
  mutate: test ## Run mutation tests
12
12
  @echo "Running mutation tests - only 100% free mutation will be accepted"
13
- @bundle exec mutant --include lib --require rails_event_store --use rspec "RailsEventStore*" --expected-coverage 497/636
13
+ @bundle exec mutant --include lib --require rails_event_store --use rspec "RailsEventStore*"
14
14
 
15
15
  .PHONY: help
16
16
 
@@ -9,51 +9,39 @@ module RailsEventStore
9
9
  @event_broker = event_broker
10
10
  end
11
11
 
12
- def publish_event(event, stream_name = GLOBAL_STREAM, expected_version = :any)
13
- event_store.publish_event(event, stream_name, expected_version)
12
+ def publish_event(event, stream_name: GLOBAL_STREAM, expected_version: :any)
13
+ event_store.publish_event(event, stream_name: stream_name, expected_version: expected_version)
14
14
  end
15
15
 
16
- def append_to_stream(event, stream_name = GLOBAL_STREAM, expected_version = :any)
17
- event_store.append_to_stream(stream_name, event, expected_version)
16
+ def append_to_stream(event, stream_name: GLOBAL_STREAM, expected_version: :any)
17
+ event_store.append_to_stream(stream_name, event, expected_version: expected_version)
18
18
  end
19
19
 
20
20
  def delete_stream(stream_name)
21
21
  event_store.delete_stream(stream_name)
22
22
  end
23
23
 
24
- def read_events_forward(stream_name, start = :head, count = page_size)
24
+ def read_events_forward(stream_name, start: :head, count: page_size)
25
25
  event_store.read_events_forward(stream_name, start, count)
26
26
  end
27
- def read_events(stream_name, start = :head, count = page_size)
28
- warn "[DEPRECATION] `read_events` is deprecated. Please use `read_events_forward` instead."
29
- read_events_forward(stream_name, start, count)
30
- end
31
27
 
32
- def read_events_backward(stream_name, start = :head, count = page_size)
28
+ def read_events_backward(stream_name, start: :head, count: page_size)
33
29
  event_store.read_events_backward(stream_name, start, count)
34
30
  end
35
31
 
36
32
  def read_stream_events_forward(stream_name)
37
33
  event_store.read_stream_events_forward(stream_name)
38
34
  end
39
- def read_all_events(stream_name)
40
- warn "[DEPRECATION] `read_all_events` is deprecated. Please use `read_stream_events_forward` instead."
41
- read_stream_events_forward(stream_name)
42
- end
43
35
 
44
36
  def read_stream_events_backward(stream_name)
45
37
  event_store.read_stream_events_backward(stream_name)
46
38
  end
47
39
 
48
- def read_all_streams_forward(start = :head, count = page_size)
40
+ def read_all_streams_forward(start: :head, count: page_size)
49
41
  event_store.read_all_streams_forward(start, count)
50
42
  end
51
- def read_all_streams(start = :head, count = page_size)
52
- warn "[DEPRECATION] `read_all_streams` is deprecated. Please use `read_all_streams_forward` instead."
53
- read_all_streams_forward(start, count)
54
- end
55
43
 
56
- def read_all_streams_backward(start = :head, count = page_size)
44
+ def read_all_streams_backward(start: :head, count: page_size)
57
45
  event_store.read_all_streams_backward(start, count)
58
46
  end
59
47
 
@@ -1,16 +1,12 @@
1
1
  module RailsEventStore
2
2
  class Middleware
3
- def initialize(app, request_metadata)
3
+ def initialize(app, request_metadata_proc)
4
4
  @app = app
5
- @request_metadata = request_metadata
5
+ @request_metadata_proc = request_metadata_proc
6
6
  end
7
7
 
8
8
  def call(env)
9
- dup._call(env)
10
- end
11
-
12
- def _call(env)
13
- Thread.current[:rails_event_store] = @request_metadata.(env)
9
+ Thread.current[:rails_event_store] = @request_metadata_proc.(env)
14
10
  @app.call(env)
15
11
  ensure
16
12
  Thread.current[:rails_event_store] = nil
@@ -1,3 +1,3 @@
1
1
  module RailsEventStore
2
- VERSION = '0.11.0'
2
+ VERSION = '0.12.0'
3
3
  end
@@ -27,11 +27,10 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency 'sqlite3'
28
28
  spec.add_development_dependency 'rack-test'
29
29
 
30
- spec.add_dependency 'ruby_event_store', '~> 0.11.0'
31
- spec.add_dependency 'rails_event_store_active_record', '~> 0.6.6'
32
- spec.add_dependency 'aggregate_root', '~> 0.3.2'
30
+ spec.add_dependency 'ruby_event_store', '~> 0.12.0'
31
+ spec.add_dependency 'rails_event_store_active_record', '~> 0.6.7'
32
+ spec.add_dependency 'aggregate_root', '~> 0.3.4'
33
33
  spec.add_dependency 'activesupport', '>= 3.0'
34
34
  spec.add_dependency 'activemodel', '>= 3.0'
35
35
  spec.add_development_dependency 'mutant-rspec', '~> 0.8'
36
-
37
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_event_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arkency
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-12 00:00:00.000000000 Z
11
+ date: 2016-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -114,42 +114,42 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.11.0
117
+ version: 0.12.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.11.0
124
+ version: 0.12.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rails_event_store_active_record
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 0.6.6
131
+ version: 0.6.7
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 0.6.6
138
+ version: 0.6.7
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: aggregate_root
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 0.3.2
145
+ version: 0.3.4
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 0.3.2
152
+ version: 0.3.4
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: activesupport
155
155
  requirement: !ruby/object:Gem::Requirement