sunstone 5.1.0.2 → 5.1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arel/visitors/sunstone.rb +2 -1
- data/lib/sunstone/version.rb +1 -1
- data/test/active_record/query_test.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36510647bb5cb8991c4133315ef746af7f2ad49b
|
4
|
+
data.tar.gz: 668776a98974ad2685c9bf82f054258fb462cd55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26f5d6e7b9095a221b5c411b5b6d8f6b32a39a4629175f72750a19b23178684275385b26e76329b3b24af6e333f2566642ebb134be60be651e59ac15fa5e0811
|
7
|
+
data.tar.gz: 9d000ed9a6e7647edb76e846f3fee0e3d31d64fd0ced01779dee814759885328d5dcb9b0ed26909bc3471d0c29d314e61d5509bde015615a0623732930c79eca
|
@@ -728,7 +728,8 @@ module Arel
|
|
728
728
|
def mergeable?(hash_a, hash_b)
|
729
729
|
|
730
730
|
hash_a.each do |key, value_a|
|
731
|
-
|
731
|
+
#TODO: one day maybe just use symbols for all keys?
|
732
|
+
if hash_b.has_key?(key.to_sym) || hash_b.has_key?(key.to_s)
|
732
733
|
value_b = hash_b[key]
|
733
734
|
if value_a.is_a?(Hash) && value_b.is_a?(Hash)
|
734
735
|
return false if !mergeable?(value_a, value_b)
|
data/lib/sunstone/version.rb
CHANGED
@@ -47,6 +47,13 @@ class ActiveRecord::QueryTest < ActiveSupport::TestCase
|
|
47
47
|
assert_nil Ship.last
|
48
48
|
end
|
49
49
|
|
50
|
+
test '::where on the same column multiple times with symbols and strings' do
|
51
|
+
webmock(:get, "/ships", { where: [{ id: {gt: 10} }, 'AND', {id: {gt: 11}}], limit: 100, offset: 0 }).to_return(body: [].to_json)
|
52
|
+
|
53
|
+
arel_table = Ship.arel_table
|
54
|
+
assert_equal [], Ship.where(arel_table[:id].gt(10)).where(arel_table['id'].gt(11)).to_a
|
55
|
+
end
|
56
|
+
|
50
57
|
test '::where(AND CONDITION)' do
|
51
58
|
webmock(:get, "/ships", { where: {id: 10, name: 'name'}, limit: 1, order: [{id: :asc}] }).to_return({
|
52
59
|
body: [{id: 42}].to_json
|
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: 5.1.0.
|
4
|
+
version: 5.1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Bracy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|