signum 0.5.0 → 0.5.1

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: 24b0e2cdc6b8936ceb9c1cb718ec2e78c53ef50fbb7cbad8b174b92f9b500a64
4
- data.tar.gz: aac0042cb09a5df30ecc681a6b51da1427fd3120a20a11a8d8fce4ed39ccaeb7
3
+ metadata.gz: 80bcbf3b5c508331a717b1f9b17b7d14b06c88612f54635e45f87643453ddf5b
4
+ data.tar.gz: 5e44b69680cd000e0a048d595aa0539114b3fb1b9424a9b5812eff94d41d80fa
5
5
  SHA512:
6
- metadata.gz: 42b34828f5bea2a46a40c52be15f5fa9bebd6904110820e301dded3fe3f8fcc065941e505c441ea60d43babe3e894655c504d6a4060eb130d373769cd3c7042b
7
- data.tar.gz: 738bed62ed28d5ca6ae5f6013354374462f898f1a925dec27695a955bc5945e5e89fb2e90822f04d2fdecafb6c0a210bda71c43ce34615e5b99e17a3267cb7c0
6
+ metadata.gz: d698d607336e153b25d2dfbe5717bbdeb7338a88c77049dbfa7c40e24b3cbcdd2918baedb902e360b47b67a0bed9827b73bc9604562263c27de95279d89c9571
7
+ data.tar.gz: a94a9bea7fb4242fd2f9fd312ffbf2730bd4f8479244828ce977f39b54ea784c7b4048e0c66b6a04a133a1665a590d633964ade726d4af7b73414f3618bd2122
@@ -14,9 +14,10 @@
14
14
  - if signal.metadata.present? && signal.metadata["links"].present?
15
15
  .signum-notification-body__mb__bc__mc__lkc
16
16
  - signal.metadata["links"].each do | link |
17
- a.signum-notification-body__mb__bc__mc__lkc__lk href="#{link["url"]}" target=link.fetch("target", "_blank") *link["link_attributes"]
17
+ - next unless link.is_a?(Hash)
18
+ a.signum-notification-body__mb__bc__mc__lkc__lk*{href: link.fetch('url', '#'), target:link.fetch("target", "_blank") }.merge(link.fetch("link_attributes", {}))
18
19
  i.fas.fa-link
19
- =< link["title"]
20
+ =< link["title"] || link["url"] || '(...)'
20
21
  - if signal.attachments.attached?
21
22
  .signum-notification-body__mb__bc__mc__attc
22
23
  - signal.attachments.each do | attachment |
@@ -32,10 +33,11 @@
32
33
  - if signal.metadata.present? && signal.metadata["buttons"].present?
33
34
  .signum-notification-body__mb__bmc
34
35
  - signal.metadata["buttons"].each do | button |
36
+ - next unless button.is_a?(Hash)
35
37
  .signum-notification-body__mb__bmc__bc
36
- a.signum-notification-body__mb__bmc__bc__b href="#{button["url"]}" target=button.fetch("target", "_blank") *button["link_attributes"]
38
+ a.signum-notification-body__mb__bmc__bc__b*{href: button.fetch('url', '#'), target:button.fetch("target", "_blank")}.merge(button.fetch("link_attributes", {}))
37
39
  = button["title"]
38
40
  - if signal.count.present?
39
41
  - percentage = signal.total.present? ? signal.count.fdiv(signal.total) * 100 : signal.count
40
42
  .signum-notification-body__pbc
41
- = sts.progress_bar percentage, size: :small, label: false
43
+ = sts.progress_bar percentage, size: :small, label: false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Signum
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom de Grunt