flow_state 0.1.2 → 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: d3a82752848b9c6a6132836ebcebb9c8a81790d334f1fd78172f9a0328134c98
4
- data.tar.gz: ffd08493f8e17c5845a0b09c61f663ac9ba2aca24a2ae88d7f7cc4893f62d225
3
+ metadata.gz: 43bc214a6e56b40ce376f8a83eb92e83751a0e00ebecc8b0377393cb7401da85
4
+ data.tar.gz: c47660271e45754bf0d84cb9867d7b33c44828cc2010ef705242d749e578295c
5
5
  SHA512:
6
- metadata.gz: 1b011bbaadfe5c5f7b0e800bb46d5ae6cb5a14a8346ebb05abde6231e09509677d835336cf236431bc4e4e207b26c7fc14deafc2507f1e5aa34dcae9a903d820
7
- data.tar.gz: ca3a404fe99f86cad2de56af1ce950b339665db67ebbd99e7fb1a4958232d6819934cd14999e2e938eb0660763191aa1a56856aa127f1d55260a1d668b8d3f93
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.2'
4
+ VERSION = '0.1.3'
5
5
  end
@@ -11,19 +11,19 @@ module FlowState
11
11
 
12
12
  source_root File.expand_path('templates', __dir__)
13
13
 
14
- def create_migrations
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"
14
+ @call_count = 0
18
15
 
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"
16
+ def create_migrations
17
+ migration_template 'create_flow_state_flows.rb', 'db/migrate/create_flow_state_flows.rb'
18
+ migration_template 'create_flow_state_flow_transitions.rb', 'db/migrate/create_flow_state_flow_transitions.rb'
23
19
  end
24
20
 
25
21
  def self.next_migration_number(_dirname)
26
- 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
27
27
  end
28
28
  end
29
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.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Garrett