stepper_motor 0.1.11 → 0.1.12

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: 619a3e8a9435e06f7fcf5b61ddc41d7ebb62450cb9fafccf89f8399818264ef0
4
- data.tar.gz: 3c3009f6b5c48a8dcdcd92187dbadc21d92c37b86746b8426dba8b6b60cb007f
3
+ metadata.gz: dcbfb106c1b6c9c74cef277a3bedec00c970d5264856ae92671b6f2302936eaa
4
+ data.tar.gz: a351a974b2ed5af98f20c8e816e43aac19982539054c7db1e3b1290d2d6a2538
5
5
  SHA512:
6
- metadata.gz: 1911106735b7ef6d54e7b3149cfbf26a13a6a0ec8e69a45429e244216c32f46b63b114b8101b369a36c22cdae10682a8c0adf599f18efe9bcfd2a9ded05be3ab
7
- data.tar.gz: e9996b145db211444300230ae742e8da61f8db21f3841a21c97a37779203767f4fc46535656c698c494001bbe024c6cd681599595df5a73fdaae101417ebde4c
6
+ metadata.gz: 6a7f3190a99a62537b17ccfdfd76f1c4879a5b5c054395ffbd1d4ccaf7da469f96e2198954adbb2db79571b046b772ea37daf3865f27c23ea7d3a2b75f505699
7
+ data.tar.gz: 8f999b8fb9e599d6cfac817a82cc4640902d9812a296f9643cd80d0632099f94140645f9ad55dcbd1a043e1c6f25df3084a0cc23ab88b24ac206dab2b991c302
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.12] - 2025-06-08
4
+
5
+ - Ensure base job extension gets done via the reloader, so that app classes are available
6
+
3
7
  ## [0.1.11] - 2025-06-08
4
8
 
5
9
  - Add automatic cleanup of completed journeys after a configurable time period
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StepperMotor
4
- VERSION = "0.1.11"
4
+ VERSION = "0.1.12"
5
5
  end
data/lib/stepper_motor.rb CHANGED
@@ -32,6 +32,8 @@ module StepperMotor
32
32
 
33
33
  # Extends the BaseJob of the library with any additional options
34
34
  def self.extend_base_job(&blk)
35
- BaseJob.class_eval(&blk)
35
+ ActiveSupport::Reloader.to_prepare do
36
+ BaseJob.class_eval(&blk)
37
+ end
36
38
  end
37
39
  end
@@ -2,7 +2,7 @@
2
2
  # StepperMotor is a module for building multi-step flows where steps are sequential and only
3
3
  # ever progress forward. The building block of StepperMotor is StepperMotor::Journey
4
4
  module StepperMotor
5
- VERSION = T.let("0.1.11", T.untyped)
5
+ VERSION = T.let("0.1.12", T.untyped)
6
6
  PerformStepJobV2 = T.let(StepperMotor::PerformStepJob, T.untyped)
7
7
  RecoverStuckJourneysJobV1 = T.let(StepperMotor::RecoverStuckJourneysJob, T.untyped)
8
8
 
@@ -35,6 +35,6 @@ StepperMotor.delete_completed_journeys_after = 30.days
35
35
  # job in your codebase. At the minimum, we recommend setting all StepperMotor job priorities
36
36
  # to "high" - according to the priority denomination you are using.
37
37
  # StepperMotor.extend_base_job do
38
- # priority :high
38
+ # queue_with_priority :high
39
39
  # discard_on ActiveRecord::NotFound
40
40
  # end
@@ -1,8 +1,17 @@
1
1
  require "test_helper"
2
2
 
3
3
  class ConfigurationTest < ActiveSupport::TestCase
4
+ module TestExtension
5
+ end
6
+
4
7
  test "allows extending the base job" do
5
- retrieved_name = StepperMotor.extend_base_job { name }
6
- assert_equal "StepperMotor::BaseJob", retrieved_name
8
+ ActiveSupport::Reloader.reload!
9
+
10
+ refute StepperMotor::BaseJob.ancestors.include?(TestExtension)
11
+
12
+ StepperMotor.extend_base_job { include TestExtension }
13
+ ActiveSupport::Reloader.reload!
14
+
15
+ assert StepperMotor::BaseJob.ancestors.include?(TestExtension)
7
16
  end
8
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stepper_motor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julik Tarkhanov