associate_jsonb 0.0.8 → 0.0.9

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: 9d9a2ca078138c49415e16c98a42191a1545502f41033ab7ec73494352fda01c
4
- data.tar.gz: 312f1fa2f579903c190ec72a875a000f44f32cdb9df0e218e5b276a902bb4a92
3
+ metadata.gz: 861ea54462a02137ede260085fdb80e49d0ea3d4286d09d2367cfaa9d140dcc3
4
+ data.tar.gz: 1d6fd78832d2ddc7a3d503760b401ae97f453cd79f50dc1cd14314176d9d5fdb
5
5
  SHA512:
6
- metadata.gz: 524b2455ff9c493b76605d232af61e4dcb576b1262814d13c200db7a686026230be11f837230eb6116be1c0c8d6043360cf2f22c14209ce323d8fc7875760316
7
- data.tar.gz: a76a0db4c95e3be203c397290f95110a5b8dce02a65c0fe6097df293be149e47e0d3252bf07482f679b562755f271e462f314635f3ce69ac5178a096de64965e
6
+ metadata.gz: dd8af89295273155cff22563212369930c15ff8bdcfece98e18a8f4c990d25037da443e2c345a0da99bb12d0b9ef447f7435a2c75ae1d7c62bc9e9a09bb3bac4
7
+ data.tar.gz: 5e267f48ff719e521c7f04e7a702d807a43dacadff43223499fc3d9c638020730db6b3b3105f36b1e90d466689bf92ce3fcbdd5c78f5498ef95ce987164082bf
@@ -156,8 +156,9 @@ module AssociateJsonb
156
156
  def add_column_options!(sql, opts)
157
157
  super
158
158
 
159
- if opts[:constraint]
160
- sql << " #{accept(ConstraintDefinition.new(**opts[:constraint]))}"
159
+ if constraint_opts = opts[:constraint]
160
+ constraint_opts = { value: constraint_opts } unless constraint_opts.is_a?(Hash)
161
+ sql << " #{accept(ConstraintDefinition.new(**constraint_opts))}"
161
162
  end
162
163
 
163
164
  sql
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module AssociateJsonb
5
- VERSION = "0.0.8"
5
+ VERSION = "0.0.9"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: associate_jsonb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sampson Crowley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-12 00:00:00.000000000 Z
11
+ date: 2020-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails