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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40e3769944f241f922ada44ee68481751bd2becd8c287972522c179d7dbe2696
4
- data.tar.gz: 45f4723223484bd4a5fd6fd2eedfdb4da12044b2986ac3facf2bf10df62c8671
3
+ metadata.gz: 431a4051a349e98758ed8b86e331191c4cab06e76fb6baeb873e35993b8d7ac3
4
+ data.tar.gz: ced2c7a5b62d0f6c12b9a369dd750e9027bb93fd68f702ae6fb7191eaf0e9fc0
5
5
  SHA512:
6
- metadata.gz: f36ae90ac276a1777b229d30bff8a77d4e216dc68b5b8ae7d2c407bc6692c25b1f2a5823e2607ef3825f579751bc8c8fb28874cc9f62c26fa4c209beadc7de0c
7
- data.tar.gz: 9f17625cd21f52316b04923c87e6e7edf7ca1d651bbb7ce7b4dcce53f9e2e5b6cb67ce3acb7a40f747abf9cb46727e3a34f0f040f1075aa4b79dfbdd717c6116
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['record_id']
18
- record_class = params['record_class']
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
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class RemoveRepetitionFromMetaWorkflowsWorkflowExecutions < ActiveRecord::Migration[7.2]
4
+ def change
5
+ remove_column :meta_workflows_workflow_executions, :repetition, :integer
6
+ end
7
+ end
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MetaWorkflows
4
- VERSION = '0.8.1'
4
+ VERSION = '0.8.2'
5
5
  end
@@ -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
- parent_record: parent_record,
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.1
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