seed_migrator 0.5.1 → 0.6.0

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: 7e413f192d1217e9beb4421d31e29611ee60baacdfed3b9b69b953d882981c59
4
- data.tar.gz: a98a29afac4ba9428c065d961bb5948ea4b29612b6993d21e616b420f9873e0a
3
+ metadata.gz: 1a6bcf41254e6488442ee9643524fe6a0a4e8b953d4e103bc0957c60216af322
4
+ data.tar.gz: 91c75a9618f03aae0233471f28cd11c37854a0a6499b493b7b47d41fc6a1c4d8
5
5
  SHA512:
6
- metadata.gz: 63dcdfde64cf2537d1479c4fa8f1276010211bbac6a1341442120713f3f0d3334aa76332a88bc4d228b852bd3e3f8630b17ffa1c19300149d843260188f4d4a8
7
- data.tar.gz: f5a8003b94a986529dec0a0e8de76e8e15e3e26a313d6ac9dc7b165fe832c8114da4e66791901f247ec5bc0a135fe18d7a473f9a9c28a460d7e509de2ceca10f
6
+ metadata.gz: 05d50cac5ee0cc11e7bcb93b55c271db3f06b521d00643ed4a6d0c3eed6fdb0726de63a9ef2dc026127429741912d0e17863f97415e9c6a9bb8a5b05b8cddd45
7
+ data.tar.gz: f99f883004ee15137415d5d4b9fdb36f099bfb90c03be11fd9b055203a41f2619b467ec456128517561f9d1e0ca56b2809c7bf66e4d6eaffa3585f3fbbbd7dec
@@ -1,4 +1,4 @@
1
- class <%= migration_class_name %> < ActiveRecord::Migration
1
+ class <%= migration_class_name %> < ActiveRecord::Migration<%= version_suffix %>
2
2
  include <%= application_class_name %>DataUpdate
3
3
 
4
4
  def up
@@ -43,6 +43,17 @@ module Generators # :nodoc:
43
43
  def data_update_file_name
44
44
  "#{migration_number}_#{file_name}_data_update"
45
45
  end
46
+
47
+ # Version suffix for Rails 5 migrations.
48
+ #
49
+ # @return [String]
50
+ def version_suffix
51
+ major_version, minor_version, *_ = Rails.version.split(".")
52
+
53
+ return "" if major_version.to_i < 5
54
+
55
+ "[#{major_version}.#{minor_version}]"
56
+ end
46
57
  end
47
58
  end
48
59
  end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seed_migrator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arthur Shagall
8
8
  - Zach Belzer
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
  date: 2019-10-21 00:00:00.000000000 Z
@@ -134,7 +134,7 @@ files:
134
134
  homepage: https://github.com/HornsAndHooves
135
135
  licenses: []
136
136
  metadata: {}
137
- post_install_message:
137
+ post_install_message:
138
138
  rdoc_options: []
139
139
  require_paths:
140
140
  - lib
@@ -149,9 +149,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  requirements: []
152
- rubyforge_project:
153
- rubygems_version: 2.7.9
154
- signing_key:
152
+ rubygems_version: 3.1.4
153
+ signing_key:
155
154
  specification_version: 4
156
155
  summary: Handle post-release data updates through migrations
157
156
  test_files: []