rgeo-activerecord 2.1.0 → 2.1.1

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: 5b83476535f3d17674c94804b519733b8323132e
4
- data.tar.gz: a6be4923114b7a126efca93c7a9777f05abfe427
3
+ metadata.gz: eefa5be0ab751442125af4725e0c68a027de604a
4
+ data.tar.gz: febd0ffb4107382342a35c47d85c4e42f79407f5
5
5
  SHA512:
6
- metadata.gz: 289df566bcc7790e1a19af1b8ad937529f0b161db4ae95c02dc3b9878cee98e4a31b400dc6e0b96127559ae3c18687ad7276509bbb47c017349eda1b873dec2b
7
- data.tar.gz: db7bbcafe746974fa60a8d2aff1ec298e30bb87203685b9cb16172e7f7e8f35b4d64ff905278827b714e77c85724ed3f5b57699241e5ad976f78fffcb2a0786b
6
+ metadata.gz: 4d80baf3359fd91e9ea9425fc9ae152f7e3ed4ef91e91156ce40b64eb49c7dfe198b2b10355b238ae5d5c5a5e51b808beccdd0ed94ceef5fec71756fa2fdfd6a
7
+ data.tar.gz: d7e315bd3bba85db027ff861083ab3d0ede51e2d627d4f24172427ad9869456060c94c590ed80ab05a76da9cc2944acf50f4969d43edced4b3ac1c171a2b9d26
@@ -27,7 +27,13 @@ module RGeo
27
27
  node.expressions.each_with_index do |expr, index|
28
28
  exprs << (node.spatial_argument?(index) ? visit_in_spatial_context(expr, collector) : visit(expr, collector))
29
29
  end
30
- collector << "#{name}(#{node.distinct ? 'DISTINCT ' : ''}#{exprs.join(', ')})#{node.alias ? " AS #{visit(node.alias, *args)}" : ''}"
30
+ collector << name
31
+ collector << "("
32
+ collector << "DISTINCT " if node.distinct
33
+ collector << exprs.join(', ')
34
+ collector << ")"
35
+ collector << " AS #{ visit(node.alias, collector) }" if node.alias
36
+ collector
31
37
  end
32
38
 
33
39
  # Generates SQL for a spatial node.
@@ -38,9 +44,9 @@ module RGeo
38
44
  when ::String
39
45
  collector << "#{st_func('ST_WKTToSQL')}(#{quote(node)})"
40
46
  when ::RGeo::Feature::Instance
41
- collector << visit_RGeo_Feature_Instance(node, *args)
47
+ collector << visit_RGeo_Feature_Instance(node, collector)
42
48
  when ::RGeo::Cartesian::BoundingBox
43
- collector << visit_RGeo_Cartesian_BoundingBox(node, *args)
49
+ collector << visit_RGeo_Cartesian_BoundingBox(node, collector)
44
50
  else
45
51
  visit(node, collector)
46
52
  end
@@ -1,5 +1,5 @@
1
1
  module RGeo
2
2
  module ActiveRecord
3
- VERSION = '2.1.0'.freeze
3
+ VERSION = "2.1.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgeo-activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Azuma, Tee Parham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-07 00:00:00.000000000 Z
11
+ date: 2015-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rgeo
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  version: '0'
124
124
  requirements: []
125
125
  rubyforge_project:
126
- rubygems_version: 2.4.5
126
+ rubygems_version: 2.4.6
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: An RGeo module providing spatial extensions to ActiveRecord.
@@ -132,4 +132,3 @@ test_files:
132
132
  - test/common_adapter_elements_test.rb
133
133
  - test/support/fake_record.rb
134
134
  - test/test_helper.rb
135
- has_rdoc: