eucalyptus 0.2.6 → 0.2.7
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 +3 -3
- data/lib/eucalyptus/resource.rb +5 -0
- data/spec/eucalyptus/resource_spec.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30b866963f49e1d4da6a2d5a0a34a803dbd0eb2d
|
4
|
+
data.tar.gz: 9201ad4d0ed6b4870f6588e3fc74cb528f01b959
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca21567e4d952cdaa449550c4f12afb6998d96dd365cb7e2570872e43cb61525f724c33501421dc1eb8d48c9eadacaa6fb61c245f272d48350975d79a9140984
|
7
|
+
data.tar.gz: 3f8d90d8241119f0d61e8cd8ed4eb5fe291358193d2d2fdf4fe41d5fbd135035c3c0918aa3798645bc633b8587cd902a55db53d692033772b5705ba4c69b008b
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.7
|
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.
|
5
|
+
# stub: eucalyptus 0.2.7 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "eucalyptus"
|
9
|
-
s.version = "0.2.
|
9
|
+
s.version = "0.2.7"
|
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-
|
14
|
+
s.date = "2015-06-28"
|
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 = [
|
data/lib/eucalyptus/resource.rb
CHANGED
@@ -30,6 +30,7 @@ module Eucalyptus
|
|
30
30
|
response.collect{ |res| self.new(res) }
|
31
31
|
end
|
32
32
|
|
33
|
+
|
33
34
|
def initialize(response)
|
34
35
|
@response = Response.new(response)
|
35
36
|
end
|
@@ -42,6 +43,10 @@ module Eucalyptus
|
|
42
43
|
@response.respond_to?(method_sym)
|
43
44
|
end
|
44
45
|
|
46
|
+
def update(graph: Eucalyptus.graph, fields:)
|
47
|
+
graph.put_connections(self.id, "", fields)
|
48
|
+
end
|
49
|
+
|
45
50
|
def ads(options={})
|
46
51
|
Ad.all(parent: self, options: options)
|
47
52
|
end
|
@@ -101,6 +101,11 @@ describe Eucalyptus::Resource do
|
|
101
101
|
|
102
102
|
describe '#update' do
|
103
103
|
it 'updates a resource' do
|
104
|
+
VCR.use_cassette("updating_adset") do
|
105
|
+
graph = double(:graph, put_connections: {success: true})
|
106
|
+
ad_set = Eucalyptus::AdSet.find(6025097880671)
|
107
|
+
expect(ad_set.update(graph: graph, fields: {bid_type: "CPM"})).to eql({success: true})
|
108
|
+
end
|
104
109
|
end
|
105
110
|
end
|
106
111
|
|
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.
|
4
|
+
version: 0.2.7
|
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-
|
11
|
+
date: 2015-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: koala
|