alephant-broker 3.5.1 → 3.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c13b7a9cc8002ce3f9aa7e486c365f043869ac3
4
- data.tar.gz: 4b1e0a001451521746c6d2f716b8291f0f73c22b
3
+ metadata.gz: 52e4a653a307d66e0da474f0dfd58bb93a5119a5
4
+ data.tar.gz: 09de927d1e746c1366a53fabc46d258a515bd69b
5
5
  SHA512:
6
- metadata.gz: 3cb2662440354ddb7a1d789c1ad268fb008953566d903cb8e051f34dc9850bfd6e87261a8b86ae0c5cb3755b07d3e80d6f862f116b5b6661758f8f63f1ca853e
7
- data.tar.gz: c845bd7e4e2b8cb82dcf7ff09cd996adad013c3cafa3321f49e9766dcbe2257bcfc88bee6bc12f31f3d1a23ff8d57ab532498df1085c32f71c1f3db30fb13393
6
+ metadata.gz: 2c8e3714596e1493e016ce1c5cb86d918620466f599e3f2515899ebe24de938e8cd7861f5e4fc7eeac95f7fb1b74111040badb9f33f405f14c625463e0400286
7
+ data.tar.gz: 8294f0c17edb5f12b706f88aa7e3588973a82098d02880170fa7b5d4f6ef1b7cfafc892b0c52e643a0318c0e8f6bf8c8d4eddf98feb1b6b49fb2a605ecb7ed70
@@ -1 +1 @@
1
- jruby-1.7
1
+ jruby-1.7.17
@@ -15,7 +15,7 @@ module Alephant
15
15
  @@client ||= @@elasticache.client
16
16
  else
17
17
  logger.debug "Broker::Cache::Client#initialize: No config endpoint, NullClient used"
18
- logger.metric("NoConfigEndpoint", opts.merge(:function => "initialize"))
18
+ logger.metric "NoConfigEndpoint"
19
19
  @@client = NullClient.new
20
20
  end
21
21
  end
@@ -25,10 +25,7 @@ module Alephant
25
25
  versioned_key = versioned key
26
26
  result = @@client.get versioned_key
27
27
  logger.info "Broker::Cache::Client#get key: #{versioned_key} - #{result ? 'hit' : 'miss'}"
28
- logger.metric(
29
- "GetKeyMiss",
30
- opts[:dimensions].merge(:function => "get")
31
- ) unless result
28
+ logger.metric "GetKeyMiss" unless result
32
29
  result ? result : set(key, block.call)
33
30
  rescue StandardError => e
34
31
  block.call if block_given?
@@ -41,15 +38,6 @@ module Alephant
41
38
 
42
39
  private
43
40
 
44
- def opts
45
- {
46
- :dimensions => {
47
- :module => "AlephantBrokerCache",
48
- :class => "Client"
49
- }
50
- }
51
- end
52
-
53
41
  def config_endpoint
54
42
  Broker.config['elasticache_config_endpoint']
55
43
  end
@@ -20,25 +20,13 @@ module Alephant
20
20
  )
21
21
  rescue Alephant::Broker::Errors::ContentNotFound => e
22
22
  logger.warn "Broker.ComponentFactory.create: Exception raised (ContentNotFound)"
23
- logger.metric("ContentNotFound", opts)
23
+ logger.metric "ContentNotFound"
24
24
  ErrorComponent.new(component_meta, 404, e)
25
25
  rescue => e
26
26
  logger.warn "Broker.ComponentFactory.create: Exception raised (#{e.message}, #{e.backtrace.join('\n')})"
27
- logger.metric("ExceptionRaised", opts)
27
+ logger.metric "ExceptionRaised"
28
28
  ErrorComponent.new(component_meta, 500, e)
29
29
  end
30
-
31
- private
32
-
33
- def opts
34
- {
35
- :dimensions => {
36
- :module => "AlephantBroker",
37
- :class => "ComponentFactory",
38
- :function => "create"
39
- }
40
- }
41
- end
42
30
  end
43
31
  end
44
32
  end
@@ -51,20 +51,10 @@ module Alephant
51
51
  JSON.parse(json)
52
52
  rescue JSON::ParserError => e
53
53
  logger.warn "Broker.environment#data: ParserError"
54
- logger.metric("JSONParserError", opts)
54
+ logger.metric "JSONParserError"
55
55
  nil
56
56
  end
57
57
  end
58
-
59
- def opts
60
- {
61
- :dimensions => {
62
- :module => "AlephantBroker",
63
- :class => "Environment",
64
- :function => "parse"
65
- }
66
- }
67
- end
68
58
  end
69
59
  end
70
60
  end
@@ -22,10 +22,7 @@ module Alephant
22
22
  def load(component_meta)
23
23
  cache_object(component_meta)
24
24
  rescue
25
- logger.metric(
26
- "CacheMiss",
27
- opts[:dimensions].merge(:function => "load")
28
- )
25
+ logger.metric "CacheMiss"
29
26
  cache.set(component_meta.cache_key, content(component_meta))
30
27
  end
31
28
 
@@ -59,17 +56,15 @@ module Alephant
59
56
 
60
57
  Faraday.get(url_for component_meta).tap do |r|
61
58
  unless r.success?
62
- logger.metric(
63
- "ContentNotFound",
64
- opts[:dimensions].merge(:function => "request")
65
- )
59
+ logger.metric "ContentNotFound"
66
60
  raise Alephant::Broker::Errors::ContentNotFound
67
61
  end
68
62
 
69
63
  request_time = Time.new - before
70
- logger.metric("LoadComponentTime", opts.merge(
71
- :unit => "Seconds", :value => request_time,
72
- ).tap { |h| h[:dimensions].merge!(:function => "request") })
64
+ logger.metric("LoadComponentTime",
65
+ :unit => "Seconds",
66
+ :value => request_time
67
+ )
73
68
  end
74
69
  end
75
70
 
@@ -79,15 +74,6 @@ module Alephant
79
74
  component_meta.options
80
75
  )
81
76
  end
82
-
83
- def opts
84
- {
85
- :dimensions => {
86
- :module => "AlephantBrokerLoadStrategy",
87
- :class => "HTTP"
88
- }
89
- }
90
- end
91
77
  end
92
78
  end
93
79
  end
@@ -21,10 +21,7 @@ module Alephant
21
21
  component_meta
22
22
  )
23
23
  rescue
