browser_sniffer 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/browser_sniffer/patterns.rb +2 -2
- data/lib/browser_sniffer/version.rb +1 -1
- data/shipit.rubygems.yml +1 -0
- data/test/browser_sniffer_test.rb +28 -2
- data.tar.gz.sig +2 -1
- metadata +4 -4
- metadata.gz.sig +0 -0
- data/shipit.yml +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f93aafcb13b51eb02e24a774f70ba70324a00be
|
4
|
+
data.tar.gz: de5b77af69dc86126213fae36538ec97822cde9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97de90a5846f3693c6cb2944619a001fcf403ec5e88f8cfb1e5bf7ce99d4180deab372afd74fa2eb69858813f76d1967cd58b4f692487937cb1c78032a0739a3
|
7
|
+
data.tar.gz: 4d5a00d50aa403c810a16d1e6c6b726c0bb6eb5d1112b59e63307d58335656117a9b9bbe950aeb2723445a8605e5b36d92b72f5804441d91e8dda781b867986e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -81,7 +81,7 @@ class BrowserSniffer
|
|
81
81
|
], [[:name, 'Chrome'], :version, :major, [:type, :chrome]], [
|
82
82
|
/version\/((\d+)?[\w\.]+).+?mobile\/\w+\s(safari)/i # Mobile Safari
|
83
83
|
], [:version, :major, [:name, 'Mobile Safari'], [:type, :safari]], [
|
84
|
-
/Mozilla\/5.0 \(iPhone;(.*)AppleWebKit\/((\d+)?[\w\.]+).+?(mobile)\/\w?/i # ios webview
|
84
|
+
/Mozilla\/5.0 \((?:iPhone|iPod(?: Touch)?);(.*)AppleWebKit\/((\d+)?[\w\.]+).+?(mobile)\/\w?/i # ios webview
|
85
85
|
], [:version, :major, [:name, 'Mobile Safari'], [:type, :safari]], [
|
86
86
|
/version\/((\d+)?[\w\.]+).+?(mobile\s?safari|safari)/i # Safari & Safari Mobile
|
87
87
|
], [:version, :major, :name, [:type, :safari]], [
|
@@ -119,7 +119,7 @@ class BrowserSniffer
|
|
119
119
|
/\s(nook)[\w\s]+build\/(\w+)/i, # Nook
|
120
120
|
/(dell)\s(strea[kpr\s\d]*[\dko])/i # Dell Streak
|
121
121
|
], [:vendor, :model, [:type, :tablet]], [
|
122
|
-
/\((
|
122
|
+
/\((?:iphone|ipod(?: touch)?);.+(apple)/i # iPod Touch/iPhone
|
123
123
|
], [:model, :vendor, [:name, :iphone], [:type, :handheld]], [
|
124
124
|
/(blackberry)[\s-]?(\w+)/i, # BlackBerry
|
125
125
|
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|huawei|meizu|motorola)[\s_-]?([\w-]+)*/i, # BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Huawei/Meizu/Motorola
|
data/shipit.rubygems.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# using the default shipit config
|
@@ -67,6 +67,32 @@ class BrowserSnifferTest < MiniTest::Unit::TestCase
|
|
67
67
|
:browser => :safari,
|
68
68
|
:major_browser_version => 3
|
69
69
|
},
|
70
|
+
:ipod_touch_ios4 => {
|
71
|
+
:user_agent => "Mozilla/5.0 (iPod; U; CPU iPhone OS 4_3_3 like Mac OS X; ja-jp) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5",
|
72
|
+
:form_factor => :handheld,
|
73
|
+
:ios? => true,
|
74
|
+
:android? => false,
|
75
|
+
:desktop? => false,
|
76
|
+
:engine => :webkit,
|
77
|
+
:major_engine_version => 533,
|
78
|
+
:os => :ios,
|
79
|
+
:os_version => '4.3.3',
|
80
|
+
:browser => :safari,
|
81
|
+
:major_browser_version => 5
|
82
|
+
},
|
83
|
+
:ipod_touch_ios7 => {
|
84
|
+
:user_agent => "Mozilla/5.0 (iPod touch; CPU iPhone OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B554a Safari/9537.53",
|
85
|
+
:form_factor => :handheld,
|
86
|
+
:ios? => true,
|
87
|
+
:android? => false,
|
88
|
+
:desktop? => false,
|
89
|
+
:engine => :webkit,
|
90
|
+
:major_engine_version => 537,
|
91
|
+
:os => :ios,
|
92
|
+
:os_version => '7.0.4',
|
93
|
+
:browser => :safari,
|
94
|
+
:major_browser_version => 7
|
95
|
+
},
|
70
96
|
:nexus_one => {
|
71
97
|
:user_agent => "Mozilla/5.0 (Linux; U; Android 2.2; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1",
|
72
98
|
:form_factor => :handheld,
|
@@ -351,8 +377,8 @@ class BrowserSnifferTest < MiniTest::Unit::TestCase
|
|
351
377
|
:major_engine_version => 533,
|
352
378
|
:os => :ios,
|
353
379
|
:os_version => '4.3.3',
|
354
|
-
:browser =>
|
355
|
-
:browser_name => '
|
380
|
+
:browser => :safari,
|
381
|
+
:browser_name => 'Mobile Safari',
|
356
382
|
:major_browser_version => 533
|
357
383
|
},
|
358
384
|
:ipod_os_4_3_3 => {
|
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
W���x��ϡ��1�C�$f��6v�稈�"Io@��^=������Y�И-+�p�-��t-����$qêdĤ�)��a�C��E�����/r0{ ^�W��S+���pz�U�0�fD'4�<
|
2
|
+
�.(�cW3��ӷ��Л~qۖ/�z��/p;����ԓ�]63��)��**(���w��Ch_��"jk������+b�49���]k�d��r��KD�:�fؘ������.����m=�Ze�p
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: browser_sniffer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
fl3hbtVFTqbOlwL9vy1fudXcolIE/ZTcxQ+er07ZFZdKCXayR9PPs64heamfn0fp
|
31
31
|
TConQSX2BnZdhIEYW+cKzEC/bLc=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2014-05
|
33
|
+
date: 2014-08-05 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: bundler
|
@@ -78,7 +78,7 @@ files:
|
|
78
78
|
- lib/browser_sniffer.rb
|
79
79
|
- lib/browser_sniffer/patterns.rb
|
80
80
|
- lib/browser_sniffer/version.rb
|
81
|
-
- shipit.yml
|
81
|
+
- shipit.rubygems.yml
|
82
82
|
- test/browser_sniffer_test.rb
|
83
83
|
- test/test_helper.rb
|
84
84
|
homepage: https://github.com/Shopify/browser_sniffer
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version: '0'
|
103
103
|
requirements: []
|
104
104
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.2.
|
105
|
+
rubygems_version: 2.2.2
|
106
106
|
signing_key:
|
107
107
|
specification_version: 4
|
108
108
|
summary: Parses user agent strings and boils it all down to a few simple classifications.
|
metadata.gz.sig
CHANGED
Binary file
|
data/shipit.yml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
dependencies:
|
2
|
-
override:
|
3
|
-
- bundle install --path=./data/bundler
|
4
|
-
|
5
|
-
deploy:
|
6
|
-
override:
|
7
|
-
- |
|
8
|
-
BUILD=`bundle exec rake build`
|
9
|
-
if [ $? != 0 ]; then
|
10
|
-
echo $BUILD;
|
11
|
-
exit 1;
|
12
|
-
fi
|
13
|
-
PKG=`echo $BUILD | cut -d" " -f5 | sed -e s/\.$//`;
|
14
|
-
VERSION=`bundle exec rake build | cut -d" " -f2`;
|
15
|
-
gem push $PKG
|