alephant-broker 1.2.1 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -2
- data/alephant-broker.gemspec +2 -2
- data/lib/alephant/broker.rb +11 -11
- data/lib/alephant/broker/component.rb +20 -67
- data/lib/alephant/broker/component_factory.rb +30 -0
- data/lib/alephant/broker/component_meta.rb +51 -0
- data/lib/alephant/broker/error_component.rb +42 -0
- data/lib/alephant/broker/errors/content_not_found.rb +7 -0
- data/lib/alephant/broker/errors/invalid_cache_key.rb +1 -3
- data/lib/alephant/broker/load_strategy/s3.rb +88 -0
- data/lib/alephant/broker/request/asset.rb +2 -3
- data/lib/alephant/broker/request/batch.rb +4 -5
- data/lib/alephant/broker/request/factory.rb +23 -18
- data/lib/alephant/broker/request/handler.rb +5 -10
- data/lib/alephant/broker/response/asset.rb +17 -10
- data/lib/alephant/broker/response/base.rb +5 -53
- data/lib/alephant/broker/response/batch.rb +12 -9
- data/lib/alephant/broker/response/factory.rb +4 -0
- data/lib/alephant/broker/version.rb +1 -1
- data/spec/fixtures/json/batch.json +1 -0
- data/spec/fixtures/json/batch_compiled.json +1 -0
- data/spec/integration/spec_helper.rb +1 -0
- data/spec/rack_spec.rb +97 -96
- data/spec/spec_helper.rb +4 -0
- metadata +57 -46
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,253 +1,253 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alephant-broker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Jack
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - '>='
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '0'
|
14
19
|
name: rspec
|
20
|
+
prerelease: false
|
21
|
+
type: :development
|
15
22
|
version_requirements: !ruby/object:Gem::Requirement
|
16
23
|
requirements:
|
17
24
|
- - '>='
|
18
25
|
- !ruby/object:Gem::Version
|
19
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
20
28
|
requirement: !ruby/object:Gem::Requirement
|
21
29
|
requirements:
|
22
30
|
- - '>='
|
23
31
|
- !ruby/object:Gem::Version
|
24
32
|
version: '0'
|
33
|
+
name: rspec-nc
|
25
34
|
prerelease: false
|
26
35
|
type: :development
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rspec-nc
|
29
36
|
version_requirements: !ruby/object:Gem::Requirement
|
30
37
|
requirements:
|
31
38
|
- - '>='
|
32
39
|
- !ruby/object:Gem::Version
|
33
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
34
42
|
requirement: !ruby/object:Gem::Requirement
|
35
43
|
requirements:
|
36
44
|
- - '>='
|
37
45
|
- !ruby/object:Gem::Version
|
38
46
|
version: '0'
|
47
|
+
name: guard
|
39
48
|
prerelease: false
|
40
49
|
type: :development
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: guard
|
43
50
|
version_requirements: !ruby/object:Gem::Requirement
|
44
51
|
requirements:
|
45
52
|
- - '>='
|
46
53
|
- !ruby/object:Gem::Version
|
47
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
48
56
|
requirement: !ruby/object:Gem::Requirement
|
49
57
|
requirements:
|
50
58
|
- - '>='
|
51
59
|
- !ruby/object:Gem::Version
|
52
60
|
version: '0'
|
61
|
+
name: guard-rspec
|
53
62
|
prerelease: false
|
54
63
|
type: :development
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: guard-rspec
|
57
64
|
version_requirements: !ruby/object:Gem::Requirement
|
58
65
|
requirements:
|
59
66
|
- - '>='
|
60
67
|
- !ruby/object:Gem::Version
|
61
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
62
70
|
requirement: !ruby/object:Gem::Requirement
|
63
71
|
requirements:
|
64
72
|
- - '>='
|
65
73
|
- !ruby/object:Gem::Version
|
66
74
|
version: '0'
|
75
|
+
name: pry
|
67
76
|
prerelease: false
|
68
77
|
type: :development
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: pry
|
71
78
|
version_requirements: !ruby/object:Gem::Requirement
|
72
79
|
requirements:
|
73
80
|
- - '>='
|
74
81
|
- !ruby/object:Gem::Version
|
75
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
76
84
|
requirement: !ruby/object:Gem::Requirement
|
77
85
|
requirements:
|
78
86
|
- - '>='
|
79
87
|
- !ruby/object:Gem::Version
|
80
88
|
version: '0'
|
89
|
+
name: pry-remote
|
81
90
|
prerelease: false
|
82
91
|
type: :development
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: pry-remote
|
85
92
|
version_requirements: !ruby/object:Gem::Requirement
|
86
93
|
requirements:
|
87
94
|
- - '>='
|
88
95
|
- !ruby/object:Gem::Version
|
89
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
90
98
|
requirement: !ruby/object:Gem::Requirement
|
91
99
|
requirements:
|
92
100
|
- - '>='
|
93
101
|
- !ruby/object:Gem::Version
|
94
102
|
version: '0'
|
103
|
+
name: pry-nav
|
95
104
|
prerelease: false
|
96
105
|
type: :development
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: pry-nav
|
99
106
|
version_requirements: !ruby/object:Gem::Requirement
|
100
107
|
requirements:
|
101
108
|
- - '>='
|
102
109
|
- !ruby/object:Gem::Version
|
103
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
104
112
|
requirement: !ruby/object:Gem::Requirement
|
105
113
|
requirements:
|
106
114
|
- - '>='
|
107
115
|
- !ruby/object:Gem::Version
|
108
|
-
version:
|
116
|
+
version: 0.0.2
|
117
|
+
name: rake-rspec
|
109
118
|
prerelease: false
|
110
119
|
type: :development
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: bundler
|
113
120
|
version_requirements: !ruby/object:Gem::Requirement
|
114
121
|
requirements:
|
115
|
-
- -
|
122
|
+
- - '>='
|
116
123
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
124
|
+
version: 0.0.2
|
125
|
+
- !ruby/object:Gem::Dependency
|
118
126
|
requirement: !ruby/object:Gem::Requirement
|
119
127
|
requirements:
|
120
128
|
- - ~>
|
121
129
|
- !ruby/object:Gem::Version
|
122
130
|
version: '1.5'
|
131
|
+
name: bundler
|
123
132
|
prerelease: false
|
124
133
|
type: :development
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: rake
|
127
134
|
version_requirements: !ruby/object:Gem::Requirement
|
128
135
|
requirements:
|
129
|
-
- -
|
136
|
+
- - ~>
|
130
137
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
138
|
+
version: '1.5'
|
139
|
+
- !ruby/object:Gem::Dependency
|
132
140
|
requirement: !ruby/object:Gem::Requirement
|
133
141
|
requirements:
|
134
142
|
- - '>='
|
135
143
|
- !ruby/object:Gem::Version
|
136
144
|
version: '0'
|
145
|
+
name: rake
|
137
146
|
prerelease: false
|
138
147
|
type: :development
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: rack-test
|
141
148
|
version_requirements: !ruby/object:Gem::Requirement
|
142
149
|
requirements:
|
143
150
|
- - '>='
|
144
151
|
- !ruby/object:Gem::Version
|
145
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
146
154
|
requirement: !ruby/object:Gem::Requirement
|
147
155
|
requirements:
|
148
156
|
- - '>='
|
149
157
|
- !ruby/object:Gem::Version
|
150
158
|
version: '0'
|
159
|
+
name: rack-test
|
151
160
|
prerelease: false
|
152
161
|
type: :development
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: request_store
|
155
162
|
version_requirements: !ruby/object:Gem::Requirement
|
156
163
|
requirements:
|
157
164
|
- - '>='
|
158
165
|
- !ruby/object:Gem::Version
|
159
166
|
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
160
168
|
requirement: !ruby/object:Gem::Requirement
|
161
169
|
requirements:
|
162
170
|
- - '>='
|
163
171
|
- !ruby/object:Gem::Version
|
164
172
|
version: '0'
|
173
|
+
name: alephant-lookup
|
165
174
|
prerelease: false
|
166
175
|
type: :runtime
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: peach
|
169
176
|
version_requirements: !ruby/object:Gem::Requirement
|
170
177
|
requirements:
|
171
178
|
- - '>='
|
172
179
|
- !ruby/object:Gem::Version
|
173
180
|
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
174
182
|
requirement: !ruby/object:Gem::Requirement
|
175
183
|
requirements:
|
176
184
|
- - '>='
|
177
185
|
- !ruby/object:Gem::Version
|
178
186
|
version: '0'
|
187
|
+
name: alephant-cache
|
179
188
|
prerelease: false
|
180
189
|
type: :runtime
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: alephant-lookup
|
183
190
|
version_requirements: !ruby/object:Gem::Requirement
|
184
191
|
requirements:
|
185
192
|
- - '>='
|
186
193
|
- !ruby/object:Gem::Version
|
187
194
|
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
188
196
|
requirement: !ruby/object:Gem::Requirement
|
189
197
|
requirements:
|
190
198
|
- - '>='
|
191
199
|
- !ruby/object:Gem::Version
|
192
200
|
version: '0'
|
201
|
+
name: alephant-logger
|
193
202
|
prerelease: false
|
194
203
|
type: :runtime
|
195
|
-
- !ruby/object:Gem::Dependency
|
196
|
-
name: alephant-cache
|
197
204
|
version_requirements: !ruby/object:Gem::Requirement
|
198
205
|
requirements:
|
199
206
|
- - '>='
|
200
207
|
- !ruby/object:Gem::Version
|
201
208
|
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
202
210
|
requirement: !ruby/object:Gem::Requirement
|
203
211
|
requirements:
|
204
212
|
- - '>='
|
205
213
|
- !ruby/object:Gem::Version
|
206
214
|
version: '0'
|
215
|
+
name: alephant-sequencer
|
207
216
|
prerelease: false
|
208
217
|
type: :runtime
|
209
|
-
- !ruby/object:Gem::Dependency
|
210
|
-
name: alephant-logger
|
211
218
|
version_requirements: !ruby/object:Gem::Requirement
|
212
219
|
requirements:
|
213
220
|
- - '>='
|
214
221
|
- !ruby/object:Gem::Version
|
215
222
|
version: '0'
|
223
|
+
- !ruby/object:Gem::Dependency
|
216
224
|
requirement: !ruby/object:Gem::Requirement
|
217
225
|
requirements:
|
218
226
|
- - '>='
|
219
227
|
- !ruby/object:Gem::Version
|
220
228
|
version: '0'
|
229
|
+
name: dalli-elasticache
|
221
230
|
prerelease: false
|
222
231
|
type: :runtime
|
223
|
-
- !ruby/object:Gem::Dependency
|
224
|
-
name: alephant-sequencer
|
225
232
|
version_requirements: !ruby/object:Gem::Requirement
|
226
233
|
requirements:
|
227
234
|
- - '>='
|
228
235
|
- !ruby/object:Gem::Version
|
229
236
|
version: '0'
|
237
|
+
- !ruby/object:Gem::Dependency
|
230
238
|
requirement: !ruby/object:Gem::Requirement
|
231
239
|
requirements:
|
232
240
|
- - '>='
|
233
241
|
- !ruby/object:Gem::Version
|
234
242
|
version: '0'
|
243
|
+
name: pmap
|
235
244
|
prerelease: false
|
236
245
|
type: :runtime
|
237
|
-
- !ruby/object:Gem::Dependency
|
238
|
-
name: dalli-elasticache
|
239
246
|
version_requirements: !ruby/object:Gem::Requirement
|
240
247
|
requirements:
|
241
248
|
- - '>='
|
242
249
|
- !ruby/object:Gem::Version
|
243
250
|
version: '0'
|
244
|
-
requirement: !ruby/object:Gem::Requirement
|
245
|
-
requirements:
|
246
|
-
- - '>='
|
247
|
-
- !ruby/object:Gem::Version
|
248
|
-
version: '0'
|
249
|
-
prerelease: false
|
250
|
-
type: :runtime
|
251
251
|
description: Brokers requests for alephant components
|
252
252
|
email:
|
253
253
|
- stevenmajack@gmail.com
|
@@ -267,9 +267,14 @@ files:
|
|
267
267
|
- lib/alephant/broker.rb
|
268
268
|
- lib/alephant/broker/cache.rb
|
269
269
|
- lib/alephant/broker/component.rb
|
270
|
+
- lib/alephant/broker/component_factory.rb
|
271
|
+
- lib/alephant/broker/component_meta.rb
|
270
272
|
- lib/alephant/broker/environment.rb
|
273
|
+
- lib/alephant/broker/error_component.rb
|
274
|
+
- lib/alephant/broker/errors/content_not_found.rb
|
271
275
|
- lib/alephant/broker/errors/invalid_asset_id.rb
|
272
276
|
- lib/alephant/broker/errors/invalid_cache_key.rb
|
277
|
+
- lib/alephant/broker/load_strategy/s3.rb
|
273
278
|
- lib/alephant/broker/request.rb
|
274
279
|
- lib/alephant/broker/request/asset.rb
|
275
280
|
- lib/alephant/broker/request/batch.rb
|
@@ -283,6 +288,9 @@ files:
|
|
283
288
|
- lib/alephant/broker/response/factory.rb
|
284
289
|
- lib/alephant/broker/response/multi.rb
|
285
290
|
- lib/alephant/broker/version.rb
|
291
|
+
- spec/fixtures/json/batch.json
|
292
|
+
- spec/fixtures/json/batch_compiled.json
|
293
|
+
- spec/integration/spec_helper.rb
|
286
294
|
- spec/rack_spec.rb
|
287
295
|
- spec/spec_helper.rb
|
288
296
|
homepage: https://github.com/BBC-News/alephant-broker
|
@@ -310,5 +318,8 @@ signing_key:
|
|
310
318
|
specification_version: 4
|
311
319
|
summary: Brokers requests for alephant components
|
312
320
|
test_files:
|
321
|
+
- spec/fixtures/json/batch.json
|
322
|
+
- spec/fixtures/json/batch_compiled.json
|
323
|
+
- spec/integration/spec_helper.rb
|
313
324
|
- spec/rack_spec.rb
|
314
325
|
- spec/spec_helper.rb
|