ruby-vast 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +20 -0
- data/README.rdoc +55 -0
- data/lib/ruby-vast.rb +1 -0
- data/lib/vast.rb +33 -0
- data/lib/vast/ad.rb +103 -0
- data/lib/vast/companion_creative.rb +81 -0
- data/lib/vast/creative.rb +62 -0
- data/lib/vast/document.rb +71 -0
- data/lib/vast/element.rb +9 -0
- data/lib/vast/extension.rb +18 -0
- data/lib/vast/icon.rb +87 -0
- data/lib/vast/inline_ad.rb +22 -0
- data/lib/vast/linear_creative.rb +57 -0
- data/lib/vast/mediafile.rb +56 -0
- data/lib/vast/non_linear_creative.rb +97 -0
- data/lib/vast/version.rb +3 -0
- data/lib/vast/wrapper_ad.rb +19 -0
- data/lib/vast3_draft.xsd +1036 -0
- data/lib/vast_2.0.1.xsd +643 -0
- data/test/ad_test.rb +122 -0
- data/test/companion_creative_test.rb +38 -0
- data/test/creative_test.rb +35 -0
- data/test/document_test.rb +72 -0
- data/test/examples/document_with_no_ads.xml +3 -0
- data/test/examples/document_with_one_inline_ad.xml +121 -0
- data/test/examples/document_with_one_inline_and_one_wrapper_ad.xml +105 -0
- data/test/examples/document_with_one_wrapper_ad.xml +40 -0
- data/test/examples/document_with_two_inline_ads.xml +120 -0
- data/test/examples/invalid_document.xml +3 -0
- data/test/examples/invalid_document_with_missing_ad_type.xml +58 -0
- data/test/examples/invalid_document_with_missing_creative_type.xml +39 -0
- data/test/examples/vast3_inline.xml +86 -0
- data/test/extension_test.rb +20 -0
- data/test/inline_ad_test.rb +14 -0
- data/test/linear_creative_test.rb +26 -0
- data/test/mediafile_test.rb +20 -0
- data/test/non_linear_creative_test.rb +39 -0
- data/test/test_helper.rb +13 -0
- data/test/vast3_inline_ad_test.rb +23 -0
- data/test/wrapper_ad_test.rb +16 -0
- metadata +99 -0
@@ -0,0 +1,40 @@
|
|
1
|
+
<!-- VAST document with one Wrapper ad -->
|
2
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
3
|
+
<VAST version="2.0">
|
4
|
+
<Ad id="602833">
|
5
|
+
<Wrapper>
|
6
|
+
<AdSystem>Acudeo Compatible</AdSystem>
|
7
|
+
<VASTAdTagURI>http://demo.tremormedia.com/proddev/vast/vast_inline_linear.xml</VASTAdTagURI>
|
8
|
+
<Impression>http://myTrackingURL/wrapper/impression</Impression>
|
9
|
+
<Creatives>
|
10
|
+
|
11
|
+
<Creative AdID="602833">
|
12
|
+
<Linear>
|
13
|
+
<TrackingEvents>
|
14
|
+
</TrackingEvents>
|
15
|
+
</Linear>
|
16
|
+
</Creative>
|
17
|
+
<Creative AdID="602833-Companion">
|
18
|
+
<CompanionAds>
|
19
|
+
<Companion width="300" height="250">
|
20
|
+
|
21
|
+
<StaticResource creativeType="image/jpeg">http://demo.tremormedia.com/proddev/vast/300x250_banner1.jpg</StaticResource>
|
22
|
+
<TrackingEvents>
|
23
|
+
<Tracking event="creativeView">http://myTrackingURL/wrapper/firstCompanionCreativeView</Tracking>
|
24
|
+
</TrackingEvents>
|
25
|
+
<CompanionClickThrough>http://www.tremormedia.com</CompanionClickThrough>
|
26
|
+
</Companion>
|
27
|
+
<Companion width="728" height="90">
|
28
|
+
|
29
|
+
<StaticResource creativeType="image/jpeg">
|
30
|
+
<![CDATA[http://demo.tremormedia.com/proddev/vast/728x90_banner1.jpg]]>
|
31
|
+
</StaticResource>
|
32
|
+
<CompanionClickThrough>http://www.tremormedia.com</CompanionClickThrough>
|
33
|
+
</Companion>
|
34
|
+
</CompanionAds>
|
35
|
+
</Creative>
|
36
|
+
</Creatives>
|
37
|
+
</Wrapper>
|
38
|
+
</Ad>
|
39
|
+
|
40
|
+
</VAST>
|
@@ -0,0 +1,120 @@
|
|
1
|
+
<!-- VAST document with two InLine ads -->
|
2
|
+
<VAST version="2.0">
|
3
|
+
<Ad id="601364">
|
4
|
+
<InLine>
|
5
|
+
<AdSystem>Acudeo Compatible</AdSystem>
|
6
|
+
<AdTitle>VAST 2.0 Instream Test 1</AdTitle>
|
7
|
+
<Description>VAST 2.0 Instream Test 1</Description>
|
8
|
+
<Error>http://myErrorURL/error</Error>
|
9
|
+
|
10
|
+
<Impression>
|
11
|
+
<![CDATA[http://myTrackingURL/impression]]>
|
12
|
+
</Impression>
|
13
|
+
<Creatives>
|
14
|
+
<Creative AdID="601364">
|
15
|
+
<Linear>
|
16
|
+
<Duration>00:00:30</Duration>
|
17
|
+
<TrackingEvents>
|
18
|
+
<Tracking event="creativeView">http://myTrackingURL/creativeView</Tracking>
|
19
|
+
|
20
|
+
<Tracking event="start">http://myTrackingURL/start</Tracking>
|
21
|
+
<Tracking event="midpoint">http://myTrackingURL/midpoint</Tracking>
|
22
|
+
<Tracking event="firstQuartile">http://myTrackingURL/firstQuartile</Tracking>
|
23
|
+
<Tracking event="thirdQuartile">http://myTrackingURL/thirdQuartile</Tracking>
|
24
|
+
<Tracking event="complete">http://myTrackingURL/complete</Tracking>
|
25
|
+
</TrackingEvents>
|
26
|
+
|
27
|
+
<VideoClicks>
|
28
|
+
<ClickThrough>http://www.tremormedia.com</ClickThrough>
|
29
|
+
<ClickTracking>http://myTrackingURL/click</ClickTracking>
|
30
|
+
</VideoClicks>
|
31
|
+
<MediaFiles>
|
32
|
+
<MediaFile delivery="progressive" type="video/x-flv" bitrate="500" width="400" height="300" scalable="true" maintainAspectRatio="true">http://cdnp.tremormedia.com/video/acudeo/Carrot_400x300_500kb.flv</MediaFile>
|
33
|
+
</MediaFiles>
|
34
|
+
|
35
|
+
</Linear>
|
36
|
+
</Creative>
|
37
|
+
<Creative AdID="601364-Companion">
|
38
|
+
<CompanionAds>
|
39
|
+
<Companion width="300" height="250">
|
40
|
+
<StaticResource creativeType="image/jpeg">
|
41
|
+
<![CDATA[http://demo.tremormedia.com/proddev/vast/Blistex1.jpg]]>
|
42
|
+
</StaticResource>
|
43
|
+
<TrackingEvents>
|
44
|
+
<Tracking event="creativeView">http://myTrackingURL/firstCompanionCreativeView</Tracking>
|
45
|
+
</TrackingEvents>
|
46
|
+
|
47
|
+
<CompanionClickThrough>http://www.tremormedia.com</CompanionClickThrough>
|
48
|
+
</Companion>
|
49
|
+
<Companion width="728" height="90">
|
50
|
+
<StaticResource creativeType="image/jpeg">http://demo.tremormedia.com/proddev/vast/728x90_banner1.jpg</StaticResource>
|
51
|
+
<CompanionClickThrough>http://www.tremormedia.com</CompanionClickThrough>
|
52
|
+
</Companion>
|
53
|
+
|
54
|
+
</CompanionAds>
|
55
|
+
</Creative>
|
56
|
+
</Creatives>
|
57
|
+
</InLine>
|
58
|
+
</Ad>
|
59
|
+
|
60
|
+
<Ad id="601365">
|
61
|
+
<InLine>
|
62
|
+
<AdSystem>Acudeo Compatible</AdSystem>
|
63
|
+
<AdTitle>VAST 2.0 Instream Test 1</AdTitle>
|
64
|
+
<Description>VAST 2.0 Instream Test 1</Description>
|
65
|
+
<Error>http://myErrorURL/error</Error>
|
66
|
+
|
67
|
+
<Impression>
|
68
|
+
<![CDATA[http://myTrackingURL/impression]]>
|
69
|
+
</Impression>
|
70
|
+
<Creatives>
|
71
|
+
<Creative AdID="601365">
|
72
|
+
<Linear>
|
73
|
+
<Duration>00:00:30</Duration>
|
74
|
+
<TrackingEvents>
|
75
|
+
<Tracking event="creativeView">http://myTrackingURL/creativeView</Tracking>
|
76
|
+
|
77
|
+
<Tracking event="start">http://myTrackingURL/start</Tracking>
|
78
|
+
<Tracking event="midpoint">http://myTrackingURL/midpoint</Tracking>
|
79
|
+
<Tracking event="firstQuartile">http://myTrackingURL/firstQuartile</Tracking>
|
80
|
+
<Tracking event="thirdQuartile">http://myTrackingURL/thirdQuartile</Tracking>
|
81
|
+
<Tracking event="complete">http://myTrackingURL/complete</Tracking>
|
82
|
+
</TrackingEvents>
|
83
|
+
|
84
|
+
<VideoClicks>
|
85
|
+
<ClickThrough>http://www.tremormedia.com</ClickThrough>
|
86
|
+
<ClickTracking>http://myTrackingURL/click</ClickTracking>
|
87
|
+
</VideoClicks>
|
88
|
+
<MediaFiles>
|
89
|
+
<MediaFile delivery="progressive" type="video/x-flv" bitrate="500" width="400" height="300" scalable="true" maintainAspectRatio="true">http://cdnp.tremormedia.com/video/acudeo/Carrot_400x300_500kb.flv</MediaFile>
|
90
|
+
</MediaFiles>
|
91
|
+
|
92
|
+
</Linear>
|
93
|
+
</Creative>
|
94
|
+
<Creative AdID="601365-Companion">
|
95
|
+
<CompanionAds>
|
96
|
+
<Companion width="300" height="250">
|
97
|
+
<StaticResource creativeType="image/jpeg">
|
98
|
+
<![CDATA[http://demo.tremormedia.com/proddev/vast/Blistex1.jpg]]>
|
99
|
+
</StaticResource>
|
100
|
+
<TrackingEvents>
|
101
|
+
<Tracking event="creativeView">http://myTrackingURL/firstCompanionCreativeView</Tracking>
|
102
|
+
|
103
|
+
</TrackingEvents>
|
104
|
+
|
105
|
+
<CompanionClickThrough>http://www.tremormedia.com</CompanionClickThrough>
|
106
|
+
</Companion>
|
107
|
+
<Companion width="728" height="90">
|
108
|
+
<StaticResource creativeType="image/jpeg">
|
109
|
+
<![CDATA[http://demo.tremormedia.com/proddev/vast/728x90_banner1.jpg]]>
|
110
|
+
</StaticResource>
|
111
|
+
<CompanionClickThrough>http://www.tremormedia.com</CompanionClickThrough>
|
112
|
+
</Companion>
|
113
|
+
|
114
|
+
</CompanionAds>
|
115
|
+
</Creative>
|
116
|
+
</Creatives>
|
117
|
+
</InLine>
|
118
|
+
</Ad>
|
119
|
+
|
120
|
+
</VAST>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<!-- Invalid VAST document with ad type commented out -->
|
2
|
+
<VAST version="2.0">
|
3
|
+
|
4
|
+
<Ad id="601364">
|
5
|
+
<!-- <InLine> -->
|
6
|
+
<AdSystem>Acudeo Compatible</AdSystem>
|
7
|
+
<AdTitle>VAST 2.0 Instream Test 1</AdTitle>
|
8
|
+
<Description>VAST 2.0 Instream Test 1</Description>
|
9
|
+
<Error>http://myErrorURL/error</Error>
|
10
|
+
|
11
|
+
<Impression>http://myTrackingURL/impression</Impression>
|
12
|
+
<Creatives>
|
13
|
+
<Creative AdID="601364">
|
14
|
+
<Linear>
|
15
|
+
<Duration>00:00:30</Duration>
|
16
|
+
<TrackingEvents>
|
17
|
+
<Tracking event="creativeView">http://myTrackingURL/creativeView</Tracking>
|
18
|
+
|
19
|
+
<Tracking event="start">http://myTrackingURL/start</Tracking>
|
20
|
+
<Tracking event="midpoint">http://myTrackingURL/midpoint</Tracking>
|
21
|
+
<Tracking event="firstQuartile">http://myTrackingURL/firstQuartile</Tracking>
|
22
|
+
<Tracking event="thirdQuartile">http://myTrackingURL/thirdQuartile</Tracking>
|
23
|
+
<Tracking event="complete">http://myTrackingURL/complete</Tracking>
|
24
|
+
</TrackingEvents>
|
25
|
+
|
26
|
+
<VideoClicks>
|
27
|
+
<ClickThrough>http://www.tremormedia.com</ClickThrough>
|
28
|
+
<ClickTracking>http://myTrackingURL/click</ClickTracking>
|
29
|
+
</VideoClicks>
|
30
|
+
<MediaFiles>
|
31
|
+
<MediaFile delivery="progressive" type="video/x-flv" bitrate="500" width="400" height="300" scalable="true" maintainAspectRatio="true">http://cdnp.tremormedia.com/video/acudeo/Carrot_400x300_500kb.flv</MediaFile>
|
32
|
+
</MediaFiles>
|
33
|
+
|
34
|
+
</Linear>
|
35
|
+
</Creative>
|
36
|
+
<Creative AdID="601364-Companion">
|
37
|
+
<CompanionAds>
|
38
|
+
<Companion width="300" height="250">
|
39
|
+
<StaticResource creativeType="image/jpeg">http://demo.tremormedia.com/proddev/vast/Blistex1.jpg</StaticResource>
|
40
|
+
<TrackingEvents>
|
41
|
+
<Tracking event="creativeView">http://myTrackingURL/firstCompanionCreativeView</Tracking>
|
42
|
+
|
43
|
+
</TrackingEvents>
|
44
|
+
|
45
|
+
<CompanionClickThrough>http://www.tremormedia.com</CompanionClickThrough>
|
46
|
+
</Companion>
|
47
|
+
<Companion width="728" height="90">
|
48
|
+
<StaticResource creativeType="image/jpeg">http://demo.tremormedia.com/proddev/vast/728x90_banner1.jpg</StaticResource>
|
49
|
+
<CompanionClickThrough>http://www.tremormedia.com</CompanionClickThrough>
|
50
|
+
</Companion>
|
51
|
+
|
52
|
+
</CompanionAds>
|
53
|
+
</Creative>
|
54
|
+
</Creatives>
|
55
|
+
<!-- </InLine> -->
|
56
|
+
</Ad>
|
57
|
+
|
58
|
+
</VAST>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<!-- Invalid VAST document with missing ad creative-->
|
2
|
+
<VAST version="2.0">
|
3
|
+
|
4
|
+
<Ad id="601364">
|
5
|
+
<InLine>
|
6
|
+
<AdSystem>Acudeo Compatible</AdSystem>
|
7
|
+
<AdTitle>VAST 2.0 Instream Test 1</AdTitle>
|
8
|
+
<Description>VAST 2.0 Instream Test 1</Description>
|
9
|
+
<Error>http://myErrorURL/error</Error>
|
10
|
+
|
11
|
+
<Impression>http://myTrackingURL/impression</Impression>
|
12
|
+
<Creatives>
|
13
|
+
<Creative AdID="601364">
|
14
|
+
<!-- <Linear> -->
|
15
|
+
<Duration>00:00:30</Duration>
|
16
|
+
<TrackingEvents>
|
17
|
+
<Tracking event="creativeView">http://myTrackingURL/creativeView</Tracking>
|
18
|
+
|
19
|
+
<Tracking event="start">http://myTrackingURL/start</Tracking>
|
20
|
+
<Tracking event="midpoint">http://myTrackingURL/midpoint</Tracking>
|
21
|
+
<Tracking event="firstQuartile">http://myTrackingURL/firstQuartile</Tracking>
|
22
|
+
<Tracking event="thirdQuartile">http://myTrackingURL/thirdQuartile</Tracking>
|
23
|
+
<Tracking event="complete">http://myTrackingURL/complete</Tracking>
|
24
|
+
</TrackingEvents>
|
25
|
+
|
26
|
+
<VideoClicks>
|
27
|
+
<ClickThrough>http://www.tremormedia.com</ClickThrough>
|
28
|
+
<ClickTracking>http://myTrackingURL/click</ClickTracking>
|
29
|
+
</VideoClicks>
|
30
|
+
<MediaFiles>
|
31
|
+
<MediaFile delivery="progressive" type="video/x-flv" bitrate="500" width="400" height="300" scalable="true" maintainAspectRatio="true">http://cdnp.tremormedia.com/video/acudeo/Carrot_400x300_500kb.flv</MediaFile>
|
32
|
+
</MediaFiles>
|
33
|
+
<!-- </Linear> -->
|
34
|
+
</Creative>
|
35
|
+
</Creatives>
|
36
|
+
</InLine>
|
37
|
+
</Ad>
|
38
|
+
|
39
|
+
</VAST>
|
@@ -0,0 +1,86 @@
|
|
1
|
+
<VAST version="3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd">
|
2
|
+
<Ad id="2447226.251866656" sequence="1">
|
3
|
+
<InLine>
|
4
|
+
<AdSystem>FreeWheel</AdSystem>
|
5
|
+
<AdTitle>Ooyla test m3u8 midroll 1</AdTitle>
|
6
|
+
<Error><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447226&reid=1698599&arid=0&iw=&uxnw=&uxss=&uxct=&et=e&cn=[ERRORCODE]]]></Error>
|
7
|
+
<Impression id="FWi_2447226.0"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447226&reid=1698599&arid=0&auid=&cn=defaultImpression&et=i&_cc=&tpos=15&iw=&uxnw=&uxss=&uxct=&metr=121&init=1&_dic=1&cr=]]></Impression>
|
8
|
+
|
9
|
+
<Creatives>
|
10
|
+
<Creative AdID="2447226">
|
11
|
+
<Linear>
|
12
|
+
<Duration>00:00:15</Duration>
|
13
|
+
<TrackingEvents>
|
14
|
+
<Tracking event="complete"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447226&reid=1698599&arid=0&auid=&cn=complete&et=i&_cc=&tpos=15&init=1&iw=&uxnw=&uxss=&uxct=&metr=121]]></Tracking>
|
15
|
+
<Tracking event="firstQuartile"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447226&reid=1698599&arid=0&auid=&cn=firstQuartile&et=i&_cc=&tpos=15&init=1&iw=&uxnw=&uxss=&uxct=&metr=121]]></Tracking>
|
16
|
+
<Tracking event="midpoint"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447226&reid=1698599&arid=0&auid=&cn=midPoint&et=i&_cc=&tpos=15&init=1&iw=&uxnw=&uxss=&uxct=&metr=121]]></Tracking>
|
17
|
+
<Tracking event="thirdQuartile"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447226&reid=1698599&arid=0&auid=&cn=thirdQuartile&et=i&_cc=&tpos=15&init=1&iw=&uxnw=&uxss=&uxct=&metr=121]]></Tracking>
|
18
|
+
</TrackingEvents>
|
19
|
+
<VideoClicks>
|
20
|
+
<ClickTracking id="FWc_2447226.0"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447226&reid=1698599&arid=0&auid=&cn=defaultClick&et=c&_cc=&tpos=15&cr=]]></ClickTracking>
|
21
|
+
</VideoClicks>
|
22
|
+
<MediaFiles>
|
23
|
+
<MediaFile delivery="streaming" height="0" type="application/x-mpegURL" width="0"><![CDATA[http://hdadshds-f.akamaihd.net/i/video/campaigns/fox/tmobile/tmo15unlimitedh641080_,130,80,180,340,450,250,50,30,22,15,0.mp4.csmil/master.m3u8]]></MediaFile>
|
24
|
+
</MediaFiles>
|
25
|
+
</Linear>
|
26
|
+
</Creative>
|
27
|
+
</Creatives>
|
28
|
+
</InLine>
|
29
|
+
</Ad>
|
30
|
+
<Ad id="2447227.255243472" sequence="2">
|
31
|
+
<InLine>
|
32
|
+
<AdSystem>FreeWheel</AdSystem>
|
33
|
+
<AdTitle>Ooyla test m3u8 midroll 2</AdTitle>
|
34
|
+
<Error><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447227&reid=1698600&arid=0&iw=&uxnw=&uxss=&uxct=&et=e&cn=[ERRORCODE]]]></Error>
|
35
|
+
<Impression id="FWi_2447227.0"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447227&reid=1698600&arid=0&auid=&cn=defaultImpression&et=i&_cc=&tpos=15&iw=&uxnw=&uxss=&uxct=&metr=121&init=1&_dic=1&cr=]]></Impression>
|
36
|
+
|
37
|
+
<Creatives>
|
38
|
+
<Creative AdID="2447227">
|
39
|
+
<Linear>
|
40
|
+
<Duration>00:00:31</Duration>
|
41
|
+
<TrackingEvents>
|
42
|
+
<Tracking event="complete"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447227&reid=1698600&arid=0&auid=&cn=complete&et=i&_cc=&tpos=15&init=1&iw=&uxnw=&uxss=&uxct=&metr=121]]></Tracking>
|
43
|
+
<Tracking event="firstQuartile"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447227&reid=1698600&arid=0&auid=&cn=firstQuartile&et=i&_cc=&tpos=15&init=1&iw=&uxnw=&uxss=&uxct=&metr=121]]></Tracking>
|
44
|
+
<Tracking event="midpoint"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447227&reid=1698600&arid=0&auid=&cn=midPoint&et=i&_cc=&tpos=15&init=1&iw=&uxnw=&uxss=&uxct=&metr=121]]></Tracking>
|
45
|
+
<Tracking event="thirdQuartile"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447227&reid=1698600&arid=0&auid=&cn=thirdQuartile&et=i&_cc=&tpos=15&init=1&iw=&uxnw=&uxss=&uxct=&metr=121]]></Tracking>
|
46
|
+
</TrackingEvents>
|
47
|
+
<VideoClicks>
|
48
|
+
<ClickTracking id="FWc_2447227.0"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447227&reid=1698600&arid=0&auid=&cn=defaultClick&et=c&_cc=&tpos=15&cr=]]></ClickTracking>
|
49
|
+
</VideoClicks>
|
50
|
+
<MediaFiles>
|
51
|
+
<MediaFile delivery="streaming" height="0" type="application/x-mpegURL" width="0"><![CDATA[http://hdadshds-f.akamaihd.net/i/video/campaigns/fox/showtime/homelandlookagain30qsbj2330h_,340,450,180,250,130,80,50,30,22,15,0.mp4.csmil/master.m3u8]]></MediaFile>
|
52
|
+
</MediaFiles>
|
53
|
+
</Linear>
|
54
|
+
</Creative>
|
55
|
+
</Creatives>
|
56
|
+
</InLine>
|
57
|
+
</Ad>
|
58
|
+
<Ad id="2447228.257609712" sequence="3">
|
59
|
+
<InLine>
|
60
|
+
<AdSystem>FreeWheel</AdSystem>
|
61
|
+
<AdTitle>Ooyla test m3u8 midroll 3</AdTitle>
|
62
|
+
<Error><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447228&reid=1698602&arid=0&iw=&uxnw=&uxss=&uxct=&et=e&cn=[ERRORCODE]]]></Error>
|
63
|
+
<Impression id="FWi_2447228.0"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447228&reid=1698602&arid=0&auid=&cn=defaultImpression&et=i&_cc=&tpos=15&iw=&uxnw=&uxss=&uxct=&metr=121&init=1&_dic=1&cr=]]></Impression>
|
64
|
+
|
65
|
+
<Creatives>
|
66
|
+
<Creative AdID="2447228">
|
67
|
+
<Linear>
|
68
|
+
<Duration>00:00:31</Duration>
|
69
|
+
<TrackingEvents>
|
70
|
+
<Tracking event="complete"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447228&reid=1698602&arid=0&auid=&cn=complete&et=i&_cc=&tpos=15&init=1&iw=&uxnw=&uxss=&uxct=&metr=121]]></Tracking>
|
71
|
+
<Tracking event="firstQuartile"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447228&reid=1698602&arid=0&auid=&cn=firstQuartile&et=i&_cc=&tpos=15&init=1&iw=&uxnw=&uxss=&uxct=&metr=121]]></Tracking>
|
72
|
+
<Tracking event="midpoint"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447228&reid=1698602&arid=0&auid=&cn=midPoint&et=i&_cc=&tpos=15&init=1&iw=&uxnw=&uxss=&uxct=&metr=121]]></Tracking>
|
73
|
+
<Tracking event="thirdQuartile"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447228&reid=1698602&arid=0&auid=&cn=thirdQuartile&et=i&_cc=&tpos=15&init=1&iw=&uxnw=&uxss=&uxct=&metr=121]]></Tracking>
|
74
|
+
</TrackingEvents>
|
75
|
+
<VideoClicks>
|
76
|
+
<ClickTracking id="FWc_2447228.0"><![CDATA[http://g1.v.fwmrm.net/ad/l/1?s=a032&n=164515&t=1366755844262714011&adid=2447228&reid=1698602&arid=0&auid=&cn=defaultClick&et=c&_cc=&tpos=15&cr=]]></ClickTracking>
|
77
|
+
</VideoClicks>
|
78
|
+
<MediaFiles>
|
79
|
+
<MediaFile delivery="streaming" height="0" type="application/x-mpegURL" width="0"><![CDATA[http://hdadshds-f.akamaihd.net/i/video/campaigns/fx/millercoors/snowparty30enhdns_,340,50,30,22,15,450,180,250,130,80,0.mp4.csmil/master.m3u8]]></MediaFile>
|
80
|
+
</MediaFiles>
|
81
|
+
</Linear>
|
82
|
+
</Creative>
|
83
|
+
</Creatives>
|
84
|
+
</InLine>
|
85
|
+
</Ad>
|
86
|
+
</VAST>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class ExtensionTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
def test_should_know_attributes
|
6
|
+
document_file = example_file('document_with_one_inline_ad.xml')
|
7
|
+
document = VAST::Document.parse!(document_file)
|
8
|
+
extension = VAST::Extension.new(document.at('Extension'))
|
9
|
+
|
10
|
+
assert_equal "DART", extension.type
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_should_know_attributes
|
14
|
+
document_file = example_file('document_with_one_inline_ad.xml')
|
15
|
+
document = VAST::Document.parse!(document_file)
|
16
|
+
extension = VAST::Extension.new(document.at('Extension'))
|
17
|
+
|
18
|
+
assert_equal extension.source_node, extension.xml
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class InlineAdTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
def test_ad_should_know_attributes
|
6
|
+
document_file = example_file('document_with_one_inline_ad.xml')
|
7
|
+
document = VAST::Document.parse!(document_file)
|
8
|
+
inline_ad = document.inline_ads.first
|
9
|
+
|
10
|
+
assert_equal "http://mySurveyURL/survey", inline_ad.survey_url.to_s
|
11
|
+
assert_equal "VAST 2.0 Instream Test 1", inline_ad.ad_title
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class LinearCreativeTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
def test_should_know_attributes
|
6
|
+
document_file = example_file('document_with_one_inline_ad.xml')
|
7
|
+
document = VAST::Document.parse!(document_file)
|
8
|
+
creative = document.inline_ads.first.linear_creatives.first
|
9
|
+
|
10
|
+
assert_equal "00:00:30", creative.duration
|
11
|
+
assert_equal "http://www.tremormedia.com", creative.click_through_url.to_s
|
12
|
+
assert_equal "http://myTrackingURL/click1", creative.click_tracking_urls.first.to_s
|
13
|
+
assert_equal "http://myTrackingURL/click2", creative.click_tracking_urls.last.to_s
|
14
|
+
assert_equal "http://myTrackingURL/custom1", creative.custom_click_urls[:custom_one].to_s
|
15
|
+
assert_equal "http://myTrackingURL/custom2", creative.custom_click_urls[:custom_two].to_s
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_should_have_mediafiles
|
19
|
+
document_file = example_file('document_with_one_inline_ad.xml')
|
20
|
+
document = VAST::Document.parse!(document_file)
|
21
|
+
creative = document.inline_ads.first.linear_creatives.first
|
22
|
+
|
23
|
+
assert creative.mediafiles.first.kind_of?(VAST::Mediafile)
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class MediafileTest < Test::Unit::TestCase
|
4
|
+
def test_should_know_attributes
|
5
|
+
document_file = example_file('document_with_one_inline_ad.xml')
|
6
|
+
document = VAST::Document.parse!(document_file)
|
7
|
+
mediafile = VAST::Mediafile.new(document.at('MediaFile'))
|
8
|
+
|
9
|
+
assert_equal "http://cdnp.tremormedia.com/video/acudeo/Carrot_400x300_500kb.flv", mediafile.url.to_s
|
10
|
+
assert_equal "firstFile", mediafile.id
|
11
|
+
assert_equal "progressive", mediafile.delivery
|
12
|
+
assert_equal "video/x-flv", mediafile.type
|
13
|
+
assert_equal 400, mediafile.width
|
14
|
+
assert_equal 300, mediafile.height
|
15
|
+
assert_equal 500, mediafile.bitrate
|
16
|
+
assert_equal "VPAID", mediafile.api_framework
|
17
|
+
assert mediafile.scalable?
|
18
|
+
assert mediafile.maintain_aspect_ratio?
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class NonLinearCreativeTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
def test_should_know_attributes
|
6
|
+
document_file = example_file('document_with_one_inline_ad.xml')
|
7
|
+
document = VAST::Document.parse!(document_file)
|
8
|
+
creative = document.inline_ads.first.non_linear_creatives.first
|
9
|
+
|
10
|
+
assert_equal "special_overlay", creative.id
|
11
|
+
assert_equal 300, creative.width
|
12
|
+
assert_equal 50, creative.height
|
13
|
+
assert_equal 600, creative.expanded_width
|
14
|
+
assert_equal 500, creative.expanded_height
|
15
|
+
assert_equal "http://t3.liverail.com", creative.click_through_url.to_s
|
16
|
+
assert_equal "VPAID", creative.api_framework
|
17
|
+
assert creative.scalable?
|
18
|
+
assert creative.maintain_aspect_ratio?
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_should_know_static_resource
|
22
|
+
document_file = example_file('document_with_one_inline_ad.xml')
|
23
|
+
document = VAST::Document.parse!(document_file)
|
24
|
+
creative_with_static_resource = document.inline_ads.first.non_linear_creatives.first
|
25
|
+
|
26
|
+
assert_equal :static, creative_with_static_resource.resource_type
|
27
|
+
assert_equal "image/jpeg", creative_with_static_resource.creative_type
|
28
|
+
assert_equal "http://cdn.liverail.com/adasset/228/330/overlay.jpg", creative_with_static_resource.resource_url.to_s
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_should_know_iframe_resource
|
32
|
+
document_file = example_file('document_with_one_inline_ad.xml')
|
33
|
+
document = VAST::Document.parse!(document_file)
|
34
|
+
creative_with_iframe_resource = document.inline_ads.first.non_linear_creatives.last
|
35
|
+
|
36
|
+
assert_equal :iframe, creative_with_iframe_resource.resource_type
|
37
|
+
assert_equal "http://ad3.liverail.com/util/non_linear.php", creative_with_iframe_resource.resource_url.to_s
|
38
|
+
end
|
39
|
+
end
|