bucket_cake 1.0.2 → 2.0.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: e7155199c9b7b0a90ec9aa330c1d0d20024bb4a8
4
- data.tar.gz: 520f3d24ed2846ad6f0440a5f3ce6ef85d40897d
3
+ metadata.gz: c49d5fcb0e7b7afd013221cc3eb3d078d95f847e
4
+ data.tar.gz: 9211b8214070bd70608afc0ba858b5b2b9840bac
5
5
  SHA512:
6
- metadata.gz: 21f92a74498c053337e3c3e9d36d930fc3391aa36f400688108433afbac43c1e6517055a4e3a44a91f47a6852ebbc0d1ad091f3758e6cc42a9fcd5c1f3a3e40e
7
- data.tar.gz: a71710932d326ee30e7c8e36cf671706dc954bf2bc2cabd5675114a794fcb119060457cdd456105d438440efae23f7dfb88d91a3258dac6b673380fac108df66
6
+ metadata.gz: ed546c03fe1bf34954aaa2ab9e03c4f8186382ab61b8421ada8a5ff09e92eabdcc604ac73f15df4c21f544907795b5e2ff660804f40e6ad28f8dd8f5478de1e9
7
+ data.tar.gz: f4a4362fe3ffad0f703ddda93408f348e96aaeb74c29e873ee83c8446d83a6a1478aa6acb1ec5003f7d8f92427c25f37a50d22e6619b0e1b7fe75cec15730a49
@@ -17,20 +17,23 @@ module BucketCake
17
17
  'Use Rails.cache if you are not sure.'
18
18
  end
19
19
 
20
- def latest(type, klass, &b)
21
- get Source::Latest.new(type, cache), klass, &b
20
+ def latest(type, klass)
21
+ get Source::Latest.new(type, cache), klass
22
22
  end
23
23
 
24
- def range(type, klass, &b)
25
- get Source::Range.new(type, cache), klass, &b
24
+ def range(type, klass)
25
+ get Source::Range.new(type, cache), klass
26
26
  end
27
27
 
28
28
  def get(source, klass)
29
29
  return unless source.new_data?
30
30
 
31
- result = yield Decoder.new(source.zip_files, klass).items
32
- source.confirm!
33
- result
31
+ Enumerator.new do |y|
32
+ Decoder.new(source.zip_files, klass).items.each do |item|
33
+ y << item
34
+ end
35
+ source.confirm!
36
+ end
34
37
  end
35
38
  end
36
39
  end
@@ -1,24 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
  module BucketCake
3
3
  class Entities < Base
4
- def advertisers(&b)
5
- latest 'advertisers', Cakeproto::Advertiser, &b
4
+ def advertisers
5
+ latest 'advertisers', Cakeproto::Advertiser
6
6
  end
7
7
 
8
- def affiliates(&b)
9
- latest 'affiliates', Cakeproto::Affiliate, &b
8
+ def affiliates
9
+ latest 'affiliates', Cakeproto::Affiliate
10
10
  end
11
11
 
12
- def campaigns(&b)
13
- latest 'campaigns', Cakeproto::Campaign, &b
12
+ def campaigns
13
+ latest 'campaigns', Cakeproto::Campaign
14
14
  end
15
15
 
16
- def creatives(&b)
17
- latest 'creatives', Cakeproto::Creative, &b
16
+ def creatives
17
+ latest 'creatives', Cakeproto::Creative
18
18
  end
19
19
 
20
- def offers(&b)
21
- latest 'offers', Cakeproto::Offer, &b
20
+ def offers
21
+ latest 'offers', Cakeproto::Offer
22
22
  end
23
23
  end
24
24
  end
@@ -1,24 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
  module BucketCake
3
3
  class Facts < Base
4
- def clicks(&b)
5
- range 'clicks', Cakeproto::Click, &b
4
+ def clicks
5
+ range 'clicks', Cakeproto::Click
6
6
  end
7
7
 
8
- def conversions(&b)
9
- range 'conversions', Cakeproto::Conversion, &b
8
+ def conversions
9
+ range 'conversions', Cakeproto::Conversion
10
10
  end
11
11
 
12
- def conversion_changes(&b)
13
- range 'conversion_changes', Cakeproto::ConversionChange, &b
12
+ def conversion_changes
13
+ range 'conversion_changes', Cakeproto::ConversionChange
14
14
  end
15
15
 
16
- def cap_states(&b)
17
- range 'cap_states', Cakeproto::CapState, &b
16
+ def cap_states
17
+ range 'cap_states', Cakeproto::CapState
18
18
  end
19
19
 
20
- def latest_cap_states(&b)
21
- latest 'cap_states', Cakeproto::CapState, &b
20
+ def latest_cap_states
21
+ latest 'cap_states', Cakeproto::CapState
22
22
  end
23
23
  end
24
24
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module BucketCake
3
- VERSION = '1.0.2'
3
+ VERSION = '2.0.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: 1.0.2
4
+ version: 2.0.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-03-09 00:00:00.000000000 Z
11
+ date: 2016-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk