compendium 1.1.3.3 → 1.1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/compendium/query.rb +1 -0
- data/lib/compendium/version.rb +1 -1
- data/spec/report_spec.rb +32 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTRmMzFjMzFhMTA3YjVjNDMwYjM0NzQwYjFhMWMxMDNlZjdlZGQ0ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MWEzM2NiMjk2ZjhiNGE5YmIwNjkzNjY0MTRkMDI1YWU3OGE1NWE3Ng==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWRlMjMxNTlkNDg4ZTUxMmRhZjBhZjJlZjVmNDJlZTRkMmVkY2Y1Nzg3YzM0
|
10
|
+
YzI2YTY0NGYzODdmOGFkNmI1NTBmMDVmNzBjZTI3ODBiMDdlMzJiZDk3OWZk
|
11
|
+
NDhjMjk2NDlmZTdkOTJkMTc3NWJjZGE1ZTcxZGQ0N2RkODNiODE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGMzNzk4NGVhMDU0NjU1MDVjNGYyYzM2ZjIyMWZjOTc5MzgwMDEyNWEzYzcz
|
14
|
+
NTgwZGQ2OTA0YTMwNDZhYTAyYWNlMWQ1MGYzZDM0ZWQ3YTRmODE0MzAzMDUy
|
15
|
+
MzNlYjQ0NDNiZGJlMDViOTQ0NDRmNDcwMDc5MTJiNWMzYTk0NzY=
|
data/lib/compendium/query.rb
CHANGED
data/lib/compendium/version.rb
CHANGED
data/spec/report_spec.rb
CHANGED
@@ -264,4 +264,36 @@ describe Compendium::Report do
|
|
264
264
|
end
|
265
265
|
end
|
266
266
|
end
|
267
|
+
|
268
|
+
describe '.filter' do
|
269
|
+
let(:filter_proc) { -> * {} }
|
270
|
+
|
271
|
+
let(:report_class) do
|
272
|
+
Class.new(described_class) do
|
273
|
+
query :main_query
|
274
|
+
end
|
275
|
+
end
|
276
|
+
|
277
|
+
let(:subclass1) do
|
278
|
+
k = Class.new(report_class)
|
279
|
+
k.filter(:main_query, &filter_proc)
|
280
|
+
k
|
281
|
+
end
|
282
|
+
|
283
|
+
let(:subclass2) { Class.new(report_class) }
|
284
|
+
let(:subclass3) { Class.new(subclass1) }
|
285
|
+
|
286
|
+
it 'should add filters to the specified query' do
|
287
|
+
subclass1.main_query.filters.should include filter_proc
|
288
|
+
end
|
289
|
+
|
290
|
+
it 'should add filters by inheritence' do
|
291
|
+
subclass3.main_query.filters.should include filter_proc
|
292
|
+
end
|
293
|
+
|
294
|
+
it 'should not bleed filters from a subclass into other subclasses' do
|
295
|
+
subclass1
|
296
|
+
subclass2.main_query.filters.should be_empty
|
297
|
+
end
|
298
|
+
end
|
267
299
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compendium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.3.
|
4
|
+
version: 1.1.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Vandersluis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
type: :runtime
|