24
- logger.metric(
25
- "S3CacheMiss",
26
- opts[:dimensions].merge(:function => "load")
27
- )
24
+ logger.metric "S3CacheMiss"
28
25
  add_s3_headers(
29
26
  cache.set(
30
27
  cache_key(component_meta),
@@ -46,15 +43,6 @@ module Alephant
46
43
 
47
44
  private
48
45
 
49
- def opts
50
- {
51
- :dimensions => {
52
- :module => "AlephantBrokerLoadStrategyS3",
53
- :class => "Base"
54
- }
55
- }
56
- end
57
-
58
46
  def s3_path(component_meta)
59
47
  fail NotImplementedError
60
48
  end
@@ -73,10 +61,7 @@ module Alephant
73
61
  cached = false
74
62
  s3.get s3_path(component_meta)
75
63
  rescue AWS::S3::Errors::NoSuchKey, InvalidCacheKey
76
- logger.metric(
77
- "S3InvalidCacheKey",
78
- opts[:dimensions].merge(:function => "retrieve_object")
79
- )
64
+ logger.metric "S3InvalidCacheKey"
80
65
  raise Alephant::Broker::Errors::ContentNotFound
81
66
  end
82
67
 
@@ -17,7 +17,7 @@ module Alephant
17
17
  env.options
18
18
  )
19
19
  rescue InvalidAssetId
20
- logger.metric("InvalidAssetId", opts)
20
+ logger.metric "InvalidAssetId"
21
21
  logger.error "Broker.Request.Asset.initialize: Exception raised (InvalidAssetId)"
22
22
  end
23
23
 
@@ -26,16 +26,6 @@ module Alephant
26
26
  def component_id(path)
27
27
  path.split('/')[2] || (raise InvalidAssetId.new 'No Asset ID specified')
28
28
  end
29
-
30
- def opts
31
- {
32
- :dimensions => {
33
- :module => "AlephantBrokerRequest",
34
- :class => "Asset",
35
- :function => "initialize"
36
- }
37
- }
38
- end
39
29
  end
40
30
  end
41
31
  end
@@ -47,17 +47,7 @@ module Alephant
47
47
  end
48
48
 
49
49
  def log
50
- logger.metric("BrokerResponse#{status}", opts)
51
- end
52
-
53
- def opts
54
- {
55
- :dimensions => {
56
- :module => "AlephantBrokerResponse",
57
- :class => "Base",
58
- :function => "log"
59
- }
60
- }
50
+ logger.metric "BrokerResponse#{status}"
61
51
  end
62
52
  end
63
53
  end
@@ -1,5 +1,5 @@
1
1
  module Alephant
2
2
  module Broker
3
- VERSION = "3.5.1"
3
+ VERSION = "3.5.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,281 +1,281 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alephant-broker
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.1
4
+ version: 3.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Jack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-02 00:00:00.000000000 Z
11
+ date: 2015-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rspec
15
- version_requirements: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '>='
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
14
  requirement: !ruby/object:Gem::Requirement
21
15
  requirements:
22
16
  - - '>='
23
17
  - !ruby/object:Gem::Version
24
18
  version: '0'
19
+ name: rspec
25
20
  prerelease: false
26
21
  type: :development
27
- - !ruby/object:Gem::Dependency
28
- name: rspec-nc
29
22
  version_requirements: !ruby/object:Gem::Requirement
30
23
  requirements:
31
24
  - - '>='
32
25
  - !ruby/object:Gem::Version
33
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
34
28
  requirement: !ruby/object:Gem::Requirement
35
29
  requirements:
36
30
  - - '>='
37
31
  - !ruby/object:Gem::Version
38
32
  version: '0'
33
+ name: rspec-nc
39
34
  prerelease: false
40
35
  type: :development
41
- - !ruby/object:Gem::Dependency
42
- name: guard
43
36
  version_requirements: !ruby/object:Gem::Requirement
44
37
  requirements:
45
38
  - - '>='
46
39
  - !ruby/object:Gem::Version
47
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
48
42
  requirement: !ruby/object:Gem::Requirement
49
43
  requirements:
50
44
  - - '>='
51
45
  - !ruby/object:Gem::Version
52
46
  version: '0'
47
+ name: guard
53
48
  prerelease: false
54
49
  type: :development
55
- - !ruby/object:Gem::Dependency
56
- name: guard-rspec
57
50
  version_requirements: !ruby/object:Gem::Requirement
58
51
  requirements:
59
52
  - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
62
56
  requirement: !ruby/object:Gem::Requirement
63
57
  requirements:
64
58
  - - '>='
65
59
  - !ruby/object:Gem::Version
66
60
  version: '0'
61
+ name: guard-rspec
67
62
  prerelease: false
68
63
  type: :development
69
- - !ruby/object:Gem::Dependency
70
- name: pry
71
64
  version_requirements: !ruby/object:Gem::Requirement
72
65
  requirements:
73
66
  - - '>='
74
67
  - !ruby/object:Gem::Version
75
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
76
70
  requirement: !ruby/object:Gem::Requirement
77
71
  requirements:
78
72
  - - '>='
79
73
  - !ruby/object:Gem::Version
80
74
  version: '0'
75
+ name: pry
81
76
  prerelease: false
82
77
  type: :development
83
- - !ruby/object:Gem::Dependency
84
- name: pry-remote
85
78
  version_requirements: !ruby/object:Gem::Requirement
86
79
  requirements:
87
80
  - - '>='
88
81
  - !ruby/object:Gem::Version
89
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
90
84
  requirement: !ruby/object:Gem::Requirement
91
85
  requirements:
92
86
  - - '>='
93
87
  - !ruby/object:Gem::Version
94
88
  version: '0'
89
+ name: pry-remote
95
90
  prerelease: false
96
91
  type: :development
97
- - !ruby/object:Gem::Dependency
98
- name: pry-nav
99
92
  version_requirements: !ruby/object:Gem::Requirement
100
93
  requirements:
101
94
  - - '>='
102
95
  - !ruby/object:Gem::Version
103
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
104
98
  requirement: !ruby/object:Gem::Requirement
105
99
  requirements:
106
100
  - - '>='
107
101
  - !ruby/object:Gem::Version
108
102
  version: '0'
103
+ name: pry-nav
109
104
  prerelease: false
110
105
  type: :development
111
- - !ruby/object:Gem::Dependency
112
- name: rake-rspec
113
106
  version_requirements: !ruby/object:Gem::Requirement
114
107
  requirements:
115
108
  - - '>='
116
109
  - !ruby/object:Gem::Version
117
- version: 0.0.2
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
118
112
  requirement: !ruby/object:Gem::Requirement
119
113
  requirements:
120
114
  - - '>='
121
115
  - !ruby/object:Gem::Version
122
116
  version: 0.0.2
117
+ name: rake-rspec
123
118
  prerelease: false
124
119
  type: :development
125
- - !ruby/object:Gem::Dependency
126
- name: bundler
127
120
  version_requirements: !ruby/object:Gem::Requirement
128
121
  requirements:
129
- - - ~>
122
+ - - '>='
130
123
  - !ruby/object:Gem::Version
131
- version: '1.5'
124
+ version: 0.0.2
125
+ - !ruby/object:Gem::Dependency
132
126
  requirement: !ruby/object:Gem::Requirement
133
127
  requirements:
134
128
  - - ~>
135
129
  - !ruby/object:Gem::Version
136
130
  version: '1.5'
131
+ name: bundler
137
132
  prerelease: false
138
133
  type: :development
139
- - !ruby/object:Gem::Dependency
140
- name: rake
141
134
  version_requirements: !ruby/object:Gem::Requirement
142
135
  requirements:
143
- - - '>='
136
+ - - ~>
144
137
  - !ruby/object:Gem::Version
145
- version: '0'
138
+ version: '1.5'
139
+ - !ruby/object:Gem::Dependency
146
140
  requirement: !ruby/object:Gem::Requirement
147
141
  requirements:
148
142
  - - '>='
149
143
  - !ruby/object:Gem::Version
150
144
  version: '0'
145
+ name: rake
151
146
  prerelease: false
152
147
  type: :development
153
- - !ruby/object:Gem::Dependency
154
- name: rack-test
155
148
  version_requirements: !ruby/object:Gem::Requirement
156
149
  requirements:
157
150
  - - '>='
158
151
  - !ruby/object:Gem::Version
159
152
  version: '0'
153
+ - !ruby/object:Gem::Dependency
160
154
  requirement: !ruby/object:Gem::Requirement
161
155
  requirements:
162
156
  - - '>='
163
157
  - !ruby/object:Gem::Version
164
158
  version: '0'
159
+ name: rack-test
165
160
  prerelease: false
166
161
  type: :development
167
- - !ruby/object:Gem::Dependency
168
- name: alephant-lookup
169
162
  version_requirements: !ruby/object:Gem::Requirement
170
163
  requirements:
171
164
  - - '>='
172
165
  - !ruby/object:Gem::Version
173
166
  version: '0'
167
+ - !ruby/object:Gem::Dependency
174
168
  requirement: !ruby/object:Gem::Requirement
175
169
  requirements:
176
170
  - - '>='
177
171
  - !ruby/object:Gem::Version
178
172
  version: '0'
173
+ name: alephant-lookup
179
174
  prerelease: false
180
175
  type: :runtime
181
- - !ruby/object:Gem::Dependency
182
- name: alephant-cache
183
176
  version_requirements: !ruby/object:Gem::Requirement
184
177
  requirements:
185
178
  - - '>='
186
179
  - !ruby/object:Gem::Version
187
180
  version: '0'
181
+ - !ruby/object:Gem::Dependency
188
182
  requirement: !ruby/object:Gem::Requirement
189
183
  requirements:
190
184
  - - '>='
191
185
  - !ruby/object:Gem::Version
192
186
  version: '0'
187
+ name: alephant-cache
193
188
  prerelease: false
194
189
  type: :runtime
195
- - !ruby/object:Gem::Dependency
196
- name: alephant-logger
197
190
  version_requirements: !ruby/object:Gem::Requirement
198
191
  requirements:
199
- - - '='
192
+ - - '>='
200
193
  - !ruby/object:Gem::Version
201
- version: 1.2.0
194
+ version: '0'
195
+ - !ruby/object:Gem::Dependency
202
196
  requirement: !ruby/object:Gem::Requirement
203
197
  requirements:
204
198
  - - '='
205
199
  - !ruby/object:Gem::Version
206
200
  version: 1.2.0
201
+ name: alephant-logger
207
202
  prerelease: false
208
203
  type: :runtime
209
- - !ruby/object:Gem::Dependency
210
- name: alephant-sequencer
211
204
  version_requirements: !ruby/object:Gem::Requirement
212
205
  requirements:
213
- - - '>='
206
+ - - '='
214
207
  - !ruby/object:Gem::Version
215
- version: '0'
208
+ version: 1.2.0
209
+ - !ruby/object:Gem::Dependency
216
210
  requirement: !ruby/object:Gem::Requirement
217
211
  requirements:
218
212
  - - '>='
219
213
  - !ruby/object:Gem::Version
220
214
  version: '0'
215
+ name: alephant-sequencer
221
216
  prerelease: false
222
217
  type: :runtime
223
- - !ruby/object:Gem::Dependency
224
- name: dalli-elasticache
225
218
  version_requirements: !ruby/object:Gem::Requirement
226
219
  requirements:
227
220
  - - '>='
228
221
  - !ruby/object:Gem::Version
229
222
  version: '0'
223
+ - !ruby/object:Gem::Dependency
230
224
  requirement: !ruby/object:Gem::Requirement
231
225
  requirements:
232
226
  - - '>='
233
227
  - !ruby/object:Gem::Version
234
228
  version: '0'
229
+ name: dalli-elasticache
235
230
  prerelease: false
236
231
  type: :runtime
237
- - !ruby/object:Gem::Dependency
238
- name: pmap
239
232
  version_requirements: !ruby/object:Gem::Requirement
240
233
  requirements:
241
234
  - - '>='
242
235
  - !ruby/object:Gem::Version
243
236
  version: '0'
237
+ - !ruby/object:Gem::Dependency
244
238
  requirement: !ruby/object:Gem::Requirement
245
239
  requirements:
246
240
  - - '>='
247
241
  - !ruby/object:Gem::Version
248
242
  version: '0'
243
+ name: pmap
249
244
  prerelease: false
250
245
  type: :runtime
251
- - !ruby/object:Gem::Dependency
252
- name: faraday
253
246
  version_requirements: !ruby/object:Gem::Requirement
254
247
  requirements:
255
248
  - - '>='
256
249
  - !ruby/object:Gem::Version
257
250
  version: '0'
251
+ - !ruby/object:Gem::Dependency
258
252
  requirement: !ruby/object:Gem::Requirement
259
253
  requirements:
260
254
  - - '>='
261
255
  - !ruby/object:Gem::Version
262
256
  version: '0'
257
+ name: faraday
263
258
  prerelease: false
264
259
  type: :runtime
265
- - !ruby/object:Gem::Dependency
266
- name: crimp
267
260
  version_requirements: !ruby/object:Gem::Requirement
268
261
  requirements:
269
262
  - - '>='
270
263
  - !ruby/object:Gem::Version
271
264
  version: '0'
265
+ - !ruby/object:Gem::Dependency
272
266
  requirement: !ruby/object:Gem::Requirement
273
267
  requirements:
274
268
  - - '>='
275
269
  - !ruby/object:Gem::Version
276
270
  version: '0'
271
+ name: crimp
277
272
  prerelease: false
278
273
  type: :runtime
274
+ version_requirements: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - '>='
277
+ - !ruby/object:Gem::Version
278
+ version: '0'
279
279
  description: Brokers requests for alephant components
280
280
  email:
281
281
  - stevenmajack@gmail.com