activerecord-rescue_from_duplicate 0.1.1 → 0.1.2

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: 99e556184dcd2af6057a37ec28413793958ecda0
4
- data.tar.gz: 51098dffb2d6b8d5b89b28f2f2664be4e4e34202
3
+ metadata.gz: ad1109d6b48c9d16624a06e7262f80571d261b5e
4
+ data.tar.gz: 7fb9e9970bc575794559358c82be53d8667c5c92
5
5
  SHA512:
6
- metadata.gz: acaaf4ae2919df995ac930b8ea2bdefb400753fc18b3883c717bc8e204cf9c0d681c515cc20a9c04f0b8ba5f3c2ab7b09610d1c4e005a17cee0d0312c0d6937f
7
- data.tar.gz: 423538cdfdfa906a50b17beeb2e697dcd7cc38cc23683a3c2b2092cf8c4b29a10d0b14f12e8be42bcbce5284cd74dd3eceee131df0db4f48b4d0b6e8a1fde9a4
6
+ metadata.gz: 7c77fd19ff2d451ad3351c7c2058e76048df727dc5932648668687449960299fe9fa98ce44c1cf5ef0d36bc7955553810fc02240a3e43ccb31e5a87a37403d28
7
+ data.tar.gz: 52cc5da74eb6c2993042645e679af11209011a86392c4e2863e33af4919dcc1ffb087d5bcdfcad31f0874534c780a80f83288aa34fb5bf66851898e406a211a4
@@ -15,6 +15,7 @@ module RescueFromDuplicate
15
15
 
16
16
  klasses.each do |klass|
17
17
  klass._rescue_from_duplicate_handlers.each do |handler|
18
+ next unless klass.connection.table_exists?(klass.table_name)
18
19
  unique_indexes = klass.connection.indexes(klass.table_name).select(&:unique)
19
20
 
20
21
  unless unique_indexes.any? { |index| index.columns.map(&:to_s).sort == handler.columns }
@@ -1,5 +1,5 @@
1
1
  module Activerecord
2
2
  module RescueFromDuplicate
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-rescue_from_duplicate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Malette
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-09 00:00:00.000000000 Z
11
+ date: 2016-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  version: '0'
191
191
  requirements: []
192
192
  rubyforge_project:
193
- rubygems_version: 2.2.3
193
+ rubygems_version: 2.5.1
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: Rescue from MySQL and Sqlite duplicate errors when trying to insert records