migration_tools 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/migration_tools/tasks.rb +6 -1
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2dd1f0b5db6927a64aa37fb521a1bee6aaca98db
4
- data.tar.gz: f34ba208cf8c7a5cedb38d136f549392af9ad4e4
3
+ metadata.gz: b4672873c0980176f5f8481054a9c7ddd3ebb9ad
4
+ data.tar.gz: 1a548def35f56259a4b8b6ec15460dbcd4ea58a1
5
5
  SHA512:
6
- metadata.gz: cd3fe69387bf383e84696b153fc11654fb8558e270bca2727bdbc296b92a33ddabc6bf3dcb1e3645d45e94707dfd85c1d2a0a707e8d15c07d787046f7ff27d65
7
- data.tar.gz: 98387a655b0fbe427a0e9c5c172d3475cb176d9b253304b39304739753ecff5c74a16f4993e54c56711b93ff9465bbb63ac477b1ea9daa6abe088f46429b81e9
6
+ metadata.gz: abcec27cea51bafd32f0d8ed358d02b98a447d1cf0034976f6106deb9ecbe90fa8cdadf9054aac1c3b2f0965d4cf6bd4c515e7d4f0b04b9c4b2c57688643ee71
7
+ data.tar.gz: 19009d8b5b6e367084d4e443b3c256edd6b9e30ca78484826599f3b8e0ec103fd56860c1ea1322020e5095df67c1422e3d1c902955f313371c887e99368b178c
@@ -29,7 +29,12 @@ module MigrationTools
29
29
 
30
30
  def migrator(target_version = nil)
31
31
  if ActiveRecord::VERSION::MAJOR > 3
32
- ActiveRecord::Migrator.new(:up, ActiveRecord::Migrator.migrations(migrations_paths), target_version)
32
+ migrations = if defined?(::ActiveRecord::MigrationContext)
33
+ ActiveRecord::MigrationContext.new(migrations_paths).migrations
34
+ else
35
+ ActiveRecord::Migrator.migrations(migrations_paths)
36
+ end
37
+ ActiveRecord::Migrator.new(:up, migrations, target_version)
33
38
  else
34
39
  ActiveRecord::Migrator.new(:up, migrations_paths, target_version)
35
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: migration_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Morten Primdahl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-28 00:00:00.000000000 Z
11
+ date: 2018-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 3.2.6
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '5.2'
22
+ version: '6.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 3.2.6
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '5.2'
32
+ version: '6.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rake
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  version: '0'
158
158
  requirements: []
159
159
  rubyforge_project:
160
- rubygems_version: 2.5.2
160
+ rubygems_version: 2.6.14
161
161
  signing_key:
162
162
  specification_version: 4
163
163
  summary: Encourage migrations that do not require downtime