uc3-dmp-event-bridge 0.0.3 → 0.0.5

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: 0061f407f79ded7c0b7ec87632dfa65bdcdf3373b4e4d5e4534d4a891cdd5bff
4
- data.tar.gz: c768dc010958bcfa9a26537c37045924e0785e23df25cebf756e354ae18ce436
3
+ metadata.gz: 5e5884a882f33323c2f18c93367002aa1360f3db3f70c777aa0b50309867351f
4
+ data.tar.gz: f3a18988f071d18e3d74e1baee585b585d22805b5b228b922eabeb422f7f97a7
5
5
  SHA512:
6
- metadata.gz: 78466312b02998b365f6aba7811698c1cef619c94d8297d9041697a4591c1f29880424fe74672652eda158a07162ade6a22eb718093f42993c089ada0836cefd
7
- data.tar.gz: ad71a46c136e4520e47d2e5cf8fe3a899cc48ce5329ec11b516b33262a25758855f031c7e34902fd3795c9aa83b8cd3ae200c42392d995e61d5e536b39cee133
6
+ metadata.gz: 2cc59282d4a151c55712f84a7d66042c21e320a23c1a62d217ab6061eee8e4919eddb27856545e082ecf563444ef9c671a7f9840ab123ae5318a556a0c99e5e8
7
+ data.tar.gz: a4731bb1f7604e64fd56b2f655301521239839325a5836231705b94529d660088fb1be757f95a55608b5294bcb6e42765fe25bb14569ae3f0c11f64c44d2bb06
@@ -27,15 +27,16 @@ module Uc3DmpEventBridge
27
27
 
28
28
  # Publish an event to the EventBus so that other Lambdas can do their thing
29
29
  # rubocop:disable Metrics/AbcSize
30
- def publish(source:, dmp:, event_type: DEFAULT_EVENT_TYPE, logger: nil)
30
+ def publish(source:, dmp:, event_type: DEFAULT_EVENT_TYPE, detail: nil, logger: nil)
31
31
  source = "#{source} -> #{SOURCE}.publish"
32
+ detail = detail.nil? ? _generate_detail(dmp: dmp).to_json : (detail.is_a?(Hash) ? detail.to_json : detail.to_s)
32
33
 
33
34
  message = {
34
35
  entries: [{
35
36
  time: Time.now,
36
37
  source: "#{ENV.fetch('DOMAIN', nil)}:lambda:event_publisher",
37
38
  detail_type: event_type.to_s,
38
- detail: _generate_detail(dmp: dmp).to_json,
39
+ detail: detail,
39
40
  event_bus_name: ENV.fetch('EVENT_BUS_NAME', nil)
40
41
  }]
41
42
  }
@@ -60,6 +61,7 @@ module Uc3DmpEventBridge
60
61
  SK: dmp['SK'],
61
62
  dmphub_provenance_id: dmp.fetch('dmphub_provenance_id', nil),
62
63
  dmproadmap_links: dmp.fetch('dmproadmap_links', {}),
64
+ dmproadmap_related_identifiers: relateds,
63
65
  dmphub_updater_is_provenance: dmp.fetch('dmphub_updater_is_provenance', false)
64
66
  }
65
67
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpEventBridge
4
- VERSION = '0.0.3'
4
+ VERSION = '0.0.5'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-event-bridge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-06 00:00:00.000000000 Z
11
+ date: 2023-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json