wurfl_client 0.5.4 → 0.6.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.
- data/VERSION +1 -1
- data/lib/wurfl_client.rb +7 -2
- data/lib/wurfl_client/ua_device_detector.rb +1 -1
- data/wurfl_client.gemspec +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
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
|
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.
|
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
|
+
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
|
+
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-
|
13
|
+
date: 2011-05-13 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: wurfl
|