alephant-broker 3.5.5 → 3.6.0

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: 05c6adac26727c40736d51d7819bc2a3274f2c2e
4
- data.tar.gz: e077559f777a6b5c33acdf790c7f4f74a7ac023a
3
+ metadata.gz: 7ca53c956e0cb99621191d4a9a47244143bfa9cb
4
+ data.tar.gz: 78e72d2023986bd39f46c2c6d2912ab3c9733c01
5
5
  SHA512:
6
- metadata.gz: 725b00c3beb5ae0f2af61941f028c0394076f2d04e34e9d1cf7310ad77650bba1581e35e018994238b14d3d8ac67ef732dff319853b7e4b17c2d282eb137cb64
7
- data.tar.gz: 2de20236cba6ee24b20e46d973d8304313e0263345c18187396a357a2279c89640a09b9102edaec984b81f29b706ce92713ec7f811c26b83b939ed9ddca6c31a
6
+ metadata.gz: 233cdca5fe6e33766e3ac03bfa93da871be90d60cf240280a091064551a3a0797709e5bb3d1bb7f3ff10bb24641ec23b665c68ed63fb9fa36c906efbc3ef9676
7
+ data.tar.gz: a6cc8109baf8e4a80a3c1c76b9947044993f3d2c14510fa8c880c690026e8cf7388f17f5d2cf5ccff5657b8fcd7cf88c8e202a91267ef64a459a3a18b5695bde
@@ -12,7 +12,7 @@ module Alephant
12
12
  end
13
13
 
14
14
  def setup
15
- @headers = @component.headers
15
+ @headers.merge!(@component.headers)
16
16
  @content = @component.content
17
17
  log if @component.is_a? Component
18
18
  end
@@ -21,6 +21,7 @@ module Alephant
21
21
  def initialize(status = 200, content_type = "text/html")
22
22
  @content = STATUS_CODE_MAPPING[status]
23
23
  @headers = { "Content-Type" => content_type }
24
+ @headers.merge!(Broker.config[:headers]) if Broker.config.has_key?(:headers)
24
25
  @status = status
25
26
 
26
27
  log_status
@@ -1,5 +1,5 @@
1
1
  module Alephant
2
2
  module Broker
3
- VERSION = "3.5.5"
3
+ VERSION = "3.6.0"
4
4
  end
5
5
  end
data/spec/http_spec.rb CHANGED
@@ -69,7 +69,7 @@ describe Alephant::Broker::LoadStrategy::HTTP do
69
69
  specify do
70
70
  expect do
71
71
  subject.load component_meta
72
- end.to raise_error
72
+ end.to raise_error(RuntimeError)
73
73
  end
74
74
  end
75
75
 
@@ -83,7 +83,7 @@ describe Alephant::Broker::LoadStrategy::HTTP do
83
83
  specify do
84
84
  expect do
85
85
  subject.load component_meta
86
- end.to raise_error
86
+ end.to raise_error(Alephant::Broker::Errors::ContentNotFound)
87
87
  end
88
88
  end
89
89
  end
metadata CHANGED
@@ -1,279 +1,279 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alephant-broker
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.5
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BBC News
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-26 00:00:00.000000000 Z
11
+ date: 2016-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rspec
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - ">="
16
+ - - '>='
18
17
  - !ruby/object:Gem::Version
19
18
  version: '0'
20
- type: :development
19
+ name: rspec
21
20
  prerelease: false
21
+ type: :development
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rspec-nc
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
- - - ">="
30
+ - - '>='
32
31
  - !ruby/object:Gem::Version
33
32
  version: '0'
34
- type: :development
33
+ name: rspec-nc
35
34
  prerelease: false
35
+ type: :development
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: guard
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
- - - ">="
44
+ - - '>='
46
45
  - !ruby/object:Gem::Version
47
46
  version: '0'
48
- type: :development
47
+ name: guard
49
48
  prerelease: false
49
+ type: :development
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: guard-rspec
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
- - - ">="
58
+ - - '>='
60
59
  - !ruby/object:Gem::Version
61
60
  version: '0'
62
- type: :development
61
+ name: guard-rspec
63
62
  prerelease: false
63
+ type: :development
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: pry
71
70
  requirement: !ruby/object:Gem::Requirement
72
71
  requirements:
73
- - - ">="
72
+ - - '>='
74
73
  - !ruby/object:Gem::Version
75
74
  version: '0'
76
- type: :development
75
+ name: pry
77
76
  prerelease: false
77
+ type: :development
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: pry-remote
85
84
  requirement: !ruby/object:Gem::Requirement
86
85
  requirements:
87
- - - ">="
86
+ - - '>='
88
87
  - !ruby/object:Gem::Version
89
88
  version: '0'
90
- type: :development
89
+ name: pry-remote
91
90
  prerelease: false
91
+ type: :development
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: pry-nav
99
98
  requirement: !ruby/object:Gem::Requirement
100
99
  requirements:
101
- - - ">="
100
+ - - '>='
102
101
  - !ruby/object:Gem::Version
103
102
  version: '0'
104
- type: :development
103
+ name: pry-nav
105
104
  prerelease: false
105
+ type: :development
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: rake-rspec
113
112
  requirement: !ruby/object:Gem::Requirement
114
113
  requirements:
115
- - - ">="
114
+ - - '>='
116
115
  - !ruby/object:Gem::Version
117
116
  version: 0.0.2
118
- type: :development
117
+ name: rake-rspec
119
118
  prerelease: false
119
+ type: :development
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: 0.0.2
125
125
  - !ruby/object:Gem::Dependency
126
- name: bundler
127
126
  requirement: !ruby/object:Gem::Requirement
128
127
  requirements:
129
- - - "~>"
128
+ - - ~>
130
129
  - !ruby/object:Gem::Version
131
130
  version: '1.5'
132
- type: :development
131
+ name: bundler
133
132
  prerelease: false
133
+ type: :development
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - "~>"
136
+ - - ~>
137
137
  - !ruby/object:Gem::Version
138
138
  version: '1.5'
139
139
  - !ruby/object:Gem::Dependency
140
- name: rake
141
140
  requirement: !ruby/object:Gem::Requirement
142
141
  requirements:
143
- - - ">="
142
+ - - '>='
144
143
  - !ruby/object:Gem::Version
145
144
  version: '0'
146
- type: :development
145
+ name: rake
147
146
  prerelease: false
147
+ type: :development
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - '>='
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
- name: rack-test
155
154
  requirement: !ruby/object:Gem::Requirement
156
155
  requirements:
157
- - - ">="
156
+ - - '>='
158
157
  - !ruby/object:Gem::Version
159
158
  version: '0'
160
- type: :development
159
+ name: rack-test
161
160
  prerelease: false
161
+ type: :development
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - '>='
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
- name: alephant-lookup
169
168
  requirement: !ruby/object:Gem::Requirement
170
169
  requirements:
171
- - - ">="
170
+ - - '>='
172
171
  - !ruby/object:Gem::Version
173
172
  version: '0'
174
- type: :runtime
173
+ name: alephant-lookup
175
174
  prerelease: false
175
+ type: :runtime
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ">="
178
+ - - '>='
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
- name: alephant-cache
183
182
  requirement: !ruby/object:Gem::Requirement
184
183
  requirements:
185
- - - ">="
184
+ - - '>='
186
185
  - !ruby/object:Gem::Version
187
186
  version: '0'
188
- type: :runtime
187
+ name: alephant-cache
189
188
  prerelease: false
189
+ type: :runtime
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">="
192
+ - - '>='
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
- name: alephant-logger
197
196
  requirement: !ruby/object:Gem::Requirement
198
197
  requirements:
199
198
  - - '='
200
199
  - !ruby/object:Gem::Version
201
200
  version: 1.2.0
202
- type: :runtime
201
+ name: alephant-logger
203
202
  prerelease: false
203
+ type: :runtime
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - '='
207
207
  - !ruby/object:Gem::Version
208
208
  version: 1.2.0
209
209
  - !ruby/object:Gem::Dependency
