active_node 2.2.8 → 2.2.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45501f3e062853d5fe6ccc8c86f421db66c5cff9
4
- data.tar.gz: 03cd4becab14827bbef0bac124fd0574d0f34b24
3
+ metadata.gz: ec9336e089548ff6330d481bd0eba85e7271f9ee
4
+ data.tar.gz: 52ddbd8b07e19a0abc8597342543697b7ad1127e
5
5
  SHA512:
6
- metadata.gz: 1bc1bda0941bf238967605fe40083c6ad2b6315d5371b5e28667fbaef5abf01e37dde54c3cacaffbb51aa971316cf7f3c52e4e3a6fe706896b3282deea7622ef
7
- data.tar.gz: e39299ad270597c5c36d120056322b3ba8beb8c141210c675cbbd85d127fb525f670057a7fe3f7758d55264f8c4e2bd9fe366d93bc48b7ea218ff34335f234c2
6
+ metadata.gz: 0097d3c8dd69f3b8cd29253b3a10fc8ef87e0609dca385fde28384d228b37b16ebaffac607526e545019355e64d500f7316a0b9995628db7a997f1670f15c9c3
7
+ data.tar.gz: a38eecc74b13f6842262d0af6a273eec053ac656ad9e8edfa5d04bf588e212185a963bbd487758c0623692ace430a47b39ea75d9cab44b2d11424726b057e363
@@ -34,10 +34,6 @@ module ActiveNode
34
34
  self
35
35
  end
36
36
 
37
- def count
38
- to_a.count
39
- end
40
-
41
37
  def includes *includes
42
38
  @includes += includes
43
39
  self
@@ -1,3 +1,3 @@
1
1
  module ActiveNode
2
- VERSION = "2.2.8"
2
+ VERSION = "2.2.9"
3
3
  end
@@ -16,4 +16,13 @@ describe ActiveNode::QueryMethods do
16
16
  expect(Person.limit(1)).to eq([p1])
17
17
  end
18
18
  end
19
+
20
+ describe "#count" do
21
+ it "should respect block passed to count" do
22
+ Person.create!(name: 'abc')
23
+ expect(Person.count).to eq(1)
24
+ expect(Person.count{|p| p.name == 'abc'}).to eq(1)
25
+ expect(Person.count{|p| p.name != 'abc'}).to eq(0)
26
+ end
27
+ end
19
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_node
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.8
4
+ version: 2.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Heinrich Klobuczek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-04 00:00:00.000000000 Z
11
+ date: 2014-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_attr