rising_dragon 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -3
- data/lib/rising_dragon/event.rb +1 -6
- data/lib/rising_dragon/sns/publisher.rb +1 -1
- data/lib/rising_dragon/sqs/emitter.rb +4 -4
- data/lib/rising_dragon/sqs/worker.rb +2 -2
- data/lib/rising_dragon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74bc8b8f49f7973d57ad8d41e6f76baddec6b0bf4932f80f176a29b9b297b7ac
|
4
|
+
data.tar.gz: 32f93f80428dafccecdde6aca601e0964ddec6f67b44dd99939e08f55af286a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ff59d15b15bb852057add629f0bd5624005724b556a8839ce91958411b90efd0884e8c224c6fc1e7346c563cd47f29144d9241b37c75cf549174b06eeaaed53
|
7
|
+
data.tar.gz: 0a599a9d04fc13c4f928e52bda1597eda0e8d3a0ca5ef0d808f424dcffa71fd6abd6a326c96e3790c9515c5210fcbda751ba2267cbed93e4015ae92dc795b5d2
|
data/.travis.yml
CHANGED
data/lib/rising_dragon/event.rb
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
module RisingDragon
|
2
2
|
class Event
|
3
3
|
attr_reader :id, :type, :timestamp, :data
|
4
|
-
def initialize(id:, type:, timestamp:, data
|
4
|
+
def initialize(id:, type:, timestamp:, data:)
|
5
5
|
@id = id
|
6
6
|
@type = type
|
7
7
|
@timestamp = timestamp
|
8
8
|
@data = data
|
9
|
-
@sqs_msg = sqs_msg
|
10
9
|
end
|
11
10
|
|
12
11
|
def to_json(*option)
|
@@ -17,9 +16,5 @@ module RisingDragon
|
|
17
16
|
data: @data,
|
18
17
|
}.to_json(*option)
|
19
18
|
end
|
20
|
-
|
21
|
-
def delete!
|
22
|
-
@sqs_msg.delete
|
23
|
-
end
|
24
19
|
end
|
25
20
|
end
|
@@ -18,7 +18,7 @@ module RisingDragon
|
|
18
18
|
private
|
19
19
|
|
20
20
|
def create_event(type, data)
|
21
|
-
::RisingDragon::Event.new(id: uuid, timestamp: unixtime, type: type, data: data
|
21
|
+
::RisingDragon::Event.new(id: uuid, timestamp: unixtime, type: type, data: data)
|
22
22
|
end
|
23
23
|
|
24
24
|
def uuid
|
@@ -44,7 +44,7 @@ module RisingDragon
|
|
44
44
|
nil
|
45
45
|
end
|
46
46
|
|
47
|
-
def event_from_json(
|
47
|
+
def event_from_json(body)
|
48
48
|
msg = JSON.parse(body['Message'])
|
49
49
|
|
50
50
|
id = msg['id']
|
@@ -52,11 +52,11 @@ module RisingDragon
|
|
52
52
|
timestamp = Time.at(msg['timestamp'] / 1000.0)
|
53
53
|
data = msg['data']
|
54
54
|
|
55
|
-
::RisingDragon::Event.new(id: id, type: type, timestamp: timestamp, data: data
|
55
|
+
::RisingDragon::Event.new(id: id, type: type, timestamp: timestamp, data: data)
|
56
56
|
end
|
57
57
|
|
58
|
-
def
|
59
|
-
event = event_from_json(
|
58
|
+
def emit_sns_msg(body)
|
59
|
+
event = event_from_json(body)
|
60
60
|
emit_event(event)
|
61
61
|
end
|
62
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rising_dragon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ota42y
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02
|
11
|
+
date: 2018-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shoryuken
|