210
- name: alephant-sequencer
211
210
  requirement: !ruby/object:Gem::Requirement
212
211
  requirements:
213
- - - ">="
212
+ - - '>='
214
213
  - !ruby/object:Gem::Version
215
214
  version: '0'
216
- type: :runtime
215
+ name: alephant-sequencer
217
216
  prerelease: false
217
+ type: :runtime
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
- - - ">="
220
+ - - '>='
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
223
  - !ruby/object:Gem::Dependency
224
- name: dalli-elasticache
225
224
  requirement: !ruby/object:Gem::Requirement
226
225
  requirements:
227
- - - ">="
226
+ - - '>='
228
227
  - !ruby/object:Gem::Version
229
228
  version: '0'
230
- type: :runtime
229
+ name: dalli-elasticache
231
230
  prerelease: false
231
+ type: :runtime
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
- - - ">="
234
+ - - '>='
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0'
237
237
  - !ruby/object:Gem::Dependency
238
- name: pmap
239
238
  requirement: !ruby/object:Gem::Requirement
240
239
  requirements:
241
- - - ">="
240
+ - - '>='
242
241
  - !ruby/object:Gem::Version
243
242
  version: '0'
244
- type: :runtime
243
+ name: pmap
245
244
  prerelease: false
245
+ type: :runtime
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
- - - ">="
248
+ - - '>='
249
249
  - !ruby/object:Gem::Version
250
250
  version: '0'
251
251
  - !ruby/object:Gem::Dependency
252
- name: faraday
253
252
  requirement: !ruby/object:Gem::Requirement
254
253
  requirements:
255
- - - ">="
254
+ - - '>='
256
255
  - !ruby/object:Gem::Version
257
256
  version: '0'
258
- type: :runtime
257
+ name: faraday
259
258
  prerelease: false
259
+ type: :runtime
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
- - - ">="
262
+ - - '>='
263
263
  - !ruby/object:Gem::Version
264
264
  version: '0'
265
265
  - !ruby/object:Gem::Dependency
266
- name: crimp
267
266
  requirement: !ruby/object:Gem::Requirement
268
267
  requirements:
269
- - - ">="
268
+ - - '>='
270
269
  - !ruby/object:Gem::Version
271
270
  version: '0'
272
- type: :runtime
271
+ name: crimp
273
272
  prerelease: false
273
+ type: :runtime
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
- - - ">="
276
+ - - '>='
277
277
  - !ruby/object:Gem::Version
278
278
  version: '0'
279
279
  description: Brokers requests for alephant components
@@ -283,9 +283,9 @@ executables: []
283
283
  extensions: []
284
284
  extra_rdoc_files: []
285
285
  files:
286
- - ".gitignore"
287
- - ".ruby-version"
288
- - ".travis.yml"
286
+ - .gitignore
287
+ - .ruby-version
288
+ - .travis.yml
289
289
  - Gemfile
290
290
  - Guardfile
291
291
  - LICENSE.txt
@@ -329,24 +329,24 @@ homepage: https://github.com/BBC-News/alephant-broker
329
329
  licenses:
330
330
  - MIT
331
331
  metadata: {}
332
- post_install_message:
332
+ post_install_message:
333
333
  rdoc_options: []
334
334
  require_paths:
335
335
  - lib
336
336
  required_ruby_version: !ruby/object:Gem::Requirement
337
337
  requirements:
338
- - - ">="
338
+ - - '>='
339
339
  - !ruby/object:Gem::Version
340
340
  version: '0'
341
341
  required_rubygems_version: !ruby/object:Gem::Requirement
342
342
  requirements:
343
- - - ">="
343
+ - - '>='
344
344
  - !ruby/object:Gem::Version
345
345
  version: '0'
346
346
  requirements: []
347
- rubyforge_project:
348
- rubygems_version: 2.2.2
349
- signing_key:
347
+ rubyforge_project:
348
+ rubygems_version: 2.1.9
349
+ signing_key:
350
350
  specification_version: 4
351
351
  summary: Brokers requests for alephant components
352
352
  test_files: