activerecord-rescue_from_duplicate 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 177b4e3d186607ace00720b9a9aa0ef36c4544ba
|
4
|
+
data.tar.gz: d1572e760fa9e8db750096b2ccf0ff8ce8103951
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 917489d657451b3efe18181ebcdae646f6b392952f0ee0616b800fa04741b739840d73cd7feb80529df0b077926efadb96f8454602d0d58a2efef1129b4de55f
|
7
|
+
data.tar.gz: 4f8ed33d63076f70e383069c9b97277d5d2efe315afc92f31c96ff63e209eb3d082d5127409221f810b810312b22a221fdbd803a32500a95f29f764d3b05cd0b
|
data/spec/rescuer_spec.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RescueFromDuplicate::Rescuer do
|
4
|
-
subject { RescueFromDuplicate::Rescuer.new(:
|
4
|
+
subject { RescueFromDuplicate::Rescuer.new(:shop_id, scope: :name) }
|
5
5
|
|
6
6
|
context "#matches?" do
|
7
7
|
it 'is true when the columns are the same' do
|
8
8
|
expect(subject.matches?(["shop_id", "name"])).to be true
|
9
|
+
expect(subject.matches?(["name", "shop_id"])).to be true
|
9
10
|
end
|
10
11
|
|
11
12
|
it 'is false when the columns are not the same' do
|
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.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guillaume Malette
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|