cognito-client 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/flay.yml +1 -1
- data/lib/cognito/client/resource.rb +1 -1
- data/lib/cognito/client/response.rb +1 -1
- data/lib/cognito/client/response/builder.rb +8 -1
- data/lib/cognito/version.rb +1 -1
- 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: 254a261b87f0e6c1632d4ea5dde068bfc048fab4
|
4
|
+
data.tar.gz: 82afab80836bce46a4c059ede534a174b46a1d5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 071d208ecb7dac5f6d34be8f0abf5ad1b6365cd9ccb614108f371e6c8056fbd4fc2b40ea08b5277d2b623b43667e51b2df7550665601c9bd1e28d599ec782a13
|
7
|
+
data.tar.gz: d405291bf36e571667b255ba15103ead4878ba53cd32d8afca5a49e8734f31b2c9c09a31da724a167d7c3325292aec010998fc6a47c002ab557a7cf8e845d46f
|
data/config/flay.yml
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
class Cognito
|
4
4
|
class Client
|
5
5
|
class Response
|
6
|
-
include Anima.new(:status, :headers, :data, :connection)
|
6
|
+
include Anima.new(:status, :headers, :data, :json, :connection)
|
7
7
|
|
8
8
|
def self.build(response, connection)
|
9
9
|
new(Builder.call(response).merge(connection: connection))
|
@@ -10,7 +10,8 @@ class Cognito
|
|
10
10
|
{
|
11
11
|
status: build_status,
|
12
12
|
headers: response.headers.to_hash,
|
13
|
-
data: build_data
|
13
|
+
data: build_data,
|
14
|
+
json: json_body
|
14
15
|
}
|
15
16
|
end
|
16
17
|
|
@@ -22,6 +23,12 @@ class Cognito
|
|
22
23
|
resource_class.build(document.data, document)
|
23
24
|
end
|
24
25
|
|
26
|
+
def json_body
|
27
|
+
return if response.body.empty?
|
28
|
+
|
29
|
+
JSON.parse(response)
|
30
|
+
end
|
31
|
+
|
25
32
|
def build_status
|
26
33
|
Status.new(
|
27
34
|
code: response.code,
|
data/lib/cognito/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cognito-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Connor Jacobsen
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-10-
|
13
|
+
date: 2016-10-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|