acts-as-taggable-array-on 0.4.1 → 0.4.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a77a0ec0610eefe1f30f46cdceea0506283044dc
|
4
|
+
data.tar.gz: d3a309690f4f0277752d68c270f937a6c67a66d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfef9bc472538240ea718500f4f3295c3bdf684ede2e4d35d81055406a8ab51040d7a8dd864ab30264d7bbed12c8055a6e3a3e36406ec54c522ee3287306a23a
|
7
|
+
data.tar.gz: 5a7de21d8081ad1dfc2916cdb0e7f19c4c14219fb8f89ad619d069e2e7d636715f5b1d143dc9b677edb95a8ac2091e5e90d8809b19690e0be4fca7ad4722ebf9
|
data/README.md
CHANGED
@@ -2,12 +2,13 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe ActsAsTaggableArrayOn::Taggable do
|
4
4
|
before do
|
5
|
-
@user1 = User.create name: 'Tom', colors: ['red', 'blue'], sizes: ['medium', 'large']
|
6
|
-
@user2 = User.create name: 'Ken', colors: ['black', 'white', 'red'], sizes: ['small', 'large']
|
7
|
-
@user3 = User.create name: 'Joe', colors: ['black', 'blue'], sizes: ['small', 'medium', 'large']
|
5
|
+
@user1 = User.create name: 'Tom', colors: ['red', 'blue'], sizes: ['medium', 'large'], codes: [456, 789]
|
6
|
+
@user2 = User.create name: 'Ken', colors: ['black', 'white', 'red'], sizes: ['small', 'large'], codes: [123, 789]
|
7
|
+
@user3 = User.create name: 'Joe', colors: ['black', 'blue'], sizes: ['small', 'medium', 'large'], codes: [123, 456, 789]
|
8
8
|
|
9
9
|
User.acts_as_taggable_array_on :colors
|
10
10
|
User.acts_as_taggable_array_on :sizes
|
11
|
+
User.acts_as_taggable_array_on :codes
|
11
12
|
end
|
12
13
|
|
13
14
|
describe "#acts_as_taggable_array_on" do
|
@@ -32,6 +33,13 @@ describe ActsAsTaggableArrayOn::Taggable do
|
|
32
33
|
expect(User.without_all_sizes('medium')).to match_array([@user2])
|
33
34
|
end
|
34
35
|
|
36
|
+
it "should work with ::integer typed array" do
|
37
|
+
expect(User.with_any_codes([123])).to match_array([@user2,@user3])
|
38
|
+
expect(User.with_all_codes([123, 789])).to match_array([@user2,@user3])
|
39
|
+
expect(User.without_any_codes(456)).to match_array([@user2])
|
40
|
+
expect(User.without_all_codes(456)).to match_array([@user2])
|
41
|
+
end
|
42
|
+
|
35
43
|
describe "#with_any_tags" do
|
36
44
|
it "returns users having any tags of args" do
|
37
45
|
expect(User.with_any_colors(['red', 'blue'])).to match_array([@user1,@user2,@user3])
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts-as-taggable-array-on
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takuya Miyamoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|