browser 2.5.3 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,68 +1,96 @@
1
- ADLXBOT: 'Mozilla/5.0 (compatible; adidxbot/2.0; +http://www.bing.com/bingbot.htm)'
2
- ANDERSPINK: 'Mozilla/5.0 (compatible; AndersPinkBot/1.0; +http://anderspink.com/bot.html)'
3
- APIS_GOOGLE: 'APIs-Google; (+https://developers.google.com/webmasters/APIs-Google.html)'
4
- APPLE_BOT: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/600.2.5 (KHTML, like Gecko) Version/8.0.2 Safari/600.2.5 (Applebot/0.1)'
5
- ASK: 'Mozilla/2.0 (compatible; Ask Jeeves/Teoma; +http://sp.ask.com/docs/about/tech_crawling.html)'
1
+ ADLXBOT: "Mozilla/5.0 (compatible; adidxbot/2.0; +http://www.bing.com/bingbot.htm)"
2
+ ADS_TXT_CRAWLER: "AdsTxtCrawler/1.0"
3
+ ANDERSPINK: "Mozilla/5.0 (compatible; AndersPinkBot/1.0; +http://anderspink.com/bot.html)"
4
+ APIS_GOOGLE: "APIs-Google; (+https://developers.google.com/webmasters/APIs-Google.html)"
5
+ APPLE_BOT: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/600.2.5 (KHTML, like Gecko) Version/8.0.2 Safari/600.2.5 (Applebot/0.1)"
6
+ ASK: "Mozilla/2.0 (compatible; Ask Jeeves/Teoma; +http://sp.ask.com/docs/about/tech_crawling.html)"
6
7
  AWS_ELB: ELB-HealthChecker/1.0
7
- BAIDU: 'Baiduspider+(+http://www.baidu.com/search/spider.htm)'
8
- BARKROWLER: 'Barkrowler/0.7 (+http://www.exensa.com/crawl)'
9
- BINGBOT: 'Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)'
10
- BINGPREVIEW: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like Gecko) BingPreview/1.0b'
11
- BUBING: 'BUbiNG (+http://law.di.unimi.it/BUbiNG.html)'
12
- BUZZBOT: 'Buzzbot/1.0 (Buzzbot; http://www.buzzstream.com; buzzbot@buzzstream.com)'
13
- CIPACRAWLER: 'CipaCrawler/3.0 (info@domaincrawler.com; http://www.domaincrawler.com/www.example.com)'
8
+ BAIDU: "Baiduspider+(+http://www.baidu.com/search/spider.htm)"
9
+ BARKROWLER: "Barkrowler/0.7 (+http://www.exensa.com/crawl)"
10
+ BINGBOT: "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
11
+ BINGPREVIEW: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like Gecko) BingPreview/1.0b"
12
+ BUBING: "BUbiNG (+http://law.di.unimi.it/BUbiNG.html)"
13
+ BUZZBOT: "Buzzbot/1.0 (Buzzbot; http://www.buzzstream.com; buzzbot@buzzstream.com)"
14
+ CIPACRAWLER: "CipaCrawler/3.0 (info@domaincrawler.com; http://www.domaincrawler.com/www.example.com)"
14
15
  CLOUDFLARE: "Mozilla/5.0 (compatible; CloudFlare-AlwaysOnline/1.0; +http://www.cloudflare.com/always-online) AppleWebKit/534.34"
