sandthorn_event_filter 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +21 -0
- data/.travis.yml +5 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +49 -0
- data/LICENSE.txt +22 -0
- data/README.md +60 -0
- data/Rakefile +13 -0
- data/lib/sandthorn_event_filter/event.rb +38 -0
- data/lib/sandthorn_event_filter/filter.rb +77 -0
- data/lib/sandthorn_event_filter/matchers/aggregate_type_matcher.rb +15 -0
- data/lib/sandthorn_event_filter/matchers/attribute_changed_matcher.rb +17 -0
- data/lib/sandthorn_event_filter/matchers/block_matcher.rb +15 -0
- data/lib/sandthorn_event_filter/matchers/event_name_matcher.rb +15 -0
- data/lib/sandthorn_event_filter/matchers/extract.rb +51 -0
- data/lib/sandthorn_event_filter/matchers/identity_matcher.rb +9 -0
- data/lib/sandthorn_event_filter/matchers/matcher.rb +20 -0
- data/lib/sandthorn_event_filter/matchers/matcher_collection.rb +36 -0
- data/lib/sandthorn_event_filter/matchers/not_matcher.rb +10 -0
- data/lib/sandthorn_event_filter/matchers/sequence_number_matcher.rb +16 -0
- data/lib/sandthorn_event_filter/version.rb +3 -0
- data/lib/sandthorn_event_filter.rb +7 -0
- data/sandthorn_event_filter.gemspec +32 -0
- data/spec/data/events.rb +28 -0
- data/spec/event_spec.rb +38 -0
- data/spec/filter_spec.rb +151 -0
- data/spec/matchers/attribute_changed_matcher_spec.rb +48 -0
- data/spec/matchers/block_matcher_spec.rb +26 -0
- data/spec/matchers/class_matcher_spec.rb +37 -0
- data/spec/matchers/event_name_matcher_spec.rb +36 -0
- data/spec/matchers/extract_spec.rb +60 -0
- data/spec/matchers/matcher_collection_spec.rb +47 -0
- data/spec/matchers/sequence_number_matcher_spec.rb +31 -0
- data/spec/spec_helper.rb +17 -0
- metadata +200 -0
data/spec/filter_spec.rb
ADDED
@@ -0,0 +1,151 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module SandthornEventFilter
|
4
|
+
describe Filter do
|
5
|
+
let(:fake_events) { [:event, :other_event] }
|
6
|
+
let(:filter) { Filter.new(fake_events) }
|
7
|
+
|
8
|
+
describe "basic methods" do
|
9
|
+
it "should respond to basic methods" do
|
10
|
+
methods = [:each, :first, :last, :length, :empty?, :reject, :[]]
|
11
|
+
methods.each do |method|
|
12
|
+
expect(filter).to respond_to(method)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
describe ".initialize" do
|
18
|
+
|
19
|
+
it "is possible to create an empty filter" do
|
20
|
+
expect { Filter.new }.to_not raise_error
|
21
|
+
end
|
22
|
+
|
23
|
+
it "exposes the original events" do
|
24
|
+
expect(filter.original_events).to eq(fake_events)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "has a filter chain" do
|
28
|
+
expect(filter.matchers).to_not be_nil
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe ".events" do
|
33
|
+
context "when there are no matchers" do
|
34
|
+
it "should return the original events" do
|
35
|
+
expect(filter.events).to eq(fake_events)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context "when there is a filter" do
|
40
|
+
let(:events) { [{ aggregate_type: "Foo" }, { aggregate_type: "Bar" }] }
|
41
|
+
it "should return the filtered result" do
|
42
|
+
filter = Filter.new(events).extract(types: "Foo")
|
43
|
+
filtered_events = filter.events
|
44
|
+
expect(filtered_events.length).to eq(1)
|
45
|
+
expect(filtered_events).to include(events.first)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
describe ".apply" do
|
51
|
+
let(:events) { [{ aggregate_type: "Foo" }, { aggregate_type: "Bar" }] }
|
52
|
+
it "should return the filtered result" do
|
53
|
+
filter = Filter.new.extract(types: "Foo")
|
54
|
+
filtered_events = filter.apply(events)
|
55
|
+
expect(filtered_events.length).to eq(1)
|
56
|
+
expect(filtered_events).to include(events.first)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
describe "chaining" do
|
61
|
+
let(:events) { [{aggregate_type: "Foo"}, {aggregate_type: "Bar"}] }
|
62
|
+
context "when chaining filters" do
|
63
|
+
it "should leave the original filter untouched" do
|
64
|
+
filter = Filter.new(events)
|
65
|
+
other_filter = filter.extract(types: "Foo")
|
66
|
+
expect(filter.events).to eq(events)
|
67
|
+
end
|
68
|
+
|
69
|
+
describe "the new filter" do
|
70
|
+
it "should be a new filter instance" do
|
71
|
+
filter = Filter.new(events)
|
72
|
+
other_filter = filter.extract(types: "Foo")
|
73
|
+
expect(other_filter).to_not equal(filter)
|
74
|
+
end
|
75
|
+
|
76
|
+
it "should have the same original events" do
|
77
|
+
filter = Filter.new(events)
|
78
|
+
other_filter = filter.extract(types: "Foo")
|
79
|
+
expect(other_filter.original_events).to eq(filter.original_events)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
describe ".select and .reject" do
|
86
|
+
let(:events) { [{aggregate_type: "Foo"}, {aggregate_type: "Bar"}] }
|
87
|
+
it "should return a new filter" do
|
88
|
+
filter = Filter.new(events)
|
89
|
+
reject = filter.select { |e| e[:aggregate_type] == "Foo" }
|
90
|
+
select = filter.reject { |e| e[:aggregate_type] == "Bar" }
|
91
|
+
expect(reject).to be_kind_of Filter
|
92
|
+
expect(select).to be_kind_of Filter
|
93
|
+
expect(select.events).to eq([events.first])
|
94
|
+
expect(reject.events).to eq([events.first])
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
end
|
99
|
+
|
100
|
+
describe 'tests on actual data' do
|
101
|
+
let(:events) { SandthornEventFilter::Fixtures::EVENTS }
|
102
|
+
|
103
|
+
context 'when extracting `new` events' do
|
104
|
+
it "should return matching events" do
|
105
|
+
new_events_filter = Filter.new(events).extract(events: "new")
|
106
|
+
expect(new_events_filter.length).to eq(2)
|
107
|
+
event = Event.wrap(new_events_filter.first)
|
108
|
+
expect(event.name).to eq("new")
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
context 'when removing `new` events' do
|
113
|
+
it "should return matching events" do
|
114
|
+
filter = Filter.new(events).remove(events: 'new')
|
115
|
+
filtered = filter.events
|
116
|
+
expect(filtered.length).to eq(18)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
context 'when extracting events for an aggregate type' do
|
121
|
+
it "should return only matching events" do
|
122
|
+
filter = Filter.new(events).extract(types: 'SandthornTest')
|
123
|
+
filtered = filter.events
|
124
|
+
expect(filtered.length).to eq(1)
|
125
|
+
expect(Event.wrap(filtered.first).aggregate_type).to eq("SandthornTest")
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
context 'when removing events for an aggregate type' do
|
130
|
+
it "should return matching events" do
|
131
|
+
filter = Filter.new(events).remove(types: 'SandthornTest')
|
132
|
+
filtered = filter.events
|
133
|
+
expect(filtered.length).to eq(19)
|
134
|
+
expect(filtered).to all( have_aggregate_type 'SandthornProduct' )
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
context "when extracting events with a changed attribute" do
|
139
|
+
it "should return matching events" do
|
140
|
+
filter = Filter.new(events).extract(changed_attributes: "name")
|
141
|
+
filtered = filter.events
|
142
|
+
expect(filtered.length).to eq(11)
|
143
|
+
filtered.each do |event|
|
144
|
+
expect(Event.wrap(event).attribute_deltas.any? {|delta| delta[:attribute_name] == "name" }).to be_truthy
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
end
|
150
|
+
|
151
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module SandthornEventFilter
|
4
|
+
module Matchers
|
5
|
+
describe AttributeChangedMatcher do
|
6
|
+
let(:event) do
|
7
|
+
{
|
8
|
+
aggregate_id:"555dc484-5727-44b1-a8da-0f85014d7204",
|
9
|
+
aggregate_type: "ProductAggregates::Store",
|
10
|
+
aggregate_version: 1,
|
11
|
+
timestamp: Time.parse("2014-08-05 16:00:40.107738"),
|
12
|
+
sequence_number: 3,
|
13
|
+
event_name: "new",
|
14
|
+
event_args: {
|
15
|
+
attribute_deltas: [
|
16
|
+
{
|
17
|
+
attribute_name: "name",
|
18
|
+
new_value: nil,
|
19
|
+
old_value: nil
|
20
|
+
},
|
21
|
+
{
|
22
|
+
attribute_name: "description",
|
23
|
+
new_value: nil,
|
24
|
+
old_value: nil
|
25
|
+
}
|
26
|
+
]
|
27
|
+
}
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
describe ".match?" do
|
32
|
+
context "when given a changed attributes" do
|
33
|
+
it "should return true" do
|
34
|
+
matcher = AttributeChangedMatcher.new("name")
|
35
|
+
expect(matcher.match?(event)).to be_truthy
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context "when given a non-changed attribute" do
|
40
|
+
it "should return false" do
|
41
|
+
matcher = AttributeChangedMatcher.new("foo")
|
42
|
+
expect(matcher.match?(event)).to be_falsey
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module SandthornEventFilter
|
4
|
+
module Matchers
|
5
|
+
describe BlockMatcher do
|
6
|
+
context "when the given block evaluates to true" do
|
7
|
+
it "should match" do
|
8
|
+
matcher = BlockMatcher.new do |event|
|
9
|
+
true
|
10
|
+
end
|
11
|
+
expect(matcher.match?({})).to be_truthy
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
context "when the given block evaluates to false" do
|
16
|
+
it "shouldn't match" do
|
17
|
+
matcher = BlockMatcher.new do |event|
|
18
|
+
false
|
19
|
+
end
|
20
|
+
expect(matcher.match?({})).to be_falsey
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module SandthornEventFilter
|
4
|
+
module Matchers
|
5
|
+
describe AggregateTypeMatcher do
|
6
|
+
let(:foo_event) { { aggregate_type: "Foo"} }
|
7
|
+
let(:bar_event) { { aggregate_type: "Bar"} }
|
8
|
+
|
9
|
+
describe ".match?" do
|
10
|
+
context "when given one class" do
|
11
|
+
context "and given an event of that class" do
|
12
|
+
it "should return true" do
|
13
|
+
filter = AggregateTypeMatcher.new("Foo")
|
14
|
+
expect(filter.match?(foo_event)).to be_truthy
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
context "when given a non-matching event" do
|
19
|
+
it "should return false" do
|
20
|
+
filter = AggregateTypeMatcher.new("Foo")
|
21
|
+
expect(filter.match?(bar_event)).to be_falsey
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context "when given multiple types" do
|
27
|
+
it "should return true if event matches any of the input types" do
|
28
|
+
filter = AggregateTypeMatcher.new(["Bar", "Foo"])
|
29
|
+
expect(filter.match?(foo_event)).to be_truthy
|
30
|
+
expect(filter.match?(bar_event)).to be_truthy
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module SandthornEventFilter
|
4
|
+
module Matchers
|
5
|
+
describe EventNameMatcher do
|
6
|
+
let(:foo_event) { { event_name: "Foo"} }
|
7
|
+
let(:bar_event) { { event_name: "Bar"} }
|
8
|
+
|
9
|
+
describe ".match?" do
|
10
|
+
context "when given one event name" do
|
11
|
+
context "and given an event of that name" do
|
12
|
+
it "should return true" do
|
13
|
+
filter = EventNameMatcher.new("Foo")
|
14
|
+
expect(filter.match?(foo_event)).to be_truthy
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
context "when given a non-matching event" do
|
19
|
+
it "should return false" do
|
20
|
+
filter = EventNameMatcher.new("Foo")
|
21
|
+
expect(filter.match?(bar_event)).to be_falsey
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context "when given multiple event names" do
|
27
|
+
it "should return true if event matches any of the input event names" do
|
28
|
+
filter = EventNameMatcher.new(["Bar", "Foo"])
|
29
|
+
expect(filter.match?(foo_event)).to be_truthy
|
30
|
+
expect(filter.match?(bar_event)).to be_truthy
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module SandthornEventFilter
|
4
|
+
module Matchers
|
5
|
+
describe Extract do
|
6
|
+
let(:foo_event) { { aggregate_type: "Foo", event_name: "foo" } }
|
7
|
+
let(:bar_event) { { aggregate_type: "Bar", event_name: "bar" } }
|
8
|
+
|
9
|
+
context "when given only class matchers" do
|
10
|
+
let(:foo_extractor) { Extract.new(types: "Foo") }
|
11
|
+
|
12
|
+
|
13
|
+
context "when given a matching event" do
|
14
|
+
it "should match" do
|
15
|
+
expect(foo_extractor.match?(foo_event)).to be_truthy
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context "when given a non-matching event" do
|
20
|
+
it "shouldn't match" do
|
21
|
+
expect(foo_extractor.match?(bar_event)).to be_falsey
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context "when given event_name matchers" do
|
27
|
+
let(:foo_extractor) { Extract.new(events: "foo") }
|
28
|
+
|
29
|
+
context "when given a matching event" do
|
30
|
+
it "should match" do
|
31
|
+
expect(foo_extractor.match?(foo_event)).to be_truthy
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
context "when given a non-matching event" do
|
36
|
+
it "should not match" do
|
37
|
+
expect(foo_extractor.match?(bar_event)).to be_falsey
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
context "when given combinations of matchers" do
|
43
|
+
let(:combo) { Extract.new(types: "Foo", events: "foo") }
|
44
|
+
context "when given an event that matches all of the criteria" do
|
45
|
+
it "should match" do
|
46
|
+
expect(combo.match?(foo_event)).to be_truthy
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
context "when given a partially matching event" do
|
51
|
+
it "should not match" do
|
52
|
+
event = { event_name: "foo", aggregate_type: "Baz" }
|
53
|
+
expect(combo.match?(event)).to be_falsey
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module SandthornEventFilter
|
4
|
+
module Matchers
|
5
|
+
describe MatcherCollection do
|
6
|
+
|
7
|
+
let(:events) { [:one, :two, :three] }
|
8
|
+
let(:chain) { SandthornEventFilter::Matchers::MatcherCollection.new }
|
9
|
+
|
10
|
+
describe ".add" do
|
11
|
+
|
12
|
+
let(:filter) { Object.new }
|
13
|
+
|
14
|
+
it 'returns a new chain' do
|
15
|
+
new_chain = chain.add(filter)
|
16
|
+
expect(new_chain).to be_kind_of MatcherCollection
|
17
|
+
expect(new_chain).to_not equal(chain)
|
18
|
+
end
|
19
|
+
it 'adds a filter to the chain' do
|
20
|
+
new_chain = chain.add(filter)
|
21
|
+
expect(new_chain.matchers).to include(filter)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe ".apply" do
|
26
|
+
context "when there are no matchers in the chain" do
|
27
|
+
it "should return the original events" do
|
28
|
+
expect(chain.matchers).to be_empty
|
29
|
+
expect(chain.apply(events)).to eq(events)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
context "when there are matchers" do
|
34
|
+
it "should call match? on the matchers for each event" do
|
35
|
+
filters = [IdentityMatcher.new, IdentityMatcher.new]
|
36
|
+
new_chain = chain.add(filters)
|
37
|
+
filters.each do |filter|
|
38
|
+
expect(filter).to receive(:match?).exactly(3).times.and_call_original
|
39
|
+
end
|
40
|
+
new_chain.apply(events)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module SandthornEventFilter
|
4
|
+
module Matchers
|
5
|
+
describe SequenceNumberMatcher do
|
6
|
+
let(:event) do
|
7
|
+
{
|
8
|
+
sequence_number: 1
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
context "when the event has a larger sequence number" do
|
13
|
+
it "should match" do
|
14
|
+
sequence_number = event[:sequence_number]
|
15
|
+
matcher = SequenceNumberMatcher.new(sequence_number - 1)
|
16
|
+
expect(matcher.match?(event)).to be_truthy
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
context "when the event has the same or lower sequence number" do
|
21
|
+
it "should not match" do
|
22
|
+
sequence_number = event[:sequence_number]
|
23
|
+
exact_matcher = SequenceNumberMatcher.new(sequence_number)
|
24
|
+
larger_matcher = SequenceNumberMatcher.new(sequence_number + 1)
|
25
|
+
expect(exact_matcher.match?(event)).to be_falsey
|
26
|
+
expect(larger_matcher.match?(event)).to be_falsey
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'sandthorn_event_filter'
|
2
|
+
require './spec/data/events'
|
3
|
+
|
4
|
+
|
5
|
+
RSpec.configure do |config|
|
6
|
+
end
|
7
|
+
RSpec::Matchers.define :have_name do |expected|
|
8
|
+
match do |actual|
|
9
|
+
actual[:event_name] == expected
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
RSpec::Matchers.define :have_aggregate_type do |expected|
|
14
|
+
match do |actual|
|
15
|
+
actual[:aggregate_type] == expected
|
16
|
+
end
|
17
|
+
end
|
metadata
ADDED
@@ -0,0 +1,200 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sandthorn_event_filter
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jesper Josefsson
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-08-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: pry
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: gem-release
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: autotest-standalone
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: dotenv
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bundler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.6'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.6'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: hamster
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description:
|
126
|
+
email:
|
127
|
+
- jesper.josefsson@gmail.com
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- ".gitignore"
|
133
|
+
- ".travis.yml"
|
134
|
+
- Gemfile
|
135
|
+
- Gemfile.lock
|
136
|
+
- LICENSE.txt
|
137
|
+
- README.md
|
138
|
+
- Rakefile
|
139
|
+
- lib/sandthorn_event_filter.rb
|
140
|
+
- lib/sandthorn_event_filter/event.rb
|
141
|
+
- lib/sandthorn_event_filter/filter.rb
|
142
|
+
- lib/sandthorn_event_filter/matchers/aggregate_type_matcher.rb
|
143
|
+
- lib/sandthorn_event_filter/matchers/attribute_changed_matcher.rb
|
144
|
+
- lib/sandthorn_event_filter/matchers/block_matcher.rb
|
145
|
+
- lib/sandthorn_event_filter/matchers/event_name_matcher.rb
|
146
|
+
- lib/sandthorn_event_filter/matchers/extract.rb
|
147
|
+
- lib/sandthorn_event_filter/matchers/identity_matcher.rb
|
148
|
+
- lib/sandthorn_event_filter/matchers/matcher.rb
|
149
|
+
- lib/sandthorn_event_filter/matchers/matcher_collection.rb
|
150
|
+
- lib/sandthorn_event_filter/matchers/not_matcher.rb
|
151
|
+
- lib/sandthorn_event_filter/matchers/sequence_number_matcher.rb
|
152
|
+
- lib/sandthorn_event_filter/version.rb
|
153
|
+
- sandthorn_event_filter.gemspec
|
154
|
+
- spec/data/events.rb
|
155
|
+
- spec/event_spec.rb
|
156
|
+
- spec/filter_spec.rb
|
157
|
+
- spec/matchers/attribute_changed_matcher_spec.rb
|
158
|
+
- spec/matchers/block_matcher_spec.rb
|
159
|
+
- spec/matchers/class_matcher_spec.rb
|
160
|
+
- spec/matchers/event_name_matcher_spec.rb
|
161
|
+
- spec/matchers/extract_spec.rb
|
162
|
+
- spec/matchers/matcher_collection_spec.rb
|
163
|
+
- spec/matchers/sequence_number_matcher_spec.rb
|
164
|
+
- spec/spec_helper.rb
|
165
|
+
homepage: https://github.com/Sandthorn
|
166
|
+
licenses:
|
167
|
+
- MIT
|
168
|
+
metadata: {}
|
169
|
+
post_install_message:
|
170
|
+
rdoc_options: []
|
171
|
+
require_paths:
|
172
|
+
- lib
|
173
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
174
|
+
requirements:
|
175
|
+
- - ">="
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '0'
|
178
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
|
+
requirements:
|
180
|
+
- - ">="
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: '0'
|
183
|
+
requirements: []
|
184
|
+
rubyforge_project:
|
185
|
+
rubygems_version: 2.2.2
|
186
|
+
signing_key:
|
187
|
+
specification_version: 4
|
188
|
+
summary: Composable filters for Sandthorn Events
|
189
|
+
test_files:
|
190
|
+
- spec/data/events.rb
|
191
|
+
- spec/event_spec.rb
|
192
|
+
- spec/filter_spec.rb
|
193
|
+
- spec/matchers/attribute_changed_matcher_spec.rb
|
194
|
+
- spec/matchers/block_matcher_spec.rb
|
195
|
+
- spec/matchers/class_matcher_spec.rb
|
196
|
+
- spec/matchers/event_name_matcher_spec.rb
|
197
|
+
- spec/matchers/extract_spec.rb
|
198
|
+
- spec/matchers/matcher_collection_spec.rb
|
199
|
+
- spec/matchers/sequence_number_matcher_spec.rb
|
200
|
+
- spec/spec_helper.rb
|