wolf_core 0.1.58 → 0.1.60

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: c8fc6b6fb1daf40963791e4257de35f151fa8be03ead5ffbb3396546cee83652
4
- data.tar.gz: 69f9b762108e301a829c1ff620a7e0392be793e0f217639a219acd91aa30000b
3
+ metadata.gz: d1c77334a21f485565f2ff7dd3f433a1f8695a6379f4896798892ef4847f2bcf
4
+ data.tar.gz: 99a37788f26c5448c7fe01bf86f73f3dbc44de8b530e24f814fe002f311d526e
5
5
  SHA512:
6
- metadata.gz: bcdc4d731e939f5e271fa91fe71cd568d255c087bdbf4aaeff32c919acadb0c73a8249685ba7016f1f0b1c7acafe62e72176b10abfb0376799290a2cc0108ea0
7
- data.tar.gz: c708f23ed50b5be10e16cb8ea0cbac7ea70f34e0e30055b8aa36c65f7098941b5e1978c027823931b1d1712f170f1eb3cd83e047e8e88869ce8c3385e9a88a65
6
+ metadata.gz: ec84c7c876e3526b0012273e5fc48ffcd224e229e1aa8b70c75b19ba9b6637029a06c1116b92a00a4681554f6b943a3e78915edee9e45d95289d7802ac277947
7
+ data.tar.gz: cbf4a6e78feed1f250f7389585247798ea9398f6e14fa2fa6b6ecadd9186a8fdf25be898d4b0dc4f16ad08c481f42a552b003e6f565e8d18c143d20234362bb6
@@ -53,8 +53,7 @@ module WolfCore
53
53
  salesforce_access_token: salesforce_access_token,
54
54
  query: { calltype: 'getRecord', RecordId: record_id }
55
55
  )
56
- log_object "foreign object is"
57
- log_object foreign_object
56
+ log_object foreign_object, title: 'foreign object is'
58
57
  foreign_object
59
58
  end
60
59
 
@@ -17,15 +17,16 @@ module WolfCore
17
17
  }
18
18
 
19
19
  def route_event_request(path:, body:)
20
- domain_url = ENV['CURRENT_SAM_URL']
21
- if domain_url.present?
22
- async_http_post(url: "#{domain_url}/#{path}", body: body)
23
- else
20
+ environment = ENV['ENVIRONMENT']
21
+ if environment == 'production'
24
22
  function_name = PATH_TO_FUNCTION_NAME_MAPPING[path]
25
23
  invoke_lambda(
26
24
  function_name: function_name,
27
25
  payload: body,
28
26
  )
27
+ else
28
+ domain_url = ENV['CURRENT_SAM_URL']
29
+ async_http_post(url: "#{domain_url}/#{path}", body: body)
29
30
  end
30
31
  end
31
32
  end
@@ -1,6 +1,7 @@
1
1
  module WolfCore
2
2
  module FkmOperations
3
3
  include WolfCore::HttpOperations
4
+ include WolfCore::ExceptionOperations
4
5
  include WolfCore::LoggingUtils
5
6
 
6
7
  def get_foreign_key_destination_id(tenant:, source:, source_id:, destination:)
@@ -30,6 +31,11 @@ module WolfCore
30
31
  end
31
32
 
32
33
  def create_foreign_key(tenant:, source:, source_id:, destination:, destination_id:)
34
+ raise_service_error('tenant is required to create a foreign key') if tenant.blank?
35
+ raise_service_error('source is required to create a foreign key') if source.blank?
36
+ raise_service_error('source_id is required to create a foreign key') if source_id.blank?
37
+ raise_service_error('destination is required to create a foreign key') if destination.blank?
38
+ raise_service_error('destination_id is required to create a foreign key') if destination_id.blank?
33
39
  response = http_post(
34
40
  url: "#{ENV['FKM_URL']}/Prod/create",
35
41
  body: {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "0.1.58"
4
+ VERSION = "0.1.60"
5
5
  end
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.58
4
+ version: 0.1.60
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-07 00:00:00.000000000 Z
11
+ date: 2024-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty