rails-data-migrations 1.1.0 → 1.2.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: ecadfdf1ff6e4b9a293770e5f333f7c297cb6821a946a89d698e829a68f5ed5b
4
- data.tar.gz: 665d7d252f71febca0da708f838808b1e165a8f94b7e8fa4f8bd6dcc891339b5
3
+ metadata.gz: 79cfbee30eadbf11575d154c03274939c71be97bfbb65fac28ffd9cbae62fa45
4
+ data.tar.gz: bcf02507f8f93df68ee100a86a16d46a7e9e6353aa001979d9c089aa3c34bc77
5
5
  SHA512:
6
- metadata.gz: 1663219b32be0c3803b827d25a2e5ebb8359324ccd78ba65c7b5eea0e8b0119bd95ee854205767b3aa6beb2ab939dc9202f1811c3dce757a94a23043a2c37913
7
- data.tar.gz: 7fcac514b7b565bfcd936d975877188a7fc8c9a52baa74ec64c56ce918cf5376bb3a4f632c835027c95d3c1cb05514c15311ee8ddd34b858cdf9402421584b84
6
+ metadata.gz: 17904e00158879c32bbe50149aca3b1a2a3304349dfe767d28e3d34578772fd01963d8b88916b76fd06bd46555dd08fcdd7d8b9427323f3ef138eca1f31d6330
7
+ data.tar.gz: 02463b37bb5621d9483eb1ebe3d2818cd7dcd780a4a3ec5f8a4ea334e016c038ba26e1467b6e3a66d09feea1e0ca4c99217d1becadaf0b5bf2addcfaeeaba6b3
data/Appraisals CHANGED
@@ -25,3 +25,7 @@ end
25
25
  appraise 'rails-5.2' do
26
26
  gem 'rails', '~> 5.2.0'
27
27
  end
28
+
29
+ appraise 'rails-6.0' do
30
+ gem 'rails', '~> 6.0.0'
31
+ end
@@ -38,12 +38,18 @@ module RailsDataMigrations
38
38
  'db/data_migrations'
39
39
  end
40
40
 
41
+ def rails_6_0?
42
+ Rails::VERSION::MAJOR >= 6
43
+ end
44
+
41
45
  def rails_5_2?
42
46
  Rails::VERSION::MAJOR > 5 || (Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR >= 2)
43
47
  end
44
48
 
45
49
  def list_migrations
46
- if rails_5_2?
50
+ if rails_6_0?
51
+ ::ActiveRecord::MigrationContext.new(migrations_path, ::ActiveRecord::SchemaMigration).migrations
52
+ elsif rails_5_2?
47
53
  ::ActiveRecord::MigrationContext.new(migrations_path).migrations
48
54
  else
49
55
  migrations(migrations_path)
@@ -60,7 +66,9 @@ module RailsDataMigrations
60
66
  end
61
67
 
62
68
  def run_migration(direction, migrations_path, version)
63
- if rails_5_2?
69
+ if rails_6_0?
70
+ new(direction, list_migrations, ::ActiveRecord::SchemaMigration, version).run
71
+ elsif rails_5_2?
64
72
  new(direction, list_migrations, version).run
65
73
  else
66
74
  run(direction, migrations_path, version)
@@ -1,3 +1,3 @@
1
1
  module RailsDataMigrations
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '1.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-data-migrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Glukhov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-13 00:00:00.000000000 Z
11
+ date: 2019-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -153,8 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  - !ruby/object:Gem::Version
154
154
  version: '0'
155
155
  requirements: []
156
- rubyforge_project:
157
- rubygems_version: 2.7.6
156
+ rubygems_version: 3.0.2
158
157
  signing_key:
159
158
  specification_version: 4
160
159
  summary: Run your data migration tasks in a db:migrate-like manner