rails-data-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
  SHA1:
3
- metadata.gz: f38af8adf101d5b10746d31b7c93c759c3186d0d
4
- data.tar.gz: 39cb6efee5c32c1a516641ed5b7883086dd28406
3
+ metadata.gz: 41b028d0c6c92f01479fd78f09b05a3a0b0a61f0
4
+ data.tar.gz: 942f98d4bbe3d11559b5028101ff9502828ed4c8
5
5
  SHA512:
6
- metadata.gz: 927eb0282f918c3d0728b90f07cf4972e27cae964d28ace764463345282ba0cf6830f005fa6263f1c1f4e315b157f17970ef7a2f7d543c1024d7a8c861323e20
7
- data.tar.gz: 16b4d11a1b90e980715e0ff72a4106be584cf84e55e22c61a66c4b9dfdf894dfe3a9f1d22fd2e2f781735397c3c6872e91e49ef6a702fff4c3a6cca360c9d087
6
+ metadata.gz: bad66e756d20288721fc21ad52171484f1680f16832f6bb6c06bcabf8af65802d7df28274bccf9389821daaee9fa91585f7d773a9819a71fd55487bd1a595d19
7
+ data.tar.gz: f9ec2ff89c5f23a9f6bc72d13b762e1668283d812992a56a541b5370df04cbb7840e7d943b0110d4017ed469fe1bbbfcc9366fbc078e37918ffd8eef4223fc63
data/Appraisals CHANGED
@@ -6,6 +6,10 @@ appraise 'rails-4.1' do
6
6
  gem 'rails', '~> 4.1'
7
7
  end
8
8
 
9
+ appraise 'rails-4.2.5' do
10
+ gem 'rails', '4.2.5'
11
+ end
12
+
9
13
  appraise 'rails-4.2' do
10
14
  gem 'rails', '~> 4.2'
11
15
  end
@@ -12,8 +12,13 @@ module RailsDataMigrations
12
12
  end
13
13
 
14
14
  class << self
15
+ def migrations_table_exists?(connection = ActiveRecord::Base.connection)
16
+ table_check_method = connection.respond_to?(:data_source_exists?) ? :data_source_exists? : :table_exists?
17
+ connection.send(table_check_method, schema_migrations_table_name)
18
+ end
19
+
15
20
  def get_all_versions(connection = ActiveRecord::Base.connection)
16
- if connection.data_source_exists?(schema_migrations_table_name)
21
+ if migrations_table_exists?(connection)
17
22
  LogEntry.all.map { |x| x.version.to_i }.sort
18
23
  else
19
24
  []
@@ -1,3 +1,3 @@
1
1
  module RailsDataMigrations
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
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.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Glukhov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-09 00:00:00.000000000 Z
11
+ date: 2016-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails