bima-shark-sdk 2.4.0 → 2.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/shark/error.rb +1 -5
- data/lib/shark/form_service/v2/form.rb +2 -0
- data/lib/shark/middleware/status.rb +2 -2
- data/lib/shark/rspec/fake_contact_service/request.rb +9 -10
- data/lib/shark/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: a940bf61424a49baa7f04791ca42ba61bb145a97
|
4
|
+
data.tar.gz: 734da4e58e55397a983e31ac9e53aa372e664a7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c1ade4eaefb81ae08c8e799d29bd6caf4b4ff1f355df7f4382c9bd0cddb3dcc0b3b0022fb4c68ffeb6d3278a95cca50a04b3076002ff1d1e5a5e9688881b36a
|
7
|
+
data.tar.gz: 12186155c320e2254eed1d4e4dcfe47ac31b2f540e5d5470d15472c3b333d9915fc75347795762be86438c7d556e004d85d2f02235bd89d5913e32f62709d763
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
## Changelog
|
2
2
|
|
3
|
-
####
|
3
|
+
#### 2.4.2
|
4
|
+
- [fix] don't swallow connection errors
|
5
|
+
|
6
|
+
#### 2.4.1
|
7
|
+
- [fix] Form Service: Added missing `versions` association to `Form`
|
4
8
|
|
5
9
|
#### 2.4.0
|
6
10
|
- added `Shark::Contact#consents` and `Shark::Contact#create_contract`
|
data/lib/shark/error.rb
CHANGED
@@ -12,8 +12,8 @@ module Shark
|
|
12
12
|
handle_status(status, env)
|
13
13
|
end
|
14
14
|
end
|
15
|
-
rescue Faraday::ConnectionFailed, Faraday::TimeoutError
|
16
|
-
raise ConnectionError,
|
15
|
+
rescue Faraday::ConnectionFailed, Faraday::TimeoutError => e
|
16
|
+
raise ConnectionError, e
|
17
17
|
end
|
18
18
|
|
19
19
|
private
|
@@ -32,7 +32,7 @@ module Shark
|
|
32
32
|
log_info '[Shark][ContactService] Faking GET request'
|
33
33
|
log_info request.uri.to_s
|
34
34
|
|
35
|
-
type = request.uri.path.split('/')[
|
35
|
+
type = request.uri.path.split('/')[-1]
|
36
36
|
params = query_params_to_object(request.uri)
|
37
37
|
|
38
38
|
objects = if %w[contacts accounts].include?(type) && params['filter'].present?
|
@@ -52,8 +52,8 @@ module Shark
|
|
52
52
|
log_info '[Shark][ContactService] Faking GET request with ID'
|
53
53
|
log_info request.uri.to_s
|
54
54
|
|
55
|
-
type = request.uri.path.split('/')[2]
|
56
|
-
id = request.uri.path.split('/')[
|
55
|
+
type = request.uri.path.split('/')[-2]
|
56
|
+
id = request.uri.path.split('/')[-1]
|
57
57
|
query = request.uri.query_values
|
58
58
|
|
59
59
|
object = cache.find(type, id)
|
@@ -84,11 +84,10 @@ module Shark
|
|
84
84
|
log_info '[Shark][ContactService] Faking GET memberships request'
|
85
85
|
log_info request.uri.to_s
|
86
86
|
|
87
|
-
|
88
|
-
group_id = request.uri.path.split('/')[3]
|
87
|
+
group_id = request.uri.path.split('/')[-2]
|
89
88
|
contact_id = query_params_to_object(request.uri)['filter']['contact_id']
|
90
89
|
|
91
|
-
group = cache.find(
|
90
|
+
group = cache.find('groups', group_id)
|
92
91
|
|
93
92
|
if group.present?
|
94
93
|
contacts = group.dig('relationships', 'contacts', 'data')
|
@@ -107,8 +106,8 @@ module Shark
|
|
107
106
|
log_info "[Shark][ContactService] Faking PATCH request with body: #{request.body}"
|
108
107
|
log_info request.uri.to_s
|
109
108
|
|
110
|
-
type = request.uri.path.split('/')[2]
|
111
|
-
id = request.uri.path.split('/')[
|
109
|
+
type = request.uri.path.split('/')[-2]
|
110
|
+
id = request.uri.path.split('/')[-1]
|
112
111
|
parsed_data = JSON.parse(request.body)['data']
|
113
112
|
|
114
113
|
object = cache.find(type, id)
|
@@ -134,8 +133,8 @@ module Shark
|
|
134
133
|
log_info '[Shark][ContactService] Faking DELETE request'
|
135
134
|
log_info request.uri.to_s
|
136
135
|
|
137
|
-
type = request.uri.path.split('/')[2]
|
138
|
-
id = request.uri.path.split('/')[
|
136
|
+
type = request.uri.path.split('/')[-2]
|
137
|
+
id = request.uri.path.split('/')[-1]
|
139
138
|
|
140
139
|
object = cache.find(type, id)
|
141
140
|
|
data/lib/shark/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bima-shark-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Huy Dinh
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-
|
13
|
+
date: 2022-10-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|