dynamoid_advanced_where 1.0.0 → 1.0.1

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
  SHA256:
3
- metadata.gz: 92ed86764764bc4cb565a2499dcbb686dcc82c043e2e6739d5e9a43a508096e7
4
- data.tar.gz: ab2b862945f23e4289b7231346ad81a457fba65c222b0c1b4bd0f219f4ca2d8c
3
+ metadata.gz: f415151e23b5baba11532ebc26bf31020983502dd979a41a49e262933bf4ea50
4
+ data.tar.gz: be4300fcbfe8db7056c2c0e0163f8573854434c3a40826476686243dc4cafd5b
5
5
  SHA512:
6
- metadata.gz: 1ea844c390551ebfb5813ac4c6c4f66a5acd31699fbe964e10fa08b912d464f46ff1685397f29c0dc1aed951432ffa03e1040b9d82cc25fdc692941447688f6c
7
- data.tar.gz: 964bcf57c3c19b94853d711b3bdfda1141a6ee113f9532d86452435372959beeb9c58ca81940c34520e03a32c4d9af2f3e5d91f4991bc027d6a8a94dd23dfce4
6
+ metadata.gz: ce2f7f1722ffbfb98bc4302495679d5511ef59b88f0b676850e77c20600bb7f19b728bdb0fd6bee8f385abd42947a9afb0b12ffd469165bb5ffaaeffeb5586fa
7
+ data.tar.gz: 69dd0f4ad676256f5e6b0d52decd79198f69aa7f03efec1602d87e8bebb5a133076b337a00d7c2ef91ac71b0d9bf48c599aef9f9d1cc097028762a07724e5e5e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dynamoid_advanced_where (1.0.0)
4
+ dynamoid_advanced_where (1.0.1)
5
5
  dynamoid (>= 3.2, < 4)
6
6
 
7
7
  GEM
@@ -1,7 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+
3
4
  module DynamoidAdvancedWhere
4
5
  module Nodes
6
+ module Concerns
7
+ module SupportsLogicalAnd
8
+ def and(other_value)
9
+ AndNode.new(self, other_value)
10
+ end
11
+ alias & and
12
+ end
13
+ end
14
+
15
+ # I know this is weird but it prevents a circular dependency
16
+ require_relative './not'
17
+
5
18
  class AndNode < BaseNode
6
19
  include Concerns::Negatable
7
20
  attr_accessor :child_nodes
@@ -30,14 +43,5 @@ module DynamoidAdvancedWhere
30
43
  end
31
44
  alias & and
32
45
  end
33
-
34
- module Concerns
35
- module SupportsLogicalAnd
36
- def and(other_value)
37
- AndNode.new(self, other_value)
38
- end
39
- alias & and
40
- end
41
- end
42
46
  end
43
47
  end
@@ -6,6 +6,8 @@ module DynamoidAdvancedWhere
6
6
  module Nodes
7
7
  class ExistsNode < BaseNode
8
8
  include Concerns::Negatable
9
+ include Concerns::SupportsLogicalAnd
10
+ include Concerns::SupportsLogicalOr
9
11
 
10
12
  attr_accessor :field_node, :prefix
11
13
  def initialize(field_node:)
@@ -4,8 +4,23 @@ require 'forwardable'
4
4
 
5
5
  module DynamoidAdvancedWhere
6
6
  module Nodes
7
+ module Concerns
8
+ module Negatable
9
+ def negate
10
+ NotNode.new(sub_node: self)
11
+ end
12
+ alias ! negate
13
+ end
14
+ end
15
+
16
+ # I know this is weird but it prevents a circular dependency
17
+ require_relative './and_node'
18
+ require_relative './or_node'
19
+
7
20
  class NotNode
8
21
  extend Forwardable
22
+ include Concerns::SupportsLogicalAnd
23
+ include Concerns::SupportsLogicalOr
9
24
 
10
25
  attr_accessor :sub_node
11
26
 
@@ -23,13 +38,5 @@ module DynamoidAdvancedWhere
23
38
  end
24
39
  end
25
40
 
26
- module Concerns
27
- module Negatable
28
- def negate
29
- NotNode.new(sub_node: self)
30
- end
31
- alias ! negate
32
- end
33
- end
34
41
  end
35
42
  end
@@ -1,3 +1,3 @@
1
1
  module DynamoidAdvancedWhere
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamoid_advanced_where
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Malinconico