alephant-broker 0.1.5 → 0.1.6
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7410ac49baac4bf594eabcfde56e669343902682
|
|
4
|
+
data.tar.gz: 1ab7c48a49eb1e41182d4968c9cfe14a736032ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 197a8602b01a878fd66154c23e4a783f4cc1fc7603c351ac016a55d6df5b9ab87bc07a12ece82a7dbeda6c0ab3f25f76912ce0e2befed2a730525f8bad39e251
|
|
7
|
+
data.tar.gz: a5f6f485240d886380682631df0b558377a46b8d65838b87d9c4aa5216d4b5cb39bfb3cf2a2d483b51648585ddc5683d956c3aa74a9d0e609972031d46e476be
|
|
@@ -23,12 +23,14 @@ module Alephant
|
|
|
23
23
|
|
|
24
24
|
def json
|
|
25
25
|
get_components.peach do |component|
|
|
26
|
+
thread_local_request = @request.clone
|
|
27
|
+
|
|
26
28
|
id = component['component']
|
|
27
29
|
options = set_keys_to_symbols component.fetch('options', {})
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
thread_local_request.set_component(id, options)
|
|
30
32
|
|
|
31
|
-
asset = AssetResponse.new(
|
|
33
|
+
asset = AssetResponse.new(thread_local_request, @config)
|
|
32
34
|
component.store('status', asset.status)
|
|
33
35
|
component.store('body', asset.content) if valid_status_for asset
|
|
34
36
|
end
|
data/spec/batch_response_spec.rb
CHANGED
|
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
|
3
3
|
describe Alephant::Broker::ResponseFactory do
|
|
4
4
|
describe "#response_from(request)" do
|
|
5
5
|
let (:request) { double("Alephant::Broker::Request") }
|
|
6
|
-
let (:post_request) { double("Alephant::Broker::PostRequest") }
|
|
6
|
+
let (:post_request) { double("Alephant::Broker::PostRequest").as_null_object }
|
|
7
7
|
|
|
8
8
|
it "should return asset response" do
|
|
9
9
|
instance = Alephant::Broker::ResponseFactory.new({})
|
|
@@ -34,7 +34,6 @@ describe Alephant::Broker::ResponseFactory do
|
|
|
34
34
|
Alephant::Broker::AssetResponse
|
|
35
35
|
.any_instance
|
|
36
36
|
.stub(:initialize)
|
|
37
|
-
.with(post_request, {})
|
|
38
37
|
|
|
39
38
|
expect(instance.response_from(post_request))
|
|
40
39
|
.to be_a Alephant::Broker::BatchResponse
|
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: 0.1.
|
|
4
|
+
version: 0.1.6
|
|
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-04-
|
|
11
|
+
date: 2014-04-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|