agilibox 1.10.1 → 1.10.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff2d34b73ea33a219f3d265b935bdea4036bfc6ec4341fd2276e30027faabcc0
4
- data.tar.gz: a045b91aea19b7e91086e76b719b331ad7e1c91a968dcc98ab0ee2c751bd73f0
3
+ metadata.gz: c957ea49c90e282829586fcc2e643e29f0cafdf6de7addd6867e7c7ccb84b208
4
+ data.tar.gz: 7a03a0ccea759d460a7c67deb95f44e9e06f09ae89ddf9e8038e23f8112749a7
5
5
  SHA512:
6
- metadata.gz: 4fee52d85871c82503de1c260a47e8c21a67632ed46ab225d3b62d67d2c800097581134777fdf8dbd00f7dee1a8325f6645f5c5c32357afb76ff3a0c824d3ce8
7
- data.tar.gz: b5015ff7177e0d632fd3426db3eb1c784a624458a9d55c6c70e614a75a43dfb0d3f53c39ca734072f7bea305065997f49e63fd8e303437f7d69f8d2c5fcee249
6
+ metadata.gz: b458a4602f68758275b70049a33def1d27658af96e4d6941251702b0d2957b5968c3cd2cf7bb682338f4c3a931233e054636629e9539053ef5700ad9102c847b
7
+ data.tar.gz: f64d11c96a644d6f2871820a25f1ba000904dbecf50037fa07b69cfe37c1f87aab16041a9188f0fb78c9ff9d988597408ba8f3dac9d78682c755c3a5d1badc36
data/CHANGELOG.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## Next version
4
4
 
5
+ ## v1.10.2
6
+ - Filters improvements
7
+
5
8
  ## v1.10.1
6
9
  - Fix date filters
7
10
 
@@ -1,4 +1,6 @@
1
1
  class Agilibox::SmallData::Filter
2
+ include ActiveModel::Model
3
+
2
4
  STRATEGIES = {}
3
5
 
4
6
  attr_reader :jar
@@ -60,8 +62,12 @@ class Agilibox::SmallData::Filter
60
62
  write read.merge(new_filters)
61
63
  end
62
64
 
65
+ def actives_count
66
+ read.count { |k, v| strategies.key?(k.to_s) && v.present? }
67
+ end
68
+
63
69
  def any?
64
- read.select { |k, v| strategies.key?(k.to_s) && v.present? }.any?
70
+ actives_count.positive?
65
71
  end
66
72
 
67
73
  def empty?
@@ -1,3 +1,3 @@
1
1
  module Agilibox
2
- VERSION = "1.10.1"
2
+ VERSION = "1.10.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agilibox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.1
4
+ version: 1.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - agilidée