ad_leads 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/lib/ad_leads/campaign.rb +8 -0
- data/lib/ad_leads/version.rb +1 -1
- data/spec/ad_leads/campaign_spec.rb +9 -0
- data/spec/ad_leads/network_requests_redux_spec.rb +12 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MDY5MThjYTU3MDkxYzQ2ZmRhYWI5NjY3YWIyOTIyYjgyM2NiMGRiYw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
OWE3YjAwY2NiMjM3NGE2YzY2YTg4NjJkZjcyZDk2MzM1ODgzM2IxOA==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
Mjk0MjRjM2YzOTU5NmQxNTMyMjI4MGU0ZTMzNTBiMzg1MjJjYThmOWQ2YmI2
|
10
|
+
M2NjZGEyZDYxMzlkM2FjNmVjYmUyMDQ1ZmE3NWY3ZDRmOWVkNzg2MTU5ZGIx
|
11
|
+
N2MzMTM2MDNmNGQwN2RkZDIyYWRlMzM4MjQ1NjY5MjY5ZmMyZDQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZGIwN2YxNzY1NTYzNzRkMDUwMTJhMTJmZDM1MTlkNjY0YjEwMWY1YjIxYTc2
|
14
|
+
ZWRlZDRjYWJkNDMzZGI4YjY2ZGM1YjhmNzA2MTUwZGEwZWIwNGRiY2UwZTgx
|
15
|
+
OTNkYmVlZWFiYTY3MmM1OTlmOTIzNWM4NmNjZDNjY2IyNTExNzg=
|
data/lib/ad_leads/campaign.rb
CHANGED
@@ -35,6 +35,10 @@ module AdLeads
|
|
35
35
|
retry unless remaining_tries.zero?
|
36
36
|
end
|
37
37
|
|
38
|
+
def signup_delivery(campaign_id, options={})
|
39
|
+
post signup_delivery_path(campaign_id), options
|
40
|
+
end
|
41
|
+
|
38
42
|
private
|
39
43
|
|
40
44
|
def campaign_path(id)
|
@@ -50,6 +54,10 @@ module AdLeads
|
|
50
54
|
campaign_path(id) + '/plan'
|
51
55
|
end
|
52
56
|
|
57
|
+
def signup_delivery_path(id)
|
58
|
+
campaign_path(id) + '/signupdelivery'
|
59
|
+
end
|
60
|
+
|
53
61
|
def campaign_etag(id)
|
54
62
|
get campaign_etag_path(id)
|
55
63
|
end
|
data/lib/ad_leads/version.rb
CHANGED
@@ -75,4 +75,13 @@ describe AdLeads::Client::Campaign do
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
end
|
78
|
+
|
79
|
+
describe '#signup_delivery' do
|
80
|
+
let(:signup_opts) { {} }
|
81
|
+
|
82
|
+
it 'configures signup delivery for the campaign' do
|
83
|
+
expect(client).to receive(:post).with('/campaigns/1/signupdelivery', signup_opts)
|
84
|
+
client.signup_delivery(1, signup_opts)
|
85
|
+
end
|
86
|
+
end
|
78
87
|
end
|
@@ -4,8 +4,15 @@ require 'pry'
|
|
4
4
|
describe AdLeads::Client do
|
5
5
|
let!(:client) { AdLeads::Client.new }
|
6
6
|
let(:connection) { client.connection }
|
7
|
-
let(:token) { '
|
7
|
+
let(:token) { '2b3fa296-48ab-4daa-accd-22d905476149' }
|
8
8
|
let(:file) { './spec/fixtures/test.jpg' }
|
9
|
+
let(:signup_config) {{
|
10
|
+
'url' => 'http://url.com/subscribers',
|
11
|
+
'method' => 'POST',
|
12
|
+
'ad_campaign_id' => 'test_ad_campaign_id',
|
13
|
+
'auth_token' => 'test_token',
|
14
|
+
'dataSink' => 'RealtimeHTTP'
|
15
|
+
}}
|
9
16
|
|
10
17
|
before do
|
11
18
|
client.stub(:token).and_return(token)
|
@@ -90,6 +97,10 @@ describe AdLeads::Client do
|
|
90
97
|
|
91
98
|
expect(client.last_response.status).to eq(200)
|
92
99
|
expect(JSON.parse(client.last_response.body)['result']).to eq true
|
100
|
+
|
101
|
+
client.signup_delivery(campaign_id, signup_config )
|
102
|
+
expect(client.last_response.status).to eq(200)
|
103
|
+
expect(JSON.parse(client.last_response.body)['result']).to eq true
|
93
104
|
end
|
94
105
|
end
|
95
106
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ad_leads
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dinshaw
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -56,56 +56,56 @@ dependencies:
|
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '2.14'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2.14'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '1.5'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '1.5'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ! '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ! '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: pry
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ! '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ! '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
description:
|
@@ -115,7 +115,7 @@ executables: []
|
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
-
-
|
118
|
+
- .gitignore
|
119
119
|
- Gemfile
|
120
120
|
- LICENSE.txt
|
121
121
|
- README.md
|
@@ -154,17 +154,17 @@ require_paths:
|
|
154
154
|
- lib
|
155
155
|
required_ruby_version: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- -
|
157
|
+
- - ! '>='
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
160
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
161
|
requirements:
|
162
|
-
- -
|
162
|
+
- - ! '>='
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: '0'
|
165
165
|
requirements: []
|
166
166
|
rubyforge_project:
|
167
|
-
rubygems_version: 2.2.
|
167
|
+
rubygems_version: 2.2.2
|
168
168
|
signing_key:
|
169
169
|
specification_version: 4
|
170
170
|
summary: Ruby Wrapper for AdLeads API
|