easy_flow 0.22.0 → 0.23.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c1b56b170c92f6fa9d7c2edc9864de42dfaef4dc97d41822442ca289722a91e
4
- data.tar.gz: b4aa7640c10adcac242e412837870517ad688c463624d7f53dea366e4b6d0e96
3
+ metadata.gz: 81c0c3c1f15a0c2791aef81b34ea0e04562ccb4b6a4b79ed7299c044d8f6a523
4
+ data.tar.gz: f60e7006ea24aa9f1f5e316caadd710ec4ce0be74379c8bb1fc1be2ab68cd0ca
5
5
  SHA512:
6
- metadata.gz: 6a9ea816b147d6782cdc106113aeae7d95b0396679f920203afafad68f130a5895efb9ba0a020a7c55438260c2d8a782d58399a2aefd97574467be10255b5fe8
7
- data.tar.gz: 1084833772e7cea7306b369543e362d46fa552222bb398ae1bd0edc7d52aa4d7bc20ddeaac3021f301d2b9e65c662e195a489e96d09653b3b54840ffd345f364
6
+ metadata.gz: f42450ecaf979014f966086feb96cbb82d0d1104f6043f0d2542e3c841973f19fd43075d935256102951bdc273bb856ed0bce9da1c4cf4b1c5b8597d635b8f45
7
+ data.tar.gz: 66418965532ea2a4eb09f71ed575fb7279e9fa06864005be4ab606820115a918bbe86c9013fdce16f6f5509dd8193c6583bcccdfc7efaf4be6ec47237c9c0611
@@ -53,7 +53,7 @@ module EasyFlow
53
53
  end
54
54
 
55
55
  def find_run(runs, address)
56
- runs.find(address)
56
+ runs.find_by_public_code!(address)
57
57
  end
58
58
 
59
59
  def start_run(flow)
@@ -2,6 +2,8 @@ module EasyFlow
2
2
  class Run < ApplicationRecord
3
3
  self.table_name = "easy_flow_runs"
4
4
 
5
+ has_public_code
6
+
5
7
  belongs_to :flow, class_name: "EasyFlow::Definition"
6
8
  belongs_to :definition_version, class_name: "EasyFlow::Version"
7
9
  belongs_to :owner, polymorphic: true, optional: true
@@ -0,0 +1,17 @@
1
+ class AddPublicCodeToEasyFlowRuns < ActiveRecord::Migration[8.1]
2
+ class Run < ActiveRecord::Base
3
+ self.table_name = "easy_flow_runs"
4
+ end
5
+
6
+ def up
7
+ add_column :easy_flow_runs, :public_code, :string
8
+ Run.reset_column_information
9
+ Run.find_each { |run| run.update_columns(public_code: PublicCode.generate) }
10
+ change_column_null :easy_flow_runs, :public_code, false
11
+ add_index :easy_flow_runs, :public_code, unique: true
12
+ end
13
+
14
+ def down
15
+ remove_column :easy_flow_runs, :public_code
16
+ end
17
+ end
@@ -1,3 +1,3 @@
1
1
  module EasyFlow
2
- VERSION = "0.22.0"
2
+ VERSION = "0.23.0"
3
3
  end
data/lib/easy_flow.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "json"
2
+ require "public_code"
2
3
  require "easy_flow/version"
3
4
  require "easy_flow/host"
4
5
  require "easy_flow/unset_host"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - tylercschneider
@@ -23,6 +23,20 @@ dependencies:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
25
  version: 8.1.3
26
+ - !ruby/object:Gem::Dependency
27
+ name: public_code
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '0.2'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0.2'
26
40
  - !ruby/object:Gem::Dependency
27
41
  name: keystone_ui-react
28
42
  requirement: !ruby/object:Gem::Requirement
@@ -151,6 +165,7 @@ files:
151
165
  - db/migrate/20261001120000_add_owner_to_easy_flow_definitions.rb
152
166
  - db/migrate/20261007120000_add_parent_run_to_easy_flow_runs.rb
153
167
  - db/migrate/20261011130000_keep_step_visits_whole_in_easy_flow_runs.rb
168
+ - db/migrate/20261012200000_add_public_code_to_easy_flow_runs.rb
154
169
  - lib/easy_flow.rb
155
170
  - lib/easy_flow/engine.rb
156
171
  - lib/easy_flow/host.rb