larva 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +3 -0
- data/lib/larva/processor.rb +1 -1
- data/lib/larva/version.rb +1 -1
- data/test/processor_test.rb +12 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3db7d0f91a596e2a801add25f0f555969e3c704
|
4
|
+
data.tar.gz: 8270fb1338c2f139f2664378f76b4ec68a3a23ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 140db924c5d9f6bfc88567bb435a77c2aabdff54eaaa5cdf6982fe606c5e5259bb6e483146475cea8ca7f0ba3b265f75a67dd8dd9fad88cf382e64bdd3a77064
|
7
|
+
data.tar.gz: b3968a67fde438970aa85fe768fe9ae158022922107531fa83596d4c4e4a7e4b4ad3c061a3c507a180b1aa3c67b15489c2ee66319a186aed1b305fde98e6249b
|
data/CHANGELOG
CHANGED
data/lib/larva/processor.rb
CHANGED
@@ -30,7 +30,7 @@ module Larva
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def normal_process
|
33
|
-
if self.process
|
33
|
+
if respond_to?(:process) && self.process
|
34
34
|
Propono.config.logger.info "Message Processed: #{message}"
|
35
35
|
else
|
36
36
|
Propono.config.logger.info "Unrecognized event type, entity: #{entity} action: #{action}."
|
data/lib/larva/version.rb
CHANGED
data/test/processor_test.rb
CHANGED
@@ -49,7 +49,7 @@ module Larva
|
|
49
49
|
NormalProcessor.process(message)
|
50
50
|
end
|
51
51
|
|
52
|
-
def
|
52
|
+
def test_process_logs_error_with_false_handler
|
53
53
|
entity = "media_file"
|
54
54
|
action = "processed"
|
55
55
|
message = {entity: entity, action: action, media_file_id: "8"}
|
@@ -60,6 +60,17 @@ module Larva
|
|
60
60
|
NormalProcessor.any_instance.expects(:process).returns(false)
|
61
61
|
NormalProcessor.process(message)
|
62
62
|
end
|
63
|
+
|
64
|
+
def test_process_logs_error_with_no_handler
|
65
|
+
entity = "comment"
|
66
|
+
action = "created"
|
67
|
+
message = {entity: entity, action: action, media_file_id: "8"}
|
68
|
+
output = "Unrecognized event type, entity: #{entity} action: #{action}."
|
69
|
+
|
70
|
+
Propono.config.logger.stubs(:info)
|
71
|
+
Propono.config.logger.expects(:info).with(output)
|
72
|
+
MetaProcessor.process(message)
|
73
|
+
end
|
63
74
|
end
|
64
75
|
end
|
65
76
|
|