appengine-paginator 0.2.0.pre → 0.2.1.pre
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.
- data/VERSION +1 -1
- data/appengine-paginator.gemspec +1 -1
- data/lib/appengine-paginator/cursor.rb +5 -1
- data/spec/cursor_spec.rb +4 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1.pre
|
data/appengine-paginator.gemspec
CHANGED
@@ -15,7 +15,11 @@ module Paginator
|
|
15
15
|
#
|
16
16
|
# * must be a base 64 encoded cursor
|
17
17
|
def self.parse(cursor_string)
|
18
|
-
|
18
|
+
if cursor_string.nil?
|
19
|
+
nil
|
20
|
+
else
|
21
|
+
Cursor.new Java::comGoogleAppengineApiDatastore::Cursor.from_web_safe_string(cursor_string)
|
22
|
+
end
|
19
23
|
end
|
20
24
|
|
21
25
|
# returns the actual Java cursor (instance of com.google.appengine.api.datastore.Cursor
|
data/spec/cursor_spec.rb
CHANGED
@@ -18,6 +18,10 @@ describe Paginator::Cursor do
|
|
18
18
|
it 'should return an object of class Cursor' do
|
19
19
|
Paginator::Cursor.parse(@cursor_string).should be_instance_of Paginator::Cursor
|
20
20
|
end
|
21
|
+
|
22
|
+
it 'should return nil if the string is nil' do
|
23
|
+
Paginator::Cursor.parse(nil).should be_nil
|
24
|
+
end
|
21
25
|
end
|
22
26
|
|
23
27
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appengine-paginator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 961915984
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
9
|
+
- 1
|
10
10
|
- pre
|
11
|
-
version: 0.2.
|
11
|
+
version: 0.2.1.pre
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Josh Moore
|