wurfl_client 0.5.4 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.4
1
+ 0.6.0
data/lib/wurfl_client.rb CHANGED
@@ -19,11 +19,16 @@ module WurflClient
19
19
  handsets = lookup.loadLookupTable(profile)
20
20
 
21
21
  if handsets
22
- # TODO: load complete table as fallback!
23
22
  uam = Wurfl::UserAgentMatcher.new(handsets)
24
23
 
25
24
  # return first matching entry
26
- uam.match_handsets(user_agent).flatten.first
25
+ hs = uam.match_handsets(user_agent).flatten.first
26
+ if hs.class == Wurfl::Handset
27
+ hs["profile"] = profile.context
28
+ end
29
+ hs
30
+ else
31
+ # TODO: load complete table as fallback!
27
32
  end
28
33
  end
29
34
  end
@@ -25,7 +25,7 @@ module WurflClient
25
25
  end
26
26
  if dev_context
27
27
  # detect OS version
28
- os_ver = ua_string[/OS ([0-9_]+)/]
28
+ os_ver = ua_string[/OS ([0-9]+)/]
29
29
  prefix += "-OS#{os_ver[$1]}" if os_ver
30
30
  return DeviceProfile.new(dev_context, prefix)
31
31
  end
data/wurfl_client.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{wurfl_client}
8
- s.version = "0.5.4"
8
+ s.version = "0.6.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Guido Pinkas}]
12
- s.date = %q{2011-05-12}
12
+ s.date = %q{2011-05-13}
13
13
  s.description = %q{WURFL Client is a library to do WURFL (http://wurfl.sourceforge.net/) mobile device detection for web applications. Included are tools to keep the WURFL file up to date automatically and to prepare a customized lookup tables, which allow a fast device detection.}
14
14
  s.email = %q{guido.pinkas@bindertrittenwein.com}
15
15
  s.executables = [%q{wurfl_minimize.rb}, %q{wurfl_prepare_lookup.rb}]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: wurfl_client
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.4
5
+ version: 0.6.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Guido Pinkas
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-12 00:00:00 Z
13
+ date: 2011-05-13 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: wurfl