forest_admin_agent 1.19.1 → 1.19.3

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: 72e8f12e7694f7c6bad6e9e551bb4c0524df7b444d25c6f59d5c83800c060209
4
- data.tar.gz: 06bd8a2fa518d2d4f657b8f1e8b196267ebdcf00c97bc2ef28fa25bb39c09b27
3
+ metadata.gz: e96dce4393e473082f182c844d8eb326f13d17e0c218491e8ada351f163e3f1d
4
+ data.tar.gz: 33d5ddd5ab3b12d4894149ce64c7cd5e30cdf9e88c04b4b9f8703139012953b4
5
5
  SHA512:
6
- metadata.gz: f78e10b3ce3665f40736d688ec30974d776512cdf6fd266fe1cd765b6ca8741bcde60f0285c82cbc7d23f15b5cdc0722ee70d6ba16a30078a35f964f6ea679f2
7
- data.tar.gz: 2407fe96925be24e166f0df115917abd248bcf531d6df3decdcc36812a6a30f203115078e8c3617223730285530751a18ea71db737a19fa3cdd238131d37acb9
6
+ metadata.gz: c575d698994b03c2b70efdaf09d51892c4801040f988e02c0c11c4eb9243a61582d95a96adfab95cb46d75a1b498de2c76fca0a11afa0f45eba211244ce21890
7
+ data.tar.gz: 1d2e9f9e5f1da2256feac3d0b6ce4d8b35836b0da660f15d3907728a651275af801a7dba9f84944af87b6c7230143ef49685bda46d4cbd78871817ab11d1099d
@@ -24,11 +24,13 @@ module ForestAdminAgent
24
24
  collection = datasource.get_collection(collection_name)
25
25
  {
26
26
  name: collection.name,
27
- fields: collection.schema[:fields].select { |_, field| field.is_a?(ColumnSchema) }.map do |name, field|
27
+ fields: collection.schema[:fields].filter_map do |name, field|
28
+ next unless field.is_a?(ColumnSchema)
29
+
28
30
  {
29
31
  name: name,
30
32
  type: field.column_type,
31
- operators: field.filter_operators.map { |operator| operator }
33
+ operators: field.filter_operators.to_a
32
34
  }
33
35
  end
34
36
  }
@@ -29,10 +29,7 @@ module ForestAdminAgent
29
29
  @options[:class_name].gsub('::', '__')
30
30
  )
31
31
  primary_keys = ForestAdminDatasourceToolkit::Utils::Schema.primary_keys(forest_collection)
32
- id = []
33
- primary_keys.each { |key| id << @object[key] }
34
-
35
- id.join('|')
32
+ primary_keys.map { |key| @object[key] }.join('|')
36
33
  end
37
34
 
38
35
  def format_name(attribute_name)
@@ -263,7 +263,7 @@ module ForestAdminAgent
263
263
  def find_action_from_endpoint(collection_name, path, http_method)
264
264
  endpoint = path.partition('/forest/')[1..].join
265
265
  schema_file = JSON.parse(File.read(Facades::Container.config_from_cache[:schema_path]))
266
- actions = schema_file['collections']&.select { |collection| collection['name'] == collection_name }&.first&.dig('actions')
266
+ actions = schema_file['collections']&.find { |collection| collection['name'] == collection_name }&.dig('actions')
267
267
 
268
268
  return nil if actions.nil? || actions.empty?
269
269
 
@@ -6,7 +6,7 @@ module ForestAdminAgent
6
6
  module Schema
7
7
  class SchemaEmitter
8
8
  LIANA_NAME = "agent-ruby"
9
- LIANA_VERSION = "1.19.1"
9
+ LIANA_VERSION = "1.19.3"
10
10
 
11
11
  def self.generate(datasource)
12
12
  datasource.collections
@@ -1,3 +1,3 @@
1
1
  module ForestAdminAgent
2
- VERSION = "1.19.1"
2
+ VERSION = "1.19.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_admin_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.1
4
+ version: 1.19.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2025-12-24 00:00:00.000000000 Z
12
+ date: 2026-01-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport