squeel 1.0.12 → 1.0.13

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.0.13 (2012-10-11)
2
+
3
+ * Allow strings in from_value. Fixes incompatibility with acts-as-taggable-on.
4
+
1
5
  ## 1.0.12 (2012-10-07)
2
6
 
3
7
  * Properly uniq order_values before visiting, to fix #163
@@ -1,3 +1,3 @@
1
1
  module Squeel
2
- VERSION = "1.0.12"
2
+ VERSION = "1.0.13"
3
3
  end
@@ -1,6 +1,9 @@
1
1
  module Squeel
2
2
  module Visitors
3
3
  class FromVisitor < Visitor
4
+
5
+ alias :visit_String :visit_passthrough
6
+
4
7
  end
5
8
  end
6
9
  end
@@ -0,0 +1,20 @@
1
+ require 'spec_helper'
2
+
3
+ module Squeel
4
+ module Visitors
5
+ describe FromVisitor do
6
+
7
+ before do
8
+ @jd = new_join_dependency(Person, {}, [])
9
+ @c = Squeel::Adapters::ActiveRecord::Context.new(@jd)
10
+ @v = FromVisitor.new(@c)
11
+ end
12
+
13
+ it 'allows strings' do
14
+ from = @v.accept('people')
15
+ from.should eq 'people'
16
+ end
17
+
18
+ end
19
+ end
20
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: squeel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-07 00:00:00.000000000 Z
12
+ date: 2012-10-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -232,6 +232,7 @@ files:
232
232
  - spec/squeel/nodes/predicate_spec.rb
233
233
  - spec/squeel/nodes/sifter_spec.rb
234
234
  - spec/squeel/nodes/stub_spec.rb
235
+ - spec/squeel/visitors/from_visitor_spec.rb
235
236
  - spec/squeel/visitors/order_visitor_spec.rb
236
237
  - spec/squeel/visitors/predicate_visitor_spec.rb
237
238
  - spec/squeel/visitors/preload_visitor_spec.rb
@@ -254,7 +255,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
254
255
  version: '0'
255
256
  segments:
256
257
  - 0
257
- hash: -125352363847628976
258
+ hash: 2470259262111794419
258
259
  required_rubygems_version: !ruby/object:Gem::Requirement
259
260
  none: false
260
261
  requirements:
@@ -263,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
263
264
  version: '0'
264
265
  segments:
265
266
  - 0
266
- hash: -125352363847628976
267
+ hash: 2470259262111794419
267
268
  requirements: []
268
269
  rubyforge_project: squeel
269
270
  rubygems_version: 1.8.24
@@ -299,6 +300,7 @@ test_files:
299
300
  - spec/squeel/nodes/predicate_spec.rb
300
301
  - spec/squeel/nodes/sifter_spec.rb
301
302
  - spec/squeel/nodes/stub_spec.rb
303
+ - spec/squeel/visitors/from_visitor_spec.rb
302
304
  - spec/squeel/visitors/order_visitor_spec.rb
303
305
  - spec/squeel/visitors/predicate_visitor_spec.rb
304
306
  - spec/squeel/visitors/preload_visitor_spec.rb