wurfl 1.3.6 → 1.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -3
- data/.travis.yml +5 -0
- data/Gemfile +6 -0
- data/README.rdoc +15 -13
- data/Rakefile +4 -36
- data/lib/wurfl.rb +4 -0
- data/lib/wurfl/version.rb +3 -0
- data/wurfl.gemspec +23 -74
- metadata +82 -84
- data/test/benchmark.rb +0 -11
- data/test/data/wurfl.generic.patch.xml +0 -13
- data/test/data/wurfl.large.xml +0 -80020
- data/test/data/wurfl.reverse.xml +0 -38
- data/test/data/wurfl.simple.xml +0 -55
- data/test/handset_test.rb +0 -110
- data/test/loader_test.rb +0 -72
- data/test/test_helper.rb +0 -3
- data/test/user_agent_matcher_test.rb +0 -33
- data/test/utils_test.rb +0 -18
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9489c1f87e6ba193db49f7161a49a49bd91055ee16d52ffd516b4f383fae41c9
|
4
|
+
data.tar.gz: e1a1428460bf671996caa1cd1db27694fa1f8d5f9f7dc98808bc1d97fd898aec
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a8f460dd89f53322e0124112db03c19d1c7beaf5517124d2d2ee62deaf3e6ffd321dad5b5c3a30777fce2d7f20134e65df64ca97090a5c50fb32cff8e0d8a963
|
7
|
+
data.tar.gz: 82cd134971ec6dc214c61009b6c4bb5fabea7d6c41ae06d42c0ac1ea944bc85dcdf19ac7af67f6165f30532371c8db4e583f5c33c8ef529581df073ef5edfd7a
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/README.rdoc
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
*This gem is no longer maintained. Official Ruby support for WURFL is offered commercially by ScientiaMobile. More details at: https://www.scientiamobile.com/page/wurfl-infuze.*
|
2
|
+
|
1
3
|
= WURFL
|
2
4
|
|
3
5
|
WURFL is a collection of libraries and command line tools for using and manipulating the WURFL. To start using it, simply install the gem:
|
@@ -65,21 +67,21 @@ backlight capability:
|
|
65
67
|
=== uamatch
|
66
68
|
|
67
69
|
Is a tool that will let you do various searches and queries on the
|
68
|
-
WURFL based on user-agent strings. This is a very simple, yet powerful
|
69
|
-
program for finding information about the handsets in the WURFL.
|
70
|
+
WURFL based on user-agent strings. This is a very simple, yet powerful
|
71
|
+
program for finding information about the handsets in the WURFL.
|
70
72
|
See the uamatch examples section for usage.
|
71
73
|
|
72
|
-
The uamatcher will retrieve the handset descriptions with the closest
|
74
|
+
The uamatcher will retrieve the handset descriptions with the closest
|
73
75
|
Levenshtein distance (also called the edit distance) to the user-agent
|
74
|
-
string you pass as argument.
|
76
|
+
string you pass as argument.
|
75
77
|
|
76
78
|
For details see: http://en.wikipedia.org/wiki/Levenshtein_distance
|
77
79
|
|
78
80
|
When more than one handset has the same distance to the user agent string queried,
|
79
81
|
the command will iterate over the result set and print the result for each handset.
|
80
82
|
|
81
|
-
The found wurfl_ids can serve as input to the inspector command.
|
82
|
-
You can also specifically query for a certain capability.
|
83
|
+
The found wurfl_ids can serve as input to the inspector command.
|
84
|
+
You can also specifically query for a certain capability.
|
83
85
|
|
84
86
|
==== Usage
|
85
87
|
|
@@ -119,17 +121,17 @@ The mappings are not fully complete and can certainly use your input
|
|
119
121
|
in improving them.
|
120
122
|
|
121
123
|
About the source code:
|
122
|
-
The main piece of code to read are the methods under the
|
124
|
+
The main piece of code to read are the methods under the
|
123
125
|
"UAProfile Mappings" comment.
|
124
126
|
|
125
127
|
For now you can ignore the details above this comment.
|
126
128
|
Basically each method is the name of a UAProfifle component.
|
127
129
|
When you parse a UAProfile file it will call each UAProfile
|
128
|
-
component's method name.
|
130
|
+
component's method name.
|
129
131
|
|
130
|
-
So you can simply look at UAProfile component's method to see
|
132
|
+
So you can simply look at UAProfile component's method to see
|
131
133
|
how it maps to the WURFL.
|
132
|
-
If a component is not found as a method it will be logged to
|
134
|
+
If a component is not found as a method it will be logged to
|
133
135
|
Standard Error. For this log one can then add the method to
|
134
136
|
the UAProfToWurfl class later.
|
135
137
|
|
@@ -141,9 +143,9 @@ A simple usage is:
|
|
141
143
|
|
142
144
|
Example use from a bash shell with many profiles:
|
143
145
|
|
144
|
-
for i in `ls profiles`; do
|
145
|
-
wurfltools.rb uaproftowurfl profiles/$i >output/$i.wurfl
|
146
|
-
2> output/$i.parser.err;
|
146
|
+
for i in `ls profiles`; do
|
147
|
+
wurfltools.rb uaproftowurfl profiles/$i >output/$i.wurfl
|
148
|
+
2> output/$i.parser.err;
|
147
149
|
done
|
148
150
|
|
149
151
|
This assumes that you have a profiles directory with all of the UAProf
|
data/Rakefile
CHANGED
@@ -1,38 +1,6 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require 'rubygems' if RUBY_VERSION < "1.9"
|
4
|
-
require 'shoulda/tasks'
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rspec/core/rake_task"
|
5
3
|
|
6
|
-
|
4
|
+
RSpec::Core::RakeTask.new(:spec)
|
7
5
|
|
8
|
-
|
9
|
-
t.test_files = FileList['test/*_test.rb']
|
10
|
-
t.ruby_opts = ['-I"."']
|
11
|
-
t.ruby_opts = ['-rubygems'] if RUBY_VERSION < "1.9" && defined? Gem
|
12
|
-
end
|
13
|
-
|
14
|
-
begin
|
15
|
-
require 'jeweler'
|
16
|
-
Jeweler::Tasks.new do |s|
|
17
|
-
s.name = "wurfl"
|
18
|
-
s.summary = "Library and tools for manipulating the WURFL"
|
19
|
-
s.description = "Library and tools for manipulating the WURFL"
|
20
|
-
s.email = "info@mobalean.com"
|
21
|
-
s.homepage = "http://wurfl.rubyforge.org"
|
22
|
-
s.authors = ["Paul McMahon", "Zev Blut"]
|
23
|
-
s.rubyforge_project = 'wurfl'
|
24
|
-
s.add_dependency 'libxml-ruby'
|
25
|
-
end
|
26
|
-
Jeweler::RubyforgeTasks.new do |rubyforge|
|
27
|
-
rubyforge.doc_task = "rdoc"
|
28
|
-
end
|
29
|
-
rescue LoadError
|
30
|
-
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
31
|
-
end
|
32
|
-
|
33
|
-
Rake::RDocTask.new(:rdoc) do |rdoc|
|
34
|
-
rdoc.rdoc_dir = 'rdoc'
|
35
|
-
rdoc.title = 'WURFL'
|
36
|
-
rdoc.main = "README.rdoc"
|
37
|
-
rdoc.rdoc_files.include("README.rdoc", "LICENSE", "lib/**/*.rb")
|
38
|
-
end
|
6
|
+
task :default => :spec
|
data/lib/wurfl.rb
ADDED
data/wurfl.gemspec
CHANGED
@@ -1,80 +1,29 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
1
|
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "wurfl/version"
|
9
5
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
s.email = %q{info@mobalean.com}
|
16
|
-
s.executables = ["wurfltools.rb"]
|
17
|
-
s.extra_rdoc_files = [
|
18
|
-
"LICENSE",
|
19
|
-
"README.rdoc"
|
20
|
-
]
|
21
|
-
s.files = [
|
22
|
-
".gitignore",
|
23
|
-
"Examples.txt",
|
24
|
-
"LICENSE",
|
25
|
-
"README.rdoc",
|
26
|
-
"Rakefile",
|
27
|
-
"VERSION",
|
28
|
-
"bin/wurfltools.rb",
|
29
|
-
"lib/wurfl/command.rb",
|
30
|
-
"lib/wurfl/command/comparator.rb",
|
31
|
-
"lib/wurfl/command/inspector.rb",
|
32
|
-
"lib/wurfl/command/loader.rb",
|
33
|
-
"lib/wurfl/command/sanitycheck.rb",
|
34
|
-
"lib/wurfl/command/uamatch.rb",
|
35
|
-
"lib/wurfl/command/uaproftowurfl.rb",
|
36
|
-
"lib/wurfl/handset.rb",
|
37
|
-
"lib/wurfl/loader.rb",
|
38
|
-
"lib/wurfl/uaproftowurfl.rb",
|
39
|
-
"lib/wurfl/user_agent_matcher.rb",
|
40
|
-
"lib/wurfl/utils.rb",
|
41
|
-
"test/benchmark.rb",
|
42
|
-
"test/data/wurfl.generic.patch.xml",
|
43
|
-
"test/data/wurfl.large.xml",
|
44
|
-
"test/data/wurfl.reverse.xml",
|
45
|
-
"test/data/wurfl.simple.xml",
|
46
|
-
"test/handset_test.rb",
|
47
|
-
"test/loader_test.rb",
|
48
|
-
"test/test_helper.rb",
|
49
|
-
"test/user_agent_matcher_test.rb",
|
50
|
-
"test/utils_test.rb",
|
51
|
-
"wurfl.gemspec"
|
52
|
-
]
|
53
|
-
s.homepage = %q{http://wurfl.rubyforge.org}
|
54
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
55
|
-
s.require_paths = ["lib"]
|
56
|
-
s.rubyforge_project = %q{wurfl}
|
57
|
-
s.rubygems_version = %q{1.3.7}
|
58
|
-
s.summary = %q{Library and tools for manipulating the WURFL}
|
59
|
-
s.test_files = [
|
60
|
-
"test/benchmark.rb",
|
61
|
-
"test/handset_test.rb",
|
62
|
-
"test/loader_test.rb",
|
63
|
-
"test/test_helper.rb",
|
64
|
-
"test/user_agent_matcher_test.rb",
|
65
|
-
"test/utils_test.rb"
|
66
|
-
]
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "wurfl"
|
8
|
+
spec.version = Wurfl::VERSION
|
9
|
+
spec.authors = ["Paul McMahon", "Zev Blut"]
|
10
|
+
spec.email = ["paul@doorkeeper.jp"]
|
67
11
|
|
68
|
-
|
69
|
-
|
70
|
-
|
12
|
+
spec.summary = %q{This gem is no longer maintained. Official Ruby support for WURFL is offered commercially by ScientiaMobile. More details at: https://www.scientiamobile.com/page/wurfl-infuze.}
|
13
|
+
spec.description = %q{This gem is no longer maintained. Official Ruby support for WURFL is offered commercially by ScientiaMobile. More details at: https://www.scientiamobile.com/page/wurfl-infuze.}
|
14
|
+
spec.homepage = "https://github.com/mobalean/wurfl"
|
15
|
+
spec.license = "BSD 3-Clause"
|
71
16
|
|
72
|
-
|
73
|
-
|
74
|
-
else
|
75
|
-
s.add_dependency(%q<libxml-ruby>, [">= 0"])
|
76
|
-
end
|
77
|
-
else
|
78
|
-
s.add_dependency(%q<libxml-ruby>, [">= 0"])
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
79
19
|
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
27
|
+
|
28
|
+
spec.post_install_message = %q{The `wurfl` gem is no longer maintained. Official Ruby support for WURFL is offered commercially by ScientiaMobile. More details at: https://www.scientiamobile.com/page/wurfl-infuze.}
|
80
29
|
end
|
metadata
CHANGED
@@ -1,55 +1,76 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: wurfl
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease: false
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 3
|
9
|
-
- 6
|
10
|
-
version: 1.3.6
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.3.7
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Paul McMahon
|
14
8
|
- Zev Blut
|
15
9
|
autorequire:
|
16
|
-
bindir:
|
10
|
+
bindir: exe
|
17
11
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
12
|
+
date: 2018-03-12 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.16'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '1.16'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: rake
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '10.0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '10.0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: rspec
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '3.0'
|
49
|
+
type: :development
|
24
50
|
prerelease: false
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
version_requirements: *id001
|
36
|
-
description: Library and tools for manipulating the WURFL
|
37
|
-
email: info@mobalean.com
|
38
|
-
executables:
|
39
|
-
- wurfltools.rb
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '3.0'
|
56
|
+
description: 'This gem is no longer maintained. Official Ruby support for WURFL is
|
57
|
+
offered commercially by ScientiaMobile. More details at: https://www.scientiamobile.com/page/wurfl-infuze.'
|
58
|
+
email:
|
59
|
+
- paul@doorkeeper.jp
|
60
|
+
executables: []
|
40
61
|
extensions: []
|
41
|
-
|
42
|
-
|
43
|
-
-
|
44
|
-
-
|
45
|
-
files:
|
46
|
-
- .gitignore
|
62
|
+
extra_rdoc_files: []
|
63
|
+
files:
|
64
|
+
- ".gitignore"
|
65
|
+
- ".travis.yml"
|
47
66
|
- Examples.txt
|
67
|
+
- Gemfile
|
48
68
|
- LICENSE
|
49
69
|
- README.rdoc
|
50
70
|
- Rakefile
|
51
71
|
- VERSION
|
52
72
|
- bin/wurfltools.rb
|
73
|
+
- lib/wurfl.rb
|
53
74
|
- lib/wurfl/command.rb
|
54
75
|
- lib/wurfl/command/comparator.rb
|
55
76
|
- lib/wurfl/command/inspector.rb
|
@@ -62,55 +83,32 @@ files:
|
|
62
83
|
- lib/wurfl/uaproftowurfl.rb
|
63
84
|
- lib/wurfl/user_agent_matcher.rb
|
64
85
|
- lib/wurfl/utils.rb
|
65
|
-
-
|
66
|
-
- test/data/wurfl.generic.patch.xml
|
67
|
-
- test/data/wurfl.large.xml
|
68
|
-
- test/data/wurfl.reverse.xml
|
69
|
-
- test/data/wurfl.simple.xml
|
70
|
-
- test/handset_test.rb
|
71
|
-
- test/loader_test.rb
|
72
|
-
- test/test_helper.rb
|
73
|
-
- test/user_agent_matcher_test.rb
|
74
|
-
- test/utils_test.rb
|
86
|
+
- lib/wurfl/version.rb
|
75
87
|
- wurfl.gemspec
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
post_install_message:
|
81
|
-
|
82
|
-
|
83
|
-
require_paths:
|
88
|
+
homepage: https://github.com/mobalean/wurfl
|
89
|
+
licenses:
|
90
|
+
- BSD 3-Clause
|
91
|
+
metadata: {}
|
92
|
+
post_install_message: 'The `wurfl` gem is no longer maintained. Official Ruby support
|
93
|
+
for WURFL is offered commercially by ScientiaMobile. More details at: https://www.scientiamobile.com/page/wurfl-infuze.'
|
94
|
+
rdoc_options: []
|
95
|
+
require_paths:
|
84
96
|
- lib
|
85
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
-
|
87
|
-
requirements:
|
97
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
88
99
|
- - ">="
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
version: "0"
|
94
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
-
none: false
|
96
|
-
requirements:
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
97
104
|
- - ">="
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
|
100
|
-
segments:
|
101
|
-
- 0
|
102
|
-
version: "0"
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
103
107
|
requirements: []
|
104
|
-
|
105
|
-
|
106
|
-
rubygems_version: 1.3.7
|
108
|
+
rubyforge_project:
|
109
|
+
rubygems_version: 2.7.3
|
107
110
|
signing_key:
|
108
|
-
specification_version:
|
109
|
-
summary:
|
110
|
-
|
111
|
-
|
112
|
-
- test/handset_test.rb
|
113
|
-
- test/loader_test.rb
|
114
|
-
- test/test_helper.rb
|
115
|
-
- test/user_agent_matcher_test.rb
|
116
|
-
- test/utils_test.rb
|
111
|
+
specification_version: 4
|
112
|
+
summary: 'This gem is no longer maintained. Official Ruby support for WURFL is offered
|
113
|
+
commercially by ScientiaMobile. More details at: https://www.scientiamobile.com/page/wurfl-infuze.'
|
114
|
+
test_files: []
|