aua 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5f0331d20167670922477dea635073e93cde5963
4
- data.tar.gz: add2fdf9d9a138c4d3392ef8b93b6b5039e81b49
3
+ metadata.gz: a7bcaf6c058128a7d6ed3c50af05a00e77cf8df8
4
+ data.tar.gz: b4f3630969d17792efd3e20c29b2babbc6fb5daa
5
5
  SHA512:
6
- metadata.gz: 81e291279385ab2fbd0e55d9c44b0e023656ae60bcd564249b03157a8121f7f28e7935473cd4c15b0dfbff1634fea0e5918dc6d7412a763db1dd51e6aa8dc86a
7
- data.tar.gz: 7f153e8e0751c762fb96a4cc9d1de0cbdc9e5b5f73faeb4bcb8940cfbbac1727bfc71bd20c7059a0edd834795ad39ded7840eb67bef895597bcb496471c0f6aa
6
+ metadata.gz: 1ac1172e83f9030041c332fc8642556fd96ced32e82924c60d82e6f2aa2395cab839a562cb0288c81793e996f8fc6482e0637b57c3644414d4cafcc2bd100d02
7
+ data.tar.gz: c6eb775b39b6f190a0e9a4c3a18e0fd2b900b32b37661ab1462ecb26de12943ef906aa8de253497083852d473fb7ad61a28f5abe37ad006c1f52587003b29407
data/CHANGES.md CHANGED
@@ -1,6 +1,13 @@
1
1
  ### dev
2
2
 
