bima-shark-sdk 2.4.0 → 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5cd9e83af8c7d48a3ca87715aa3743e6195a3e85
4
- data.tar.gz: 2fe2155fa9f5e1619791a6c988b7d77aaa22a61d
3
+ metadata.gz: c8147ff5d815f0cf58c4af42b9dc59fd12c42403
4
+ data.tar.gz: 0ccf7a38e06b849c464eedb854ed08e3ed529ad8
5
5
  SHA512:
6
- metadata.gz: 96753859d7e2363bbadab88a43699da4c953c62289e2121a42486997aa35d5558496affc6ef478e94699df38c5508c0eac195e0d54641d92c4886a50ffd15d39
7
- data.tar.gz: 309c64b4042225ef5f345bd48fbc573a0fb9daeaaf74f411b7994622786dbd3d93dfa0097ce1d4e32125da146f32b8385f3ccb9ce218efaefa9f2c92afb0dcb8
6
+ metadata.gz: 3c38fb56121825215c37f16a0dde2aa4ff4b29b25adc7e8390bcfec1319844938fc19bb01e696d6bc857241ad5aaa0ca29d319fed5ac47ea45e71155bc177500
7
+ data.tar.gz: 4445572bb6d832693da5c3ff66405cada2c3b39332c994c32b71a4d3a6b1d6256837eb8d913db60f331e3b29e04a05dfe2a653620b96d397972b25e8797a78b1
data/CHANGELOG.md CHANGED
@@ -1,6 +1,7 @@
1
1
  ## Changelog
2
2
 
3
- #### Unreleased
3
+ #### 2.4.1
4
+ - [fix] Form Service: Added missing `versions` association to `Form`
4
5
 
5
6
  #### 2.4.0
6
7
  - added `Shark::Contact#consents` and `Shark::Contact#create_contract`
@@ -4,6 +4,8 @@ module Shark
4
4
  module FormService
5
5
  module V2
6
6
  class Form < V2::Base
7
+ has_many :versions
8
+
7
9
  # @example
8
10
  # form = Shark::FormService::V2::Form.find(id)
9
11
  # form.activate
@@ -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('/')[2]
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('/')[3]
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
- type = request.uri.path.split('/')[2]
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(type, group_id)
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('/')[3]
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('/')[3]
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Shark
4
- VERSION = '2.4.0'
4
+ VERSION = '2.4.1'
5
5
  end
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.0
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-10 00:00:00.000000000 Z
13
+ date: 2022-07-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport