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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64bf85e637237faf906bf3495efcc05d8c2be7295b2ff64c20c87464420f8df5
4
- data.tar.gz: 5a99f9ed1838b481b7179c3a49bfd2c531b97be001e65c26bff9a0793f6ebff7
3
+ metadata.gz: bb803d94accbed4eabd695e5671e76f582c7f6ddfbc6df5ea83e5ec092f2b661
4
+ data.tar.gz: 82ccc95b77e9535838d0345ed6d13b34d17e2d05115280cbcb9105980ce920c6
5
5
  SHA512:
6
- metadata.gz: 79a2d5c004a5602e94aa31b3f12c369f2968f06596681e6f54a05318f8d3c730c2a75d2be4dd29ed5741cb94e302f60eefdf7551e2a2ef48348506c44313656a
7
- data.tar.gz: 3640fe26ecd15c32e4a0d88773f3017618b900c614837ba26cc604a5e5c55e728f0a7dd2fc7a317e9e8461280069dec9b632d0e5100aa757992fa01c77b34dfb
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
- puts 'foreign keys response is'
16
- pp response
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
- parse_http_response(response).body
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
- puts 'create foreign key response is'
33
- pp response
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "0.1.34"
4
+ VERSION = "0.1.35"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wolf_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.34
4
+ version: 0.1.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Roncallo