drafting 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22e6c8a3b50e9c18bbbf2270046d351d7434a5b7b89540617b0f0977cc0f32d3
4
- data.tar.gz: 754eb2e34972631fc17ba811ae5ef4744214ac44afa7a32fc5a0388c071a9aae
3
+ metadata.gz: ee293dbec05f2b623ca4ce569a14b2e2f31c4eaa74c99414b2885614daf6c9bf
4
+ data.tar.gz: 9811141970a11924ad5c3afb69acc394e4c56ea258514f341dc6f0fa0dc77b04
5
5
  SHA512:
6
- metadata.gz: 63b27faffef9e09e06b740a0fab74dcfab7e020b9b61497554d2ccb29a7bfeae3d43086a9d40c4178aaf47745e3ca7efbde07daadbced62941f32ad497b2a373
7
- data.tar.gz: f066d6c4df5da61da95cc4c85f797fd9465c5df9b7a7e1f99d299f59cd50737cff07c6e91c8c36dc4351de8aaa1a721a475a1181345cb978325348801f0b071f
6
+ metadata.gz: 1e229250132e86dfb5180c143d331c15e2c7b8d59c58e232fe9f04214850c1d0421460aad973e5083703fa0a3313ea16e42459dfd56c08b4b008500197ed2851
7
+ data.tar.gz: 980657ca66628be70b953da701edce1cf21a83f8f5cdea904bf0d1c5744e98dd166b92201ede0730c44e41190146e4bf7ee328df0cc8e0c0a9daf5267c08f5df
@@ -1,3 +1,3 @@
1
1
  module Drafting
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
@@ -15,7 +15,12 @@ module Drafting
15
15
 
16
16
  def self.next_migration_number(dirname)
17
17
  if ActiveRecord::Base.timestamped_migrations
18
- Time.now.utc.strftime("%Y%m%d%H%M%S")
18
+ # ensure timestamp of the multiple migration files generated
19
+ # will be different
20
+ timestamp = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
21
+ timestamp += 1 if current_migration_number(dirname) == timestamp
22
+
23
+ timestamp
19
24
  else
20
25
  "%.3d" % (current_migration_number(dirname) + 1)
21
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drafting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georg Ledermann
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-08 00:00:00.000000000 Z
11
+ date: 2019-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -203,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  - !ruby/object:Gem::Version
204
204
  version: '0'
205
205
  requirements: []
206
- rubygems_version: 3.0.3
206
+ rubygems_version: 3.0.6
207
207
  signing_key:
208
208
  specification_version: 4
209
209
  summary: Save draft version of any ActiveRecord object