spy-vs-spy 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/spy-vs-spy.rb +473 -7
- data/spy-vs-spy.gemspec +69 -10
- data/test/firefox/firefox-3.1b2.txt +9 -0
- data/test/firefox/firefox-3.1b2pre.txt +4 -0
- data/test/firefox/firefox-3.1b3.txt +32 -0
- data/test/firefox/firefox-3.1b3pre.txt +2 -0
- data/test/firefox/firefox-3.5.1.txt +41 -0
- data/test/firefox/firefox-3.5.12.txt +1 -0
- data/test/firefox/firefox-3.5.2.txt +27 -0
- data/test/firefox/firefox-3.5.3.txt +22 -0
- data/test/firefox/firefox-3.5.3pre.txt +1 -0
- data/test/firefox/firefox-3.5.4.txt +3 -0
- data/test/firefox/firefox-3.5.5.txt +3 -0
- data/test/firefox/firefox-3.5.txt +40 -0
- data/test/firefox/firefox-3.5b4.txt +9 -0
- data/test/firefox/firefox-3.5b4pre.txt +3 -0
- data/test/firefox/firefox-3.6.txt +2 -0
- data/test/firefox/firefox-3.6a1pre.txt +6 -0
- data/test/firefox/firefox-3.6b1.txt +1 -0
- data/test/firefox/firefox-3.8.txt +3 -0
- data/test/msie/msie-5.5.txt +177 -0
- data/test/msie/msie-5.5b1.txt +1 -0
- data/test/msie/msie-6,0.txt +1 -0
- data/test/msie/msie-6.0.1.txt +1 -0
- data/test/msie/msie-6.0.txt +1817 -0
- data/test/msie/msie-6.0b.txt +14 -0
- data/test/msie/msie-6.1.txt +2 -0
- data/test/msie/msie-7.0.txt +1208 -0
- data/test/msie/msie-7.0b.txt +12 -0
- data/test/msie/msie-8.0.txt +340 -0
- data/test/safari/safari-1.0.3.txt +10 -0
- data/test/safari/safari-1.0.txt +8 -0
- data/test/safari/safari-1.2.2.txt +9 -0
- data/test/safari/safari-1.2.3.txt +10 -0
- data/test/safari/safari-1.2.4.txt +21 -0
- data/test/safari/safari-1.2.txt +5 -0
- data/test/safari/safari-1.3.1.txt +24 -0
- data/test/safari/safari-1.3.2.txt +14 -0
- data/test/safari/safari-1.3.txt +13 -0
- data/test/safari/safari-2.0.1.txt +9 -0
- data/test/safari/safari-2.0.2.txt +25 -0
- data/test/safari/safari-2.0.3.txt +37 -0
- data/test/safari/safari-2.0.4.txt +44 -0
- data/test/safari/safari-2.0.txt +21 -0
- data/test/safari/safari-3.0.1.txt +8 -0
- data/test/safari/safari-3.0.2.txt +14 -0
- data/test/safari/safari-3.0.3.txt +20 -0
- data/test/safari/safari-3.0.4.txt +37 -0
- data/test/safari/safari-3.0.txt +53 -0
- data/test/safari/safari-3.1.1.txt +77 -0
- data/test/safari/safari-3.1.2.txt +48 -0
- data/test/safari/safari-3.1.txt +22 -0
- data/test/safari/safari-3.2.1.txt +37 -0
- data/test/safari/safari-3.2.2.txt +9 -0
- data/test/safari/safari-3.2.3.txt +2 -0
- data/test/safari/safari-3.2.txt +7 -0
- data/test/safari/safari-4.0.1.txt +2 -0
- data/test/safari/safari-4.0.2.txt +12 -0
- data/test/safari/safari-4.0.3.txt +5 -0
- data/test/safari/safari-4.0.txt +66 -0
- data/test/safari/safari-4.0dp1.txt +8 -0
- data/test/safari/safari.txt +31 -0
- data/test/ss-test.rb +143 -3
- metadata +62 -2
@@ -0,0 +1,66 @@
|
|
1
|
+
Mozilla/5.0 (Windows; U; Windows NT 6.0; ru-RU) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
2
|
+
Mozilla/5.0 (Windows; U; Windows NT 6.0; ja-JP) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
3
|
+
Mozilla/5.0 (Windows; U; Windows NT 6.0; hu-HU) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
4
|
+
Mozilla/5.0 (Windows; U; Windows NT 6.0; he-IL) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
5
|
+
Mozilla/5.0 (Windows; U; Windows NT 6.0; he-IL) AppleWebKit/528+ (KHTML, like Gecko) Version/4.0 Safari/528.16
|
6
|
+
Mozilla/5.0 (Windows; U; Windows NT 6.0; fr-FR) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
7
|
+
Mozilla/5.0 (Windows; U; Windows NT 6.0; es-es) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
8
|
+
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
9
|
+
Mozilla/5.0 (Windows; U; Windows NT 6.0; en) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
10
|
+
Mozilla/5.0 (Windows; U; Windows NT 6.0; de-DE) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
11
|
+
Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
12
|
+
Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
13
|
+
Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
14
|
+
Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
15
|
+
Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
16
|
+
Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
17
|
+
Mozilla/5.0 (Windows; U; Windows NT 5.1; nb-NO) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
18
|
+
Mozilla/5.0 (Windows; U; Windows NT 5.1; hu-HU) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
19
|
+
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
20
|
+
Mozilla/5.0 (Windows; U; Windows NT 5.1; fi-FI) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
21
|
+
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/528+ (KHTML, like Gecko) Version/4.0 Safari/528.16
|
22
|
+
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/528+ (KHTML, like Gecko) Version/4.0 Safari/528+
|
23
|
+
Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
24
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_6; tr-TR) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.1
|
25
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_6; ja-jp) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
26
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_6; it-it) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
27
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_6; en-us) AppleWebKit/530.9+ (KHTML, like Gecko) Version/4.0 Safari/528.16
|
28
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_6; en-us) AppleWebKit/530.1+ (KHTML, like Gecko) Version/4.0 Safari/528.16
|
29
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_6; en-us) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
30
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; ja-jp) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
31
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; it-it) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
32
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en-us) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
33
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/528.5+ (KHTML, like Gecko) Version/4.0 Safari/528.1
|
34
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/528.4+ (KHTML, like Gecko) Version/4.0 Safari/528.1
|
35
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/528.1 (KHTML, like Gecko) Version/4.0 Safari/528.1
|
36
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; el-gr) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
37
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6; en-us) AppleWebKit/530.6+ (KHTML, like Gecko) Version/4.0 Safari/530.6
|
38
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6; en-us) AppleWebKit/530.3 (KHTML, like Gecko) Version/4.0 Safari/530.3
|
39
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6; en-us) AppleWebKit/530.1 (KHTML, like Gecko) Version/4.0 Safari/530.1
|
40
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6; en-gb) AppleWebKit/530.1 (KHTML, like Gecko) Version/4.0 Safari/530.1
|
41
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; fr-fr) AppleWebKit/528.18.1 (KHTML, like Gecko) Version/4.0 Safari/528.17
|
42
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.18 (KHTML, like Gecko) Version/4.0 Safari/528.17
|
43
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; ru-ru) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
44
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; nb-no) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
45
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; ko-kr) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
46
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; it-it) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
47
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; fr-fr) AppleWebKit/530.5+ (KHTML, like Gecko) Version/4.0 Safari/528.16
|
48
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; fr-fr) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
49
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; fr-ca) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
50
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; es-es) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
51
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/530.6+ (KHTML, like Gecko) Version/4.0 Safari/528.16
|
52
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/530.5+ (KHTML, like Gecko) Version/4.0 Safari/528.16
|
53
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/530.1+ (KHTML, like Gecko) Version/4.0 Safari/528.16
|
54
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
55
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/528.10+ (KHTML, like Gecko) Version/4.0 Safari/528.1
|
56
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-gb) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
57
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; de-de) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
58
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; da-dk) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
59
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/528.1 (KHTML, like Gecko) Version/4.0 Safari/528.1
|
60
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; nl-nl) AppleWebKit/528.4+ (KHTML, like Gecko) Version/4.0 Safari/528.1
|
61
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/530.1+ (KHTML, like Gecko) Version/4.0 Safari/528.16
|
62
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
|
63
|
+
Mozilla/5.0 (iPod; U; CPU iPhone OS 3_0 like Mac OS X; ja-jp) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16
|
64
|
+
Mozilla/5.0 (iPod; U; CPU iPhone OS 3_0 like Mac OS X; de-de) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16
|
65
|
+
Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7C97d Safari/528.16
|
66
|
+
Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; ko-kr) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16
|
@@ -0,0 +1,8 @@
|
|
1
|
+
Mozilla/5.0 (Windows; U; Windows NT 5.1; en) AppleWebKit/526.9 (KHTML, like Gecko) Version/4.0dp1 Safari/526.8
|
2
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; tr) AppleWebKit/528.4+ (KHTML, like Gecko) Version/4.0dp1 Safari/526.11.2
|
3
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/528.4+ (KHTML, like Gecko) Version/4.0dp1 Safari/526.11.2
|
4
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; de) AppleWebKit/528.4+ (KHTML, like Gecko) Version/4.0dp1 Safari/526.11.2
|
5
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20081212 Mozilla/5.0 (Windows; U; Windows NT 5.1; en) AppleWebKit/526.9 (KHTML, like Gecko) Version/4.0dp1 Safari/526.8
|
6
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-gb) AppleWebKit/528.10+ (KHTML, like Gecko) Version/4.0dp1 Safari/526.11.2
|
7
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/528.4+ (KHTML, like Gecko) Version/4.0dp1 Safari/526.11.2
|
8
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-gb) AppleWebKit/528.4+ (KHTML, like Gecko) Version/4.0dp1 Safari/526.11.2
|
@@ -0,0 +1,31 @@
|
|
1
|
+
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092816 Mobile Safari 1.1.3
|
2
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fi-fi) AppleWebKit/420+ (KHTML, like Gecko) Safari/419.3
|
3
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/312.8.1 (KHTML, like Gecko) Safari/312.6
|
4
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/419.2 (KHTML, like Gecko) Safari/419.3
|
5
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/418.9.1 (KHTML, like Gecko) Safari/419.3
|
6
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-ch) AppleWebKit/85 (KHTML, like Gecko) Safari/85
|
7
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-CH) AppleWebKit/419.2 (KHTML, like Gecko) Safari/419.3
|
8
|
+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; da-dk) AppleWebKit/522+ (KHTML, like Gecko) Safari/419.3
|
9
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; it-IT) AppleWebKit/521.25 (KHTML, like Gecko) Safari/521.24
|
10
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-us) AppleWebKit/419.2.1 (KHTML, like Gecko) Safari/419.3
|
11
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/522.11.1 (KHTML, like Gecko) Safari/419.3
|
12
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/521.32.1 (KHTML, like Gecko) Safari/521.32.1
|
13
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/528.16 (KHTML, like Gecko)
|
14
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; it-it) AppleWebKit/525.18 (KHTML, like Gecko)
|
15
|
+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.6) Gecko/2009011912 Safari/525.27.1
|
16
|
+
Mozilla/5.0 (iPod; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Mobile/5H11a
|
17
|
+
Mozilla/5.0 (iPod; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Mobile/5H11
|
18
|
+
Mozilla/5.0 (iPod; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko)
|
19
|
+
Mozilla/5.0 (iPod; U; CPU iPhone OS 2_2_1 like Mac OS X; de-de) AppleWebKit/525.18.1 (KHTML, like Gecko) Mobile/5H11a
|
20
|
+
Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; zh-tw) AppleWebKit/525.18.1 (KHTML, like Gecko) Mobile/5H11
|
21
|
+
Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; pt-br) AppleWebKit/525.18.1 (KHTML, like Gecko)
|
22
|
+
Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; fr-fr) AppleWebKit/525.18.1 (KHTML, like Gecko) Mobile/5H11
|
23
|
+
Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Mobile/5H11
|
24
|
+
Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko)
|
25
|
+
Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; de-de) AppleWebKit/525.18.1 (KHTML, like Gecko)
|
26
|
+
Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2 like Mac OS X; fr-fr) AppleWebKit/525.18.1 (KHTML, like Gecko) Mobile/5G77
|
27
|
+
Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2 like Mac OS X; de-de) AppleWebKit/525.18.1 (KHTML, like Gecko) Mobile/5G77
|
28
|
+
Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_1 like Mac OS X; fr-fr) AppleWebKit/525.18.1 (KHTML, like Gecko) Mobile/5F136
|
29
|
+
Mozilla/5.0 (iPhone Simulator; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Mobile/5H11
|
30
|
+
Mozilla/5.0 (iPhone Simulator; U; CPU iPhone OS 2_0 like Mac OS X; fr-fr) AppleWebKit/525.18.1 (KHTML, like Gecko)
|
31
|
+
Mobile Safari 1.1.3 (iPhone U; CPU like Mac OS X; en)
|
data/test/ss-test.rb
CHANGED
@@ -1,14 +1,154 @@
|
|
1
|
+
require "rubygems"
|
1
2
|
require "rack/test"
|
3
|
+
require "test/unit"
|
4
|
+
require "../lib/spy-vs-spy"
|
2
5
|
|
3
6
|
class SpyVsSpyTest < Test::Unit::TestCase
|
4
7
|
include Rack::Test::Methods
|
5
8
|
|
6
9
|
def app
|
7
|
-
SoldierOfCode::SpyVsSpy.new
|
10
|
+
SoldierOfCode::SpyVsSpy.new(self)
|
8
11
|
end
|
9
12
|
|
10
|
-
def
|
11
|
-
|
13
|
+
def test_safari_parse
|
14
|
+
|
15
|
+
basedir = File.dirname(__FILE__)+"/safari"
|
16
|
+
contains = Dir.new(basedir).entries
|
17
|
+
contains.delete(".")
|
18
|
+
contains.delete("..")
|
19
|
+
|
20
|
+
ua_count = 0
|
21
|
+
|
22
|
+
contains.each do |filename|
|
23
|
+
|
24
|
+
file = File.new("#{File.dirname(__FILE__)}/safari/#{filename}", "r")
|
25
|
+
|
26
|
+
# puts <<-r
|
27
|
+
#filename: #{filename}
|
28
|
+
# r
|
29
|
+
rx = Regexp.new("^safari(\-(([0-9])(.*)))\.txt")
|
30
|
+
rx.match(filename)
|
31
|
+
#puts "#{__FILE__}:#{__LINE__} #{__method__} #{$1} - #{$2} - #{$3} - #{$4} - #{$5} - #{$6} - #{$7}"
|
32
|
+
major_version = $3
|
33
|
+
# puts "#{__FILE__}:#{__LINE__} #{__method__} #{major_version}"
|
34
|
+
|
35
|
+
while (line = file.gets)
|
36
|
+
|
37
|
+
# puts "#{__FILE__}:#{__LINE__} #{__method__} #{line}"
|
38
|
+
r = SoldierOfCode::ParseUserAgent.new.parse(line)
|
39
|
+
# puts "#{__FILE__}:#{__LINE__} #{__method__} BROWSER: #{r.browser}"
|
40
|
+
assert r.browser == 'Safari'
|
41
|
+
|
42
|
+
if major_version && major_version.length > 0
|
43
|
+
# puts "#{__FILE__}:#{__LINE__} #{__method__} #{line}"
|
44
|
+
# puts "#{__FILE__}:#{__LINE__} #{__method__} #{r.browser_version_major} == #{major_version} ? #{r.browser_version_major == major_version}"
|
45
|
+
assert r.browser_version_major == major_version
|
46
|
+
end
|
47
|
+
|
48
|
+
ua_count+=1
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
puts "Number of safari agents tested: #{ua_count}"
|
56
|
+
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
def test_firefox_parse
|
61
|
+
|
62
|
+
basedir = File.dirname(__FILE__)+"/firefox"
|
63
|
+
contains = Dir.new(basedir).entries
|
64
|
+
contains.delete(".")
|
65
|
+
contains.delete("..")
|
66
|
+
|
67
|
+
ua_count = 0
|
68
|
+
|
69
|
+
contains.each do |filename|
|
70
|
+
|
71
|
+
file = File.new("#{File.dirname(__FILE__)}/firefox/#{filename}", "r")
|
72
|
+
|
73
|
+
# puts <<-r
|
74
|
+
#filename: #{filename}
|
75
|
+
# r
|
76
|
+
rx = Regexp.new("^firefox(\-(([0-9])(.*)))\.txt")
|
77
|
+
rx.match(filename)
|
78
|
+
#puts "#{__FILE__}:#{__LINE__} #{__method__} #{$1} - #{$2} - #{$3} - #{$4} - #{$5} - #{$6} - #{$7}"
|
79
|
+
major_version = $3
|
80
|
+
# puts "#{__FILE__}:#{__LINE__} #{__method__} #{major_version}"
|
81
|
+
|
82
|
+
while (line = file.gets)
|
83
|
+
|
84
|
+
# puts "#{__FILE__}:#{__LINE__} #{__method__} #{line}"
|
85
|
+
r = SoldierOfCode::ParseUserAgent.new.parse(line)
|
86
|
+
# puts "#{__FILE__}:#{__LINE__} #{__method__} BROWSER: #{r.browser}"
|
87
|
+
assert r.browser == 'Firefox'
|
88
|
+
|
89
|
+
if major_version && major_version.length > 0
|
90
|
+
# puts "#{__FILE__}:#{__LINE__} #{__method__} #{line}"
|
91
|
+
# puts "#{__FILE__}:#{__LINE__} #{__method__} [#{r.browser_version_major}] == [#{major_version}] ? #{r.browser_version_major == major_version}"
|
92
|
+
assert r.browser_version_major == major_version
|
93
|
+
end
|
94
|
+
|
95
|
+
ua_count+=1
|
96
|
+
|
97
|
+
end
|
98
|
+
|
99
|
+
|
100
|
+
end
|
101
|
+
|
102
|
+
puts "Number of firefox agents tested: #{ua_count}"
|
103
|
+
|
104
|
+
|
105
|
+
end
|
106
|
+
|
107
|
+
def test_msie_parse
|
108
|
+
|
109
|
+
basedir = File.dirname(__FILE__)+"/msie"
|
110
|
+
contains = Dir.new(basedir).entries
|
111
|
+
contains.delete(".")
|
112
|
+
contains.delete("..")
|
113
|
+
|
114
|
+
ua_count = 0
|
115
|
+
|
116
|
+
contains.each do |filename|
|
117
|
+
|
118
|
+
file = File.new("#{File.dirname(__FILE__)}/msie/#{filename}", "r")
|
119
|
+
#
|
120
|
+
# puts <<-r
|
121
|
+
#filename: #{filename}
|
122
|
+
# r
|
123
|
+
rx = Regexp.new("^msie(\-(([0-9])(.*)))\.txt")
|
124
|
+
rx.match(filename)
|
125
|
+
#puts "#{__FILE__}:#{__LINE__} #{__method__} #{$1} - #{$2} - #{$3} - #{$4} - #{$5} - #{$6} - #{$7}"
|
126
|
+
major_version = $3
|
127
|
+
# puts "#{__FILE__}:#{__LINE__} #{__method__} #{major_version}"
|
128
|
+
|
129
|
+
while (line = file.gets)
|
130
|
+
|
131
|
+
# puts "#{__FILE__}:#{__LINE__} #{__method__} #{line}"
|
132
|
+
r = SoldierOfCode::ParseUserAgent.new.parse(line)
|
133
|
+
# puts "#{__FILE__}:#{__LINE__} #{__method__} BROWSER: #{r.browser}"
|
134
|
+
assert r.browser == 'MSIE'
|
135
|
+
|
136
|
+
if major_version && major_version.length > 0
|
137
|
+
# puts "#{__FILE__}:#{__LINE__} #{__method__} #{line}"
|
138
|
+
# puts "#{__FILE__}:#{__LINE__} #{__method__} [#{r.browser_version_major}] == [#{major_version}] ? #{r.browser_version_major == major_version}"
|
139
|
+
assert r.browser_version_major == major_version
|
140
|
+
end
|
141
|
+
|
142
|
+
ua_count+=1
|
143
|
+
|
144
|
+
end
|
145
|
+
|
146
|
+
|
147
|
+
end
|
148
|
+
|
149
|
+
puts "Number of internet explorer agents tested: #{ua_count}"
|
150
|
+
|
151
|
+
|
12
152
|
end
|
13
153
|
|
14
154
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spy-vs-spy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kristan 'Krispy' Uccello
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-23 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -56,3 +56,63 @@ specification_version: 3
|
|
56
56
|
summary: UserAgent Detection Middleware for Rack.
|
57
57
|
test_files:
|
58
58
|
- test/ss-test.rb
|
59
|
+
- test/msie/msie-5.5.txt
|
60
|
+
- test/msie/msie-5.5b1.txt
|
61
|
+
- test/msie/msie-6,0.txt
|
62
|
+
- test/msie/msie-6.0.1.txt
|
63
|
+
- test/msie/msie-6.0.txt
|
64
|
+
- test/msie/msie-6.0b.txt
|
65
|
+
- test/msie/msie-6.1.txt
|
66
|
+
- test/msie/msie-7.0.txt
|
67
|
+
- test/msie/msie-7.0b.txt
|
68
|
+
- test/msie/msie-8.0.txt
|
69
|
+
- test/safari/safari-1.0.3.txt
|
70
|
+
- test/safari/safari-1.2.3.txt
|
71
|
+
- test/safari/safari-1.3.1.txt
|
72
|
+
- test/safari/safari-2.0.1.txt
|
73
|
+
- test/safari/safari-2.0.4.txt
|
74
|
+
- test/safari/safari-3.0.2.txt
|
75
|
+
- test/safari/safari-3.0.txt
|
76
|
+
- test/safari/safari-3.1.txt
|
77
|
+
- test/safari/safari-3.2.3.txt
|
78
|
+
- test/safari/safari-4.0.2.txt
|
79
|
+
- test/safari/safari-4.0dp1.txt
|
80
|
+
- test/safari/safari-1.0.txt
|
81
|
+
- test/safari/safari-1.2.4.txt
|
82
|
+
- test/safari/safari-1.3.2.txt
|
83
|
+
- test/safari/safari-2.0.2.txt
|
84
|
+
- test/safari/safari-2.0.txt
|
85
|
+
- test/safari/safari-3.0.3.txt
|
86
|
+
- test/safari/safari-3.1.1.txt
|
87
|
+
- test/safari/safari-3.2.1.txt
|
88
|
+
- test/safari/safari-3.2.txt
|
89
|
+
- test/safari/safari-4.0.3.txt
|
90
|
+
- test/safari/safari.txt
|
91
|
+
- test/safari/safari-1.2.2.txt
|
92
|
+
- test/safari/safari-1.2.txt
|
93
|
+
- test/safari/safari-1.3.txt
|
94
|
+
- test/safari/safari-2.0.3.txt
|
95
|
+
- test/safari/safari-3.0.1.txt
|
96
|
+
- test/safari/safari-3.0.4.txt
|
97
|
+
- test/safari/safari-3.1.2.txt
|
98
|
+
- test/safari/safari-3.2.2.txt
|
99
|
+
- test/safari/safari-4.0.1.txt
|
100
|
+
- test/safari/safari-4.0.txt
|
101
|
+
- test/firefox/firefox-3.1b2.txt
|
102
|
+
- test/firefox/firefox-3.1b3.txt
|
103
|
+
- test/firefox/firefox-3.5.1.txt
|
104
|
+
- test/firefox/firefox-3.5.2.txt
|
105
|
+
- test/firefox/firefox-3.5.3pre.txt
|
106
|
+
- test/firefox/firefox-3.5.5.txt
|
107
|
+
- test/firefox/firefox-3.5b4.txt
|
108
|
+
- test/firefox/firefox-3.6.txt
|
109
|
+
- test/firefox/firefox-3.6b1.txt
|
110
|
+
- test/firefox/firefox-3.1b2pre.txt
|
111
|
+
- test/firefox/firefox-3.1b3pre.txt
|
112
|
+
- test/firefox/firefox-3.5.12.txt
|
113
|
+
- test/firefox/firefox-3.5.3.txt
|
114
|
+
- test/firefox/firefox-3.5.4.txt
|
115
|
+
- test/firefox/firefox-3.5.txt
|
116
|
+
- test/firefox/firefox-3.5b4pre.txt
|
117
|
+
- test/firefox/firefox-3.6a1pre.txt
|
118
|
+
- test/firefox/firefox-3.8.txt
|