mongoid-report 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/lib/mongoid/report/collection.rb +5 -0
- data/lib/mongoid/report/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Nzk0NTgwOTk3NDY5NjYzNzQ4YjM5NmQ1NjVlNTI2ZGI1YTA0NDcwMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjNjYmU3MjIxNzQxOGFlM2JlYzBjZjQ1OWNhYTM0MWNkMDc5ZjQyYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGE2NTQ1M2EyYWQzYjcxMDZiNzFiNTM2YjJkYTAyMWI3NjJjMmZiYWVlYTdk
|
10
|
+
NDAxZjI0YWY3NWVmMzY2Zjc2N2ZiZDcyYmI5NzQ0NWQ0YjMwOTYyMzM2NWZm
|
11
|
+
NDc2Mzg5MTJlNGE4MjYyNWRmYTA4ZmMxMDE0OTRiMGI1NTNlOTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODZhMDdjOTk2YWRkOGQyM2FkZTlhZTdiMzBiYzM5NmFjN2MzM2ZkNWI3NzJh
|
14
|
+
M2VlZmFkNjUzNmZlMGM5YzZiM2Q1YTkzOGZjYzNhZGNjN2MwMGIyNGEyZWVj
|
15
|
+
MzVmMDVlMTE1MWY0Njk1ZWVjNDg5ZGNmNTBmOTNiODcyYTgwNjA=
|
data/Gemfile.lock
CHANGED
@@ -21,9 +21,14 @@ module Mongoid
|
|
21
21
|
def summary
|
22
22
|
@summary ||= reduce(Hash.new{|h, k| h[k] = 0}) do |summary, row|
|
23
23
|
@fields.each do |field|
|
24
|
+
next if @columns.has_key?(field.to_s)
|
24
25
|
summary[field] += row[field.to_s]
|
25
26
|
end
|
26
27
|
|
28
|
+
@columns.each do |name, function|
|
29
|
+
summary[name] = function.call(@context, row)
|
30
|
+
end
|
31
|
+
|
27
32
|
summary
|
28
33
|
end.with_indifferent_access
|
29
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-report
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandr Korsak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|