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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 27efaf5971c6a6112e6bd8a425dce94b75c460be
4
- data.tar.gz: 9ad629f199f45389fcc44e86ba4dd7a563d5393a
3
+ metadata.gz: 3ae927751df0dbaf9388e840db25719ee4a5bd6d
4
+ data.tar.gz: 531bfc801a47a52c4b0e217663440341a00557a2
5
5
  SHA512:
6
- metadata.gz: c3889a2162aa6549ede31230f0d2d6fbda77a81ed59b59fcd1b220c0ecf17b682bdb850ac1a521fde94e17bc8b5e57f4fe0f16b437766983abe0b6497d52959e
7
- data.tar.gz: 4bacd362cc9b17643ca4d181753b4cb666759b69e54dc9b82a6bb2110e10efa5bf7a593065071509e8902c2cedd43013f8be49cd9182e500dbcbd88fdc58b1b2
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
@@ -1,3 +1,3 @@
1
1
  module RescueUniqueConstraint
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
@@ -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", "~> 4.1"
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.1.0
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-01-05 00:00:00.000000000 Z
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.2.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: