migration_tools 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 874e2249fe8f46c0c45e27240057567452d8dca2
4
- data.tar.gz: a604848f9316ce60956f0d41e9c48eab791486e0
3
+ metadata.gz: 12b49932fe409545d164d7cb198256b2486b298b
4
+ data.tar.gz: 143860d5ed493dea62e247e17fa55f0e79c7f0b5
5
5
  SHA512:
6
- metadata.gz: d91531cdbb15179510cead5a2eb125935e01cec75fcbad7817a33a90fd93e46798c21f29913e6cc3f1267e533d38650d8e40c414a9a4e0af6373389cd557ded5
7
- data.tar.gz: b0ccf6c64b597751a1261ab0f95033fd290e62eea564f58ed0a52cc0b73ee68aa1f17959d0ce82a538a2874eedcf2fc093e511b4f336c3ffd35eef2263d6070a
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 migrate(direction)
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
- super
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.0
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-12 00:00:00.000000000 Z
11
+ date: 2016-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord