filternator 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: 580bcc844e002308ce04d4d7d065b55be8502a93
4
- data.tar.gz: ccfa34d6d51b92828046475068553c35c605f07a
3
+ metadata.gz: 82f0c46375dde16ab7532075d52291d28be82c5e
4
+ data.tar.gz: ef7d2847bd06b6aff7c54e98468fbc47d82085e8
5
5
  SHA512:
6
- metadata.gz: 48bf7cb13193cad57d1c80c5fa958756b8b591eaa7f70f440d2fc24cbe8d0af1f80a26053a2448c658535672f21bd86181b6bc41091fb9d499a88bf361b3dcfe
7
- data.tar.gz: 6aea328ce4c15f04752de860b85a5db93a819e917c68085be1ab666451ec79164c43c15f6996b661d602f7387cd07c72695a3c73b72912423847bf8fd837f152
6
+ metadata.gz: e074b3c9b3e0c91c94fa941e6a77c0564831981aa2748ecbe153aa704d63a011e7ec481689f7c12aed05f98f14eaa00ca548501ea632a83bcbf9681f163aba39
7
+ data.tar.gz: 950b3227ca852897f68f5cb994c7464be3d96a0032adb325823305073f23ce6ff5546edb13a7bd312d3ddc09f3959e2f4752f49fada78366fb6542614045f2eb
@@ -14,7 +14,7 @@ module Filternator
14
14
  def stats
15
15
  pairs = all_filters.map { |filter|
16
16
  result = apply(filter: filter).count
17
- result = result.keys.first if result.is_a?(Hash) # ActiveRecord `group by` fix
17
+ result = result.values.inject(:+) if result.is_a?(Hash) # ActiveRecord `group by` fix
18
18
  [ filter, result ]
19
19
  }
20
20
  Hash[pairs]
@@ -1,3 +1,3 @@
1
1
  module Filternator
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filternator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - iain