meta_workflows 0.8.1 → 0.8.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 +4 -4
- data/app/jobs/meta_workflows/record_redirect_job.rb +2 -2
- data/app/models/meta_workflows/workflow_execution.rb +0 -2
- data/db/migrate/20250617192849_remove_repetition_from_meta_workflows_workflow_executions.rb +7 -0
- data/lib/meta_workflows/engine.rb +0 -9
- data/lib/meta_workflows/version.rb +1 -1
- data/lib/services/meta_workflows/meta_workflow_service.rb +3 -3
- metadata +2 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 431a4051a349e98758ed8b86e331191c4cab06e76fb6baeb873e35993b8d7ac3
|
4
|
+
data.tar.gz: ced2c7a5b62d0f6c12b9a369dd750e9027bb93fd68f702ae6fb7191eaf0e9fc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c309e7acdaab0f25f4451a688cda47c19fa2367d394e1e0392ef596c7ab78d3a44fc08259ae2c6871fa51d95ab35a1c853f442824a8290a0afabe7963fde5738
|
7
|
+
data.tar.gz: 6270d2f04ebfc06e624cb5881578b46490550256558e22e3c8599af384e5de4fe5b0616317acf585a094e9ce34df02197cf9fd58811b5f62ba8324f34006582d
|
@@ -14,8 +14,8 @@ module MetaWorkflows
|
|
14
14
|
private
|
15
15
|
|
16
16
|
def broadcast_redirect(params)
|
17
|
-
record_id = params['
|
18
|
-
record_class = params['
|
17
|
+
record_id = params['redirect_id']
|
18
|
+
record_class = params['redirect_class']
|
19
19
|
redirect_method = params['redirect_method']
|
20
20
|
|
21
21
|
record_class_constant = record_class.to_s.safe_constantize
|
@@ -8,12 +8,10 @@ module MetaWorkflows
|
|
8
8
|
|
9
9
|
# Default values for fields
|
10
10
|
attribute :current_step, :integer, default: 0
|
11
|
-
attribute :repetition, :integer, default: 0
|
12
11
|
attribute :completed, :boolean, default: false
|
13
12
|
attribute :workflow_params, :json, default: -> { {} }
|
14
13
|
|
15
14
|
validates :current_step, presence: true, numericality: { only_integer: true, greater_than_or_equal_to: 0 }
|
16
|
-
validates :repetition, presence: true, numericality: { only_integer: true, greater_than_or_equal_to: 0 }
|
17
15
|
validates :completed, inclusion: { in: [true, false] }
|
18
16
|
|
19
17
|
def increment_step
|
@@ -9,7 +9,6 @@ module MetaWorkflows
|
|
9
9
|
#{root}/app/controllers/concerns
|
10
10
|
#{root}/app/models/concerns
|
11
11
|
#{root}/app/services
|
12
|
-
#{root}/app/components
|
13
12
|
#{root}/app/jobs
|
14
13
|
#{root}/app/sidekiq
|
15
14
|
#{root}/lib
|
@@ -29,14 +28,6 @@ module MetaWorkflows
|
|
29
28
|
# Configure Sidekiq for MetaWorkflows jobs
|
30
29
|
app.config.active_job.queue_adapter = :sidekiq
|
31
30
|
end
|
32
|
-
|
33
|
-
# Configure ViewComponent if available
|
34
|
-
if defined?(ViewComponent)
|
35
|
-
existing_paths = [*ViewComponent::Base.view_component_path]
|
36
|
-
engine_component_path = root.join('app', 'components').to_s
|
37
|
-
|
38
|
-
app.config.view_component.view_component_path = (existing_paths + [engine_component_path]).uniq
|
39
|
-
end
|
40
31
|
end
|
41
32
|
|
42
33
|
# Configure routes
|
@@ -169,10 +169,8 @@ module Services
|
|
169
169
|
|
170
170
|
raise ArgumentError, "Invalid collection creator class: #{service_class_name}" unless service_class
|
171
171
|
|
172
|
-
parent_record = find_parent_record(workflow_execution)
|
173
|
-
|
174
172
|
service_class.new(
|
175
|
-
|
173
|
+
workflow_execution: workflow_execution,
|
176
174
|
collection: inputs[:collection]
|
177
175
|
)
|
178
176
|
end
|
@@ -189,6 +187,8 @@ module Services
|
|
189
187
|
service_class.new(target_record, attributes_to_update, workflow_execution.workflow_params)
|
190
188
|
end
|
191
189
|
|
190
|
+
# TODO: We should refactor this along with the build_record_update_service method
|
191
|
+
# to only use workflow_params and use better naming (instead of record_id and record_class)
|
192
192
|
def find_parent_record(workflow_execution)
|
193
193
|
record_class = workflow_execution.record.class.name.constantize
|
194
194
|
record_class.find(workflow_execution.workflow_params['record_id'])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meta_workflows
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leonid Medovyy
|
@@ -67,20 +67,6 @@ dependencies:
|
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: view_component
|
72
|
-
requirement: !ruby/object:Gem::Requirement
|
73
|
-
requirements:
|
74
|
-
- - ">="
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '3.0'
|
77
|
-
type: :runtime
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: !ruby/object:Gem::Requirement
|
80
|
-
requirements:
|
81
|
-
- - ">="
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
version: '3.0'
|
84
70
|
- !ruby/object:Gem::Dependency
|
85
71
|
name: stimulus-rails
|
86
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -173,6 +159,7 @@ files:
|
|
173
159
|
- db/migrate/20250530220737_create_meta_workflows_tool_calls.rb
|
174
160
|
- db/migrate/20250530220750_create_meta_workflows_workflow_steps.rb
|
175
161
|
- db/migrate/20250613213159_add_error_fields_to_workflow_steps.rb
|
162
|
+
- db/migrate/20250617192849_remove_repetition_from_meta_workflows_workflow_executions.rb
|
176
163
|
- db/migrate/20250618175439_add_call_id_and_status_to_meta_workflows_tool_calls.rb
|
177
164
|
- lib/meta_workflows.rb
|
178
165
|
- lib/meta_workflows/asset_installer.rb
|