alephant-broker 3.15.0 → 3.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/alephant/broker/request/factory.rb +9 -0
- data/lib/alephant/broker/version.rb +1 -1
- 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: 214c59f6fa05a2a77e994ecccfcf688c305d1d61
|
4
|
+
data.tar.gz: 329d9389678e66155a86b7a71e89c8e62a143d93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 385b4d08d156992cd88f33692be1bc4c580d006fa2552532606884f1a64784f3f1eb51ceaa972152775d15e321a26e81a05f04d9edfa65e9e1e74fea28ec823c
|
7
|
+
data.tar.gz: 97eed03d2d8ac334b56dbb365f0c96a307f1c28ffc3e6e66a98bd0a76195a3ca5ab40421aa1069d9ae5f1432ef54db64b46279eef3df144de0700e4ceedc7131
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "alephant/logger"
|
1
2
|
require "alephant/broker/request"
|
2
3
|
require "alephant/broker/component_factory"
|
3
4
|
|
@@ -5,6 +6,8 @@ module Alephant
|
|
5
6
|
module Broker
|
6
7
|
module Request
|
7
8
|
class Factory
|
9
|
+
extend Logger
|
10
|
+
|
8
11
|
def self.request_type_from(env)
|
9
12
|
env.path.split("/")[1]
|
10
13
|
end
|
@@ -12,14 +15,20 @@ module Alephant
|
|
12
15
|
def self.request_for(load_strategy, env)
|
13
16
|
component_factory = ComponentFactory.new load_strategy
|
14
17
|
|
18
|
+
logger.metric('RequestCount')
|
19
|
+
|
15
20
|
case request_type_from(env)
|
16
21
|
when "component"
|
22
|
+
logger.metric('ActionableRequestCount')
|
17
23
|
Asset.new(component_factory, env)
|
18
24
|
when "components"
|
25
|
+
logger.metric('ActionableRequestCount')
|
19
26
|
Batch.new(component_factory, env)
|
20
27
|
when "status"
|
28
|
+
logger.metric('StatusRequest')
|
21
29
|
Status.new
|
22
30
|
else
|
31
|
+
logger.metric('NotFoundRequest')
|
23
32
|
NotFound.new
|
24
33
|
end
|
25
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alephant-broker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.15.
|
4
|
+
version: 3.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BBC News
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|