3
- [full changelog](http://github.com/yolk/aua/compare/v0.2.5...master)
3
+ [full changelog](http://github.com/yolk/aua/compare/v0.2.6...master)
4
+
5
+ ### 0.2.6 / 2015-08-05
6
+
7
+ [full changelog](http://github.com/yolk/aua/compare/v0.2.5...v0.2.6)
8
+
9
+ * Show only major version for MSIE 12 (Edge)
10
+ * Small fixes: Konqueror + Vienna RSS
4
11
 
5
12
  ### 0.2.5 / 2015-08-05
6
13
 
@@ -3,7 +3,8 @@ module Aua::Agents::FeedReader
3
3
 
4
4
  def self.extend?(agent)
5
5
  KNOWN_CLIENTS.include?(agent.app) ||
6
- (agent.app == "Tumblr" && agent.products.include?("RSS") && agent.products.include?("syndication"))
6
+ (agent.app == "Tumblr" && agent.products.include?("RSS") && agent.products.include?("syndication")) ||
7
+ agent.products.include?("Vienna")
7
8
  end
8
9
 
9
10
  def type
@@ -12,10 +13,11 @@ module Aua::Agents::FeedReader
12
13
 
13
14
  def name
14
15
  return :TumblrRSSSyndication if app == "Tumblr"
16
+ return :Vienna if products.include?("Vienna")
15
17
  app.to_sym
16
18
  end
17
19
 
18
20
  def version
19
- @version ||= versions[0] || versions[1]
21
+ @version ||= version_of(name) || versions[0] || versions[1]
20
22
  end
21
23
  end
@@ -1,7 +1,8 @@
1
1
  module Aua::Agents::Konqueror
2
2
  def self.extend?(agent)
3
3
  agent.products.include?("KHTML") &&
4
- agent.app_comments[1] =~ PATTERN
4
+ (agent.app_comments[1] =~ PATTERN ||
5
+ agent.products.include?("Konqueror"))
5
6
  end
6
7
 
7
8
  PATTERN = /Konqueror\/([\d\.]+)/
@@ -15,6 +16,6 @@ module Aua::Agents::Konqueror
15
16
  end
16
17
 
17
18
  def version
18
- @version ||= app_comments[1] =~ PATTERN && $1
19
+ @version ||= app_comments[1] =~ PATTERN && $1 || version_of("Konqueror")
19
20
  end
20
21
  end
@@ -22,7 +22,7 @@ module Aua::Agents::Msie
22
22
  if app_comments_string =~ PATTERN
23
23
  $1 == "Trident\/" ? TRIDENT_VERSION_MAP[$2] || $2 : $2
24
24
  else
25
- version_of("Edge")
25
+ version_of("Edge").split(/\./, 2)[0]
26
26
  end
27
27
  end
28
28
  end
@@ -1,3 +1,3 @@
1
1
  class Aua
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
@@ -157,6 +157,10 @@ describe Aua do
157
157
  { :type => :Browser, :name => :Konqueror, :version => "4.3", :os_name => :Linux, :os_version => nil, :platform => :X11 },
158
158
  "Mozilla/5.0 (compatible; Konqueror/4.0; Windows) KHTML/4.0.83 (like Gecko)" =>
159
159
  { :type => :Browser, :name => :Konqueror, :version => "4.0", :os_name => :Windows, :os_version => nil, :platform => :Windows },
160
+ "Mozilla/5.0 (X11; Linux x86_64) KHTML/5.8.0 (like Gecko) Konqueror/5.8" =>
161
+ { :type => :Browser, :name => :Konqueror, :version => "5.8", :os_name => :Linux, :os_version => nil, :platform => :X11 },
162
+ "Mozilla/5.0 (X11; Linux x86_64) KHTML/4.14.3 (like Gecko) Konqueror/4.14 Fedora/4.14.3-8.fc21" =>
163
+ { :type => :Browser, :name => :Konqueror, :version => "4.14", :os_name => :Linux, :os_version => "Fedora", :platform => :X11 },
160
164
 
161
165
  # Chrome
162
166
  "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36" =>
@@ -217,10 +221,12 @@ describe Aua do
217
221
  { :type => :Browser, :name => :OperaMobile, :version => "10.1", :os_name => :Linux, :os_version => "Maemo", :platform => :X11 },
218
222
 
219
223
  # MSIE
224
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240" =>
225
+ { :type => :Browser, :name => :MSIE, :version => "12", :os_name => :Windows, :os_version => "10", :platform => :Windows },
220
226
  "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0" =>
221
- { :type => :Browser, :name => :MSIE, :version => "12.0", :os_name => :Windows, :os_version => "10", :platform => :Windows },
227
+ { :type => :Browser, :name => :MSIE, :version => "12", :os_name => :Windows, :os_version => "10", :platform => :Windows },
222
228
  "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; DEVICE INFO) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Mobile Safari/537.36 Edge/12.0" =>
223
- { :type => :Browser, :name => :MSIE, :version => "12.0", :os_name => :WindowsPhone, :os_version => "10", :platform => :Windows },
229
+ { :type => :Browser, :name => :MSIE, :version => "12", :os_name => :WindowsPhone, :os_version => "10", :platform => :Windows },
224
230
  "Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv 11.0) like Gecko" =>
225
231
  { :type => :Browser, :name => :MSIE, :version => "11.0", :os_name => :Windows, :os_version => "8.1", :platform => :Windows },
226
232
  "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)" =>
@@ -425,6 +431,8 @@ describe Aua do
425
431
  { :type => :FeedReader, :name => :FeeddlerRSS, :version => nil, :os_name => nil, :os_version => nil, :platform => nil },
426
432
  "FreeRSSReader/1.9.5 CFNetwork/672.0.2 Darwin/14.0.0" =>
427
433
  { :type => :FeedReader, :name => :FreeRSSReader, :version => "1.9.5", :os_name => :Darwin, :os_version => "14.0.0", :platform => :Darwin },
434
+ "Mozilla/5.0 Vienna/3.0.6" =>
435
+ { :type => :FeedReader, :name => :Vienna, :version => "3.0.6", :os_name => nil, :os_version => nil, :platform => nil },
428
436
 
429
437
  # SearchBots
430
438
  "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)" =>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aua
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Munz