flow_state 0.1.1 → 0.1.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/lib/flow_state/version.rb +1 -1
- data/lib/generators/flow_state/install_generator.rb +9 -3
- 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: d3a82752848b9c6a6132836ebcebb9c8a81790d334f1fd78172f9a0328134c98
|
4
|
+
data.tar.gz: ffd08493f8e17c5845a0b09c61f663ac9ba2aca24a2ae88d7f7cc4893f62d225
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b011bbaadfe5c5f7b0e800bb46d5ae6cb5a14a8346ebb05abde6231e09509677d835336cf236431bc4e4e207b26c7fc14deafc2507f1e5aa34dcae9a903d820
|
7
|
+
data.tar.gz: ca3a404fe99f86cad2de56af1ce950b339665db67ebbd99e7fb1a4958232d6819934cd14999e2e938eb0660763191aa1a56856aa127f1d55260a1d668b8d3f93
|
data/lib/flow_state/version.rb
CHANGED
@@ -5,15 +5,21 @@ require 'rails/generators/migration'
|
|
5
5
|
|
6
6
|
module FlowState
|
7
7
|
module Generators
|
8
|
-
# Generates migrations
|
8
|
+
# Generates migrations for FlowState
|
9
9
|
class InstallGenerator < Rails::Generators::Base
|
10
10
|
include Rails::Generators::Migration
|
11
11
|
|
12
12
|
source_root File.expand_path('templates', __dir__)
|
13
13
|
|
14
14
|
def create_migrations
|
15
|
-
|
16
|
-
|
15
|
+
timestamp = Time.now.utc.strftime('%Y%m%d%H%M%S')
|
16
|
+
|
17
|
+
migration_template 'create_flow_state_flows.rb', "db/migrate/#{timestamp}_create_flow_state_flows.rb"
|
18
|
+
|
19
|
+
second_timestamp = (timestamp.to_i + 1).to_s
|
20
|
+
|
21
|
+
migration_template 'create_flow_state_flow_transitions.rb',
|
22
|
+
"db/migrate/#{second_timestamp}_create_flow_state_flow_transitions.rb"
|
17
23
|
end
|
18
24
|
|
19
25
|
def self.next_migration_number(_dirname)
|