bucket_cake 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bucket_cake/base.rb +24 -8
- data/lib/bucket_cake/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6218b2fa3893f182b7496439e44f8949bf7aee7
|
4
|
+
data.tar.gz: f95f2be1fb21ec64e39a9339f05f5df3a396ec0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5e792fdfaff1ba571d1a2281b33b956ddc371d70e48f2e8c90ff3071ae1c3ccbeb64ec2688e36d35a05de20c5097907701e4ec596f05b4f3a58ce1dc6809942
|
7
|
+
data.tar.gz: 09ca866b49a3dc26741e612fa4b124f6d35e3c3b2f93c0af29eb9a9a9c79fbcf74a5ecd144ac048c2d49d05773f56d57c79bec7a4686f8b068224f15e18e01da
|
data/lib/bucket_cake/base.rb
CHANGED
@@ -2,24 +2,40 @@
|
|
2
2
|
module BucketCake
|
3
3
|
class Base
|
4
4
|
class Range < self
|
5
|
-
|
6
|
-
raise 'BucketCake: cursor has invalid format!' unless cursor.nil? || cursor =~ CURSOR_REGEXP
|
7
|
-
@cursor = cursor
|
8
|
-
end
|
5
|
+
private
|
9
6
|
|
10
|
-
def
|
11
|
-
|
7
|
+
def source
|
8
|
+
Source::Range.new(self.class::FOLDER, cursor)
|
12
9
|
end
|
13
10
|
end
|
14
11
|
|
15
12
|
class Latest < self
|
16
|
-
def
|
17
|
-
|
13
|
+
def initialize(cursor = nil)
|
14
|
+
super(cursor)
|
15
|
+
end
|
16
|
+
|
17
|
+
def has_new_data?
|
18
|
+
cursor.nil? || cursor != source.latest_cursor
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def source
|
24
|
+
Source::Latest.new(self.class::FOLDER, cursor)
|
18
25
|
end
|
19
26
|
end
|
20
27
|
|
21
28
|
attr_reader :cursor
|
22
29
|
|
30
|
+
def initialize(cursor)
|
31
|
+
raise 'BucketCake: cursor has invalid format!' unless cursor.nil? || cursor =~ CURSOR_REGEXP
|
32
|
+
@cursor = cursor
|
33
|
+
end
|
34
|
+
|
35
|
+
def items
|
36
|
+
get source, self.class::PROTOCLASS
|
37
|
+
end
|
38
|
+
|
23
39
|
private
|
24
40
|
|
25
41
|
def get(source, klass)
|
data/lib/bucket_cake/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bucket_cake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ad2games developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
196
|
version: '0'
|
197
197
|
requirements: []
|
198
198
|
rubyforge_project:
|
199
|
-
rubygems_version: 2.
|
199
|
+
rubygems_version: 2.5.1
|
200
200
|
signing_key:
|
201
201
|
specification_version: 4
|
202
202
|
summary: Get cakeproto objects from S3.
|