mongoid-report 0.2.1 → 0.2.2
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/README.md +3 -3
- data/lib/mongoid/report/output.rb +3 -0
- data/lib/mongoid/report/version.rb +1 -1
- data/spec/mongoid/report/out_spec.rb +20 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YmRkZTE1OTMyNjYwZDI4ZTI1NjM4MjcyNDkyZTQ2NzRhMjZlMmE3Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTMyNWExZjM2YTVkZWFiZDEwZWQ3ZGI2MGVkNWMzZGQ3MjA5YWVmYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWJiMWI0MjViODc1OWZjYWJmN2MwMTY3OGQ4NTA0MDg5NjVjMDQxODNlZmFk
|
10
|
+
YzgwYTYwYWU3NjQyOGNhYWMwYmYwNjRhYWFmZDMyODJjNDQ0YzFmMmFlY2E0
|
11
|
+
M2U5Nzc1YmZiYWE1M2Q3ODkzZjMwN2MwZDc5ZTliOTJkMmYxMDU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWYyZGZjZDY1MDE3MmVmYWY1NTc5NjFhNDNmM2MyMDE1MGQyMGM1NzZlOGM0
|
14
|
+
Mzc2OTExNDFmNDI4NDcxOTk4ZjE5ZDJmM2MyNjU0NTFiYjk4NzIwZDk5NjYy
|
15
|
+
MmEwODYzMTEyNzQ3YzRjZDJmM2JhN2MyNTUxYjA0MWI1NmExMGQ=
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
Library for easy building aggregation report using mongodb aggregation
|
4
4
|
framework.
|
5
5
|
|
6
|
+
[![Gem Version](https://badge.fury.io/rb/mongoid-report.svg)](http://badge.fury.io/rb/mongoid-report)
|
7
|
+
|
6
8
|
[![Build Status](https://secure.travis-ci.org/oivoodoo/mongoid-report.png?branch=master)](https://travis-ci.org/oivoodoo/mongoid-report)
|
7
9
|
|
8
10
|
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/oivoodoo/mongoid-report)
|
@@ -61,9 +63,7 @@ Or install it yourself as:
|
|
61
63
|
|
62
64
|
## Contributors
|
63
65
|
|
64
|
-
@oivoodoo
|
65
|
-
|
66
|
-
@baltazore
|
66
|
+
[@oivoodoo](http://github.com/oivoodoo) and [@baltazore](http://github.com/baltazore)
|
67
67
|
|
68
68
|
## Contributing
|
69
69
|
|
@@ -3,6 +3,26 @@ require 'spec_helper'
|
|
3
3
|
describe Mongoid::Report do
|
4
4
|
let(:klass) { Model }
|
5
5
|
|
6
|
+
it 'should work fine for no documents to insert' do
|
7
|
+
report_klass = Class.new do
|
8
|
+
include Mongoid::Report
|
9
|
+
|
10
|
+
report 'example' do
|
11
|
+
attach_to Model do
|
12
|
+
group_by :field1
|
13
|
+
batches pool_size: 2
|
14
|
+
column :field1, :field2
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
report = report_klass.new
|
20
|
+
|
21
|
+
scoped = report.aggregate_for('example', 'models')
|
22
|
+
scoped = scoped.out('stored-report')
|
23
|
+
expect { scoped.all }.not_to raise_error
|
24
|
+
end
|
25
|
+
|
6
26
|
it 'should merge properly results on splitted requests' do
|
7
27
|
########## 1. Making the first report and out to the defined collection name.
|
8
28
|
report_klass = Class.new do
|
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.2.
|
4
|
+
version: 0.2.2
|
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-
|
11
|
+
date: 2014-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|