adzerk 0.13 → 0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +5 -5
  2. data/lib/adzerk.rb +0 -0
  3. data/lib/adzerk/advertiser.rb +0 -0
  4. data/lib/adzerk/api_endpoint.rb +0 -0
  5. data/lib/adzerk/category.rb +0 -0
  6. data/lib/adzerk/channel_site_map.rb +0 -0
  7. data/lib/adzerk/client.rb +1 -1
  8. data/lib/adzerk/creative.rb +0 -0
  9. data/lib/adzerk/creative_map.rb +0 -0
  10. data/lib/adzerk/errors.rb +0 -0
  11. data/lib/adzerk/flight.rb +0 -0
  12. data/lib/adzerk/geo_targeting.rb +0 -0
  13. data/lib/adzerk/invitation.rb +0 -0
  14. data/lib/adzerk/priority.rb +0 -0
  15. data/lib/adzerk/publisher.rb +0 -0
  16. data/lib/adzerk/reporting.rb +0 -0
  17. data/lib/adzerk/site_zone_targeting.rb +0 -0
  18. data/lib/adzerk/util.rb +0 -0
  19. data/lib/adzerk/version.rb +1 -1
  20. data/test/adtype_api_spec.rb +0 -0
  21. data/test/advertiser_api_spec.rb +0 -0
  22. data/test/campaign_api_spec.rb +2 -3
  23. data/test/category_api_spec.rb +0 -0
  24. data/test/channel_api_spec.rb +0 -0
  25. data/test/channel_site_map_api_spec.rb +0 -0
  26. data/test/creative_api_spec.rb +0 -0
  27. data/test/creative_map_api_spec.rb +1 -32
  28. data/test/flight_api_spec.rb +2 -1
  29. data/test/geo_targeting_api_spec.rb +0 -0
  30. data/test/invitation_api_spec.rb +0 -0
  31. data/test/login_api_spec.rb +0 -0
  32. data/test/priority_api_spec.rb +0 -0
  33. data/test/publisher_api_spec.rb +0 -0
  34. data/test/rakefile.rb +0 -0
  35. data/test/report_api_spec.rb +2 -2
  36. data/test/security_api_spec.rb +0 -0
  37. data/test/site_api_spec.rb +0 -0
  38. data/test/site_zone_targeting_api_spec.rb +0 -0
  39. data/test/spec_helper.rb +0 -0
  40. data/test/util_spec.rb +0 -0
  41. data/test/zone_api_spec.rb +0 -0
  42. metadata +5 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 45256e26c1df6bc024eb079d454aa60403c11578
4
- data.tar.gz: 3ee03c68d83208ff84b71a2331b15041ba822b56
2
+ SHA256:
3
+ metadata.gz: dfcb33e06a66b4728d0a27e69c41a240a3d3f73ce3af93056fdbb794e6b1361c
4
+ data.tar.gz: d6b9c3113f6120d074a517643a56fb4cb1fc2b98b98abe016cb31cbebcadad32
5
5
  SHA512:
6
- metadata.gz: f3e19e1997bdfe16fa887c5834716de82fcddc76b47f86e4d7af7f3f51690ce105e95f76d7e88be4fed3446642792115e4819963d4b167cf1b4741e5f885f6e5
7
- data.tar.gz: 23fe705e697ca32fc9ebc3dc1c5ef5162fd5921ae7c6c8b58c8051e2358d7fdc2b5e3f94801cc1bb93f68689980bd5e62c6f9d6fe2125393d73f5e29922e17bc
6
+ metadata.gz: f549e8160c19e563cdb4aa4c54b085a833b62b6588227c2540f7e58471805ed88f79680f3d3a32c125639e98a7502b55fe9dee2b4736c560322a10ef5aa5aa61
7
+ data.tar.gz: 2be8a73fb39675f73bd02e13ddd6165f2402005b561b03ab94cf546fd4702c8fcf5105b1240cd7b0a8b71dcb214064764e6d7ce249bee12f2e87d7947533ceaa
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -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)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  module Adzerk
2
- VERSION = "0.13"
2
+ VERSION = "0.14"
3
3
  end
File without changes
File without changes
@@ -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])
File without changes
File without changes
File without changes
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 "This PassCreativeMap does not belong to your network."
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(
@@ -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
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -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 => "1/15/2011",
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: "1/1/2014", end_date: "10/1/2018")
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)
File without changes
File without changes
File without changes
File without changes
File without changes
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.13'
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: 2017-10-19 00:00:00.000000000 Z
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.0.0
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.0.0
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
- rubyforge_project:
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