sidekiq_adhoc_job 2.2.1 → 2.2.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 660ad86dfb526fe0eb9b473d1a86799c5f20d0f76934740e87365da5cb9bb287
|
|
4
|
+
data.tar.gz: 1237cc51e7ca8b2f52ca89e35969f153de5c97e72196c9134a6c1764e16c5565
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3358428e19855f80d3f3b6ea468f10f4f634c3d15fd7d36e5843d1f2211af7d1dde8810e7b7e73799f6fecc47fb79532cc98f6aa9423837c752c8b9161a9b7a4
|
|
7
|
+
data.tar.gz: 87493129755ea165c769362b0723756155133cebcfbe53e8bfd597dfef572f23ba22313ab3946c62d347e505dcbf0d0c701f264210ab23e811c1be517a3a5f73
|
|
@@ -60,8 +60,13 @@
|
|
|
60
60
|
<script>
|
|
61
61
|
document.getElementById('adhoc-jobs-submit-form').addEventListener('submit', (event) => {
|
|
62
62
|
const confirmPrompt = "<%= @presented_job.confirm_prompt_message %>";
|
|
63
|
-
|
|
63
|
+
const input = prompt(`Please enter "${confirmPrompt}" to confirm`);
|
|
64
|
+
if (input !== confirmPrompt) {
|
|
64
65
|
event.preventDefault();
|
|
66
|
+
if (input !== null) {
|
|
67
|
+
alert('Your confirmation input is incorrect, try again.');
|
|
68
|
+
}
|
|
69
|
+
}
|
|
65
70
|
})
|
|
66
71
|
</script>
|
|
67
72
|
<% end %>
|
data/lib/sidekiq_adhoc_job.rb
CHANGED
|
@@ -59,8 +59,15 @@ module SidekiqAdhocJob
|
|
|
59
59
|
Array(@module_names).map(&:to_s)
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
-
def
|
|
63
|
-
@
|
|
62
|
+
def require_confirm_proc
|
|
63
|
+
@require_confirm_proc ||= \
|
|
64
|
+
if @require_confirm_worker_names.respond_to?(:call)
|
|
65
|
+
@require_confirm_worker_names
|
|
66
|
+
else
|
|
67
|
+
shortlisted_workers = Array(@require_confirm_worker_names).map(&:to_s)
|
|
68
|
+
|
|
69
|
+
->(worker_name) { shortlisted_workers.include?(worker_name) }
|
|
70
|
+
end
|
|
64
71
|
end
|
|
65
72
|
|
|
66
73
|
def require_confirm_prompt_message=(message)
|
|
@@ -70,7 +77,7 @@ module SidekiqAdhocJob
|
|
|
70
77
|
end
|
|
71
78
|
|
|
72
79
|
def require_confirmation?(worker_name)
|
|
73
|
-
|
|
80
|
+
require_confirm_proc.call(worker_name)
|
|
74
81
|
end
|
|
75
82
|
|
|
76
83
|
def strategy
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sidekiq_adhoc_job
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.2.
|
|
4
|
+
version: 2.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Goh Khoon Hiang
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-01-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pry
|