mantle 2.2.0 → 2.2.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.md +6 -0
- data/Gemfile.lock +7 -34
- data/lib/mantle/message_router.rb +10 -1
- data/lib/mantle/version.rb +1 -1
- data/spec/lib/mantle/message_router_spec.rb +11 -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: 80ac6bfeeb529ac8a532e10a827cb6d20309276b
|
|
4
|
+
data.tar.gz: bf6b389f9346f12942cf71f91a167608c120d6b9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 45eac395464c21c201eddcb8721415595a554603d4831b4f5f395d4e2bdba10d3bc65ec45ee4013e1e642bced463fe1c2e5bdb8ae723409038521f230bc51186
|
|
7
|
+
data.tar.gz: b7d4e493fca814023ef98a269c0c04c7317dab371692cbea3459ff71548af88964032514ef9751b17ab03b488d8c0457ef30ea16bc76b9e0620f35e760dd8f23
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,62 +1,36 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
mantle (2.
|
|
4
|
+
mantle (2.2.0)
|
|
5
5
|
redis
|
|
6
6
|
sidekiq
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
celluloid (0.17.
|
|
12
|
-
bundler
|
|
11
|
+
celluloid (0.17.2)
|
|
13
12
|
celluloid-essentials
|
|
14
13
|
celluloid-extras
|
|
15
14
|
celluloid-fsm
|
|
16
15
|
celluloid-pool
|
|
17
16
|
celluloid-supervision
|
|
18
|
-
dotenv
|
|
19
|
-
nenv
|
|
20
|
-
rspec-logsplit (>= 0.1.2)
|
|
21
17
|
timers (>= 4.1.1)
|
|
22
|
-
celluloid-essentials (0.20.
|
|
23
|
-
bundler
|
|
24
|
-
dotenv
|
|
25
|
-
nenv
|
|
26
|
-
rspec-logsplit (>= 0.1.2)
|
|
18
|
+
celluloid-essentials (0.20.5)
|
|
27
19
|
timers (>= 4.1.1)
|
|
28
|
-
celluloid-extras (0.20.
|
|
29
|
-
bundler
|
|
30
|
-
dotenv
|
|
31
|
-
nenv
|
|
32
|
-
rspec-logsplit (>= 0.1.2)
|
|
20
|
+
celluloid-extras (0.20.5)
|
|
33
21
|
timers (>= 4.1.1)
|
|
34
|
-
celluloid-fsm (0.20.
|
|
35
|
-
bundler
|
|
36
|
-
dotenv
|
|
37
|
-
nenv
|
|
38
|
-
rspec-logsplit (>= 0.1.2)
|
|
22
|
+
celluloid-fsm (0.20.5)
|
|
39
23
|
timers (>= 4.1.1)
|
|
40
|
-
celluloid-pool (0.20.
|
|
41
|
-
bundler
|
|
42
|
-
dotenv
|
|
43
|
-
nenv
|
|
44
|
-
rspec-logsplit (>= 0.1.2)
|
|
24
|
+
celluloid-pool (0.20.5)
|
|
45
25
|
timers (>= 4.1.1)
|
|
46
|
-
celluloid-supervision (0.20.
|
|
47
|
-
bundler
|
|
48
|
-
dotenv
|
|
49
|
-
nenv
|
|
50
|
-
rspec-logsplit (>= 0.1.2)
|
|
26
|
+
celluloid-supervision (0.20.5)
|
|
51
27
|
timers (>= 4.1.1)
|
|
52
28
|
coderay (1.1.0)
|
|
53
29
|
connection_pool (2.2.0)
|
|
54
30
|
diff-lcs (1.2.5)
|
|
55
|
-
dotenv (2.0.2)
|
|
56
31
|
hitimes (1.2.3)
|
|
57
32
|
json (1.8.3)
|
|
58
33
|
method_source (0.8.2)
|
|
59
|
-
nenv (0.2.0)
|
|
60
34
|
pry (0.10.0)
|
|
61
35
|
coderay (~> 1.1.0)
|
|
62
36
|
method_source (~> 0.8.1)
|
|
@@ -73,7 +47,6 @@ GEM
|
|
|
73
47
|
rspec-expectations (3.2.0)
|
|
74
48
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
75
49
|
rspec-support (~> 3.2.0)
|
|
76
|
-
rspec-logsplit (0.1.3)
|
|
77
50
|
rspec-mocks (3.2.0)
|
|
78
51
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
79
52
|
rspec-support (~> 3.2.0)
|
|
@@ -10,7 +10,16 @@ module Mantle
|
|
|
10
10
|
Mantle.logger.debug("Routing message for #{@channel}")
|
|
11
11
|
Mantle.logger.debug("Message: #{@message}")
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
begin
|
|
14
|
+
Mantle::Workers::ProcessWorker.perform_async(@channel, @message)
|
|
15
|
+
rescue => e
|
|
16
|
+
msg = "Unable to process Mantle message\n"
|
|
17
|
+
msg += "#{e.class} #{e}\n"
|
|
18
|
+
msg += "#{e.backtrace.nil? ? '' : e.backtrace.join("\n")}"
|
|
19
|
+
msg += "Channel: #{@channel}"
|
|
20
|
+
msg += "Message: #{@message}"
|
|
21
|
+
Mantle.logger.error msg
|
|
22
|
+
end
|
|
14
23
|
end
|
|
15
24
|
end
|
|
16
25
|
end
|
data/lib/mantle/version.rb
CHANGED
|
@@ -57,5 +57,16 @@ describe Mantle::MessageRouter do
|
|
|
57
57
|
expect(args.last).to eq(message)
|
|
58
58
|
end
|
|
59
59
|
end
|
|
60
|
+
|
|
61
|
+
context "processing malformed messages" do
|
|
62
|
+
it "logs to error log" do
|
|
63
|
+
fake_process_worker = Class.new
|
|
64
|
+
stub_const("Mantle::Workers::ProcessWorker", fake_process_worker)
|
|
65
|
+
allow(fake_process_worker).to receive(:perform_async) { raise JSON::GeneratorError }
|
|
66
|
+
|
|
67
|
+
expect(Mantle.logger).to receive(:error)
|
|
68
|
+
Mantle::MessageRouter.new("user:login", message).route
|
|
69
|
+
end
|
|
70
|
+
end
|
|
60
71
|
end
|
|
61
72
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mantle
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.2.
|
|
4
|
+
version: 2.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Grant Ammons
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-
|
|
12
|
+
date: 2015-10-28 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: redis
|