kaminari-neo4j 0.0.1 → 0.0.2

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: f3757da254f5e7f7dff521f7e505482f2ee93eda
4
- data.tar.gz: 51e11d1bb43661d5b5f8934daacac8bf15136c99
3
+ metadata.gz: 4ef076f46be70a411c7bd452743dc70dcc388918
4
+ data.tar.gz: 27fd8e6ad95ac86031c67c34ebee8701eac9d4df
5
5
  SHA512:
6
- metadata.gz: e468ea5032281e4f69be0e9f1882162157548f1bbedc79696e97577e3a4435a5cb4e5c1167daee25fdc7455778345743608c7157f006c2b96ba9229205ae036f
7
- data.tar.gz: ea7bc1becc8167b52b4b02a8dc0123f2cc726949e399c98d1f0ee1451f6954d0b1a972b1fc7eea039272d66c6b1514c14dec7e2fe1bb3186ef83e5689bf51c82
6
+ metadata.gz: ef7c625ff6d653817f7fd1069a8d8966078c22ceb2af0fca92fb97c6de43b39b68a9a6a9defcbb6573b7bc05327be0d550082d3a300254edcdde64bf73d975fe
7
+ data.tar.gz: 3f3cfcb252cde749d24f1b8ab7120071b73a1bd1de2cfc45fc0187bc10ad8c28c8e10b7b5aa2fcb95fc93dff7d702d59c1d4debb095af3ac9bc648bdb9fad15e
@@ -19,12 +19,7 @@ module Kaminari
19
19
  end
20
20
 
21
21
  def total
22
- target = target(source)
23
- if source.instance_of?(::Neo4j::Core::Query)
24
- source.reorder.with("#{target} as #{target}").pluck("COUNT(#{target})").first
25
- else
26
- source.count
27
- end
22
+ source.count
28
23
  end
29
24
 
30
25
  def items
@@ -35,10 +30,6 @@ module Kaminari
35
30
  new(source, page, per_page)
36
31
  end
37
32
 
38
- def target(source)
39
- source.instance_of?(::Neo4j::Core::Query) ? return_var : source.identity
40
- end
41
-
42
33
  def per(num)
43
34
  self.class.create_from(source, current_page, num)
44
35
  end
@@ -48,11 +39,6 @@ module Kaminari
48
39
  self
49
40
  end
50
41
 
51
- def return_var
52
- clause = source.instance_variable_get('@clauses').find { |c| c.is_a?(::Neo4j::Core::QueryClauses::ReturnClause) }
53
- clause.instance_variable_get('@arg')
54
- end
55
-
56
42
  def to_ary
57
43
  items.to_a
58
44
  end
@@ -1,5 +1,5 @@
1
1
  module Kaminari
2
2
  module Neo4j
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaminari-neo4j
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dieter Pisarewski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-05 00:00:00.000000000 Z
11
+ date: 2015-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport