bucket_cake 1.0.1 → 1.0.2
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 +2 -1
- data/lib/bucket_cake/decoder.rb +1 -0
- data/lib/bucket_cake/entities.rb +1 -0
- data/lib/bucket_cake/facts.rb +5 -0
- data/lib/bucket_cake/proto_ext/time_with_zone.rb +1 -0
- data/lib/bucket_cake/source.rb +4 -4
- data/lib/bucket_cake/values.rb +1 -0
- data/lib/bucket_cake/version.rb +1 -1
- data/lib/bucket_cake.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7155199c9b7b0a90ec9aa330c1d0d20024bb4a8
|
4
|
+
data.tar.gz: 520f3d24ed2846ad6f0440a5f3ce6ef85d40897d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21f92a74498c053337e3c3e9d36d930fc3391aa36f400688108433afbac43c1e6517055a4e3a44a91f47a6852ebbc0d1ad091f3758e6cc42a9fcd5c1f3a3e40e
|
7
|
+
data.tar.gz: a71710932d326ee30e7c8e36cf671706dc954bf2bc2cabd5675114a794fcb119060457cdd456105d438440efae23f7dfb88d91a3258dac6b673380fac108df66
|
data/lib/bucket_cake/base.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module BucketCake
|
2
3
|
class Base
|
3
4
|
def initialize(cache)
|
@@ -12,7 +13,7 @@ module BucketCake
|
|
12
13
|
def check_cache!
|
13
14
|
return if cache && cache.respond_to?(:read) && cache.respond_to?(:write)
|
14
15
|
|
15
|
-
|
16
|
+
raise 'BucketCake: cache parameter must respond to #read and #write. ' \
|
16
17
|
'Use Rails.cache if you are not sure.'
|
17
18
|
end
|
18
19
|
|
data/lib/bucket_cake/decoder.rb
CHANGED
data/lib/bucket_cake/entities.rb
CHANGED
data/lib/bucket_cake/facts.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module BucketCake
|
2
3
|
class Facts < Base
|
3
4
|
def clicks(&b)
|
@@ -15,5 +16,9 @@ module BucketCake
|
|
15
16
|
def cap_states(&b)
|
16
17
|
range 'cap_states', Cakeproto::CapState, &b
|
17
18
|
end
|
19
|
+
|
20
|
+
def latest_cap_states(&b)
|
21
|
+
latest 'cap_states', Cakeproto::CapState, &b
|
22
|
+
end
|
18
23
|
end
|
19
24
|
end
|
data/lib/bucket_cake/source.rb
CHANGED
@@ -15,7 +15,7 @@ module BucketCake
|
|
15
15
|
io = object.get.body
|
16
16
|
|
17
17
|
# we need to force binary encoding, otherwise binary zip data will be parsed as utf-8
|
18
|
-
io.set_encoding('BINARY'
|
18
|
+
io.set_encoding('BINARY')
|
19
19
|
|
20
20
|
y << io.read
|
21
21
|
end
|
@@ -24,11 +24,11 @@ module BucketCake
|
|
24
24
|
|
25
25
|
def check_success(key)
|
26
26
|
@success_files ||= Set.new
|
27
|
-
@success_files << key if key.end_with?('/SUCCESS'
|
27
|
+
@success_files << key if key.end_with?('/SUCCESS')
|
28
28
|
|
29
29
|
# This relies on the fact that SUCCESS files always come before partNNN.zip files.
|
30
30
|
# But that is fine because S3 guarantees alphabetical order.
|
31
|
-
@success_files.include?(File.dirname(key) + '/SUCCESS'
|
31
|
+
@success_files.include?(File.dirname(key) + '/SUCCESS')
|
32
32
|
end
|
33
33
|
|
34
34
|
def new_data?
|
@@ -56,7 +56,7 @@ module BucketCake
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def bucket
|
59
|
-
@bucket ||= Aws::S3::Bucket.new(ENV.fetch('CAKE_DATA_BUCKET'
|
59
|
+
@bucket ||= Aws::S3::Bucket.new(ENV.fetch('CAKE_DATA_BUCKET'))
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
data/lib/bucket_cake/values.rb
CHANGED
data/lib/bucket_cake/version.rb
CHANGED
data/lib/bucket_cake.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: 1.0.
|
4
|
+
version: 1.0.2
|
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-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|