rails_async_migrations 1.0.2 → 1.0.3

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: 19fc441a029878e39ee6794467b9a442d0b3b2a7a6a2190612555478ee60689a
4
- data.tar.gz: bc1947d8c051d3dbdecfda22c8efabb35cc75a2a012592b8f0a67e8f67ea64ac
3
+ metadata.gz: d3950f1a87294b305b11d6b4f72fe89140ac5ca037b0d63634b93883efac2226
4
+ data.tar.gz: bc23163e9ec84a71472a786388372461d3437316c56286d03c8f231462fd9770
5
5
  SHA512:
6
- metadata.gz: 6300eed27ef6c4007a24757aec057f4675b2b92d3fa4606e48c9b387307065d2ae0be82c84fe404364b5a96c662542498800e75dcdfbe2f5b1ba1eb6217da563
7
- data.tar.gz: 13f506f3dc6bd466da06861e22d5e0fe781510f53e5a4c4d0c03e251d0db2081c4751c7ee0f9fe36150873b5ee2ea2565091f1f7120077528899fa98559cf6d3
6
+ metadata.gz: f197bd6a02bca2bc548c5a68a8ac29145461d97dc88217e399aa1183c329a476d4658f610460106261ef2e3b89f792f25de1a084d259079c64288443edc626d5
7
+ data.tar.gz: fc3b0b75a80a3840c8bd9f2b488f5cebd4cc30ed2d011d65a6e88571cc4ce05949f4e97b5f2058519bbc0879d6169669d1f362150a9c5b55f32e0bb2026ce184
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_async_migrations (1.0.2)
4
+ rails_async_migrations (1.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -4,14 +4,11 @@ module RailsAsyncMigrations
4
4
  # in some context we have to guess it from the file and current connection
5
5
  # for instance when we use class methods such as `turn_async`
6
6
  def migration_class
7
- if instance.class == ActiveRecord::Migration
8
- fetch_from_file
9
- else
10
- instance.class
11
- end
7
+ fetch_from_file || instance.class
12
8
  end
13
9
 
14
10
  def fetch_from_file
11
+ return unless current_migration
15
12
  require current_migration.filename
16
13
  current_migration.name.constantize
17
14
  end
@@ -1,3 +1,3 @@
1
1
  module RailsAsyncMigrations
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_async_migrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent Schaffner