adroller 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +22 -0
- data/Rakefile +1 -0
- data/adroller-0.0.1.gem +0 -0
- data/adroller.gemspec +28 -0
- data/lib/adroll/ad.rb +5 -3
- data/lib/adroll/service.rb +1 -1
- data/lib/adroller/version.rb +3 -0
- data/lib/adroller.rb +5 -0
- data/spec/lib/adroll/ad_spec.rb +3 -2
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2095ba8c205aed53d9fb979e295101b4c1856e0b
|
4
|
+
data.tar.gz: 24675d22d861ae0d1b2bbcd7ac126e5f848218cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 329f119c0221325e6bf0cc3579897c8b49edce55e8a6505696a21ed7b38f5e91bcc4b22642bf5edf6716b883dd5e1e1897de7a10d2a85a6fb6caf9a51b98fe86
|
7
|
+
data.tar.gz: 78c83e33193e8a10aab98eb361d49cc00b1d717423e942cfaed8cec9da1e1d54abae98ea87c718ff7fc7f8830bdca7052b4dd600f28d13cb27eb377984765c1d
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Nikolas Davis
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
data/adroller-0.0.1.gem
ADDED
Binary file
|
data/adroller.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'adroller/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'adroller'
|
8
|
+
spec.version = Adroller::VERSION
|
9
|
+
spec.authors = ['Nikolas Davis']
|
10
|
+
spec.email = ['nikolasliamdavis@gmail.com']
|
11
|
+
spec.summary = 'Ruby API Wrapper for AdRoll'
|
12
|
+
spec.description = 'Ruby Gem for Interaction with AdRoll v1 API'
|
13
|
+
spec.homepage = 'http://www.adroll.com'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.7'
|
22
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
23
|
+
spec.add_development_dependency 'byebug', '~> 3.4', '>= 3.4.0'
|
24
|
+
spec.add_development_dependency 'rspec', '~> 3.0', '>= 3.0.0'
|
25
|
+
spec.add_development_dependency 'webmock', '~> 1.18', '>= 1.18.0'
|
26
|
+
spec.add_development_dependency 'factory_girl', '~> 4.4', '>= 4.4.0'
|
27
|
+
spec.add_dependency 'httparty', '~> 0.13.1'
|
28
|
+
end
|
data/lib/adroll/ad.rb
CHANGED
@@ -15,17 +15,19 @@ module AdRoll
|
|
15
15
|
call_api(:post, __method__, params)
|
16
16
|
end
|
17
17
|
|
18
|
-
def create(advertisable:, file:, destination_url: nil, name: nil,
|
19
|
-
headline: nil, body: nil, message: nil, product: nil, logo: nil)
|
18
|
+
def create(advertisable:, file:, dynamic_template_id:, destination_url: nil, name: nil,
|
19
|
+
headline: nil, body: nil, message: nil, product: nil, logo: nil, background: nil)
|
20
20
|
params = {
|
21
21
|
advertisable: advertisable,
|
22
22
|
file: file,
|
23
|
+
dynamic_template_id: dynamic_template_id,
|
23
24
|
destination_url: destination_url,
|
24
25
|
name: name,
|
25
26
|
headline: headline,
|
26
27
|
body: body,
|
27
28
|
product: product,
|
28
|
-
logo: logo
|
29
|
+
logo: logo,
|
30
|
+
background: background
|
29
31
|
}.reject { |_, value| value.nil? }
|
30
32
|
|
31
33
|
call_api(:post, __method__, params)
|
data/lib/adroll/service.rb
CHANGED
data/lib/adroller.rb
ADDED
data/spec/lib/adroll/ad_spec.rb
CHANGED
@@ -27,12 +27,13 @@ describe AdRoll::Api::Ad do
|
|
27
27
|
let!(:request_uri) { "https://#{basic_auth}@api.adroll.com/v1/ad/create" }
|
28
28
|
let!(:params) do
|
29
29
|
{ advertisable: 'advertisable',
|
30
|
-
file: 'ANBLE5432'
|
30
|
+
file: 'ANBLE5432',
|
31
|
+
dynamic_template_id: 1
|
31
32
|
}
|
32
33
|
end
|
33
34
|
|
34
35
|
it 'calls the api with the correct params' do
|
35
|
-
subject.create(advertisable: 'advertisable', file: 'ANBLE5432')
|
36
|
+
subject.create(advertisable: 'advertisable', file: 'ANBLE5432', dynamic_template_id: 1)
|
36
37
|
expect(WebMock).to have_requested(:post, request_uri).with(query: params)
|
37
38
|
end
|
38
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adroller
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikolas Davis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -144,7 +144,11 @@ files:
|
|
144
144
|
- ".rubocop_todo.yml"
|
145
145
|
- Gemfile
|
146
146
|
- Gemfile.lock
|
147
|
+
- LICENSE.txt
|
147
148
|
- README.md
|
149
|
+
- Rakefile
|
150
|
+
- adroller-0.0.1.gem
|
151
|
+
- adroller.gemspec
|
148
152
|
- lib/adroll.rb
|
149
153
|
- lib/adroll/ad.rb
|
150
154
|
- lib/adroll/adgroup.rb
|
@@ -162,6 +166,8 @@ files:
|
|
162
166
|
- lib/adroll/segment.rb
|
163
167
|
- lib/adroll/service.rb
|
164
168
|
- lib/adroll/user.rb
|
169
|
+
- lib/adroller.rb
|
170
|
+
- lib/adroller/version.rb
|
165
171
|
- spec/factories/service_factory.rb
|
166
172
|
- spec/lib/adroll/ad_spec.rb
|
167
173
|
- spec/lib/adroll/advertisable_spec.rb
|