browserino 2.12.0 → 2.13.0
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +27 -7
- data/bin/browserino +1 -1
- data/lib/browserino/core/patterns.rb +54 -89
- data/lib/browserino/core/supported.rb +1 -1
- data/lib/browserino/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cd18f87571cf993db2a622396ebbbcf1dd5285f
|
4
|
+
data.tar.gz: c075f89285dc8b08654ddd29d468b2932d57e73f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cfa196f9d7225e8876513b8857cedda14880b3693751fd9d46c887e47ed8ebd7787a65e44b973c3e4fa4dac08610c4d0d5a921c29b4512011a7ee9f7a948aa8
|
7
|
+
data.tar.gz: aa6bb6cfbb1e7f3cda0dde31497ba723c55ab98fa31d4fe613b51406013c67bd6ea0aa098298287f6eb5d7d5515c002f5525df6b5df7e40c0415b2270bed13b6
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
## CHANGELOG
|
2
2
|
_dates are in dd-mm-yyyy format_
|
3
3
|
|
4
|
+
#### 19-10-2016 VERSION 2.10.1.1
|
5
|
+
|
6
|
+
- Test on ruby 2.3.1
|
7
|
+
- Fix missing questionmarks on method names in the README.
|
8
|
+
- Change gem homepage to io domain
|
9
|
+
|
4
10
|
#### 25-08-2016 VERSION 2.10.1
|
5
11
|
|
6
12
|
- Replaced `require` with `require_relative` where possible
|
data/README.md
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
# Browserino
|
2
2
|
|
3
3
|
A UserAgent sniffer with Rails >= 3.2.0 integration.
|
4
|
-
The sniffer can currently identify 22 bots (of which 6 social media and 5 search engines),
|
4
|
+
The sniffer can currently identify 22 bots (of which 6 social media and 5 search engines), 17 browsers, 11 operating systems, 6 programming language UA's and 4 consoles.
|
5
5
|
|
6
6
|
# DEPRECATION WARNING: Ruby < 2
|
7
7
|
|
8
8
|
Browserino will be dropping support for Ruby versions less than 2 with the release of version `3`
|
9
|
+
The planned release date for version `3` is on new years day (Jan 01, 2017).
|
10
|
+
|
11
|
+
This breaking update will also remove the deprecated (and no longer used) second value that can be passed to `Browserino.new` which allowed you to return a custom value instead of the default `nil` if a property isn't set.
|
12
|
+
**Rails** users can simply upgrade their version as long as they use Ruby `>= 2` or above since the custom return value was never used during initialization.
|
9
13
|
|
10
14
|
## Status
|
11
15
|
|
@@ -26,6 +30,17 @@ Useragent references:
|
|
26
30
|
_dates are in dd-mm-yyyy format_
|
27
31
|
_older changes can be found in the [CHANGELOG.md](CHANGELOG.md)_
|
28
32
|
|
33
|
+
#### 09-12-2016 VERSION 2.13.0
|
34
|
+
|
35
|
+
- Added support for Colibri
|
36
|
+
- Added `colibri?` method
|
37
|
+
- Added support for `:colibri` (`Symbol` and `String`) in methods
|
38
|
+
- Added `agent.internet_explorer?` method as alias for `agent.ie?`
|
39
|
+
- Added support for `:internet_explorer` (`Symbol` and `String`) in methods
|
40
|
+
- Test aliasses if they exist for a certain browser (used to be tested by hand)
|
41
|
+
- Test aliasses if they exist for a certain user (used to be tested by hand)
|
42
|
+
- Add a roadmap
|
43
|
+
|
29
44
|
#### 14-11-2016 VERSION 2.12.0
|
30
45
|
|
31
46
|
- Added support for SamsungBrowser
|
@@ -50,12 +65,6 @@ _older changes can be found in the [CHANGELOG.md](CHANGELOG.md)_
|
|
50
65
|
- Added support for MacOS `:sierra` alias in methods.
|
51
66
|
- Added deprecation notice for dropping support of Ruby < 2.0.0
|
52
67
|
|
53
|
-
#### 19-10-2016 VERSION 2.10.1.1
|
54
|
-
|
55
|
-
- Test on ruby 2.3.1
|
56
|
-
- Fix missing questionmarks on method names in the README.
|
57
|
-
- Change gem homepage to io domain
|
58
|
-
|
59
68
|
## Installation
|
60
69
|
|
61
70
|
Add the following to your applications Gemfile:
|
@@ -596,6 +605,7 @@ agent.library? :curl, version: 7.21
|
|
596
605
|
* `edge`
|
597
606
|
* `samsungbrowser`
|
598
607
|
* `webosbrowser`
|
608
|
+
* `colibri`
|
599
609
|
|
600
610
|
Examples:
|
601
611
|
|
@@ -654,6 +664,16 @@ Notes:
|
|
654
664
|
* `solaris?` only supports numeric versions
|
655
665
|
* *named versions* are only supported if they are present in a [map](https://github.com/SidOfc/browserino/tree/master/lib/browserino/core/mapping.rb)
|
656
666
|
|
667
|
+
## Roadmap
|
668
|
+
|
669
|
+
Browserino will always be a work in progress, I will do my best to maintain and update the gem regularly as I have so far, below are some points of interest on what could / should be improved, rewritten or removed.
|
670
|
+
There is no steady schedule for these changes however these are the changes I deemed most important, the value in them being here is that you, as a developer using Browserino have the possibility to see what might be added, changed or removed in the near(est) future of change.
|
671
|
+
|
672
|
+
* Drop ruby `< 2` support and remove custom return value from constructor
|
673
|
+
* Refactor test suite entirely to improve readability and structure of tests.
|
674
|
+
* Add more bot identification
|
675
|
+
* Rewrite aliassing and UA lie detection
|
676
|
+
|
657
677
|
## Contributing
|
658
678
|
|
659
679
|
Bug reports and pull requests are welcome on GitHub at https://github.com/SidOfc/browserino. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
data/bin/browserino
CHANGED
@@ -2,114 +2,79 @@ module Browserino
|
|
2
2
|
module Core
|
3
3
|
PATTERNS = {
|
4
4
|
browser: {
|
5
|
-
|
6
|
-
|
7
|
-
version: %r{samsungbrowser/(?<version>[\d\.]+)}i
|
8
|
-
},
|
5
|
+
colibri: { name: /(?<name>colibri)/i,
|
6
|
+
version: %r{colibri/(?<version>[\d\.]+)}i },
|
9
7
|
|
10
|
-
|
11
|
-
|
12
|
-
version: %r{w(?:eb)?osbrowser/(?<version>[\d\.]+)}i,
|
13
|
-
},
|
8
|
+
samsungbrowser: { name: /(?<name>samsungbrowser)/i,
|
9
|
+
version: %r{samsungbrowser/(?<version>[\d\.]+)}i },
|
14
10
|
|
15
|
-
|
16
|
-
|
17
|
-
version: %r{vivaldi/(?<version>[\d\.]+)}i
|
18
|
-
},
|
11
|
+
webosbrowser: { name: /(?<name>w(?:eb)?os(?:browser)?)/i,
|
12
|
+
version: %r{w(?:eb)?osbrowser/(?<version>[\d\.]+)}i },
|
19
13
|
|
20
|
-
|
21
|
-
|
22
|
-
version: %r{ucbrowser/?(?<version>[\d\.]+)}i
|
23
|
-
},
|
14
|
+
vivaldi: { name: /(?<name>vivaldi)/i,
|
15
|
+
version: %r{vivaldi/(?<version>[\d\.]+)}i },
|
24
16
|
|
25
|
-
|
26
|
-
|
27
|
-
version: %r{bolt/(?<version>[\d\.]+)}i
|
28
|
-
},
|
17
|
+
ucbrowser: { name: /(?<name>ucbrowser)/i,
|
18
|
+
version: %r{ucbrowser/?(?<version>[\d\.]+)}i },
|
29
19
|
|
30
|
-
|
31
|
-
|
32
|
-
version: %r{(?:ope?ra?\smini)/(?<version>[\d\.]+)}i
|
33
|
-
},
|
20
|
+
bolt: { name: /(?<name>bolt)/i,
|
21
|
+
version: %r{bolt/(?<version>[\d\.]+)}i },
|
34
22
|
|
35
|
-
|
36
|
-
|
37
|
-
version: %r{(?:ope?ra?|version)[/\s](?<version>[\d\.]+)}i
|
38
|
-
},
|
23
|
+
opera_mini: { name: /(?<name>ope?ra?\smini)/i,
|
24
|
+
version: %r{(?:ope?ra?\smini)/(?<version>[\d\.]+)}i },
|
39
25
|
|
40
|
-
|
41
|
-
|
42
|
-
version: %r{maxthon[\s/](?<version>[\d\.]+)}i
|
43
|
-
},
|
26
|
+
opera: { name: /opera(?!ti(?:on|ng))|opr/i,
|
27
|
+
version: %r{(?:ope?ra?|version)[/\s](?<version>[\d\.]+)}i },
|
44
28
|
|
45
|
-
|
46
|
-
|
47
|
-
version: %r{edge/(?<version>[\d\.]+)}i
|
48
|
-
},
|
29
|
+
maxthon: { name: /(?<name>maxthon)/i,
|
30
|
+
version: %r{maxthon[\s/](?<version>[\d\.]+)}i },
|
49
31
|
|
50
|
-
|
51
|
-
|
52
|
-
version: /(?:(?:ms)?ie\s|rv:)(?<version>[\d\.]+)/i
|
53
|
-
},
|
32
|
+
edge: { name: /(?<name>edge)/i,
|
33
|
+
version: %r{edge/(?<version>[\d\.]+)}i },
|
54
34
|
|
55
|
-
|
56
|
-
|
57
|
-
version: %r{seamonkey/(?<version>[\d\.]+)}i
|
58
|
-
},
|
35
|
+
ie: { name: /(?<name>msie|trident)/i,
|
36
|
+
version: /(?:(?:ms)?ie\s|rv:)(?<version>[\d\.]+)/i },
|
59
37
|
|
60
|
-
|
61
|
-
|
62
|
-
version: %r{servo/(?<version>[\d\.]+)}i
|
63
|
-
},
|
38
|
+
seamonkey: { name: /(?<name>seamonkey)/i,
|
39
|
+
version: %r{seamonkey/(?<version>[\d\.]+)}i },
|
64
40
|
|
65
|
-
|
66
|
-
|
67
|
-
|ice(?:weasel|cat)|netscape|superswan)/xi,
|
68
|
-
version: %r{(?:(?:fire|water)(?:fox|bird)|ice(?:weasel|cat)
|
69
|
-
|netscape|superswan)/?(?<version>[\d\.]+)}xi
|
70
|
-
},
|
41
|
+
servo: { name: /(?<name>servo)/i,
|
42
|
+
version: %r{servo/(?<version>[\d\.]+)}i },
|
71
43
|
|
72
|
-
|
73
|
-
|
74
|
-
|
44
|
+
firefox: {name: /(?<name>(?:fire|water)(?:fox|bird)
|
45
|
+
|ice(?:weasel|cat)|netscape|superswan)/xi,
|
46
|
+
version: %r{(?:(?:fire|water)(?:fox|bird)|ice(?:weasel|cat)
|
47
|
+
|netscape|superswan)/?(?<version>[\d\.]+)}xi
|
75
48
|
},
|
76
49
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
50
|
+
brave: { name: /(?<name>brave)/i,
|
51
|
+
version: %r{brave/(?<version>[\d\.]+)}i },
|
52
|
+
|
53
|
+
chrome: { name: /(?<name>chrome?(ium|plus)?)/i,
|
54
|
+
version: %r{chrome?(?:ium|plus)?/(?<version>[\d\.]+)}i },
|
81
55
|
|
82
|
-
safari: {
|
83
|
-
|
84
|
-
version: %r{(?:version|safari)/(?<version>[\d\.]+)}i
|
85
|
-
}
|
56
|
+
safari: { name: /(?<name>safari)/i,
|
57
|
+
version: %r{(?:version|safari)/(?<version>[\d\.]+)}i }
|
86
58
|
},
|
87
59
|
|
88
60
|
library: {
|
89
|
-
php: {
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
name: /(?<name>pycurl)/i,
|
107
|
-
version: %r{pycurl/(?<version>[\d\.]+)}i
|
108
|
-
},
|
109
|
-
curl: {
|
110
|
-
name: /(?<name>curl)/i,
|
111
|
-
version: %r{curl/(?<version>[\d\.a-z]+)}i
|
112
|
-
}
|
61
|
+
php: { name: /(?<name>php)/i,
|
62
|
+
version: %r{php/(?<version>[\d\.]+)}i },
|
63
|
+
|
64
|
+
python: { name: /(?<name>python)/i,
|
65
|
+
version: %r{python-urllib/(?<version>[\d\.]+)}i },
|
66
|
+
|
67
|
+
perl: { name: /(?<name>perl)/i,
|
68
|
+
version: %r{perl/(?<version>[\d\.]+)}i },
|
69
|
+
|
70
|
+
java: { name: /(?<name>java)/i,
|
71
|
+
version: %r{java/(?<version>[\d\._]+)}i },
|
72
|
+
|
73
|
+
pycurl: { name: /(?<name>pycurl)/i,
|
74
|
+
version: %r{pycurl/(?<version>[\d\.]+)}i },
|
75
|
+
|
76
|
+
curl: { name: /(?<name>curl)/i,
|
77
|
+
version: %r{curl/(?<version>[\d\.a-z]+)}i }
|
113
78
|
},
|
114
79
|
|
115
80
|
bot: {
|
data/lib/browserino/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: browserino
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sidney Liebrand
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
191
|
version: '0'
|
192
192
|
requirements: []
|
193
193
|
rubyforge_project:
|
194
|
-
rubygems_version: 2.
|
194
|
+
rubygems_version: 2.6.8
|
195
195
|
signing_key:
|
196
196
|
specification_version: 4
|
197
197
|
summary: A browser identification gem with command line and Rails (>= 3.2.0) integration
|