migration_tools 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/migration_tools/migration_extension.rb +8 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12b49932fe409545d164d7cb198256b2486b298b
|
4
|
+
data.tar.gz: 143860d5ed493dea62e247e17fa55f0e79c7f0b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5383e68f3208176a38473a901b5cac684d322be1a48adc60415df1d35de2ba491851627e9909d1f702f58869791fe1b3636fa16ba065c421f26f974166a2b1c4
|
7
|
+
data.tar.gz: 6025f1aff003f04b7f1d48c267d02ea62ef2c6bb1117c47c249a8df88f0e5a4d3a716076f7832a68785a8f25542089994508074ac01654b479b095a1300e9e0b
|
@@ -11,18 +11,22 @@ module MigrationTools
|
|
11
11
|
self.migration_group = arg.to_s
|
12
12
|
end
|
13
13
|
|
14
|
-
def
|
14
|
+
def migrate_with_forced_groups(direction)
|
15
15
|
if MigrationTools.forced? && migration_group.blank?
|
16
16
|
raise "Cowardly refusing to run migration without a group. Read https://github.com/zendesk/migration_tools/blob/master/README.md"
|
17
17
|
end
|
18
|
-
|
18
|
+
migrate_without_forced_groups(direction)
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
ActiveRecord::Migration.singleton_class.send(:prepend, MigrationTools::MigrationExtension)
|
24
|
-
|
25
23
|
ActiveRecord::Migration.class_eval do
|
24
|
+
extend MigrationTools::MigrationExtension
|
25
|
+
class << self
|
26
|
+
alias_method :migrate_without_forced_groups, :migrate
|
27
|
+
alias_method :migrate, :migrate_with_forced_groups
|
28
|
+
end
|
29
|
+
|
26
30
|
def migration_group
|
27
31
|
self.class.migration_group
|
28
32
|
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.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Morten Primdahl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|