15
- COMMONCRAWL: 'CCBot/2.0 (http://commoncrawl.org/faq/)'
16
- COMODO_SSL_CHECKER: 'COMODO SSL Checker'
17
- COPYPANTS: 'Mozilla/5.0 (compatible; BotPants/1.0; Linux; +info@copypants.com) KHTML/3.5.5 (like Gecko)'
18
- DAUMOA: Mozilla/5.0 (compatible; MSIE or Firefox mutant; not on Windows server;) Daumoa 4.0
19
- DOMAINAREANIMATOR: 'Domain Re-Animator Bot (http://domainreanimator.com) - support@domainreanimator.com'
20
- DOT_BOT: 'Mozilla/5.0 (compatible; DotBot/1.1; http://www.opensiteexplorer.org/dotbot, help@moz.com)'
21
- DUCKDUCKGO: 'DuckDuckBot/1.0; (+http://duckduckgo.com/duckduckbot.html)'
22
- FACEBOOK_BOT: 'facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)'
23
- GOOGLE_BOT: 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'
24
- GOOGLE_PAGE_SPEED_INSIGHTS: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko; Google Page Speed Insights) Chrome/22.0.1229 Safari/537.4'
16
+ COMMONCRAWL: "CCBot/2.0 (http://commoncrawl.org/faq/)"
17
+ COMODO_SSL_CHECKER: "COMODO SSL Checker"
18
+ COPYPANTS: "Mozilla/5.0 (compatible; BotPants/1.0; Linux; +info@copypants.com) KHTML/3.5.5 (like Gecko)"
19
+ DATAFEEDWATCH: "Datafeedwatch/2.1.x"
20
+ DATANYZE: "Mozilla/5.0 (X11; Datanyze; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36"
21
+ DAUMOA: "Mozilla/5.0 (compatible; MSIE or Firefox mutant; not on Windows server;) Daumoa 4.0"
22
+ DOMAINAREANIMATOR: "Domain Re-Animator Bot (http://domainreanimator.com) - support@domainreanimator.com"
23
+ DOT_BOT: "Mozilla/5.0 (compatible; DotBot/1.1; http://www.opensiteexplorer.org/dotbot, help@moz.com)"
24
+ DUCKDUCKGO: "DuckDuckBot/1.0; (+http://duckduckgo.com/duckduckbot.html)"
25
+ EZPUBLISH: "eZ Publish Link Validator"
26
+ FACEBOOK_BOT: "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"
27
+ FYREBOT: "Fyrebot/1.0"
28
+ GARLIK: "GarlikCrawler/1.2 (http://garlik.com/, crawler@garlik.com)"
29
+ GERMCRAWLER: "GermCrawler"
30
+ GO_1.1_PACKAGE_HTTP: "Go 1.1 package http"
31
+ GOOGLE_BOT: "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
32
+ GOOGLE_PAGE_SPEED_INSIGHTS: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko; Google Page Speed Insights) Chrome/22.0.1229 Safari/537.4"
33
+ GOOGLE_SHOPPING: "google-xrawler"
25
34
  GOOGLE_SITE_VERIFICATION: Mozilla/5.0 (compatible; Google-Site-Verification/1.0)
