has_friendship 0.1.0 → 0.1.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
  SHA1:
3
- metadata.gz: b3ec9dd62bd0dc88ac3f2f24c3a358cdb0a3f627
4
- data.tar.gz: b6eb97452db346ec53035758f58eff3b0d926851
3
+ metadata.gz: 50065c83e6fa815a565ce0011363dee9f2b84112
4
+ data.tar.gz: c49fd71f89811cb8dbb69c37343d21ad2d0b20ce
5
5
  SHA512:
6
- metadata.gz: 1a89cb131c5523a31dcce5b211c63d0dbe5e46d09f78c562caf08201e1c81513ee5d6c8df1dd4ffef145fa22bdac7972aede1428d9cbfab1b1978fc9561be58c
7
- data.tar.gz: 858c9683fee0765f24a8eb51ae6bc04b5d4e0b053856687c1ad5b874d8a0ea050591751d81260319bb11f8c6013613cae279651675e1090b52155bf2ac9b18dd
6
+ metadata.gz: 7ae61ed59f8998c28ec53a24e57736341d8eef93c2b2ecacc7da8618e8ae5d32c5b146ad9cc1039f5adacbf69d4ade054419bfef6f6d63863a5d84c6fd691261
7
+ data.tar.gz: 47d40f00541f16b31f0970fc459110da505cd0cb73d7e2c12fcf5648384f10dd3d399959cc3cedbbd565fa949bb92aae4fab1026414ddafc94a7fded50eb38a9
@@ -9,7 +9,10 @@ class HasFriendshipGenerator < Rails::Generators::Base
9
9
  end
10
10
 
11
11
  def self.next_migration_number(path)
12
- Time.now.utc.strftime("%Y%m%d%H%M%S")
12
+ next_num = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
13
+ current_num = current_migration_number(path)
14
+ next_num += (current_num - next_num + 1) if current_num >= next_num
15
+ next_num.to_s
13
16
  end
14
17
 
15
18
  def create_migration_file
@@ -1,3 +1,3 @@
1
1
  module HasFriendship
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_friendship
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sung Won Cho
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-04 00:00:00.000000000 Z
11
+ date: 2016-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails