forest_admin_datasource_toolkit 1.40.1 → 1.41.0

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: 190a558c8d3e6a33c4a10749196acd2d6c10e2c20cc58061d0c863f6d7c4ab14
4
- data.tar.gz: 65b56b7ff4f9560b5779727ea89f6aeb17e9c0c990ffa86cc88c6b6724fbe82b
3
+ metadata.gz: 5c33993a66508f7b9f68405da7b79d78a56c5c128b3533ffcbace85c7e6e913c
4
+ data.tar.gz: 78af493051757183a3f5f3dfe49e63e22f9b3dcc39a3c9ea8faee4854dea3984
5
5
  SHA512:
6
- metadata.gz: 1a57468ace6221245624375b9f64d3098e05314de614b9886d544f5e295f68495cfd3d8ae97bc1bdc77e393cd620d23b59c9986d234aeea44f5dffb8df1b5426
7
- data.tar.gz: 225e7ff48cfd5ec3cde4d313114ec2490b5badb64e88b929f838240409eb59d544a02e2a1bfe16d953ef4225acf523d55ba3b4c91011f72c85e456137dae4443
6
+ metadata.gz: 2e2af00eb575ec1cd0acb7ab0529e2fe94da28becb96197d2727d246106a6b2d409d89e26e8e9dac418452a66e744bcfb28331b30fcbaf8f4a13a05db45043df
7
+ data.tar.gz: 86fe59f8a4444f3cc018e574fa258410bd179442ca453c0dfee0cc095261479fc7704f82f43854302676f81d1104cd99c5338557f1e2b304ea9472662f8d65ba
@@ -187,7 +187,7 @@ module ForestAdminDatasourceToolkit
187
187
 
188
188
  summary['Count'] += 1
189
189
  summary['Min'] = value if min.nil? || value < min
190
- summary['Max'] = value if max.nil? || value < max
190
+ summary['Max'] = value if max.nil? || value > max
191
191
  end
192
192
 
193
193
  summary['Sum'] += value if value.is_a?(Numeric)
@@ -34,11 +34,15 @@ module ForestAdminDatasourceToolkit
34
34
  )
35
35
  end
36
36
 
37
+ # Recurses through `match`, not through `every_leaf` / `some_leaf`:
38
+ # those walk down to the leaves and would apply this branch's
39
+ # aggregator to a nested one's, reading `And(a, Or(b, c))` as
40
+ # `And(a, b, c)`.
37
41
  def match(record, collection, timezone)
38
42
  if @aggregator == 'And'
39
- every_leaf { |condition| condition.match(record, collection, timezone) }
43
+ @conditions.all? { |condition| condition.match(record, collection, timezone) }
40
44
  else
41
- some_leaf { |condition| condition.match(record, collection, timezone) }
45
+ @conditions.any? { |condition| condition.match(record, collection, timezone) }
42
46
  end
43
47
  end
44
48
 
@@ -1,3 +1,3 @@
1
1
  module ForestAdminDatasourceToolkit
2
- VERSION = "1.40.1"
2
+ VERSION = "1.41.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_admin_datasource_toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.40.1
4
+ version: 1.41.0
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: 2026-08-28 00:00:00.000000000 Z
12
+ date: 2026-09-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport