deep_unrest 0.1.51 → 0.1.52

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
  SHA256:
3
- metadata.gz: c5bdcd91ef4c50a606bbf723fd202a21893c72b8957efbaabd2d7a2eb80b1aaa
4
- data.tar.gz: fdf2a501df3a0b314550d905bdf9f746d7e3f8c2fca384d554e8a3c9532e8c2a
3
+ metadata.gz: c9f6aa0030171474c99726d5cde0c78550c6a22b0d56ca435bd03e4384627868
4
+ data.tar.gz: 2c02e8088b4c8caef247f1952d99deeacb08933038dcd1d9482eaa39b3b2f6c3
5
5
  SHA512:
6
- metadata.gz: 7393ec72fbc84c85fcd78460c91889af3fefbb893cd2ea65d7359414580d535c4113c85700e115ee5bc53d39efca53075f7b3d072bac5d981edb9f24437152bf
7
- data.tar.gz: 92eb1af0dfae994732550bb7538888ea4db1ed0e4d5a5a6ef4825e1fec160b0a8a5821e8715e13e2ba2055f67dfd5e7c8f294c6d105aa1db258767a6bb1da84a
6
+ metadata.gz: 82eacaadc3b6051b9219dcd6153bf2dc393cde4d11f5aa5ce520dae40b92ba11a3545e696f29d01a48005e372963f182bfd8ef1981967c2d6f6a00d5d29ac87e
7
+ data.tar.gz: 0a7b1f194ea17e963a6731b5d4961b1f7c5b5f262d4f3411db4478c71d849ce4017b3cdff0592dea6a79898b088b745e629976f00a3e3bc9b4f43af8bcf60cc0
@@ -66,6 +66,10 @@ module DeepUnrest
66
66
  query = resolve_conditions(mapping[:query].deep_dup, parent_context)
67
67
  raise DeepUnrest::InvalidQuery unless query[:id] || query[:find]
68
68
 
69
+ if query.key?(:if)
70
+ return unless query[:if][:attribute] == query[:if][:matches]
71
+ end
72
+
69
73
  record = if query.key?(:id)
70
74
  mapping[:scope].find(query[:id]) if query.key?(:id)
71
75
  else
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeepUnrest
4
- VERSION = '0.1.51'
4
+ VERSION = '0.1.52'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deep_unrest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.51
4
+ version: 0.1.52
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lynn Hurley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-05 00:00:00.000000000 Z
11
+ date: 2019-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails