bima-shark-sdk 2.4.0 → 2.4.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 +2 -1
- data/lib/shark/form_service/v2/form.rb +2 -0
- 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: c8147ff5d815f0cf58c4af42b9dc59fd12c42403
|
|
4
|
+
data.tar.gz: 0ccf7a38e06b849c464eedb854ed08e3ed529ad8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3c38fb56121825215c37f16a0dde2aa4ff4b29b25adc7e8390bcfec1319844938fc19bb01e696d6bc857241ad5aaa0ca29d319fed5ac47ea45e71155bc177500
|
|
7
|
+
data.tar.gz: 4445572bb6d832693da5c3ff66405cada2c3b39332c994c32b71a4d3a6b1d6256837eb8d913db60f331e3b29e04a05dfe2a653620b96d397972b25e8797a78b1
|
data/CHANGELOG.md
CHANGED
|
@@ -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.1
|
|
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-01
|
|
13
|
+
date: 2022-07-01 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: activesupport
|