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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f44d08dc6bb1c700f32c5271ccab0db4fe069bc4
4
- data.tar.gz: a442c4792155830be5fd507b479469e89adaddb9
3
+ metadata.gz: 36510647bb5cb8991c4133315ef746af7f2ad49b
4
+ data.tar.gz: 668776a98974ad2685c9bf82f054258fb462cd55
5
5
  SHA512:
6
- metadata.gz: 2221ec8ec6cb8a6b14d0d4d08b8639b611e0fefafcec97aa6ea6d0721933f124e930a8a77382de76ce9d57d31f17aa8ce9beca7175dfd5d64630fef86e030494
7
- data.tar.gz: 0d588df4234c01d1a1272fc3620c592308fda785a56a0c2ac4939301be68678547eee8907e7f780f461e390cdafad84291fdbb9d16dfe429cebb750bb2ada623
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
- if hash_b.has_key?(key)
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)
@@ -1,3 +1,3 @@
1
1
  module Sunstone
2
- VERSION = '5.1.0.2'
2
+ VERSION = '5.1.0.3'
3
3
  end
@@ -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.2
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-06 00:00:00.000000000 Z
11
+ date: 2017-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake