eucalyptus 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71de071b1b62e4584b7d0d3923d9e8c7f5549093
4
- data.tar.gz: 5443c5f7b222e7f5fb01c4adc1f17ba495f3bf81
3
+ metadata.gz: 21c83f716d9b6569822426c81c7ba15cea39f4e6
4
+ data.tar.gz: f8e8f7d74ed99cf702c62bb84e83979faf18b8a0
5
5
  SHA512:
6
- metadata.gz: 45be70a3a040b5f4c7ed36ecf6e1244bc23a3ca45b55560e1a59997e97c0e0125e67b57b8fd932c01817ed2fa79536a966b1553f1c583ccea016a377a08a90eb
7
- data.tar.gz: 61aec13d7d0c3e1121e15932b23269e7ee79d1ce7047ede11e2c4f86c33be526a456d809be870799657221e7c1705af4445bb461cd626e8e7f9afd62c2e6b35f
6
+ metadata.gz: f3e0ffc746395b8d255072e087a4b11e514406d1453b5edc0c92dc62f4e337d2e0c9f9bb02c4cb9808854f319bdf3fe59d338314b97dcb931becc547e06c886d
7
+ data.tar.gz: b66cbc6c47a1974f805ff3d0df784808969dade1a18ca56b62e61aa5f9b68a73bcbfc8c66b0b19ad33cb4c83a674f72e9cd8e2c3d38b1c2f5e7d3d9c2820e0bc
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
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.2.2 ruby lib
5
+ # stub: eucalyptus 0.2.3 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "eucalyptus"
9
- s.version = "0.2.2"
9
+ s.version = "0.2.3"
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"]
@@ -51,11 +51,5 @@ module Eucalyptus
51
51
  def self.parent
52
52
  OpenStruct.new(id: "me")
53
53
  end
54
-
55
- # ASSOCIATOINS
56
- def ads; Ad.all(parent: self); end
57
- def ad_sets; AdSet.all(parent: self); end
58
- def campaigns; Campaign.all(parent: self); end
59
- def insights; Insight.all(parent: self); end
60
54
  end
61
55
  end
data/lib/eucalyptus/ad.rb CHANGED
@@ -19,7 +19,6 @@ module Eucalyptus
19
19
  end
20
20
 
21
21
  def ad_set; AdSet.find(self.campaign_id); end
22
- def insights; Insight.all(parent: self); end
23
22
 
24
23
  def self.api_path
25
24
  "adgroups"
@@ -25,8 +25,6 @@ module Eucalyptus
25
25
  end
26
26
 
27
27
  def campaign; Campaign.find(self.campaign_group_id); end
28
- def ads; Ad.all(parent: self); end
29
- def insights; Insight.all(parent: self); end
30
28
 
31
29
  def self.api_path
32
30
  "adcampaigns"
@@ -15,9 +15,5 @@ module Eucalyptus
15
15
  def self.api_path
16
16
  "adcampaign_groups"
17
17
  end
18
-
19
- def ads; Ad.all(parent: self); end
20
- def ad_sets; AdSet.all(parent: self); end
21
- def insights; Insight.all(parent: self); end
22
18
  end
23
19
  end
@@ -41,5 +41,21 @@ module Eucalyptus
41
41
  def respond_to?(method_sym, include_private = false)
42
42
  @response.respond_to?(method_sym)
43
43
  end
44
+
45
+ def ads(options={})
46
+ Ad.all(parent: self, options: options)
47
+ end
48
+
49
+ def campaigns(options={})
50
+ Campaign.all(parent: self, options: options)
51
+ end
52
+
53
+ def ad_sets(options={})
54
+ AdSet.all(parent: self, options: options)
55
+ end
56
+
57
+ def insights(options={})
58
+ Insight.all(parent: self, options: options)
59
+ end
44
60
  end
45
61
  end
@@ -11,7 +11,7 @@ describe Eucalyptus::Account do
11
11
 
12
12
  describe '#insights' do
13
13
  it 'returns an array of insights for the account' do
14
- VCR.use_cassette("resource_insights") do
14
+ VCR.use_cassette("account_insights") do
15
15
  expect(account.insights).to be_a Array
16
16
  expect(account.insights.first).to be_a Eucalyptus::Insight
17
17
  end
@@ -37,7 +37,7 @@ describe Eucalyptus::Account do
37
37
  end
38
38
 
39
39
  describe '#campaigns' do
40
- it 'returns a collection of AdSet objects which belong to the account' do
40
+ it 'returns a collection of Campaign objects which belong to the account' do
41
41
  VCR.use_cassette("account_campaigns") do
42
42
  expect(account.campaigns).to be_a Array
43
43
  expect(account.campaigns.first).to be_a Eucalyptus::Campaign
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eucalyptus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oguz Huner