rescue_unique_constraint 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rescue_unique_constraint.rb +1 -1
- data/lib/rescue_unique_constraint/version.rb +1 -1
- data/rescue_unique_constraint.gemspec +1 -1
- metadata +11 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ae927751df0dbaf9388e840db25719ee4a5bd6d
|
4
|
+
data.tar.gz: 531bfc801a47a52c4b0e217663440341a00557a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a72284d65d5ca068ca7ad3a0b1332566122cbbb4086685ec6fa0ad329611f235ddc7876c8dbd1ca8eb0fd52fb77d8fc9f6a4d28c279a63e80fe34c77d41f57e
|
7
|
+
data.tar.gz: 7a0c92cf066504cf0f1aae321c400b208cc9e95016ea5bdab50b90d2f44ea0fbdb312d6fe90790c513048d18971e980d569314491600419012bc722ad9dd5d74
|
@@ -21,7 +21,7 @@ module RescueUniqueConstraint
|
|
21
21
|
|
22
22
|
def rescue_unique_constraint(index:, field:)
|
23
23
|
unless method_defined?(:create_or_update_with_rescue)
|
24
|
-
define_method(:create_or_update_with_rescue) do
|
24
|
+
define_method(:create_or_update_with_rescue) do |*|
|
25
25
|
begin
|
26
26
|
create_or_update_without_rescue
|
27
27
|
rescue ActiveRecord::RecordNotUnique => e
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "activerecord", "
|
21
|
+
spec.add_dependency "activerecord", ">= 4.1", "< 6"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.6"
|
24
24
|
spec.add_development_dependency "rake", "~> 10.5"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rescue_unique_constraint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tam Dang
|
@@ -9,22 +9,28 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-02-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '4.1'
|
21
|
+
- - "<"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '6'
|
21
24
|
type: :runtime
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
24
27
|
requirements:
|
25
|
-
- - "
|
28
|
+
- - ">="
|
26
29
|
- !ruby/object:Gem::Version
|
27
30
|
version: '4.1'
|
31
|
+
- - "<"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '6'
|
28
34
|
- !ruby/object:Gem::Dependency
|
29
35
|
name: bundler
|
30
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -152,10 +158,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
158
|
version: '0'
|
153
159
|
requirements: []
|
154
160
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.
|
161
|
+
rubygems_version: 2.4.3
|
156
162
|
signing_key:
|
157
163
|
specification_version: 4
|
158
164
|
summary: Turns ActiveRecord::RecordNotUnique errors into ActiveRecord errors
|
159
165
|
test_files:
|
160
166
|
- spec/rescue_unique_constraint_spec.rb
|
161
|
-
has_rdoc:
|