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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba73cbeeef27e403f0426d02157edd801ea1227c
4
- data.tar.gz: 5382069dc7c3bbaa7740b64d89f02b74b8d78009
3
+ metadata.gz: e7155199c9b7b0a90ec9aa330c1d0d20024bb4a8
4
+ data.tar.gz: 520f3d24ed2846ad6f0440a5f3ce6ef85d40897d
5
5
  SHA512:
6
- metadata.gz: 1e163d6001a79f0e013e717f4c7c83f92457faa2ac1ff49220fe55b83b495a1be2e65d6f8af65e675b9fbc35cd0fabfc04900198d127800c921c4b08cdbd7647
7
- data.tar.gz: c9d1d3864f8b954ac86517a50759991c4cbc2e0a5c611eeb73a3341c1c8c3e515655a22834a3ac72cd18a48b0e5eaa8f080f9452b265614167848282c365999c
6
+ metadata.gz: 21f92a74498c053337e3c3e9d36d930fc3391aa36f400688108433afbac43c1e6517055a4e3a44a91f47a6852ebbc0d1ad091f3758e6cc42a9fcd5c1f3a3e40e
7
+ data.tar.gz: a71710932d326ee30e7c8e36cf671706dc954bf2bc2cabd5675114a794fcb119060457cdd456105d438440efae23f7dfb88d91a3258dac6b673380fac108df66
@@ -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
- fail 'BucketCake: cache parameter must respond to #read and #write. ' \
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
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module BucketCake
2
3
  class Decoder
3
4
  def initialize(zip_files, klass)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module BucketCake
2
3
  class Entities < Base
3
4
  def advertisers(&b)
@@ -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
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Cakeproto
2
3
  class TimeWithZone
3
4
  def to_utc
@@ -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'.freeze)
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'.freeze)
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'.freeze)
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'.freeze))
59
+ @bucket ||= Aws::S3::Bucket.new(ENV.fetch('CAKE_DATA_BUCKET'))
60
60
  end
61
61
  end
62
62
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module BucketCake
2
3
  class Values < Base
3
4
  def affiliate_tiers(&b)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module BucketCake
3
- VERSION = '1.0.1'.freeze
3
+ VERSION = '1.0.2'
4
4
  end
data/lib/bucket_cake.rb CHANGED
@@ -29,5 +29,5 @@ require 'bucket_cake/facts'
29
29
  Protobuf.ignore_unknown_fields = false
30
30
 
31
31
  module BucketCake
32
- CACHE_PREFIX = 'bucket-cake-latest'.freeze
32
+ CACHE_PREFIX = 'bucket-cake-latest'
33
33
  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: 1.0.1
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-01-19 00:00:00.000000000 Z
11
+ date: 2016-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk