wolf_core 0.1.52 → 0.1.54
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/lib/wolf_core/infrastructure/fkm_operations.rb +16 -18
- data/lib/wolf_core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd23957ae21f0fc7435745529121a874974f57b8776729d1fa8a7e9fb7d0ab7a
|
4
|
+
data.tar.gz: f08b20bd6d26cc46caff73b1cebf492d0002345c5c981757af7ead1fa369002a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 386d1e3b66e8522629cd9cafd1d201ea5cc5cf4cb6af13a7b99ffea579220a9e1c5036d655b141c40deb3bfad4deccea649cdbc72210d78e0532f1b53e115e82
|
7
|
+
data.tar.gz: b45dc2f8b98480f6fce43482a217916297b5f14f3e8fe650b2af3da12565ae9942558edc1af4e6c82ccf038881c18030fb99c0f4301ad33fdb55cba72fb0a918
|
@@ -14,8 +14,7 @@ module WolfCore
|
|
14
14
|
url: "#{ENV['FKM_URL']}/Prod/lookup?tenant=#{tenant}&source=#{source}&source_id=#{source_id}"
|
15
15
|
)
|
16
16
|
response = parse_http_response(response)
|
17
|
-
log_object 'get_foreign_keys response is'
|
18
|
-
log_object response
|
17
|
+
log_object response, title: 'get_foreign_keys response is'
|
19
18
|
validate_http_response(response: response, message: 'Error getting foreign keys')
|
20
19
|
response.body
|
21
20
|
end
|
@@ -25,8 +24,7 @@ module WolfCore
|
|
25
24
|
url: "#{ENV['FKM_URL']}/Prod/lookup?tenant=#{tenant}&destination=#{destination}&destination_id=#{destination_id}"
|
26
25
|
)
|
27
26
|
response = parse_http_response(response)
|
28
|
-
log_object 'get_foreign_keys_by_destination response is'
|
29
|
-
log_object response
|
27
|
+
log_object response, title: 'get_foreign_keys_by_destination response is'
|
30
28
|
validate_http_response(response: response, message: 'Error getting foreign keys by destination id')
|
31
29
|
response.body
|
32
30
|
end
|
@@ -43,23 +41,23 @@ module WolfCore
|
|
43
41
|
}
|
44
42
|
)
|
45
43
|
response = parse_http_response(response)
|
46
|
-
log_object 'create_foreign_key response is'
|
47
|
-
log_object response
|
44
|
+
log_object response, title: 'create_foreign_key response is'
|
48
45
|
validate_http_response(response: response, message: 'Error creating foreign key')
|
49
46
|
parse_http_response(response).body
|
50
47
|
end
|
51
48
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
49
|
+
def find_or_create_foreign_key(tenant:, source:, source_id:, destination:, destination_id:)
|
50
|
+
destination_id = get_foreign_key_destination_id(
|
51
|
+
tenant: tenant, source: source, source_id: source_id,
|
52
|
+
destination: destination
|
53
|
+
)
|
54
|
+
log_object "find_or_create_foreign_key destination_id is #{destination_id}"
|
55
|
+
return Result.success(data: { operation: :find }) if destination_id.present?
|
56
|
+
create_foreign_key(
|
57
|
+
tenant: tenant, source: source, source_id: source_id,
|
58
|
+
destination: destination, destination_id: destination_id
|
59
|
+
)
|
60
|
+
Result.success(data: { operation: :create })
|
61
|
+
end
|
64
62
|
end
|
65
63
|
end
|
data/lib/wolf_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wolf_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.54
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Roncallo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|