freelancing-god-riddle 0.9.8.1371.1 → 0.9.8.1371.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,7 +33,16 @@ module Riddle
33
33
  message.append_int self.values.length
34
34
  # using to_f is a hack from the php client - to workaround 32bit
35
35
  # signed ints on x32 platforms
36
- message.append_ints *self.values.collect { |val| val.to_f }
36
+ message.append_ints *self.values.collect { |val|
37
+ case val
38
+ when TrueClass
39
+ 1.0
40
+ when FalseClass
41
+ 0.0
42
+ else
43
+ val.to_f
44
+ end
45
+ }
37
46
  end
38
47
  message.append_int self.exclude? ? 1 : 0
39
48
 
data/lib/riddle.rb CHANGED
@@ -18,7 +18,7 @@ module Riddle #:nodoc:
18
18
  Rev = 1371
19
19
  # Release number to mark my own fixes, beyond feature parity with
20
20
  # Sphinx itself.
21
- Release = 1
21
+ Release = 2
22
22
 
23
23
  String = [Major, Minor, Tiny].join('.')
24
24
  GemVersion = [Major, Minor, Tiny, Rev, Release].join('.')
@@ -30,4 +30,9 @@ describe Riddle::Client::Filter do
30
30
  filter = Riddle::Client::Filter.new("field", 5.4..13.5, true)
31
31
  filter.query_message.should == query_contents(:filter_floats_exclude)
32
32
  end
33
+
34
+ it "should render a filter that is an array of boolean values correctly" do
35
+ filter = Riddle::Client::Filter.new("field", [false, true])
36
+ filter.query_message.should == query_contents(:filter_boolean)
37
+ end
33
38
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freelancing-god-riddle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8.1371.1
4
+ version: 0.9.8.1371.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Allan
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-08-13 00:00:00 -07:00
12
+ date: 2008-10-25 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15