squeel 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Squeel
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
@@ -60,7 +60,7 @@ module Squeel
60
60
  # not passed as an SqlLiteral.
61
61
  def quoted?(object)
62
62
  case object
63
- when Arel::Nodes::SqlLiteral, Bignum, Fixnum
63
+ when Arel::Nodes::SqlLiteral, Bignum, Fixnum, Arel::SelectManager
64
64
  false
65
65
  else
66
66
  true
@@ -16,6 +16,13 @@ module Squeel
16
16
  @v = PredicateVisitor.new(@c)
17
17
  end
18
18
 
19
+ it 'does not quote Arel::SelectManager values in Predicate nodes' do
20
+ predicate = Nodes::Predicate.new(Nodes::Function.new(:blah, [1, 2]), :in, Person.select(:id).arel)
21
+ node = @v.accept(predicate)
22
+ node.should be_a Arel::Nodes::In
23
+ node.right.should be_a Arel::Nodes::SelectStatement
24
+ end
25
+
19
26
  it 'creates Equality nodes for simple hashes' do
20
27
  predicate = @v.accept(:name => 'Joe')
21
28
  predicate.should be_a Arel::Nodes::Equality
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: squeel
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.6.0
5
+ version: 0.6.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ernie Miller
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-04 00:00:00 Z
13
+ date: 2011-05-11 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -224,4 +224,3 @@ test_files:
224
224
  - spec/squeel/visitors/predicate_visitor_spec.rb
225
225
  - spec/squeel/visitors/symbol_visitor_spec.rb
226
226
  - spec/support/schema.rb
227
- has_rdoc: