eucalyptus 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/eucalyptus.gemspec +2 -2
- data/lib/eucalyptus/response.rb +2 -7
- data/spec/eucalyptus/ad_set_spec.rb +1 -1
- data/spec/eucalyptus/ad_spec.rb +1 -1
- data/spec/eucalyptus/custom_audience_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c83f6eca705bf5f185c17c49fe51e85f99e857a
|
4
|
+
data.tar.gz: 3383735b876a853c42f1b73037b37f7c4828c842
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3af6245f4de0532e6b1007a9234b0e94d86a4c9cb7aa1c85fce85583310e9cd133e75c5f2a0f5f1ab2761582a0adfbe724dd64401bccf62a0912220a71916ee6
|
7
|
+
data.tar.gz: aa121be90de152aedbb057f763ca0071aafd8391905c2a8696041a64cb41fbc4917ad927102d198d945380b0c4aa1b4792b1a69706a24a2ba94a4bb9712b5011
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/eucalyptus.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: eucalyptus 0.3.
|
5
|
+
# stub: eucalyptus 0.3.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "eucalyptus"
|
9
|
-
s.version = "0.3.
|
9
|
+
s.version = "0.3.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
data/lib/eucalyptus/response.rb
CHANGED
@@ -14,11 +14,11 @@ module Eucalyptus
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
class ResponseCollection
|
17
|
+
class ResponseCollection < Array
|
18
18
|
def initialize(klass, koala_response)
|
19
19
|
@koala_response = koala_response
|
20
20
|
@klass = klass
|
21
|
-
|
21
|
+
self.concat elements(@koala_response)
|
22
22
|
end
|
23
23
|
|
24
24
|
|
@@ -27,11 +27,6 @@ module Eucalyptus
|
|
27
27
|
self.class.new(@klass, next_page)
|
28
28
|
end
|
29
29
|
|
30
|
-
# for array methods
|
31
|
-
def method_missing(method_sym, *args, &block)
|
32
|
-
@array.send(method_sym)
|
33
|
-
end
|
34
|
-
|
35
30
|
private
|
36
31
|
def elements(response)
|
37
32
|
response.collect{ |res| @klass.new(res) }
|
@@ -12,7 +12,7 @@ describe Eucalyptus::AdSet do
|
|
12
12
|
describe '#insights' do
|
13
13
|
it 'returns an array of insights for the account' do
|
14
14
|
VCR.use_cassette("ad_set_insights") do
|
15
|
-
active_ad_set = Eucalyptus::AdSet.all.find{|ad_set| ad_set.campaign_status == "ACTIVE"}
|
15
|
+
active_ad_set = Eucalyptus::AdSet.all.find{|ad_set| ad_set.campaign_status == "ACTIVE"}
|
16
16
|
expect(active_ad_set.insights.first).to be_a Eucalyptus::Insight
|
17
17
|
end
|
18
18
|
end
|
data/spec/eucalyptus/ad_spec.rb
CHANGED
@@ -21,7 +21,7 @@ describe Eucalyptus::Ad do
|
|
21
21
|
describe '#insights' do
|
22
22
|
it 'returns an array of insights for the account' do
|
23
23
|
VCR.use_cassette("ad_set_insights") do
|
24
|
-
active_ad = Eucalyptus::Ad.all.find{|ad| ad.adgroup_status == "ACTIVE"}
|
24
|
+
active_ad = Eucalyptus::Ad.all.find{|ad| ad.adgroup_status == "ACTIVE"}
|
25
25
|
expect(active_ad.insights.first).to be_a Eucalyptus::Insight
|
26
26
|
end
|
27
27
|
end
|
@@ -27,7 +27,7 @@ describe Eucalyptus::CustomAudience do
|
|
27
27
|
describe '#ad_sets' do
|
28
28
|
it 'returns ad_sets which belong to the audience' do
|
29
29
|
VCR.use_cassette('audience_ad_sets') do
|
30
|
-
audience = Eucalyptus::CustomAudience.all.
|
30
|
+
audience = Eucalyptus::CustomAudience.all.last
|
31
31
|
ad_sets = audience.ad_sets
|
32
32
|
expect(ad_sets.first.targeting.custom_audiences.first['id']).to eql audience.id
|
33
33
|
end
|