web47core 3.2.26 → 3.2.28
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/app/controllers/status_controller.rb +2 -1
- data/app/helpers/core_card_nav_items_helper.rb +5 -2
- data/app/helpers/core_dropdown_helper.rb +11 -3
- data/app/helpers/core_floating_action_button_helper.rb +1 -1
- data/app/helpers/core_link_helper.rb +7 -3
- data/lib/app/models/concerns/archive_able.rb +1 -1
- data/lib/web47core/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7354ff9fe616fa43ce58b92aa49be8cd2ff741eaedf34147fecf8ee01b7f7f9
|
4
|
+
data.tar.gz: 2e0667cf87ab3d8c978c8e54619a4bf53769b7281a9dfda953405ed51a3fe918
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 574ef64571c0e1047c22ca98717ffacaf2aad1e0f561c7059969d160324d52525ddf6f18993c030efb7f6f88f543dbdee9ecebc01b3dfb5dafb885408e626fa7
|
7
|
+
data.tar.gz: ffbd377c3dbcc8b67589448d78f91d618f79ab17e9b9cc4e7d28e41e30278cabc266c5e09bed0f850ac2d854304e3b12c1febab3f515462c6732fdd72d23e0d7
|
@@ -84,7 +84,8 @@ class StatusController < ActionController::Base
|
|
84
84
|
value = Time.now.to_i
|
85
85
|
key = "redis-status-check-#{pid}"
|
86
86
|
Rails.cache.write key, value, expires_in: 5.seconds
|
87
|
-
|
87
|
+
cached_value = Rails.cache.fetch(key)
|
88
|
+
raise "Redis not available: Expected: #{value} with key #{key}, but got #{cached_value}" unless value.eql?(cached_value)
|
88
89
|
|
89
90
|
report_success 'Redis Available', count: 1
|
90
91
|
rescue StandardError => error
|
@@ -73,8 +73,11 @@ module CoreCardNavItemsHelper
|
|
73
73
|
# @param [String] btn_class - The class of button that should be used, btn-primary is the default
|
74
74
|
# @return HTML - The HTML for the given tag
|
75
75
|
def card_nav_item_link(path, title, icon_name, confirm: nil, method: :get, btn_class: 'btn-primary')
|
76
|
-
data = { method: method }
|
77
|
-
|
76
|
+
data = { method: method, turbo_method: method }
|
77
|
+
if confirm.present?
|
78
|
+
data[:confirm] = confirm
|
79
|
+
data[:turbo_confirm] = confirm
|
80
|
+
end
|
78
81
|
content_tag(:li, class: 'nav-item me-2') do
|
79
82
|
link_to path, class: "#{btn_class} btn nav-link active", data: data do
|
80
83
|
concat(remix_icon(icon_name, classes: ['me-2'], tooltip_text: title))
|
@@ -18,8 +18,11 @@ module CoreDropdownHelper
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def dropdown_item(path, icon_name, action_name, method: :get, confirm: nil, classes: [])
|
21
|
-
data = { method: method }
|
22
|
-
|
21
|
+
data = { method: method, turbo_method: method }
|
22
|
+
if confirm.present?
|
23
|
+
data[:confirm] = confirm
|
24
|
+
data[:turbo_confirm] = confirm
|
25
|
+
end
|
23
26
|
classes << 'dropdown-item'
|
24
27
|
content_tag(:a, class: classes.join(' '), href: path, data: data) do
|
25
28
|
concat(menu_remix_icon(icon_name))
|
@@ -72,7 +75,12 @@ module CoreDropdownHelper
|
|
72
75
|
def cancel_dropdown_item(obj, path, confirm: 'Are you sure?', method: :delete)
|
73
76
|
return unless can? :edit, obj
|
74
77
|
|
75
|
-
dropdown_item(path,
|
78
|
+
dropdown_item(path,
|
79
|
+
'close-circle',
|
80
|
+
'Cancel',
|
81
|
+
method: method,
|
82
|
+
confirm: confirm,
|
83
|
+
classes: %w[text-danger])
|
76
84
|
end
|
77
85
|
|
78
86
|
def run_dropdown_item(obj, path, method: :get, title: 'Run')
|
@@ -71,7 +71,7 @@ module CoreFloatingActionButtonHelper
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def floating_action_link(path, title, icon_name, confirm: nil, method: :get)
|
74
|
-
data = { confirm: confirm, title: title, method: method }
|
74
|
+
data = { confirm: confirm, turbo_confirm: confirm, title: title, method: method, turbo_method: method }
|
75
75
|
content_tag(:li) do
|
76
76
|
concat(content_tag(:a, class: 'dropdown-item', href: path, data: data) do
|
77
77
|
concat(menu_remix_icon(icon_name))
|
@@ -239,7 +239,7 @@ module CoreLinkHelper
|
|
239
239
|
def delete_link_tag(obj, path, options = {})
|
240
240
|
return unless can? :destroy, obj
|
241
241
|
|
242
|
-
data = { method: :delete }
|
242
|
+
data = { method: :delete, turbo_method: :delete }
|
243
243
|
confirmation_data(options, data, t('links.deletion_confirmation', name: obj.class.to_s.underscore.humanize))
|
244
244
|
link_classes = tooltip_data(options, data, I18n.t('ui_form.actions.delete'))
|
245
245
|
content_tag(:a, href: path, class: link_classes, data: data) do
|
@@ -254,7 +254,7 @@ module CoreLinkHelper
|
|
254
254
|
def delete_button_tag(obj, path, options = {})
|
255
255
|
return unless can? :destroy, obj
|
256
256
|
|
257
|
-
data = { method: :delete }
|
257
|
+
data = { method: :delete, turbo_method: :delete }
|
258
258
|
confirmation_data(options, data, t('links.deletion_confirmation', name: obj.class.to_s.underscore.humanize))
|
259
259
|
link_classes = tooltip_data(options, data)
|
260
260
|
%w[btn red].each { |c| link_classes << c unless link_classes.include?(c) }
|
@@ -445,7 +445,11 @@ module CoreLinkHelper
|
|
445
445
|
#
|
446
446
|
def confirmation_data(options, data, default = nil)
|
447
447
|
confirm = options[:confirm] || options[:confirmation] || default
|
448
|
-
|
448
|
+
if confirm.present?
|
449
|
+
data[:confirm] = confirm
|
450
|
+
data[:turbo_confirm] = confirm
|
451
|
+
end
|
452
|
+
data
|
449
453
|
end
|
450
454
|
|
451
455
|
def tooltip_data(options, data, default = nil)
|
@@ -82,7 +82,7 @@ module ArchiveAble
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def days_to_deletion
|
85
|
-
archived? ? ((archived_at + retention_days.days - Time.now.utc) / 86_400).to_i :
|
85
|
+
archived? ? ((archived_at + retention_days.days - Time.now.utc) / 86_400).to_i : 0
|
86
86
|
rescue StandardError
|
87
87
|
archived? ? retention_days : 0
|
88
88
|
end
|
data/lib/web47core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web47core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Schroeder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -713,7 +713,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
713
713
|
- !ruby/object:Gem::Version
|
714
714
|
version: '0'
|
715
715
|
requirements: []
|
716
|
-
rubygems_version: 3.
|
716
|
+
rubygems_version: 3.4.20
|
717
717
|
signing_key:
|
718
718
|
specification_version: 4
|
719
719
|
summary: App47 Web Core Library.
|