faraday-for_test 0.1.0 → 0.1.1
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/VERSION +1 -1
- data/lib/faraday/for_test/proxy.rb +2 -3
- data/lib/faraday/for_test/response.rb +6 -2
- data/lib/faraday/for_test/response/dumper.rb +2 -2
- 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: 752a3427894e7b7f24e0619e79dde40e47a3c944
|
4
|
+
data.tar.gz: 21c6430fd7e5aafcb7f6bfa2e8183229370f0d7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbe5bbc7ef280154914b479d19a512195ac496f5fdfbde942ccdd2d6f6c3ede6481af76d1964388bbc034462e554ae350f577d020b17a21e4a5ed16dcb5d050d
|
7
|
+
data.tar.gz: 739e1cef585d51a45796bd3fb20a6fcaab966f9612552b0a62f7d4ab3d65ddae2fae11ae3fd7cbfce4d85bf2d269ce81e133f4534d252a8caf65f23edfb83778
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
@@ -12,11 +12,10 @@ module Faraday::ForTest
|
|
12
12
|
maybe_response = @connection.__send__(name, *args, &block)
|
13
13
|
|
14
14
|
if maybe_response.is_a?(::Faraday::Response)
|
15
|
-
|
15
|
+
request_params = args.find {|e| e.is_a?(::Array) || e.is_a?(::Hash) || e.is_a?(::NilClass) }
|
16
16
|
|
17
17
|
# TODO: configurable to find out request_params from args
|
18
|
-
|
19
|
-
response
|
18
|
+
::Faraday::ForTest::Response.new(maybe_response, request_params: request_params)
|
20
19
|
else
|
21
20
|
maybe_response
|
22
21
|
end
|
@@ -10,9 +10,13 @@ module Faraday::ForTest
|
|
10
10
|
|
11
11
|
attr_accessor :request_params
|
12
12
|
|
13
|
-
def initialize(response)
|
13
|
+
def initialize(response, params = {})
|
14
14
|
@respone = response
|
15
|
-
|
15
|
+
|
16
|
+
@request_params = params.delete(:request_params)
|
17
|
+
@params = params
|
18
|
+
|
19
|
+
super(response)
|
16
20
|
end
|
17
21
|
end
|
18
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faraday-for_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- okitan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|