adzerk 0.13 → 0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/adzerk.rb +0 -0
- data/lib/adzerk/advertiser.rb +0 -0
- data/lib/adzerk/api_endpoint.rb +0 -0
- data/lib/adzerk/category.rb +0 -0
- data/lib/adzerk/channel_site_map.rb +0 -0
- data/lib/adzerk/client.rb +1 -1
- data/lib/adzerk/creative.rb +0 -0
- data/lib/adzerk/creative_map.rb +0 -0
- data/lib/adzerk/errors.rb +0 -0
- data/lib/adzerk/flight.rb +0 -0
- data/lib/adzerk/geo_targeting.rb +0 -0
- data/lib/adzerk/invitation.rb +0 -0
- data/lib/adzerk/priority.rb +0 -0
- data/lib/adzerk/publisher.rb +0 -0
- data/lib/adzerk/reporting.rb +0 -0
- data/lib/adzerk/site_zone_targeting.rb +0 -0
- data/lib/adzerk/util.rb +0 -0
- data/lib/adzerk/version.rb +1 -1
- data/test/adtype_api_spec.rb +0 -0
- data/test/advertiser_api_spec.rb +0 -0
- data/test/campaign_api_spec.rb +2 -3
- data/test/category_api_spec.rb +0 -0
- data/test/channel_api_spec.rb +0 -0
- data/test/channel_site_map_api_spec.rb +0 -0
- data/test/creative_api_spec.rb +0 -0
- data/test/creative_map_api_spec.rb +1 -32
- data/test/flight_api_spec.rb +2 -1
- data/test/geo_targeting_api_spec.rb +0 -0
- data/test/invitation_api_spec.rb +0 -0
- data/test/login_api_spec.rb +0 -0
- data/test/priority_api_spec.rb +0 -0
- data/test/publisher_api_spec.rb +0 -0
- data/test/rakefile.rb +0 -0
- data/test/report_api_spec.rb +2 -2
- data/test/security_api_spec.rb +0 -0
- data/test/site_api_spec.rb +0 -0
- data/test/site_zone_targeting_api_spec.rb +0 -0
- data/test/spec_helper.rb +0 -0
- data/test/util_spec.rb +0 -0
- data/test/zone_api_spec.rb +0 -0
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dfcb33e06a66b4728d0a27e69c41a240a3d3f73ce3af93056fdbb794e6b1361c
|
4
|
+
data.tar.gz: d6b9c3113f6120d074a517643a56fb4cb1fc2b98b98abe016cb31cbebcadad32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f549e8160c19e563cdb4aa4c54b085a833b62b6588227c2540f7e58471805ed88f79680f3d3a32c125639e98a7502b55fe9dee2b4736c560322a10ef5aa5aa61
|
7
|
+
data.tar.gz: 2be8a73fb39675f73bd02e13ddd6165f2402005b561b03ab94cf546fd4702c8fcf5105b1240cd7b0a8b71dcb214064764e6d7ce249bee12f2e87d7947533ceaa
|
data/lib/adzerk.rb
CHANGED
File without changes
|
data/lib/adzerk/advertiser.rb
CHANGED
File without changes
|
data/lib/adzerk/api_endpoint.rb
CHANGED
File without changes
|
data/lib/adzerk/category.rb
CHANGED
File without changes
|
File without changes
|
data/lib/adzerk/client.rb
CHANGED
@@ -83,7 +83,7 @@ module Adzerk
|
|
83
83
|
http = Net::HTTP.new(uri.host, uri.port)
|
84
84
|
http.use_ssl = uri.scheme == 'https'
|
85
85
|
response = http.request(request)
|
86
|
-
if response.kind_of? Net::HTTPClientError
|
86
|
+
if response.kind_of? Net::HTTPClientError or response.kind_of? Net::HTTPServerError
|
87
87
|
error_response = JSON.parse(response.body)
|
88
88
|
msg = error_response["message"] || error_response["Error"]
|
89
89
|
raise Adzerk::ApiError.new(msg)
|
data/lib/adzerk/creative.rb
CHANGED
File without changes
|
data/lib/adzerk/creative_map.rb
CHANGED
File without changes
|
data/lib/adzerk/errors.rb
CHANGED
File without changes
|
data/lib/adzerk/flight.rb
CHANGED
File without changes
|
data/lib/adzerk/geo_targeting.rb
CHANGED
File without changes
|
data/lib/adzerk/invitation.rb
CHANGED
File without changes
|
data/lib/adzerk/priority.rb
CHANGED
File without changes
|
data/lib/adzerk/publisher.rb
CHANGED
File without changes
|
data/lib/adzerk/reporting.rb
CHANGED
File without changes
|
File without changes
|
data/lib/adzerk/util.rb
CHANGED
File without changes
|
data/lib/adzerk/version.rb
CHANGED
data/test/adtype_api_spec.rb
CHANGED
File without changes
|
data/test/advertiser_api_spec.rb
CHANGED
File without changes
|
data/test/campaign_api_spec.rb
CHANGED
@@ -73,7 +73,8 @@ describe "Campaign API" do
|
|
73
73
|
:name => "Test",
|
74
74
|
:priority_id => $priority_id,
|
75
75
|
:impressions => 10000,
|
76
|
-
:is_deleted => false
|
76
|
+
:is_deleted => false,
|
77
|
+
:goal_type => 1
|
77
78
|
}]
|
78
79
|
new1_campaign = {
|
79
80
|
:name => $campaign_name,
|
@@ -88,8 +89,6 @@ describe "Campaign API" do
|
|
88
89
|
campaign = @campaigns.create(new1_campaign)
|
89
90
|
$campaign_id_1 = campaign[:id].to_s
|
90
91
|
expect($campaign_name).to eq(campaign[:name])
|
91
|
-
# JSON.parse(response.body)["StartDate"].should == "/Date(1293858000000-0500)/"
|
92
|
-
# JSON.parse(response.body)["EndDate"].should == "/Date(1325307600000-0500)/"
|
93
92
|
expect($campaign_is_active).to eq(campaign[:is_active])
|
94
93
|
expect(campaign[:is_deleted]).to eq(false)
|
95
94
|
expect($campaign_price.to_f).to eq(campaign[:price])
|
data/test/category_api_spec.rb
CHANGED
File without changes
|
data/test/channel_api_spec.rb
CHANGED
File without changes
|
File without changes
|
data/test/creative_api_spec.rb
CHANGED
File without changes
|
@@ -332,7 +332,7 @@ describe "Creative Flight API" do
|
|
332
332
|
end
|
333
333
|
|
334
334
|
it "should not get a map in a different network" do
|
335
|
-
expect{ @creative_maps.get(123, @flight_id) }.to raise_error
|
335
|
+
expect{ @creative_maps.get(123, @flight_id) }.to raise_error Adzerk::ApiError
|
336
336
|
end
|
337
337
|
|
338
338
|
it "should get a map that's been deleted" do
|
@@ -382,37 +382,6 @@ describe "Creative Flight API" do
|
|
382
382
|
}.to raise_error "This creative map has been deleted"
|
383
383
|
end
|
384
384
|
|
385
|
-
it "should fail when creating a map for a campaign in a different network" do
|
386
|
-
expect {
|
387
|
-
creative_map = @creative_maps.create(
|
388
|
-
:campaign_id => 123,
|
389
|
-
:flight_id => @flight_id,
|
390
|
-
:size_override => false,
|
391
|
-
:iframe => false,
|
392
|
-
:impressions => 100000,
|
393
|
-
:percentage => 50,
|
394
|
-
:siteId => @site_id,
|
395
|
-
:zoneId => @zone_id,
|
396
|
-
:distributionType => 1,
|
397
|
-
:isActive => true,
|
398
|
-
:isDeleted => false,
|
399
|
-
:creative => {
|
400
|
-
:title => "Creative Title",
|
401
|
-
:url => "http://www.adzerk.com",
|
402
|
-
:body => "Test Body",
|
403
|
-
:advertiser_id => @advertiser_id,
|
404
|
-
:ad_type_id => 18,
|
405
|
-
'IsHTMLJS' => true,
|
406
|
-
:script_body => "<html></html>",
|
407
|
-
:is_active => true,
|
408
|
-
:alt => "alt text",
|
409
|
-
:is_deleted => false,
|
410
|
-
:is_sync => false
|
411
|
-
}
|
412
|
-
)
|
413
|
-
}.to raise_error "This campaign is not part of your network"
|
414
|
-
end
|
415
|
-
|
416
385
|
it "should fail when creating a map for a site in a different network" do
|
417
386
|
expect {
|
418
387
|
creative_map = @creative_maps.create(
|
data/test/flight_api_spec.rb
CHANGED
@@ -159,7 +159,8 @@ describe "Flight API" do
|
|
159
159
|
:start_date => $flight_StartDate,
|
160
160
|
:goal_type => $flight_GoalType,
|
161
161
|
:impressions => $flight_Impressions,
|
162
|
-
:is_companion => false
|
162
|
+
:is_companion => false,
|
163
|
+
:end_date => $flight_EndDate)
|
163
164
|
expect(flight[:name]).to eq("New Flight Name")
|
164
165
|
expect(flight[:is_companion]).to be false
|
165
166
|
end
|
File without changes
|
data/test/invitation_api_spec.rb
CHANGED
File without changes
|
data/test/login_api_spec.rb
CHANGED
File without changes
|
data/test/priority_api_spec.rb
CHANGED
File without changes
|
data/test/publisher_api_spec.rb
CHANGED
File without changes
|
data/test/rakefile.rb
CHANGED
File without changes
|
data/test/report_api_spec.rb
CHANGED
@@ -6,7 +6,7 @@ describe "Report API" do
|
|
6
6
|
@reports = Adzerk::Client.new(API_KEY).reports
|
7
7
|
|
8
8
|
$new_report = {
|
9
|
-
:start_date => "
|
9
|
+
:start_date => "01/15/2011",
|
10
10
|
:end_date => "12/31/2011",
|
11
11
|
:group_by => ['month'],
|
12
12
|
'Top30countries' => false,
|
@@ -36,7 +36,7 @@ describe "Report API" do
|
|
36
36
|
end
|
37
37
|
|
38
38
|
it "should return a status of 1 if the report isn't ready yet" do
|
39
|
-
bigger_report = $new_report.update(start_date: "
|
39
|
+
bigger_report = $new_report.update(start_date: "01/01/2014", end_date: "10/01/2018")
|
40
40
|
report_id = @reports.create_queued_report(bigger_report)[:id]
|
41
41
|
# immediately poll for the result
|
42
42
|
response = @reports.retrieve_queued_report(report_id)
|
data/test/security_api_spec.rb
CHANGED
File without changes
|
data/test/site_api_spec.rb
CHANGED
File without changes
|
File without changes
|
data/test/spec_helper.rb
CHANGED
File without changes
|
data/test/util_spec.rb
CHANGED
File without changes
|
data/test/zone_api_spec.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adzerk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.14'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kacy Fortner
|
@@ -17,7 +17,7 @@ authors:
|
|
17
17
|
autorequire:
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
|
-
date:
|
20
|
+
date: 2020-07-06 00:00:00.000000000 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: rspec
|
@@ -39,14 +39,14 @@ dependencies:
|
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 12.
|
42
|
+
version: 12.3.3
|
43
43
|
type: :development
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 12.
|
49
|
+
version: 12.3.3
|
50
50
|
- !ruby/object:Gem::Dependency
|
51
51
|
name: json
|
52
52
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,8 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
- !ruby/object:Gem::Version
|
155
155
|
version: '0'
|
156
156
|
requirements: []
|
157
|
-
|
158
|
-
rubygems_version: 2.5.1
|
157
|
+
rubygems_version: 3.1.2
|
159
158
|
signing_key:
|
160
159
|
specification_version: 4
|
161
160
|
summary: Adzerk API
|