26
- GOOGLE_STACKDRIVER_UPTIME_CHECKS: 'GoogleStackdriverMonitoring-UptimeChecks'
27
- GOOGLE_STRUCTURED_DATA_TESTING_TOOL2: 'Mozilla/5.0 (compatible; Google-Structured-Data-Testing-Tool +http://developers.google.com/structured-data/testing-tool/)'
28
- GOOGLE_STRUCTURED_DATA_TESTING_TOOL: 'Mozilla/5.0 (compatible; X11; Linux x86_64; Google-StructuredDataTestingTool; +http://www.google.com/webmasters/tools/richsnippets)'
29
- GRAPESHOT: 'Mozilla/5.0 (compatible; GrapeshotCrawler/2.0; +http://www.grapeshot.co.uk/crawler.php)'
30
- JOBSEEKER: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) JobBot/5.0 (compatible; +http://www.jobseeker.com.au/bot.html) Safari/538.1'
31
- LINKDEXBOT: 'Mozilla/5.0 (compatible; linkdexbot/2.0; +http://www.linkdex.com/bots/)'
32
- LOAD_TIME_BOT: 'Mozilla/5.0 (compatible; LoadTimeBot/0.9; +http://www.loadtime.net/bot.html)'
33
- LTX71: 'ltx71 - (http://ltx71.com/)'
34
- MAIL_RU: 'Mozilla/5.0 (compatible; Linux x86_64; Mail.RU_Bot/2.0; +http://go.mail.ru/help/robots)'
35
- MAPPYDATA: 'Mozilla/5.0 (compatible; Mappy/1.0; +http://mappydata.net/bot/)'
36
- MEGAINDEX_RU: 'Mozilla/5.0 (compatible; MegaIndex.ru/2.0; +https://www.megaindex.ru/?tab=linkAnalyze)'
37
- MRCHROME: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.107 Amigo/45.0.2454.107 MRCHROME SOC Safari/537.36'
38
- MSNBOT: 'msnbot/2.0b (+http://search.msn.com/msnbot.htm)'
39
- MSNBOT_MEDIA: 'msnbot-media/1.1 (+http://search.msn.com/msnbot.htm)'
35
+ GOOGLE_STACKDRIVER_UPTIME_CHECKS: "GoogleStackdriverMonitoring-UptimeChecks"
36
+ GOOGLE_STRUCTURED_DATA_TESTING_TOOL2: "Mozilla/5.0 (compatible; Google-Structured-Data-Testing-Tool +http://developers.google.com/structured-data/testing-tool/)"
37
+ GOOGLE_STRUCTURED_DATA_TESTING_TOOL: "Mozilla/5.0 (compatible; X11; Linux x86_64; Google-StructuredDataTestingTool; +http://www.google.com/webmasters/tools/richsnippets)"
38
+ GRAPESHOT: "Mozilla/5.0 (compatible; GrapeshotCrawler/2.0; +http://www.grapeshot.co.uk/crawler.php)"
39
+ HTTRACK: "Mozilla/4.5 (compatible; HTTrack 3.0x; Windows 98)"
40
+ IMPLISENSEBOT: "ImplisenseBot 1.0"
41
+ JOBSEEKER: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) JobBot/5.0 (compatible; +http://www.jobseeker.com.au/bot.html) Safari/538.1"
42
+ JOOBLE: "Mozilla/5.0 (compatible; Jooblebot/2.0; Windows NT 6.1; WOW64; +http://jooble.org/jooble-bot) Mobile"
43
+ LINKDEXBOT: "Mozilla/5.0 (compatible; linkdexbot/2.0; +http://www.linkdex.com/bots/)"
44
+ LINKEDIN: "LinkedInBot/1.0 (compatible; Mozilla/5.0; Jakarta Commons-HttpClient/3.1 +http://www.linkedin.com)"
45
+ LOAD_TIME_BOT: "Mozilla/5.0 (compatible; LoadTimeBot/0.9; +http://www.loadtime.net/bot.html)"
46
+ LTX71: "ltx71 - (http://ltx71.com/)"
47
+ MAIL_RU: "Mozilla/5.0 (compatible; Linux x86_64; Mail.RU_Bot/2.0; +http://go.mail.ru/help/robots)"
48
+ MAPPYDATA: "Mozilla/5.0 (compatible; Mappy/1.0; +http://mappydata.net/bot/)"
49
+ MASTODONBOT: "http.rb/3.0.0 (Mastodon/2.2.0; +https://mstdn.io/)"
50
+ MAUIBOT: "MauiBot (crawler.feedback+wc@gmail.com)"
51
+ MEGAINDEX_RU: "Mozilla/5.0 (compatible; MegaIndex.ru/2.0; +https://www.megaindex.ru/?tab=linkAnalyze)"
52
+ MRCHROME: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.107 Amigo/45.0.2454.107 MRCHROME SOC Safari/537.36"
53
+ MSNBOT: "msnbot/2.0b (+http://search.msn.com/msnbot.htm)"
54
+ MSNBOT_MEDIA: "msnbot-media/1.1 (+http://search.msn.com/msnbot.htm)"
40
55
  NETCRAFT2: Netcraft SSL Server Survey - contact info@netcraft.com
41
56
  NETCRAFT: Mozilla/5.0 (compatible; NetcraftSurveyAgent/1.0; +info@netcraft.com)
42
57
  NEWRELICPINGER: NewRelicPinger/1.0 (12345)
43
58
  PAESSLER: Mozilla/5.0 (compatible; PRTG Network Monitor (www.paessler.com); Windows)
44
- PRIVACYAWAREBOT: 'Mozilla/5.0 (compatible; PrivacyAwareBot/1.1; +http://www.privacyaware.org)'
45
- PROXIMIC: 'Mozilla/5.0 (compatible; proximic; +http://www.proximic.com/info/spider.php)'
46
- QUERYSEEKER: 'QuerySeekerSpider ( http://queryseeker.com/bot.html )'
47
- SCRAPY: 'Scrapy/0.18.4 (+http://scrapy.org)'
48
- SEMANTICBOT: 'Mozilla/5.0 (compatible; Semanticbot/1.0; +http://sempi.tech/bot.html)'
49
- SEO_AUDIT: 'Mozilla/5.0 (compatible; seo-audit-check-bot/1.0)'
50
- SEODIVER: 'Mozilla/5.0 (compatible; SEOdiver/1.0; +http://www.seodiver.com/bot)'
51
- SEOKICKS: 'Mozilla/5.0 (compatible; SEOkicks-Robot; +http://www.seokicks.de/robot.html)'
52
- SISTRIX: 'Mozilla/5.0 (compatible; SISTRIX Crawler; http://crawler.sistrix.net/)'
59
+ PR-CY_RU: Mozilla/5.0 (compatible; PR-CY.RU; + https://a.pr-cy.ru)
60
+ PRIVACYAWAREBOT: "Mozilla/5.0 (compatible; PrivacyAwareBot/1.1; +http://www.privacyaware.org)"
61
+ PROXIMIC: "Mozilla/5.0 (compatible; proximic; +http://www.proximic.com/info/spider.php)"
62
+ PUINCRAWLER: "Pu_iN Crawler (+http://semanticjuice.com/)"
63
+ QUERYSEEKER: "QuerySeekerSpider ( http://queryseeker.com/bot.html )"
64
+ QUICKCRAWLER: "Quick-Crawler (+https://www.scrapinghub.com/)"
65
+ SCRAPY: "Scrapy/0.18.4 (+http://scrapy.org)"
66
+ SEMANTICBOT: "Mozilla/5.0 (compatible; Semanticbot/1.0; +http://sempi.tech/bot.html)"
67
+ SEO_AUDIT: "Mozilla/5.0 (compatible; seo-audit-check-bot/1.0)"
68
+ SEODIVER: "Mozilla/5.0 (compatible; SEOdiver/1.0; +http://www.seodiver.com/bot)"
69
+ SEOKICKS: "Mozilla/5.0 (compatible; SEOkicks-Robot; +http://www.seokicks.de/robot.html)"
70
+ SISTRIX: "Mozilla/5.0 (compatible; SISTRIX Crawler; http://crawler.sistrix.net/)"
71
+ SITECHECK: 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.0) SiteCheck-sitecrawl by Siteimprove.com'
72
+ SNAPCHAT: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Snapchat/10.37.1.1 (iPhone9,4; iOS 11.4; gzip)"
53
73
  SOCIALRANKIO: SocialRankIOBot; http://socialrank.io/about
54
- SQUIDER: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36 Squider/0.01'
55
- STRIPE: 'Stripe/1.0 (+https://stripe.com/docs/webhooks)'
56
- SWIFTYPE: 'Swiftbot'
57
- TEERAID: 'Mozilla/5.0 (compatible; TeeRaidBot; +https://teeraid.com/bot/)'
58
- TINEYE: 'TinEye-bot/0.51 (see http://www.tineye.com/crawler.html)'
59
- TRAACKR: 'Traackr.com'
60
- WATCHSUMO: 'Mozilla/5.0 (compatible) WatchSumo/1.0.0 (http://www.watchsumo.com)'
61
- WEBCEO: 'Mozilla/5.0 (compatible; online-webceo-bot/1.0; +http://online.webceo.com)'
62
- WHATSAPP: 'WhatsApp/2.17.38 Mozilla/5.0 (Linux; U; Android 6.1; en-us; DV Build/Donut) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36'
63
- WORIOBOT: 'Mozilla/5.0 (compatible; woriobot +http://worio.com)'
64
- YAHOO_AD_MONITORING: 'Mozilla/5.0 (compatible; Yahoo Ad monitoring; https://help.yahoo.com/kb/yahoo-ad-monitoring-SLN24857.html)'
65
- YAHOO_SLURP: 'Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)'
66
- YANDEX_DIRECT: 'Mozilla/5.0 (compatible; YandexDirect/3.0; +http://yandex.com/bots)'
67
- YANDEX_METRIKA: 'Mozilla/5.0 (compatible; YandexMetrika/3.0; +http://yandex.com/bots)'
68
- YANGA: 'Yanga WorldSearch Bot v1.1/beta (http://www.yanga.co.uk/)'
74
+ SQUIDER: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36 Squider/0.01"
75
+ STRIPE: "Stripe/1.0 (+https://stripe.com/docs/webhooks)"
76
+ SWIFTYPE: "Swiftbot"
77
+ TANGIBLEEBOT: "TangibleeBot"
78
+ TEERAID: "Mozilla/5.0 (compatible; TeeRaidBot; +https://teeraid.com/bot/)"
79
+ TINEYE: "TinEye-bot/0.51 (see http://www.tineye.com/crawler.html)"
80
+ TRAACKR: "Traackr.com"
81
+ TRENDSMAP: "Mozilla/5.0 (compatible; TrendsmapResolver/0.1)"
82
+ UPDOWN_MONITOR: "updown.io daemon 2.2"
83
+ WATCHSUMO: "Mozilla/5.0 (compatible) WatchSumo/1.0.0 (http://www.watchsumo.com)"
84
+ WEBCEO: "Mozilla/5.0 (compatible; online-webceo-bot/1.0; +http://online.webceo.com)"
85
+ WHATSAPP: "WhatsApp/2.17.38 Mozilla/5.0 (Linux; U; Android 6.1; en-us; DV Build/Donut) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36"
86
+ WIKIDO: "WikiDo/1.1 (http://wikido.com; crawler@wikido.com)"
87
+ WOORANK: "Mozilla/5.0 (compatible; woorankreview/2.0; +https://www.woorank.com/)"
88
+ WORIOBOT: "Mozilla/5.0 (compatible; woriobot +http://worio.com)"
89
+ YAHOO_AD_MONITORING: "Mozilla/5.0 (compatible; Yahoo Ad monitoring; https://help.yahoo.com/kb/yahoo-ad-monitoring-SLN24857.html)"
90
+ YAHOO_SLURP: "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)"
91
+ YANDEX_DIRECT: "Mozilla/5.0 (compatible; YandexDirect/3.0; +http://yandex.com/bots)"
92
+ YANDEX_METRIKA: "Mozilla/5.0 (compatible; YandexMetrika/3.0; +http://yandex.com/bots)"
93
+ YANGA: "Yanga WorldSearch Bot v1.1/beta (http://www.yanga.co.uk/)"
94
+ ZABBIX: "Zabbix"
95
+ ZOOMBOT: "ZoomBot (Linkbot 1.0 http://suite.seozoom.it/bot.html)"
96
+ ZOOMINFOBOT: "ZoominfoBot (zoominfobot at zoominfo dot com)"
@@ -1,6 +1,6 @@
1
- ASK: 'Mozilla/2.0 (compatible; Ask Jeeves/Teoma; +http://sp.ask.com/docs/about/tech_crawling.html)'
2
- BAIDU: 'Baiduspider+(+http://www.baidu.com/search/spider.htm)'
3
- BINGBOT: 'Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)'
4
- DUCKDUCKGO: 'DuckDuckBot/1.0; (+http://duckduckgo.com/duckduckbot.html)'
5
- GOOGLE_BOT: 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'
6
- YAHOO_SLURP: 'Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)'
1
+ ASK: "Mozilla/2.0 (compatible; Ask Jeeves/Teoma; +http://sp.ask.com/docs/about/tech_crawling.html)"
2
+ BAIDU: "Baiduspider+(+http://www.baidu.com/search/spider.htm)"
3
+ BINGBOT: "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
4
+ DUCKDUCKGO: "DuckDuckBot/1.0; (+http://duckduckgo.com/duckduckbot.html)"
5
+ GOOGLE_BOT: "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
6
+ YAHOO_SLURP: "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)"
@@ -131,6 +131,16 @@ class AcceptLanguageTest < Minitest::Test
131
131
  assert_language result[4], code: "fr", region: nil, quality: 0.2
132
132
  end
133
133
 
134
+ test "sorts the same quality in a descending priority" do
135
+ accept_language = "fr-CA,fr;q=0.2,en-US;q=0.2,en"
136
+ result = Browser::AcceptLanguage.parse(accept_language)
137
+
138
+ assert_language result[0], code: "fr", region: "CA", quality: 1.0
139
+ assert_language result[1], code: "en", region: nil, quality: 1.0
140
+ assert_language result[2], code: "fr", region: nil, quality: 0.2
141
+ assert_language result[3], code: "en", region: "US", quality: 0.2
142
+ end
143
+
134
144
  test "rejects quality values equals to zero (#241)" do
135
145
  result = Browser::AcceptLanguage.parse("de-DE,ru;q=0.9,de;q=0.8,en;q=0.")
136
146
 
@@ -107,4 +107,11 @@ class BotsTest < Minitest::Test
107
107
 
108
108
  Browser::Bot.bots.delete("faraday")
109
109
  end
110
+
111
+ test "detects recognized bots using common libs" do
112
+ browser = Browser.new(Browser.bot_user_agents["LINKEDIN"])
113
+
114
+ assert browser.bot?
115
+ assert_equal "LinkedIn", browser.bot.name
116
+ end
110
117
  end
@@ -157,6 +157,16 @@ class DeviceTest < Minitest::Test
157
157
  assert_equal "Nintendo WiiU", device.name
158
158
  end
159
159
 
160
+ test "detect switch" do
161
+ device = Browser::Device.new(Browser["NINTENDO_SWITCH"])
162
+ assert device.nintendo_switch?
163
+ assert device.switch?
164
+ assert device.console?
165
+ assert device.nintendo?
166
+ assert_equal :switch, device.id
167
+ assert_equal "Nintendo Switch", device.name
168
+ end
169
+
160
170
  test "detect blackberry playbook" do
161
171
  device = Browser::Device.new(Browser["PLAYBOOK"])
162
172
  assert device.playbook?
@@ -13,6 +13,26 @@ class FacebookTest < Minitest::Test
13
13
  assert_equal "135", browser.version
14
14
  end
15
15
 
16
+ test "detects new facebook on iOS" do
17
+ browser = Browser.new(Browser["FACEBOOK_IOS"])
18
+
19
+ assert_equal "Facebook", browser.name
20
+ assert browser.facebook?
21
+ assert :facebook, browser.id
22
+ assert_equal "AppleWebKit/605.1.15", browser.full_version
23
+ assert_equal "AppleWebKit/605", browser.version
24
+ end
25
+
26
+ test "detects new facebook on Android" do
27
+ browser = Browser.new(Browser["FACEBOOK_ANDROID"])
28
+
29
+ assert_equal "Facebook", browser.name
30
+ assert browser.facebook?
31
+ assert :facebook, browser.id
32
+ assert_equal "214.0.0.43.83", browser.full_version
33
+ assert_equal "214", browser.version
34
+ end
35
+
16
36
  test "detects version by range" do
17
37
  browser = Browser.new(Browser["FACEBOOK"])
18
38
  assert browser.facebook?(%w[>=135])
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "test_helper"
4
+
5
+ class InstagramTest < Minitest::Test
6
+ test "detects instagram" do
7
+ browser = Browser.new(Browser["INSTAGRAM"])
8
+
9
+ assert_equal "Instagram", browser.name
10
+ assert browser.instagram?
11
+ assert :instagram, browser.id
12
+ assert_equal "41.0.0.14.90", browser.full_version
13
+ assert_equal "41", browser.version
14
+ end
15
+
16
+ test "detects version by range" do
17
+ browser = Browser.new(Browser["INSTAGRAM"])
18
+ assert browser.instagram?(%w[>=41])
19
+ end
20
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: browser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.3
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-27 00:00:00.000000000 Z
11
+ date: 2019-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -123,7 +123,7 @@ dependencies:
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
- name: codeclimate-test-reporter
126
+ name: simplecov
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ">="
@@ -166,12 +166,10 @@ files:
166
166
  - Gemfile
167
167
  - README.md
168
168
  - Rakefile
169
- - bin/rake
170
169
  - bot_exceptions.yml
171
170
  - bots.yml
172
171
  - browser.gemspec
173
172
  - config.ru
174
- - gemfiles/rails4.gemfile
175
173
  - gemfiles/rails5.gemfile
176
174
  - languages.yml
177
175
  - lib/browser.rb
@@ -198,6 +196,7 @@ files:
198
196
  - lib/browser/device/psp.rb
199
197
  - lib/browser/device/psvita.rb
200
198
  - lib/browser/device/surface.rb
199
+ - lib/browser/device/switch.rb
201
200
  - lib/browser/device/tv.rb
202
201
  - lib/browser/device/unknown.rb
203
202
  - lib/browser/device/wii.rb
@@ -209,6 +208,7 @@ files:
209
208
  - lib/browser/facebook.rb
210
209
  - lib/browser/firefox.rb
211
210
  - lib/browser/generic.rb
211
+ - lib/browser/instagram.rb
212
212
  - lib/browser/internet_explorer.rb
213
213
  - lib/browser/meta.rb
214
214
  - lib/browser/meta/base.rb
@@ -279,6 +279,7 @@ files:
279
279
  - test/unit/facebook_test.rb
280
280
  - test/unit/firefox_test.rb
281
281
  - test/unit/generic_test.rb
282
+ - test/unit/instagram_test.rb
282
283
  - test/unit/internet_explorer_test.rb
283
284
  - test/unit/ios_app_test.rb
284
285
  - test/unit/ios_test.rb
@@ -315,8 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
315
316
  - !ruby/object:Gem::Version
316
317
  version: '0'
317
318
  requirements: []
318
- rubyforge_project:
319
- rubygems_version: 2.7.3
319
+ rubygems_version: 3.0.3
320
320
  signing_key:
321
321
  specification_version: 4
322
322
  summary: Do some browser detection with Ruby.
@@ -345,6 +345,7 @@ test_files:
345
345
  - test/unit/facebook_test.rb
346
346
  - test/unit/firefox_test.rb
347
347
  - test/unit/generic_test.rb
348
+ - test/unit/instagram_test.rb
348
349
  - test/unit/internet_explorer_test.rb
349
350
  - test/unit/ios_app_test.rb
350
351
  - test/unit/ios_test.rb
@@ -1,4 +0,0 @@
1
- source "https://rubygems.org"
2
- gemspec path: ".."
3
-
4
- gem "rails", '~> 4.0'