Package not found. Please check the package name and try again.

nuntius 1.3.0 → 1.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45c8d99016b685aa17d9ed3e98f034819aa1f99e26417c46e1c63f9d3e8820e0
4
- data.tar.gz: 8c436f17b211a62558e995f00602fcc58f567044d1d9be87bca2196b807be3d2
3
+ metadata.gz: 36d46202837a34ff0d400afc96a903aed10b2b46ad7d6bede57498f46f784a33
4
+ data.tar.gz: 1e7cb04b9662c6e1aa5e12cbee17e2ba0f5fec1c29483b802bd1bb372da67077
5
5
  SHA512:
6
- metadata.gz: 60988a352c0b051f24ca087e6e78c0ce14822b46a19bce77518551a8fb2eb02dc1edbe1dcedc761fb0f8f6a76457875542c10fa52c0d6399445fa1dcf008ef87
7
- data.tar.gz: 424c5204cc8f11d56c62e0518a90a06be373155824965ea386edceb461cbd19fb09c1e2e0ed6364c83ccdc7448a9f0c06965cd4374a3b3936667d3b156b9538e
6
+ metadata.gz: 8da8d020db852a34e22b10ef09bae1e1b4f2d99b687ce77d834f769cae723458b0ed251fe0333a8cba9f11484c845d4dc057f292f756761b5c270293203efdc9
7
+ data.tar.gz: 9548dec8eb79e8d6bffd934b695a9801c5a7692359ab83708f4c2055fc6d01c9fa92c5e0e87165a0e146340a2cbfa16ed6d8aa82c6429734950bf80339894601
@@ -26,7 +26,7 @@ module Nuntius
26
26
  end
27
27
  end
28
28
 
29
- column(:traffic_light) do # , sortable: false) do |template|
29
+ column(:status) do
30
30
  render do
31
31
  html do |template|
32
32
  color = Nuntius.config.flow_color(template.id)&.light_color || "green"
@@ -66,6 +66,7 @@ module Nuntius
66
66
  @metadata_fields = {}
67
67
  @metadata_humanize = ->(data) { data.inspect }
68
68
  @default_template_scope = ->(_object) { all }
69
+ @default_params = {}
69
70
  end
70
71
 
71
72
  # Make the part that is important for visible readable for humans
@@ -97,8 +98,8 @@ module Nuntius
97
98
  @transports.push(transport) if transport
98
99
  end
99
100
 
100
- def default_params(transaction_log_entry)
101
- @default_params.is_a?(Proc) ? instance_exec(transaction_log_entry, &@default_params) : @default_params
101
+ def default_params(event, record)
102
+ @default_params.is_a?(Proc) ? instance_exec(event, record, &@default_params) : @default_params
102
103
  end
103
104
 
104
105
  def flow_color(template_id)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nuntius
4
- VERSION = "1.3.0"
4
+ VERSION = "1.3.2"
5
5
  end
data/lib/nuntius.rb CHANGED
@@ -33,6 +33,7 @@ module Nuntius
33
33
  return unless obj.is_a?(Hash) || obj.nuntiable?
34
34
  return unless templates?(obj, event)
35
35
 
36
+ params = (Nuntius.config.default_params(event, obj) || {}).merge(params)
36
37
  options = params[:options] || {}
37
38
 
38
39
  if options[:perform_now] == true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nuntius
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom de Grunt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-11 00:00:00.000000000 Z
11
+ date: 2024-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apnotic