flow_state 0.1.1 → 0.1.3

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: 9b48a529531b0fa67dc6aa8a3f12a0dd3a727ba2d31dcf00157334dd178e2a7d
4
- data.tar.gz: c25b361f9221dcbf5375b127bcf287ff8746752e7bf8a66d00d4b5faa7ca87dd
3
+ metadata.gz: 43bc214a6e56b40ce376f8a83eb92e83751a0e00ebecc8b0377393cb7401da85
4
+ data.tar.gz: c47660271e45754bf0d84cb9867d7b33c44828cc2010ef705242d749e578295c
5
5
  SHA512:
6
- metadata.gz: 539543b59cb741d4cb815bb55dae493b0db0e621e87118da507ebc318d4dfb59445df8d1bbf79119e12574c60a3eacfe31ad3f84fac2a022abfefe1b42714595
7
- data.tar.gz: 5419082a990f081688c6c235cbaa3ef34f467033691458c16d5442ebdd9ed814efa1f67b0173b9b11f3c5dc842baf7d633d974a789f8f92e7e72dc407145ceaa
6
+ metadata.gz: 7641c2bae224b679b38b0fdce118ffd1b589ce2d0d6750332eebe33b5995b7b826a7e908c09b6e250346ef216e473a2429a2a6fcb66af35431b5dc45980080e2
7
+ data.tar.gz: 8194662f1e3d44112937a23caccc9a8065a61b75eb65a0b8e8bf68358f21cdbcc70dd3cbdd7a2e871c64affba1589bcc122b79b17767371fb4e248d89116b986
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FlowState
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.3'
5
5
  end
@@ -5,19 +5,25 @@ require 'rails/generators/migration'
5
5
 
6
6
  module FlowState
7
7
  module Generators
8
- # Generates migrations etc for FlowState
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
+ @call_count = 0
15
+
14
16
  def create_migrations
15
17
  migration_template 'create_flow_state_flows.rb', 'db/migrate/create_flow_state_flows.rb'
16
18
  migration_template 'create_flow_state_flow_transitions.rb', 'db/migrate/create_flow_state_flow_transitions.rb'
17
19
  end
18
20
 
19
21
  def self.next_migration_number(_dirname)
20
- Time.now.utc.strftime('%Y%m%d%H%M%S')
22
+ @call_count ||= 0
23
+ timestamp = Time.now.utc.strftime('%Y%m%d%H%M%S').to_i
24
+ migration_number = timestamp + @call_count
25
+ @call_count += 1
26
+ migration_number.to_s
21
27
  end
22
28
  end
23
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flow_state
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Garrett