browser 2.5.3 → 5.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE.md +1 -1
  3. data/.github/workflows/tests.yml +57 -0
  4. data/.gitignore +1 -0
  5. data/.prettierignore +1 -0
  6. data/.rubocop.yml +22 -107
  7. data/CHANGELOG.md +170 -6
  8. data/FUNDING.yml +3 -0
  9. data/Gemfile +2 -0
  10. data/README.md +139 -89
  11. data/Rakefile +11 -2
  12. data/bot_exceptions.yml +2 -0
  13. data/bots.yml +302 -265
  14. data/browser.gemspec +12 -7
  15. data/gemfiles/rails6_0.gemfile +6 -0
  16. data/gemfiles/rails6_1.gemfile +6 -0
  17. data/lib/browser/accept_language.rb +6 -9
  18. data/lib/browser/action_controller.rb +1 -3
  19. data/lib/browser/aliases.rb +5 -5
  20. data/lib/browser/alipay.rb +2 -2
  21. data/lib/browser/base.rb +101 -19
  22. data/lib/browser/blackberry.rb +3 -3
  23. data/lib/browser/bot/empty_user_agent_matcher.rb +11 -0
  24. data/lib/browser/bot/keyword_matcher.rb +11 -0
  25. data/lib/browser/bot/known_bots_matcher.rb +11 -0
  26. data/lib/browser/bot.rb +39 -27
  27. data/lib/browser/browser.rb +65 -54
  28. data/lib/browser/chrome.rb +18 -5
  29. data/lib/browser/detect_version.rb +5 -5
  30. data/lib/browser/device/android.rb +20 -0
  31. data/lib/browser/device/blackberry_playbook.rb +1 -1
  32. data/lib/browser/device/ipad.rb +1 -1
  33. data/lib/browser/device/iphone.rb +1 -1
  34. data/lib/browser/device/ipod_touch.rb +1 -1
  35. data/lib/browser/device/kindle.rb +1 -1
  36. data/lib/browser/device/kindle_fire.rb +1 -1
  37. data/lib/browser/device/playstation3.rb +1 -1
  38. data/lib/browser/device/playstation4.rb +1 -1
  39. data/lib/browser/device/psp.rb +1 -1
  40. data/lib/browser/device/psvita.rb +1 -1
  41. data/lib/browser/device/samsung.rb +33 -0
  42. data/lib/browser/device/surface.rb +2 -4
  43. data/lib/browser/device/switch.rb +19 -0
  44. data/lib/browser/device/tv.rb +1 -1
  45. data/lib/browser/device/unknown.rb +1 -1
  46. data/lib/browser/device/wii.rb +1 -1
  47. data/lib/browser/device/wiiu.rb +1 -1
  48. data/lib/browser/device/xbox_360.rb +1 -1
  49. data/lib/browser/device/xbox_one.rb +1 -1
  50. data/lib/browser/device.rb +47 -30
  51. data/lib/browser/duck_duck_go.rb +22 -0
  52. data/lib/browser/edge.rb +6 -2
  53. data/lib/browser/electron.rb +2 -2
  54. data/lib/browser/facebook.rb +4 -2
  55. data/lib/browser/firefox.rb +2 -2
  56. data/lib/browser/google_search_app.rb +21 -0
  57. data/lib/browser/huawei_browser.rb +21 -0
  58. data/lib/browser/instagram.rb +21 -0
  59. data/lib/browser/internet_explorer.rb +9 -10
  60. data/lib/browser/maxthon.rb +21 -0
  61. data/lib/browser/meta/base.rb +0 -1
  62. data/lib/browser/meta/generic_browser.rb +1 -3
  63. data/lib/browser/meta.rb +12 -13
  64. data/lib/browser/micro_messenger.rb +2 -2
  65. data/lib/browser/middleware/context/additions.rb +1 -1
  66. data/lib/browser/middleware.rb +4 -3
  67. data/lib/browser/miui_browser.rb +21 -0
  68. data/lib/browser/nokia.rb +2 -2
  69. data/lib/browser/opera.rb +2 -2
  70. data/lib/browser/otter.rb +2 -2
  71. data/lib/browser/phantom_js.rb +2 -2
  72. data/lib/browser/platform/adobe_air.rb +2 -2
  73. data/lib/browser/platform/android.rb +1 -1
  74. data/lib/browser/platform/base.rb +3 -2
  75. data/lib/browser/platform/blackberry.rb +2 -2
  76. data/lib/browser/platform/chrome_os.rb +1 -1
  77. data/lib/browser/platform/firefox_os.rb +1 -1
  78. data/lib/browser/platform/ios.rb +17 -4
  79. data/lib/browser/platform/kai_os.rb +23 -0
  80. data/lib/browser/platform/linux.rb +1 -1
  81. data/lib/browser/platform/mac.rb +5 -3
  82. data/lib/browser/platform/{other.rb → unknown.rb} +3 -3
  83. data/lib/browser/platform/windows.rb +2 -2
  84. data/lib/browser/platform/windows_mobile.rb +1 -1
  85. data/lib/browser/platform/windows_phone.rb +1 -1
  86. data/lib/browser/platform.rb +37 -28
  87. data/lib/browser/qq.rb +5 -5
  88. data/lib/browser/rails.rb +7 -5
  89. data/lib/browser/safari.rb +19 -4
  90. data/lib/browser/samsung_browser.rb +21 -0
  91. data/lib/browser/snapchat.rb +21 -0
  92. data/lib/browser/sougou_browser.rb +24 -0
  93. data/lib/browser/sputnik.rb +21 -0
  94. data/lib/browser/uc_browser.rb +2 -2
  95. data/lib/browser/{generic.rb → unknown.rb} +6 -8
  96. data/lib/browser/version.rb +1 -1
  97. data/lib/browser/weibo.rb +2 -2
  98. data/lib/browser/yandex.rb +21 -0
  99. data/lib/browser.rb +2 -2
  100. data/samsung.yml +138 -0
  101. data/search_engines.yml +2 -2
  102. data/test/browser_test.rb +42 -10
  103. data/test/rails_test.rb +10 -0
  104. data/test/sample_app.rb +14 -0
  105. data/test/test_helper.rb +9 -1
  106. data/test/ua.yml +147 -109
  107. data/test/ua_bots.yml +95 -60
  108. data/test/ua_search_engines.yml +7 -6
  109. data/test/unit/accept_language_test.rb +16 -0
  110. data/test/unit/adobe_air_test.rb +1 -1
  111. data/test/unit/alipay_test.rb +6 -0
  112. data/test/unit/blackberry_test.rb +0 -6
  113. data/test/unit/bots_test.rb +37 -36
  114. data/test/unit/chrome_test.rb +8 -19
  115. data/test/unit/console_test.rb +2 -2
  116. data/test/unit/device_test.rb +60 -3
  117. data/test/unit/duck_duck_go_test.rb +37 -0
  118. data/test/unit/edge_test.rb +49 -5
  119. data/test/unit/facebook_test.rb +20 -0
  120. data/test/unit/firefox_test.rb +0 -3
  121. data/test/unit/google_search_app_test.rb +54 -0
  122. data/test/unit/huawei_browser_test.rb +25 -0
  123. data/test/unit/instagram_test.rb +30 -0
  124. data/test/unit/internet_explorer_test.rb +0 -12
  125. data/test/unit/ios_test.rb +7 -5
  126. data/test/unit/kai_os_test.rb +31 -0
  127. data/test/unit/kindle_test.rb +0 -2
  128. data/test/unit/maxthon_test.rb +25 -0
  129. data/test/unit/meta_test.rb +10 -2
  130. data/test/unit/micro_messenger_test.rb +21 -6
  131. data/test/unit/miui_browser_test.rb +25 -0
  132. data/test/unit/opera_test.rb +1 -2
  133. data/test/unit/platform_test.rb +34 -8
  134. data/test/unit/qq_test.rb +12 -0
  135. data/test/unit/safari_test.rb +12 -7
  136. data/test/unit/samsung_browser_test.rb +23 -0
  137. data/test/unit/snapchat_test.rb +40 -0
  138. data/test/unit/sougou_browser_test.rb +41 -0
  139. data/test/unit/sputnik_test.rb +22 -0
  140. data/test/unit/yandex_test.rb +37 -0
  141. metadata +83 -27
  142. data/.bundle/config +0 -2
  143. data/.travis.yml +0 -16
  144. data/bin/rake +0 -17
  145. data/gemfiles/rails4.gemfile +0 -4
  146. data/gemfiles/rails5.gemfile +0 -4
  147. data/lib/browser/meta/modern.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 293548a9eea57000babf98f31dd4fbb5652886d9af4d0fea9be163e58d041c10
