eucalyptus 0.2.7 → 0.2.8

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: 30b866963f49e1d4da6a2d5a0a34a803dbd0eb2d
4
- data.tar.gz: 9201ad4d0ed6b4870f6588e3fc74cb528f01b959
3
+ metadata.gz: da78cd111e7620b54def99b4bdfa689050c23e06
4
+ data.tar.gz: 399db7eafe5be4c1bc1f5a56ec0799c72f877ceb
5
5
  SHA512:
6
- metadata.gz: ca21567e4d952cdaa449550c4f12afb6998d96dd365cb7e2570872e43cb61525f724c33501421dc1eb8d48c9eadacaa6fb61c245f272d48350975d79a9140984
7
- data.tar.gz: 3f8d90d8241119f0d61e8cd8ed4eb5fe291358193d2d2fdf4fe41d5fbd135035c3c0918aa3798645bc633b8587cd902a55db53d692033772b5705ba4c69b008b
6
+ metadata.gz: 29cc97be6abbfb412038ec3cae661f5292b4eb1fdd072429723645bc4dace397ea74d794754ee8f8c6ce5eb77aeb1fefe989c65a707aa4d3522432d8313edd71
7
+ data.tar.gz: 37885fba967c025c0c5f686c78db11ee699eda4a5fb295329f57bc5cc15eb0a3e509367e43d2c50cf942ef7b39b478ff46def05e7c8bcb1cfb4fa39a37bd9e16
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.7
1
+ 0.2.8
data/eucalyptus.gemspec CHANGED
@@ -2,16 +2,16 @@
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.7 ruby lib
5
+ # stub: eucalyptus 0.2.8 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "eucalyptus"
9
- s.version = "0.2.7"
9
+ s.version = "0.2.8"
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"]
13
13
  s.authors = ["Oguz Huner"]
14
- s.date = "2015-06-28"
14
+ s.date = "2015-06-29"
15
15
  s.description = "An easy interface and abstraction to the Facebook Ads API"
16
16
  s.email = "oguzcanhuner@gmail.com"
17
17
  s.extra_rdoc_files = [
@@ -6,6 +6,14 @@ module Eucalyptus
6
6
  "customaudiences"
7
7
  end
8
8
 
9
+ def ad_sets
10
+ AdSet.all.collect do |ad_set|
11
+ if ad_set.targeting.custom_audiences
12
+ ad_set if ad_set.targeting.custom_audiences.any?{|a| a["id"] == self.id }
13
+ end
14
+ end.compact
15
+ end
16
+
9
17
  def self.known_fields
10
18
  [:name, :description]
11
19
  end
@@ -1,4 +1,19 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
2
 
3
3
  describe Eucalyptus::CustomAudience do
4
+ before do
5
+ Eucalyptus.configure do |config|
6
+ config.access_token = ENV["ACCESS_TOKEN"]
7
+ end
8
+ end
9
+
10
+ describe '#ad_sets' do
11
+ it 'returns ad_sets which belong to the audience' do
12
+ VCR.use_cassette('audience_ad_sets') do
13
+ audience = Eucalyptus::CustomAudience.all.first
14
+ ad_sets = audience.ad_sets
15
+ expect(ad_sets.first.targeting.custom_audiences.first['id']).to eql audience.id
16
+ end
17
+ end
18
+ end
4
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eucalyptus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oguz Huner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-28 00:00:00.000000000 Z
11
+ date: 2015-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: koala