forest_admin_datasource_toolkit 1.0.0.pre.beta.89 → 1.0.0.pre.beta.91

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: db3785fec2059a24ea3be2cedbfe5dc423dc6754702ed39956041737d2b85689
4
- data.tar.gz: b28a17b65535b135e560e67671bcd2c05dc50aa710d4800fa2081972706dc64f
3
+ metadata.gz: 160cc5a68c188a62c9f94b7089389de24fdc16df0eb6cf8ecc36eee6dfb61fd7
4
+ data.tar.gz: 3f97f5972dd068e4b761666c8999079aab58a9dacaa9bc30c4103164957d76ef
5
5
  SHA512:
6
- metadata.gz: 01b370a2e20dd3bd96832d31e189a80b281948236efe12710448472407acf19597c5bb1a6cae917fba817f2fb850bb0e3832cd350b58e4f519cec10b82f012ea
7
- data.tar.gz: f59693ce277a38d5d981290b08b9e25f4f02ad8cbbf3846e9c7e6884422041ed3bc5c0014daf65f71125ed6d632f5d39e65443a261450a9119c36eb9656f20dc
6
+ metadata.gz: c0c296a86cbf5c82c261d1cd9a395aa390762de23f7b17abd99209065c7c703f44a4a255cb39a064541cb7f1e9b95e8e8c6f8a2fabb0f97390146c58cc073195
7
+ data.tar.gz: cf9e80fad0f019cff5b9976ddfb3b4307c1fbd30b5c1d31ddbbd1c1f12b37fb981a4f95ad649c307629f9509ea8e2a2a5bb45806c876805a9cddc104d41b8ef1
@@ -9,7 +9,8 @@ module ForestAdminDatasourceToolkit
9
9
  schema = path[1]
10
10
  memo += [column_name] if schema.type == 'Column'
11
11
 
12
- if schema.type == 'OneToOne' || schema.type == 'ManyToOne' || schema.type == 'PolymorphicOneToOne'
12
+ to_one_relations = %w[OneToOne ManyToOne PolymorphicOneToOne]
13
+ if to_one_relations.include?(schema.type)
13
14
  relation = collection.datasource.get_collection(schema.foreign_collection)
14
15
  relation_columns = relation.schema[:fields]
15
16
  .select { |_column_name, relation_column| relation_column.type == 'Column' }
@@ -13,7 +13,7 @@ module ForestAdminDatasourceToolkit
13
13
  raise ForestException, "Unknown field #{key}"
14
14
  elsif schema.type == 'Column'
15
15
  FieldValidator.validate(collection, key, record_data[key])
16
- elsif schema.type == 'OneToOne' || schema.type == 'ManyToOne'
16
+ elsif ['OneToOne', 'ManyToOne'].include?(schema.type)
17
17
  sub_record = record_data[key]
18
18
  association = collection.datasource.get_collection(schema.foreign_collection)
19
19
  RecordValidator.validate(association, sub_record)
@@ -1,3 +1,3 @@
1
1
  module ForestAdminDatasourceToolkit
2
- VERSION = "1.0.0-beta.89"
2
+ VERSION = "1.0.0-beta.91"
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_admin_datasource_toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.beta.89
4
+ version: 1.0.0.pre.beta.91
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu
8
8
  - Nicolas
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2025-01-08 00:00:00.000000000 Z
12
+ date: 2025-01-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -135,7 +135,7 @@ metadata:
135
135
  source_code_uri: https://github.com/ForestAdmin/agent-ruby
136
136
  changelog_uri: https://github.com/ForestAdmin/agent-ruby/blob/main/CHANGELOG.md
137
137
  rubygems_mfa_required: 'false'
138
- post_install_message:
138
+ post_install_message:
139
139
  rdoc_options: []
140
140
  require_paths:
141
141
  - lib
@@ -150,8 +150,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  - !ruby/object:Gem::Version
151
151
  version: 1.3.1
152
152
  requirements: []
153
- rubygems_version: 3.3.5
154
- signing_key:
153
+ rubygems_version: 3.4.20
154
+ signing_key:
155
155
  specification_version: 4
156
156
  summary: Ruby agent for Forest Admin.
157
157
  test_files: []