seed_migration 1.2.1 → 1.2.2

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: 927599384f064fe9b6b5d20d04636c17d619c820
4
- data.tar.gz: f66773c892712c001177c9774f2415395c9ca9b2
3
+ metadata.gz: 34a5c7f434f5a16153c4beee3ea4d9f44fbee4fc
4
+ data.tar.gz: e2d6dcdf19b2638677c1ee1560188fcd69dbb2aa
5
5
  SHA512:
6
- metadata.gz: b1630f400d6170212e915625d23aa5b7a43af4f2bf554b95e76ae7b660b72ae5d468a030b082d207ddd0771c0a1e63b23b9cf1ebf95e3b15984bc5d66ea6cec1
7
- data.tar.gz: 7d23822f38b5f9e3a68d467878ecc67ef09e95c655c7cb43e9ff1213fa475b40af163b83368e678293e60f3c95c2da3ab4990af6442338b2d33961bcb16cedef
6
+ metadata.gz: 25b9749cb686fc0f0c871047f6a1374edadded95d8d29d2076bacde30ab68a3fd95e5868ffd51cce5cca9734b93cdf59228ca278bad8cf5a94ddca1144554b24
7
+ data.tar.gz: 92f119701d886780bb202c596a2f61e32c5724b2d00258596d76415c98d7f86f36d3b51e6f045f50fff002877f88c6cec42a5875f05bbec7dd93333224b3ee30
@@ -20,7 +20,7 @@ module SeedMigration
20
20
  def up
21
21
  # Check if we already migrated this file
22
22
  klass = class_from_path
23
- version = @path.basename.to_s.split("_", 2).first
23
+ version, _ = self.class.parse_migration_filename(@path)
24
24
  raise "#{klass} has already been migrated." if SeedMigration::DataMigration.where(version: version).first
25
25
 
26
26
  start_time = Time.now
@@ -129,9 +129,8 @@ module SeedMigration
129
129
  p "Assume seed data migrated up to #{last_timestamp}"
130
130
  files = get_migration_files(last_timestamp.to_s)
131
131
  files.each do |file|
132
- _, version = parse_migration_filename(file)
133
132
  migration = SeedMigration::DataMigration.new
134
- migration.version = version
133
+ migration.version, _ = parse_migration_filename(file)
135
134
  migration.runtime = 0
136
135
  migration.migrated_on = DateTime.now
137
136
  migration.save!
@@ -1,3 +1,3 @@
1
1
  module SeedMigration
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
3
3
  end
metadata CHANGED
@@ -1,17 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seed_migration
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy O'Neill
8
8
  - Daniel Schwartz
9
9
  - Ilya Rubnich
10
10
  - Pierre Jambet
11
+ - Sunny Ng
11
12
  autorequire:
12
13
  bindir: bin
13
14
  cert_chain: []
14
- date: 2016-10-02 00:00:00.000000000 Z
15
+ date: 2016-10-05 00:00:00.000000000 Z
15
16
  dependencies:
16
17
  - !ruby/object:Gem::Dependency
17
18
  name: pry
@@ -86,9 +87,9 @@ dependencies:
86
87
  description: Rails gem for Data Migrations
87
88
  email:
88
89
  - aoneill@harrys.com
89
- - daniel@harrys.com
90
90
  - ilya@harrys.com
91
91
  - pierre@harrys.com
92
+ - sunny@harrys.com
92
93
  executables: []
93
94
  extensions: []
94
95
  extra_rdoc_files: []