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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87c40cb79610b73decea42bbe95851d52ac91b42
4
- data.tar.gz: 9cc67aee2afdb05469072c802e7b1ad5acd7e167
3
+ metadata.gz: b6218b2fa3893f182b7496439e44f8949bf7aee7
4
+ data.tar.gz: f95f2be1fb21ec64e39a9339f05f5df3a396ec0b
5
5
  SHA512:
6
- metadata.gz: f2355e18dccb3ddce2f141ae7a0740a5721f12df438dbadcfc7911e1d19ea72e9432985ebc188968a2010ce3f594c5cdb021de933c25e794135fe2bef7287732
7
- data.tar.gz: e8fd595e130a1e8d4284b240000941335eb7b65871ee621d5864a19bce5623c014ffe80b154db2aa2f1c4a506f68dbea02cbacc3e9fed63af0b6d23edfe4134f
6
+ metadata.gz: c5e792fdfaff1ba571d1a2281b33b956ddc371d70e48f2e8c90ff3071ae1c3ccbeb64ec2688e36d35a05de20c5097907701e4ec596f05b4f3a58ce1dc6809942
7
+ data.tar.gz: 09ca866b49a3dc26741e612fa4b124f6d35e3c3b2f93c0af29eb9a9a9c79fbcf74a5ecd144ac048c2d49d05773f56d57c79bec7a4686f8b068224f15e18e01da
@@ -2,24 +2,40 @@
2
2
  module BucketCake
3
3
  class Base
4
4
  class Range < self
5
- def initialize(cursor)
6
- raise 'BucketCake: cursor has invalid format!' unless cursor.nil? || cursor =~ CURSOR_REGEXP
7
- @cursor = cursor
8
- end
5
+ private
9
6
 
10
- def items
11
- get Source::Range.new(self.class::FOLDER, cursor), self.class::PROTOCLASS
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 items
17
- get Source::Latest.new(self.class::FOLDER, nil), self.class::PROTOCLASS
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)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module BucketCake
3
- VERSION = '3.0.0'
3
+ VERSION = '3.1.0'
4
4
  end
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.0.0
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-07-22 00:00:00.000000000 Z
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.6.4
199
+ rubygems_version: 2.5.1
200
200
  signing_key:
201
201
  specification_version: 4
202
202
  summary: Get cakeproto objects from S3.