sunstone 1.6.3 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b256d6a7581179895f161977f4c9de5be4b26cae
4
- data.tar.gz: 8c4c8fda5a10e3fec97c7b347bd1ff08a0b18241
3
+ metadata.gz: 051c69bddb929215445466e39b7ab1195f980713
4
+ data.tar.gz: 33d67611b87dacf74d886c91a4d3cba1ff6bf9e6
5
5
  SHA512:
6
- metadata.gz: 23110a75c8f118ea4512b4e3ca68411293d2b2777fd7c9bec4a66c95686bdfad92f44ccc3fbbb03e3e6e95e6ac405bc31196d014c0e92760978864ee2ef6a5cb
7
- data.tar.gz: 169c3f37eaa08874d23c3222b55f900bffb99d3b9e09ee006e348dc3e5499d5c98c1fa2d1253d949bfefe98036a313be2c77e567548cb94c4c6701243ff8bfc7
6
+ metadata.gz: 7912c0cd5e1b05b8ed7b3ddf38084b712fbcb031f0cfd8e05ad5719266b637c022ad459389b9cf71b298771a1f270382a8d663a9d5117c0e6769fb4d945c2d3f
7
+ data.tar.gz: 4c0e36266c7381930baf325aaa9ab944dbfe09d27f65243dfb8968e9702ac53cb3a2b037988a384204062e901215316c58f6aad0580d3884f12ac5948a1644c7
@@ -39,8 +39,11 @@ module Arel
39
39
  def compile bvs, conn = nil
40
40
  path = "/#{table}"
41
41
 
42
- get_params = {}
42
+ if updates
43
+ body = {table.singularize => substitute_binds(updates.clone, bvs)}.to_json
44
+ end
43
45
 
46
+ get_params = {}
44
47
  if where
45
48
  get_params[:where] = substitute_binds(where.clone, bvs)
46
49
  if get_params[:where].size == 1
@@ -57,7 +60,6 @@ module Arel
57
60
  get_params[:order] = order if order
58
61
  get_params[:columns] = columns if columns
59
62
 
60
-
61
63
  case operation
62
64
  when :count, :average, :min, :max
63
65
  path += "/#{operation}"
@@ -73,7 +75,7 @@ module Arel
73
75
  request = request_type.new(path)
74
76
 
75
77
  if updates
76
- request.body = {table.singularize => substitute_binds(updates.clone, bvs)}.to_json
78
+ request.body = body
77
79
  end
78
80
 
79
81
  request
data/sunstone.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "sunstone"
3
- s.version = '1.6.3'
3
+ s.version = '1.6.4'
4
4
  s.authors = ["Jon Bracy"]
5
5
  s.email = ["jonbracy@gmail.com"]
6
6
  s.homepage = "http://sunstonerb.com"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunstone
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.3
4
+ version: 1.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Bracy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-02 00:00:00.000000000 Z
11
+ date: 2014-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake