reactor 0.11.1 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/reactor/event.rb +1 -0
- data/lib/reactor/version.rb +1 -1
- data/spec/models/concerns/subscribable_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8252972581cc95bb4ac6cd93d5a99cc760c67b70
|
4
|
+
data.tar.gz: 8b95946e4f717c78d16ce36e5da4162cb3776fbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e09bf4d0cb61913a73877f9b71066c9bc2571ae8d762acb9bd4fda882395f11ec796af4d938e46406aa745bafec05b00a8e49c283bc63ef0bf51b9afce3d29b
|
7
|
+
data.tar.gz: 1f2399204102e398cd463c761d382d9b4633d6bfcc8f4e82dbfcd7b9326f9527cd6a8504484775daae05d0d1dccd53e82d47fa89690c86111cfe1c22dba0b140
|
data/Changes.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/reactor/event.rb
CHANGED
@@ -7,6 +7,7 @@ class Reactor::Event
|
|
7
7
|
def initialize(data = {})
|
8
8
|
self.data = {}.with_indifferent_access
|
9
9
|
data.each do |key, value|
|
10
|
+
value = value.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '') if value.is_a?(String)
|
10
11
|
self.send("#{key}=", value)
|
11
12
|
end
|
12
13
|
end
|
data/lib/reactor/version.rb
CHANGED
@@ -51,6 +51,12 @@ describe Reactor::Subscribable do
|
|
51
51
|
Reactor::Event.publish(:bid_made, target: Auction.create!(start_at: 10.minutes.from_now))
|
52
52
|
end
|
53
53
|
|
54
|
+
it 'protects against bad unicode characters in event attributes' do
|
55
|
+
expect {
|
56
|
+
Reactor::Event.publish(:bad_unicode, thing_one: "\xAD", thing_two: "\xAB" )
|
57
|
+
}.to_not raise_error
|
58
|
+
end
|
59
|
+
|
54
60
|
describe 'building uniquely named subscriber handler classes' do
|
55
61
|
it 'adds a static subscriber to the global lookup constant' do
|
56
62
|
expect(Reactor::SUBSCRIBERS['puppy_delivered'][0]).to eq(Reactor::StaticSubscribers::Auction::PuppyDeliveredHandler)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reactor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- winfred
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-03-
|
14
|
+
date: 2016-03-18 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: sidekiq
|