wolf_core 0.1.34 → 0.1.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wolf_core/infrastructure/fkm_operations.rb +19 -5
- data/lib/wolf_core/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb803d94accbed4eabd695e5671e76f582c7f6ddfbc6df5ea83e5ec092f2b661
|
4
|
+
data.tar.gz: 82ccc95b77e9535838d0345ed6d13b34d17e2d05115280cbcb9105980ce920c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 754ac01a20f83df27edd825f6e92b02dd5943f09008bf1481698c88a3189bedc6a4f77a5515a104185af8dcb8a7886098835b44918a73c723fbdf4944f391ba3
|
7
|
+
data.tar.gz: ffda97e56ebacfe891992e1d91a8855977deecdced43f5bbe2d32a0aea1c055e8bd16f246492816b450f61d60c7c31f24cb2cd1dfc29c7be657e413ebbe4a550
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module WolfCore
|
2
2
|
module FkmOperations
|
3
3
|
include WolfCore::HttpOperations
|
4
|
+
include WolfCore::LoggingUtils
|
4
5
|
|
5
6
|
def get_foreign_key_destination_id(tenant:, source:, source_id:, destination:)
|
6
7
|
foreign_keys = get_foreign_keys(tenant: tenant, source: source, source_id: source_id)
|
@@ -12,10 +13,22 @@ module WolfCore
|
|
12
13
|
response = http_get(
|
13
14
|
url: "#{ENV['FKM_URL']}/Prod/lookup?tenant=#{tenant}&source=#{source}&source_id=#{source_id}"
|
14
15
|
)
|
15
|
-
|
16
|
-
|
16
|
+
response = parse_http_response(response)
|
17
|
+
log_object 'get_foreign_keys response is'
|
18
|
+
log_object response
|
17
19
|
validate_http_response(response: response, message: 'Error getting foreign keys')
|
18
|
-
|
20
|
+
response.body
|
21
|
+
end
|
22
|
+
|
23
|
+
def get_foreign_keys_by_destination(tenant:, destination:, destination_id:)
|
24
|
+
response = http_get(
|
25
|
+
url: "#{ENV['FKM_URL']}/Prod/lookup?tenant=#{tenant}&destination=#{destination}&destination_id=#{destination_id}"
|
26
|
+
)
|
27
|
+
response = parse_http_response(response)
|
28
|
+
log_object 'get_foreign_keys_by_destination response is'
|
29
|
+
log_object response
|
30
|
+
validate_http_response(response: response, message: 'Error getting foreign keys by destination id')
|
31
|
+
response.body
|
19
32
|
end
|
20
33
|
|
21
34
|
def create_foreign_key(tenant:, source:, source_id:, destination:, destination_id:)
|
@@ -29,8 +42,9 @@ module WolfCore
|
|
29
42
|
destination_id: destination_id
|
30
43
|
}
|
31
44
|
)
|
32
|
-
|
33
|
-
|
45
|
+
response = parse_http_response(response)
|
46
|
+
log_object 'create_foreign_key response is'
|
47
|
+
log_object response
|
34
48
|
validate_http_response(response: response, message: 'Error creating foreign key')
|
35
49
|
parse_http_response(response).body
|
36
50
|
end
|
data/lib/wolf_core/version.rb
CHANGED