4
- data.tar.gz: 0e5c8ae27a8b45b751c1b8c2a40aa0daf37a6a7c6547621a2dee348a6f207216
3
+ metadata.gz: 837e072e8544da56ee51cf187b35850444d17c931c535115cf50c679d2227a7c
4
+ data.tar.gz: b789e49dbd45164c42ff5a25c5bd5a5d0c54a32ac945bcbf97ee41682ca23693
5
5
  SHA512:
6
- metadata.gz: 708cd426295863ce846e4b7934ac6fa7d2716c3a0e2bf136dab0f4f79dde7648a3a41ad2dca3565bde09abe0658b08e2b5dce184d371a449f9ecbceb7a152629
7
- data.tar.gz: 2d6c9699c81fe9bd5be50089682524c12076b3962bcc2936d9592fd93d5c4cb467dcd8ece8c78cd9252bc3395884b8b3bace3daedfdfa8742a74c51b2b280a92
6
+ metadata.gz: 4adb59b646efa17033f385ad0b935f067c9b67a8718a1362f0c5ef49a3c28decd064ec788739c4d38f9969a2189ffc7090ae5d62d3979c249e3237f6b547bfe1
7
+ data.tar.gz: c0712d54d08e48522b26ce1c162a238711f20bced68b578e300657ec25ff313d9637a2a881dd2797cd8295b90d100a60789364b17cb9b008e4e3da092e071d0a
@@ -27,4 +27,4 @@
27
27
 
