searchlogic 2.5.16 → 2.5.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NTZhMTNmZDNiMDlkZjcyZjI5MmI2ZjE1OWY3M2IxMmI5NTI0MzQ1OA==
4
+ MDZlNzA2MzVhZWM3NzJkMmI5ZTUzM2EwZWFiYWMzOGIwNDU3ZTAyMA==
5
5
  data.tar.gz: !binary |-
6
- ZDIzMjY3N2RiNmJiZWU5MmIzOTQwODFlNWYxMDRhOWQ5YTk5NjZmYw==
6
+ Njc5NzZmYmQzN2FlNzQwYTg1MzBjMmRiNTRlN2NhNzViZjVkYTA5MA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Zjg0NWI3OWFiOGY3NTY1YzJhYWM0ZjRmNGZlY2IwYjI3MGI0ZGMyNTVjZDI0
10
- YTIyN2NlNjE2MjRlYjg3YTYyYmY3NzdkZDNjNGMxMzJiYjIwMDRmNGQ4Njc1
11
- NTM1YWQ3NWRjYzMxMmFjNmIwNTJhNTI1MTkwY2I1NjBlZTc1MmE=
9
+ YTVkNjJkMWQ5MjVmMDZlOGMwMGY1MjEzNDY0YWM3OGUzNGIyODNmZDliNGRj
10
+ OWJlMmJlMjYzNmM5NDgzYTg3MjA3N2I5MDhlZDZlMzA0N2JjYjEzOGNlNzg1
11
+ NWE4NjgzOWYzZjZmMWY0NzFlOTM5OTZjYTVmZjY0ODA1NzVhNzc=
12
12
  data.tar.gz: !binary |-
13
- ODcyMTk3YTNmODY0NTRjN2Q1MmY4YmUxMzVhOTBmMmZmYjFjYTQ0YzAwOTA0
14
- NWFjNGMzNTg5ZTVkYjQyNmI3ZmJlN2I3MTY4MTY0YWRkMmM3YWQ0NjViY2Qy
15
- MTU2OTkzZTU2MTU2ZjNjZmVhNDhkNTcyYjRjNmE3YWNjN2UyOTM=
13
+ NWZiYWM5MTQ5ZDhlZTg2ZjQ4MzE0NzhmNmE2NmYyYjlkMGU4YTk1YjkzMjMw
14
+ YjlkZmY2ZjVkMjBkMDVkNmQ1NDgxM2EwY2Y3NmZiOWI3ZjFjZWQwMjMyZDVj
15
+ Y2UwMTZhNGUyMGU0MWQxOGY4NjVhZGYxZTM2OTIxZDg0NjJhN2M=
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- searchlogic (2.5.15)
4
+ searchlogic (2.5.16)
5
5
  activerecord (~> 2.3.12)
6
6
  activesupport (~> 2.3.12)
7
7
 
@@ -89,7 +89,7 @@ module Searchlogic
89
89
  def type_cast(value, type, options = {})
90
90
  case value
91
91
  when Array
92
- value.collect { |v| type_cast(v, type) }
92
+ value.collect { |v| type_cast(v, type) }.uniq
93
93
  when Range
94
94
  Range.new(type_cast(value.first, type), type_cast(value.last, type))
95
95
  else
@@ -1,3 +1,3 @@
1
1
  module Searchlogic
2
- VERSION = "2.5.16"
2
+ VERSION = "2.5.17"
3
3
  end
@@ -100,6 +100,12 @@ describe Searchlogic::Search do
100
100
  search.conditions = {"id_equals_any" => ["", "1"]}
101
101
  search.id_equals_any.should == [1]
102
102
  end
103
+
104
+ it "should remove duplicate values in arrays" do
105
+ search = User.search
106
+ search.conditions = {"username_equals_any" => ["dup", "dup"]}
107
+ search.username_equals_any.should == ["dup"]
108
+ end
103
109
  end
104
110
 
105
111
  context "#compact_conditions" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: searchlogic
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.16
4
+ version: 2.5.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Johnson