ar_aggregate_by_interval 1.1.4 → 1.1.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c298fefa29a3f10b604344514cbdb4107f3ae14
|
4
|
+
data.tar.gz: 25ac0e6e1bc2aec6002ead9f3ed97d45cab933ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e101fa39c200ca502387d95b63c3dae825e25273c57ab04bb5ca05a32b2cd3932f6e6fea0cbf21d3754aec4449e77cd09a9dfe245b16d803269cf12012485f0
|
7
|
+
data.tar.gz: d99af5d4a6cd05e067c933e66a2fd9fc88613b933d8511a4a44557e4a46b3a16579c82b44a63564c3db1b8286ba58ba3288531c83532915cbf80691e4ea7a0ad
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
|
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
This file adheres to [Keep a changelog](http://keepachangelog.com/).
|
5
5
|
|
6
|
+
## [1.1.5] - 2015-03-08 (maintenance)
|
7
|
+
### Changed
|
8
|
+
- Raise ArgumentError instead of NoMethodError or RuntimeError on bad args
|
9
|
+
|
6
10
|
## [1.1.4] - 2015-03-08 (maintenance)
|
7
11
|
### Changed
|
8
12
|
- Moved functionality from constructors to methods
|
@@ -29,7 +29,7 @@ module ArAggregateByInterval
|
|
29
29
|
aggregate_column = nil
|
30
30
|
end
|
31
31
|
elsif sum_or_count != 'count' && aggregate_column.nil? || !(aggregate_column.is_a?(String) || aggregate_column.is_a?(Symbol))
|
32
|
-
raise "aggregate_column cant be nil with #{sum_or_count}"
|
32
|
+
raise ArgumentError, "aggregate_column cant be nil with #{sum_or_count}"
|
33
33
|
end
|
34
34
|
|
35
35
|
return {
|
@@ -129,10 +129,10 @@ describe ArAggregateByInterval do
|
|
129
129
|
subject do
|
130
130
|
Blog.count_weekly(:created_at, {}, {})
|
131
131
|
end
|
132
|
-
it 'raise
|
132
|
+
it 'raise ArgumentError' do
|
133
133
|
expect do
|
134
134
|
subject
|
135
|
-
end.to raise_error(
|
135
|
+
end.to raise_error(ArgumentError)
|
136
136
|
end
|
137
137
|
end
|
138
138
|
|
@@ -140,10 +140,10 @@ describe ArAggregateByInterval do
|
|
140
140
|
subject do
|
141
141
|
Blog.sum_weekly(:created_at, @from, @from)
|
142
142
|
end
|
143
|
-
it 'raise
|
143
|
+
it 'raise ArgumentError' do
|
144
144
|
expect do
|
145
145
|
subject
|
146
|
-
end.to raise_error(
|
146
|
+
end.to raise_error(ArgumentError, /aggregate_column/)
|
147
147
|
end
|
148
148
|
end
|
149
149
|
end
|