completion-kit 0.24.0 → 0.25.0
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/models/completion_kit/run.rb +9 -0
- data/lib/completion_kit/version.rb +1 -1
- data/lib/completion_kit.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0dd5840d5f76c7bab0194aa14ac51d03800b9adb4d744785a4c7ee772c680b10
|
|
4
|
+
data.tar.gz: 23046698a070d0603a450be0c8cfac38bf8c5182ded3f97be756d7ea731852f2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2088a23253cd4d69dd1dc2943357fdc4ac5d62adc19bd5adf611915b4a382c8cd98e0ec4fc330ca2a03336890ae097609c4306a81c3d7c963eb9aa2c1475411e
|
|
7
|
+
data.tar.gz: daf8a1e531b1997d81e44851ae8420d0a3051f01367ac8c10a6616030d9e5cd737f1393399efec2f9e7600a505d4f9cf54158f2db970a039fae23faf181b03cb
|
|
@@ -22,6 +22,7 @@ module CompletionKit
|
|
|
22
22
|
before_validation :set_default_status, on: :create
|
|
23
23
|
before_validation :set_auto_name, on: :create
|
|
24
24
|
after_create_commit :notify_host_of_creation
|
|
25
|
+
after_update_commit :notify_host_of_start
|
|
25
26
|
|
|
26
27
|
def self.display_scoped
|
|
27
28
|
filter = CompletionKit.config.runs_display_scope
|
|
@@ -424,6 +425,14 @@ module CompletionKit
|
|
|
424
425
|
Rails.error.report(e, handled: true, context: { hook: "on_run_created", run_id: id })
|
|
425
426
|
end
|
|
426
427
|
|
|
428
|
+
def notify_host_of_start
|
|
429
|
+
return unless saved_change_to_status? && status == "running"
|
|
430
|
+
|
|
431
|
+
CompletionKit.config.on_run_started&.call(self)
|
|
432
|
+
rescue StandardError => e
|
|
433
|
+
Rails.error.report(e, handled: true, context: { hook: "on_run_started", run_id: id })
|
|
434
|
+
end
|
|
435
|
+
|
|
427
436
|
def fail_with_summary!(message)
|
|
428
437
|
errors.add(:base, message)
|
|
429
438
|
if persisted?
|
data/lib/completion_kit.rb
CHANGED