28
28
  ## Report
29
29
 
30
- [Visit <http://user-agent.herokuapp.com> and paste the URL here]
30
+ [Visit <https://user-agent.herokuapp.com> and paste the URL here]
@@ -0,0 +1,57 @@
1
+ name: Tests
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+ push:
8
+ branches:
9
+ - main
10
+
11
+ schedule:
12
+ - cron: "0 10 * * *"
13
+
14
+ jobs:
15
+ build:
16
+ name: Tests with Ruby ${{ matrix.ruby }} and ${{ matrix.gemfile }}
17
+ runs-on: "ubuntu-latest"
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ ruby: ["3.0.x", "2.7.x", "2.6.x", "2.5.x"]
22
+ gemfile:
23
+ - Gemfile
24
+ - gemfiles/rails6_1.gemfile
25
+ - gemfiles/rails6_0.gemfile
26
+
27
+ steps:
28
+ - uses: actions/checkout@v1
29
+
30
+ - uses: actions/cache@v2
31
+ with:
32
+ path: vendor/bundle
33
+ key: >
34
+ ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
35
+ restore-keys: >
36
+ ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
37
+
38
+ - name: Set up Ruby
39
+ uses: actions/setup-ruby@v1
40
+ with:
41
+ ruby-version: ${{ matrix.ruby }}
42
+
43
+ - name: Install gem dependencies
44
+ env:
45
+ RAILS_ENV: test
46
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
47
+ run: |
48
+ gem install bundler
49
+ bundle config path vendor/bundle
50
+ bundle update --jobs 4 --retry 3
51
+
52
+ - name: Run Tests
53
+ env:
54
+ RAILS_ENV: test
55
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
56
+ run: |
57
+ bundle exec rake
data/.gitignore CHANGED
@@ -4,3 +4,4 @@ doc
4
4
  log
5
5
  *.lock
6
6
  bin/
7
+ .bundle
data/.prettierignore ADDED
@@ -0,0 +1 @@
1
+ *.yml
data/.rubocop.yml CHANGED
@@ -1,126 +1,41 @@
1
+ ---
2
+ inherit_gem:
3
+ rubocop-fnando: .rubocop.yml
4
+
1
5
  AllCops:
6
+ TargetRubyVersion: 2.5
2
7
  Exclude:
3
- - "bin/**/*"
4
- - "gemfiles/**/*"
5
- - "vendor/**/*"
6
- - "Gemfile"
7
- - "Rakefile"
8
+ - bin/**/*
9
+ - gemfiles/**/*
10
+ - vendor/**/*
11
+ - Gemfile
12
+ - Rakefile
8
13
  - "*.gemspec"
9
- - "config.ru"
10
-
11
- Style/Alias:
12
- EnforcedStyle: prefer_alias_method
13
-
14
- Style/FrozenStringLiteralComment:
15
- EnforcedStyle: always
16
-
17
- Style/ClassCheck:
18
- EnforcedStyle: kind_of?
19
-
20
- Metrics/LineLength:
21
- Max: 80
22
-
23
- Style/BlockDelimiters:
24
- Enabled: false
25
-
26
- Style/RegexpLiteral:
27
- Enabled: false
14
+ - config.ru
28
15
 
29
- Metrics/AbcSize:
30
- Enabled: false
31
-
32
- Style/PerlBackrefs:
33
- Enabled: false
34
-
35
- ClassLength:
36
- Enabled: false
37
-
38
- CyclomaticComplexity:
39
- Enabled: false
40
-
41
- Documentation:
16
+ Metrics/ClassLength:
42
17
  Enabled: false
43
18
 
44
- Encoding:
45
- Enabled: false
46
-
47
- FileName:
48
- Enabled: false
49
-
50
- IfUnlessModifier:
51
- Enabled: false
52
-
53
- MethodLength:
54
- Enabled: false
55
-
56
- ModuleFunction:
57
- Enabled: false
58
-
59
- OneLineConditional:
60
- Enabled: false
61
-
62
- ParameterLists:
63
- Enabled: false
19
+ Layout/LineLength:
20
+ Max: 80
64
21
 
65
- Proc:
22
+ Metrics/MethodLength:
66
23
  Enabled: false
67
24
 
68
- SingleLineBlockParams:
69
- Enabled: false
25
+ Style/Alias:
26
+ EnforcedStyle: prefer_alias_method
70
27
 
71
- VariableInterpolation:
28
+ Lint/RedundantCopDisableDirective:
72
29
  Enabled: false
73
30
 
74
- Style/TrailingCommaInLiteral:
31
+ Metrics/AbcSize:
75
32
  Enabled: false
76
33
 
77
- WhileUntilModifier:
34
+ Metrics/CyclomaticComplexity:
78
35
  Enabled: false
79
36
 
80
- PredicateName:
81
- NamePrefixBlacklist:
82
- - is_
83
-
84
- StringLiterals:
85
- EnforcedStyle: double_quotes
86
- SupportedStyles:
87
- - single_quotes
88
- - double_quotes
89
-
90
- DotPosition:
91
- EnforcedStyle: leading
92
-
93
- SpaceBeforeBlockBraces:
94
- EnforcedStyle: space
95
-
96
- SpaceInsideBlockBraces:
97
- EnforcedStyle: no_space
98
-
99
- DoubleNegation:
37
+ Metrics/PerceivedComplexity:
100
38
  Enabled: false
101
39
 
102
- SpaceInsideBlockBraces:
103
- SpaceBeforeBlockParameters: false
104
-
105
- SpaceInsideHashLiteralBraces:
40
+ Naming/VariableNumber:
106
41
  Enabled: false
107
-
108
- PercentLiteralDelimiters:
109
- PreferredDelimiters:
110
- '%': '[]'
111
- '%i': '[]'
112
- '%q': '[]'
113
- '%Q': '[]'
114
- '%r': '[]'
115
- '%s': '[]'
116
- '%w': '[]'
117
- '%W': '[]'
118
- '%x': '[]'
119
-
120
- Style/CollectionMethods:
121
- PreferredMethods:
122
- collect: 'map'
123
- collect!: 'map!'
124
- inject: 'reduce'
125
- detect: 'find'
126
- find_all: 'select'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,163 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.3.1
4
+
5
+ - Remove Stripe webhooks from bot list.
6
+
7
+ ## 5.3.0
8
+
9
+ - Bump up minimum required ruby version to 2.5.0. We're now relying on
10
+ `String#match?`, which was introduced by ruby-2.4, but given that ruby's
11
+ stable version is >= 2.5, seems reasonable.
12
+
13
+ ## 5.2.0
14
+
15
+ - Add KaiOS detection.
16
+ - Replace `String#=~` with `String#match?` and other optimizations.
17
+
18
+ ## 5.1.0
19
+
20
+ - Add Samsung device detection.
21
+ - Delay parsing `Accept-Language` until `Browser::Base#accept_language` is
22
+ called for the first time.
23
+ - Bump up default size limit for `Accept-Language` and `User-Agent` to 2048
24
+ bytes.
25
+
26
+ ## 5.0.0
27
+
28
+ - Rename `Browser::Platform#other?` to `Browser::Platform#unknown?`.
29
+ - Unknown platforms now return `:unknown_platform` as the id.
30
+ - Unknown devices now return `:unknown_device` as the id.
31
+ - Unknown browsers now return `:unknown_browser` as the id.
32
+ - All the changes above affect how `browser.meta` is composed.
33
+ - Add method `Browser::Base#unknown?`.
34
+ - Fix issue with `Browser::Base#safari?` matching full version.
35
+ - Add Maxthon detection.
36
+ - Add Google Search App detection.
37
+ - Add Huawei Browser detection.
38
+ - Fix Duck Duck Go browser that was being recognized as a bot.
39
+ - Add Miui Browser detection.
40
+ - Add `Browser::Base#qq?`.
41
+ - Fix QQ detection.
42
+ - Fix Alipay detection.
43
+ - Add Sougou Browser detection.
44
+ - User agent has a size limit of 512 bytes. This can be customized through
45
+ `Browser.user_agent_size_limit`.
46
+ - Accept-Language has a size limit of 256 bytes. This can be customized through
47
+ `Browser.accept_language_size_limit`.
48
+
49
+ ## 4.2.0
50
+
51
+ - Fix Chrome Lighthouse detection.
52
+ - Add Skype to bot list.
53
+
54
+ ## 4.1.0
55
+
56
+ - Add Samsung browser.
57
+ - Add Google Image Proxy to the bot list.
58
+ - Add The Knowledge AI bot to the bot list.
59
+ - Add Go HttpClient to the bot list.
60
+ - Fix Microsoft Edge detection on Android and iOS.
61
+ - Fix MicroMessenger detection on Android
62
+
63
+ ## 4.0.0
64
+
65
+ - Add Chrome Lighthouse to bot list.
66
+ - Add SeobilityBot to the bot list.
67
+ - Detect Mac-based platforms differently, depending on the version; "Mac OS X"
68
+ will be returned for versions prior to 10.12, and "macOS" for newer versions.
69
+ - Remove `Browser.modern_rules` and `Browser::Base#modern?`.
70
+ - Add DuckDuckGo browser.
71
+
72
+ # 3.0.3
73
+
74
+ - Deprecate `Browser.modern_rules` and `Browser::Base#modern?`. Theses methods
75
+ will be removed on the next major released, or by June 1st 2020.
76
+
77
+ ## 3.0.2
78
+
79
+ - Remove .bundle directory from package.
80
+
81
+ ## 3.0.1
82
+
83
+ - Fix issue with MS Edge detection as a modern browser.
84
+
85
+ ## 3.0.0
86
+
87
+ - Add ArchiveTeam's ArchiveBot to the bot list.
88
+ - Fix QQ Browser detection.
89
+ - Update modern rules.
90
+ - You can now define new bot matchers by adding a callable object to
91
+ `Browser::Bot.matchers`.
92
+ - Fix `browser.yandex?` and `browser.sputnik?`.
93
+ - [BREAKING CHANGE] Removed methods to enable the bot's empty user agent
94
+ detection (`Browser::Bot.detect_empty_ua!` and
95
+ `Browser::Bot.detect_empty_ua?`).
96
+ - [BREAKING CHANGE] Bot detection is now more aggressive by default. It matches
97
+ empty user agents, anything that matches
98
+ `crawl|fetch|search|monitoring|spider|bot`, and anything listed under
99
+ https://github.com/fnando/browser/blob/master/bots.yml.
100
+ - Add Jaunt to the bot list.
101
+
102
+ ## 2.7.1
103
+
104
+ - Handle Snapchat user agents that have a space or an empty string instead of a
105
+ slash before the version.
106
+ - Fix iOS 10+ version detection.
107
+ - Add fallback versions for instagram and snapchat to avoid NoMethodErrors on
108
+ unexpected user agents.
109
+
110
+ ## 2.7.0
111
+
112
+ - Add more Slack bots.
113
+ - Handle instagram user agents that have a slash instead of a space.
114
+ - Add `Browser::Bot.why?(ua)` to help debugging why a user agent is considered
115
+ bot.
116
+ - Promote Snapchat to a browser (it was detected as a bot previously).
117
+ - Detect Edge based on Chrome correctly.
118
+ - Improve Yandex detection.
119
+ - Add Sputnik (https://browser.sputnik.ru)
120
+ - Detect Android devices.
121
+ - Add ScoutURLMonitor to the bot list.
122
+
123
+ ## 2.6.1
124
+
125
+ - Also include controller extensions to `ActionController::Base`.
126
+
127
+ ## 2.6.0
128
+
129
+ - Add GarlikCrawler, ImplisenseBot and WikiDo bots.
130
+ - Add Mastodon URL expander bot.
131
+ - Add eZ Publish Link Validator, GermCrawler, Pu_iN Crawler, ZoomBot, and
132
+ ZoominfoBot bots.
133
+ - Add Datanyze bot.
134
+ - Add support for Instagram in-app browser.
135
+ - Add Updown.io monitor bot.
136
+ - Add Snapshat detection.
137
+ - Add Instagram detection.
138
+ - Add Nintendo Switch detection.
139
+ - Add WooRank bot.
140
+ - Add Trendsmap bot.
141
+ - Add Go 1.1 package http bot.
142
+ - Add MauiBot.
143
+ - Add SiteCheck-sitecrawl bot.
144
+ - Add PR-CY.RU bot.
145
+ - Add AdsTxtCrawler bot.
146
+ - Add HTTrack bot.
147
+ - Add Google Shopping bot.
148
+ - Add DataFeedWatch bot.
149
+ - Add Zabbix bot.
150
+ - Add TangibleeBot.
151
+ - Add Jooble bot.
152
+ - Add Fyre bot.
153
+ - Drop Rails 4 official support.
154
+ - Fix accept-language sorting (If HTTP-header has value `en,fr`—without
155
+ qualities—the first language should be `en` instead of `fr`).
156
+ - Ignore malformed strings when comparing versions.
157
+ - Fix Facebook detection on newer apps.
158
+ - Change precedence for bot detection when common libs are used.
159
+ - Add Yandex's search browser to the exception list.
160
+
3
161
  ## v2.5.3
4
162
 
5
163
  - Add Google Site Verification to the bot list.
@@ -40,8 +198,10 @@
40
198
  - Add Google Drive API, Proximic Spider, NewRelic pinger and SocialRank bots.
41
199
  - Add Pinboard in-app browser to the bot exception list.
42
200
  - All browser detection methods can now compare versions.
43
- - All platform detection methods can now compare versions (except `#linux?` and `#firefox_os?`).
44
- - Add `browser/aliases`, so you can have methods on the base object (e.g. `browser.mobile?`). See README for instructions.
201
+ - All platform detection methods can now compare versions (except `#linux?` and
202
+ `#firefox_os?`).
203
+ - Add `browser/aliases`, so you can have methods on the base object (e.g.
204
+ `browser.mobile?`). See README for instructions.
45
205
  - Remove official support for Rails 3 and Ruby 2.1.
46
206
 
47
207
  ## v2.3.0
@@ -72,7 +232,8 @@
72
232
 
73
233
  ## v2.0.3
74
234
 
75
- - Fix issue with version detection when no actual version is provided (i.e. the user agent doesn't have any version information).
235
+ - Fix issue with version detection when no actual version is provided (i.e. the
236
+ user agent doesn't have any version information).
76
237
 
77
238
  ## v2.0.2
78
239
 
@@ -85,9 +246,12 @@
85
246
 
86
247
  ## v2.0.0
87
248
 
88
- - `Browser#platform` now returns instance of `Browser::Platform`, instead of a `String`. It contains information about the platform (software).
89
- - `Browser#device` was added. It returns information about the device (hardware).
90
- - `Browser#accept_language` now returns a list of `Browser::AcceptLanguage` objects.
249
+ - `Browser#platform` now returns instance of `Browser::Platform`, instead of a
250
+ `String`. It contains information about the platform (software).
251
+ - `Browser#device` was added. It returns information about the device
252
+ (hardware).
253
+ - `Browser#accept_language` now returns a list of `Browser::AcceptLanguage`
254
+ objects.
91
255
  - `Browser#bot` now returns a `Browser::Bot` instance.
92
256
  - Safari running as web app mode is not recognized as Safari anymore.
93
257
  - ruby-2.3+ will always activate frozen strings.
data/FUNDING.yml ADDED
@@ -0,0 +1,3 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [fnando]
data/Gemfile CHANGED
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "http://rubygems.org"
2
4
  gemspec