ravelin 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ravelin/response.rb +17 -2
- data/lib/ravelin/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: 40391eef2a322ca4d72abb8f73904435d848ef24
|
4
|
+
data.tar.gz: 5e22d77bc2591757d3c52e8809e6e29c112be30b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 912ba0d197c99c9f293340b9a525bc227301163089a5c6ff9a0384a90f47f3a00d6fe039f41f949c2a7891c8b1a970588d6665fcc1e4a308104e36c5d5ebd9d3
|
7
|
+
data.tar.gz: ed9f943cefef237d32a54b8d36cb9adad2097e304e8aa84ba43b78e57996d0fce73a4dea63c2299cc88e8fd47bbef52372788e62af53fb0fa6dce7b8f8aece00
|
data/lib/ravelin/response.rb
CHANGED
@@ -6,6 +6,8 @@ module Ravelin
|
|
6
6
|
:score_id,
|
7
7
|
:source,
|
8
8
|
:comment,
|
9
|
+
:label,
|
10
|
+
:tag_names,
|
9
11
|
:http_status,
|
10
12
|
:http_body
|
11
13
|
|
@@ -14,6 +16,16 @@ module Ravelin
|
|
14
16
|
|
15
17
|
data = faraday_response.body.fetch('data', {})
|
16
18
|
|
19
|
+
tag(data) if data.key?('tagNames')
|
20
|
+
event(data) if data.key?('action')
|
21
|
+
|
22
|
+
@http_status = faraday_response.status
|
23
|
+
@http_body = faraday_response.body
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def event(data)
|
17
29
|
@customer_id = data['customerId']
|
18
30
|
@action = data['action']
|
19
31
|
@score = data['score']
|
@@ -21,8 +33,11 @@ module Ravelin
|
|
21
33
|
@source = data['source']
|
22
34
|
@comment = data['comment']
|
23
35
|
@customer_id = data['customerId']
|
24
|
-
|
25
|
-
|
36
|
+
end
|
37
|
+
|
38
|
+
def tag(data)
|
39
|
+
@tag_names = data['tagNames']
|
40
|
+
@label = data['label']
|
26
41
|
end
|
27
42
|
end
|
28
43
|
end
|
data/lib/ravelin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ravelin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Levy
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-11-
|
14
|
+
date: 2018-11-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: faraday
|