cv-user-agent 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/.rvmrc +1 -0
- data/Gemfile +2 -4
- data/Rakefile +2 -9
- data/cv-user-agent.gemspec +17 -24
- data/lib/user-agent/agent.rb +100 -100
- data/lib/user-agent/version.rb +2 -2
- data/spec/agent_spec.rb +17 -17
- data/spec/agents_spec.rb +2 -3
- data/tasks/spec.rake +3 -24
- metadata +56 -65
- data/History.rdoc +0 -12
- data/Manifest +0 -15
- data/tasks/docs.rake +0 -13
- data/tasks/gemspec.rake +0 -3
data/.gitignore
ADDED
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm --create 1.9.2@user-agent
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,15 +1,8 @@
|
|
1
|
-
|
2
1
|
$:.unshift 'lib'
|
3
2
|
require 'user-agent'
|
4
3
|
require 'rubygems'
|
5
4
|
require 'rake'
|
6
|
-
require 'echoe'
|
7
5
|
|
8
|
-
|
9
|
-
p.author = "Carlos Villela"
|
10
|
-
p.email = "cv@lixo.org"
|
11
|
-
p.summary = "User agent parser"
|
12
|
-
p.runtime_dependencies = []
|
13
|
-
end
|
6
|
+
Dir['tasks/**/*.rake'].sort.each { |f| load f }
|
14
7
|
|
15
|
-
|
8
|
+
task :default => :spec
|
data/cv-user-agent.gemspec
CHANGED
@@ -1,30 +1,23 @@
|
|
1
|
-
|
1
|
+
$:.push File.expand_path('../lib', __FILE__)
|
2
|
+
require 'user-agent/version'
|
2
3
|
|
3
4
|
Gem::Specification.new do |s|
|
4
|
-
s.name = %q{cv-user-agent}
|
5
|
-
s.version = "1.0.2"
|
6
5
|
|
7
|
-
s.
|
8
|
-
s.
|
9
|
-
s.
|
10
|
-
s.
|
11
|
-
s.
|
12
|
-
s.
|
13
|
-
s.
|
14
|
-
s.
|
15
|
-
s.
|
16
|
-
s.require_paths = ["lib"]
|
17
|
-
s.rubyforge_project = %q{cv-user-agent}
|
18
|
-
s.rubygems_version = %q{1.3.7}
|
19
|
-
s.summary = %q{User agent parser}
|
6
|
+
s.name = 'cv-user-agent'
|
7
|
+
s.version = UserAgent::VERSION
|
8
|
+
s.authors = ['Carlos Villela']
|
9
|
+
s.email = 'cvillela@thoughtworks.com'
|
10
|
+
s.homepage = 'http://github.com/cv/user-agent'
|
11
|
+
s.summary = 'User agent parser'
|
12
|
+
s.description = 'user-agent is a user agent parser support most of the commonly used browsers today.'
|
13
|
+
s.rubyforge_project = 'cv-user-agent'
|
14
|
+
s.require_paths = ['lib']
|
20
15
|
|
21
|
-
|
22
|
-
|
23
|
-
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- spec/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
19
|
+
|
20
|
+
s.add_development_dependency 'rake'
|
21
|
+
s.add_development_dependency 'rspec'
|
24
22
|
|
25
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
26
|
-
else
|
27
|
-
end
|
28
|
-
else
|
29
|
-
end
|
30
23
|
end
|
data/lib/user-agent/agent.rb
CHANGED
@@ -1,126 +1,126 @@
|
|
1
|
+
module UserAgent
|
1
2
|
|
2
|
-
class Agent
|
3
|
+
class Agent
|
3
4
|
|
4
|
-
|
5
|
+
attr_reader :string
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
def name
|
11
|
-
Agent.name_for_user_agent string
|
12
|
-
end
|
7
|
+
def initialize string
|
8
|
+
@string = string.strip
|
9
|
+
end
|
13
10
|
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
def name
|
12
|
+
Agent.name_for_user_agent string
|
13
|
+
end
|
17
14
|
|
18
|
-
|
19
|
-
|
20
|
-
|
15
|
+
def version
|
16
|
+
Agent.version_for_user_agent string
|
17
|
+
end
|
21
18
|
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
def engine
|
20
|
+
Agent.engine_for_user_agent string
|
21
|
+
end
|
25
22
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
def platform
|
31
|
-
Agent.platform_for_user_agent string
|
32
|
-
end
|
23
|
+
def engine_version
|
24
|
+
Agent.engine_version_for_user_agent string
|
25
|
+
end
|
33
26
|
|
34
|
-
|
35
|
-
|
36
|
-
|
27
|
+
def os
|
28
|
+
Agent.os_for_user_agent string
|
29
|
+
end
|
37
30
|
|
38
|
-
|
39
|
-
|
40
|
-
|
31
|
+
def platform
|
32
|
+
Agent.platform_for_user_agent string
|
33
|
+
end
|
41
34
|
|
42
|
-
|
43
|
-
|
44
|
-
|
35
|
+
def to_s
|
36
|
+
string
|
37
|
+
end
|
45
38
|
|
39
|
+
def inspect
|
40
|
+
"#<Agent:#{name} version:#{version.inspect} engine:\"#{engine.to_s}:#{engine_version}\" os:#{os.to_s.inspect}>"
|
41
|
+
end
|
46
42
|
|
43
|
+
def == other
|
44
|
+
string == other.string
|
45
|
+
end
|
47
46
|
|
48
|
-
|
49
|
-
|
50
|
-
|
47
|
+
def self.engine_version_for_user_agent string
|
48
|
+
$1 if string =~ /#{engine_for_user_agent(string)}[\/ ]([\d\w\.\-]+)/i
|
49
|
+
end
|
51
50
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
51
|
+
def self.version_for_user_agent string
|
52
|
+
case name = name_for_user_agent(string)
|
53
|
+
when :Chrome ; $1 if string =~ /chrome\/([\d\w\.\-]+)/i
|
54
|
+
when :Safari ; $1 if string =~ /version\/([\d\w\.\-]+)/i
|
55
|
+
when :PS3 ; $1 if string =~ /([\d\w\.\-]+)\)\s*$/i
|
56
|
+
when :PSP ; $1 if string =~ /([\d\w\.\-]+)\)?\s*$/i
|
57
|
+
else $1 if string =~ /#{name}[\/ ]([\d\w\.\-]+)/i
|
58
|
+
end
|
59
59
|
end
|
60
|
-
end
|
61
60
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
61
|
+
def self.engine_for_user_agent string
|
62
|
+
case string
|
63
|
+
when /webkit/i ; :webkit
|
64
|
+
when /khtml/i ; :khtml
|
65
|
+
when /konqueror/i ; :konqueror
|
66
|
+
when /chrome/i ; :chrome
|
67
|
+
when /presto/i ; :presto
|
68
|
+
when /gecko/i ; :gecko
|
69
|
+
when /msie/i ; :msie
|
70
|
+
else :Unknown
|
71
|
+
end
|
72
72
|
end
|
73
|
-
end
|
74
73
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
74
|
+
def self.os_for_user_agent string
|
75
|
+
case string
|
76
|
+
when /windows nt 6\.0/i ; :'Windows Vista'
|
77
|
+
when /windows nt 6\.\d+/i ; :'Windows 7'
|
78
|
+
when /windows nt 5\.2/i ; :'Windows 2003'
|
79
|
+
when /windows nt 5\.1/i ; :'Windows XP'
|
80
|
+
when /windows nt 5\.0/i ; :'Windows 2000'
|
81
|
+
when /os x (\d+)[._](\d+)/i ; :"OS X #{$1}.#{$2}"
|
82
|
+
when /linux/i ; :Linux
|
83
|
+
when /wii/i ; :Wii
|
84
|
+
when /playstation 3/i ; :Playstation
|
85
|
+
when /playstation portable/i ; :Playstation
|
86
|
+
when /\(ipad.*os (\d+)[._](\d+)/i ; :"iPad OS #{$1}.#{$2}"
|
87
|
+
when /\(iphone.*os (\d+)[._](\d+)/i ; :"iPhone OS #{$1}.#{$2}"
|
88
|
+
else ; :Unknown
|
89
|
+
end
|
90
90
|
end
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
91
|
+
|
92
|
+
def self.platform_for_user_agent string
|
93
|
+
case string
|
94
|
+
when /windows/i ; :Windows
|
95
|
+
when /macintosh/i ; :Macintosh
|
96
|
+
when /linux/i ; :Linux
|
97
|
+
when /wii/i ; :Wii
|
98
|
+
when /playstation/i ; :Playstation
|
99
|
+
when /ipad/i ; :iPad
|
100
|
+
when /iphone/i ; :iPhone
|
101
|
+
else :Unknown
|
102
|
+
end
|
103
103
|
end
|
104
|
-
end
|
105
104
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
105
|
+
def self.name_for_user_agent string
|
106
|
+
case string
|
107
|
+
when /konqueror/i ; :Konqueror
|
108
|
+
when /chrome/i ; :Chrome
|
109
|
+
when /safari/i ; :Safari
|
110
|
+
when /msie/i ; :IE
|
111
|
+
when /opera/i ; :Opera
|
112
|
+
when /playstation 3/i ; :PS3
|
113
|
+
when /playstation portable/i ; :PSP
|
114
|
+
when /firefox/i ; :Firefox
|
115
|
+
else ; :Unknown
|
116
|
+
end
|
117
117
|
end
|
118
|
-
end
|
119
118
|
|
120
|
-
|
119
|
+
@agents = []
|
121
120
|
|
122
|
-
|
123
|
-
|
124
|
-
|
121
|
+
def self.map name, options = {}
|
122
|
+
@agents << [name, options]
|
123
|
+
end
|
125
124
|
|
125
|
+
end
|
126
126
|
end
|
data/lib/user-agent/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
VERSION = '1.0.
|
1
|
+
module UserAgent
|
2
|
+
VERSION = '1.0.3'
|
3
3
|
end
|
data/spec/agent_spec.rb
CHANGED
@@ -1,64 +1,64 @@
|
|
1
1
|
|
2
2
|
require File.dirname(__FILE__) + '/spec_helper'
|
3
3
|
|
4
|
-
describe Agent do
|
4
|
+
describe UserAgent::Agent do
|
5
5
|
before :each do
|
6
|
-
@agent = Agent.new 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/528.4+ (KHTML, like Gecko) Version/4.0dp1 Safari/526.11.2'
|
6
|
+
@agent = UserAgent::Agent.new 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/528.4+ (KHTML, like Gecko) Version/4.0dp1 Safari/526.11.2'
|
7
7
|
end
|
8
|
-
|
8
|
+
|
9
9
|
describe "#initialize" do
|
10
10
|
it "should allow a user agent string to be passed" do
|
11
|
-
Agent.new('foo').string.should == 'foo'
|
11
|
+
UserAgent::Agent.new('foo').string.should == 'foo'
|
12
12
|
end
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
describe "#os" do
|
16
16
|
it "should return operating system symbol" do
|
17
17
|
@agent.os.should == :'OS X 10.5'
|
18
18
|
end
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
describe "#engine" do
|
22
22
|
it "should return engine symbol" do
|
23
23
|
@agent.engine.should == :webkit
|
24
24
|
end
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
describe "#engine_version" do
|
28
28
|
it "should return engine version" do
|
29
29
|
@agent.engine_version.should == '528.4'
|
30
30
|
end
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
33
|
describe "#to_s" do
|
34
34
|
it "should return the user agent string" do
|
35
35
|
@agent.to_s.should == @agent.string
|
36
36
|
end
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
39
|
describe "#inspect" do
|
40
40
|
it "should return string presenting the engine, os, version, etc" do
|
41
41
|
@agent.inspect.should == '#<Agent:Safari version:"4.0dp1" engine:"webkit:528.4" os:"OS X 10.5">'
|
42
42
|
end
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
45
|
describe "#name" do
|
46
46
|
it "should return the agent name symbol" do
|
47
47
|
@agent.name.should == :'Safari'
|
48
48
|
end
|
49
49
|
end
|
50
|
-
|
50
|
+
|
51
51
|
describe "#==" do
|
52
52
|
it "should be equal when the user agent strings are the same" do
|
53
|
-
a = Agent.new 'foo'
|
54
|
-
b = Agent.new 'foo'
|
53
|
+
a = UserAgent::Agent.new 'foo'
|
54
|
+
b = UserAgent::Agent.new 'foo'
|
55
55
|
a.should == b
|
56
56
|
end
|
57
|
-
|
57
|
+
|
58
58
|
it "should not be equal when user agent strings are different" do
|
59
|
-
a = Agent.new 'foo'
|
60
|
-
b = Agent.new 'bar'
|
59
|
+
a = UserAgent::Agent.new 'foo'
|
60
|
+
b = UserAgent::Agent.new 'bar'
|
61
61
|
a.should_not == b
|
62
62
|
end
|
63
63
|
end
|
64
|
-
end
|
64
|
+
end
|
data/spec/agents_spec.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
|
2
1
|
require File.dirname(__FILE__) + '/spec_helper'
|
3
2
|
|
4
3
|
def test name, version, platform, os, engine, engine_version, string
|
5
4
|
it "should parse #{name} #{version} on #{os} with engine #{engine} #{engine_version}" do
|
6
|
-
agent = Agent.new string
|
5
|
+
agent = UserAgent::Agent.new string
|
7
6
|
agent.name.should == name
|
8
7
|
agent.os.should == os
|
9
8
|
agent.platform.should == platform
|
@@ -13,7 +12,7 @@ def test name, version, platform, os, engine, engine_version, string
|
|
13
12
|
end
|
14
13
|
end
|
15
14
|
|
16
|
-
describe Agent do
|
15
|
+
describe UserAgent::Agent do
|
17
16
|
|
18
17
|
test :Safari, '4.0dp1', :Windows, :'Windows XP', :webkit, '526.9', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en) AppleWebKit/526.9 (KHTML, like Gecko) Version/4.0dp1 Safari/526.8'
|
19
18
|
test :Safari, '4.0.3', :Windows, :'Windows Vista', :webkit, '531.9', 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9'
|
data/tasks/spec.rake
CHANGED
@@ -1,25 +1,4 @@
|
|
1
|
+
require 'rspec/core/rake_task'
|
1
2
|
|
2
|
-
|
3
|
-
|
4
|
-
desc "Run all specifications"
|
5
|
-
Spec::Rake::SpecTask.new(:spec) do |t|
|
6
|
-
t.libs << "lib"
|
7
|
-
t.spec_opts = ["--color", "--require", "spec/spec_helper.rb"]
|
8
|
-
end
|
9
|
-
|
10
|
-
namespace :spec do
|
11
|
-
|
12
|
-
desc "Run all specifications verbosely"
|
13
|
-
Spec::Rake::SpecTask.new(:verbose) do |t|
|
14
|
-
t.libs << "lib"
|
15
|
-
t.spec_opts = ["--color", "--format", "specdoc", "--require", "spec/spec_helper.rb"]
|
16
|
-
end
|
17
|
-
|
18
|
-
desc "Run specific specification verbosely (specify SPEC)"
|
19
|
-
Spec::Rake::SpecTask.new(:select) do |t|
|
20
|
-
t.libs << "lib"
|
21
|
-
t.spec_files = [ENV["SPEC"]]
|
22
|
-
t.spec_opts = ["--color", "--format", "specdoc", "--require", "spec/spec_helper.rb"]
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
3
|
+
desc 'Run all specifications'
|
4
|
+
RSpec::Core::RakeTask.new(:spec)
|
metadata
CHANGED
@@ -1,44 +1,51 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: cv-user-agent
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 2
|
10
|
-
version: 1.0.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.3
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Carlos Villela
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
12
|
+
date: 2011-10-25 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rake
|
16
|
+
requirement: &70208198832040 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70208198832040
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rspec
|
27
|
+
requirement: &70208198831620 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70208198831620
|
36
|
+
description: user-agent is a user agent parser support most of the commonly used browsers
|
37
|
+
today.
|
38
|
+
email: cvillela@thoughtworks.com
|
24
39
|
executables: []
|
25
|
-
|
26
40
|
extensions: []
|
27
|
-
|
28
|
-
|
29
|
-
-
|
30
|
-
-
|
31
|
-
- lib/user-agent/agent.rb
|
32
|
-
- lib/user-agent/version.rb
|
33
|
-
- tasks/docs.rake
|
34
|
-
- tasks/gemspec.rake
|
35
|
-
- tasks/spec.rake
|
36
|
-
files:
|
41
|
+
extra_rdoc_files: []
|
42
|
+
files:
|
43
|
+
- .gitignore
|
44
|
+
- .rvmrc
|
37
45
|
- Gemfile
|
38
|
-
- History.rdoc
|
39
|
-
- Manifest
|
40
46
|
- README.rdoc
|
41
47
|
- Rakefile
|
48
|
+
- cv-user-agent.gemspec
|
42
49
|
- lib/user-agent.rb
|
43
50
|
- lib/user-agent/agent.rb
|
44
51
|
- lib/user-agent/version.rb
|
@@ -46,49 +53,33 @@ files:
|
|
46
53
|
- spec/agents_spec.rb
|
47
54
|
- spec/spec.opts
|
48
55
|
- spec/spec_helper.rb
|
49
|
-
- tasks/docs.rake
|
50
|
-
- tasks/gemspec.rake
|
51
56
|
- tasks/spec.rake
|
52
|
-
|
53
|
-
has_rdoc: true
|
54
|
-
homepage: ""
|
57
|
+
homepage: http://github.com/cv/user-agent
|
55
58
|
licenses: []
|
56
|
-
|
57
59
|
post_install_message:
|
58
|
-
rdoc_options:
|
59
|
-
|
60
|
-
- --inline-source
|
61
|
-
- --title
|
62
|
-
- Cv-user-agent
|
63
|
-
- --main
|
64
|
-
- README.rdoc
|
65
|
-
require_paths:
|
60
|
+
rdoc_options: []
|
61
|
+
require_paths:
|
66
62
|
- lib
|
67
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
63
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
68
64
|
none: false
|
69
|
-
requirements:
|
70
|
-
- -
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
|
73
|
-
|
74
|
-
- 0
|
75
|
-
version: "0"
|
76
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
70
|
none: false
|
78
|
-
requirements:
|
79
|
-
- -
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
|
82
|
-
segments:
|
83
|
-
- 1
|
84
|
-
- 2
|
85
|
-
version: "1.2"
|
71
|
+
requirements:
|
72
|
+
- - ! '>='
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
86
75
|
requirements: []
|
87
|
-
|
88
76
|
rubyforge_project: cv-user-agent
|
89
|
-
rubygems_version: 1.
|
77
|
+
rubygems_version: 1.8.10
|
90
78
|
signing_key:
|
91
79
|
specification_version: 3
|
92
80
|
summary: User agent parser
|
93
|
-
test_files:
|
94
|
-
|
81
|
+
test_files:
|
82
|
+
- spec/agent_spec.rb
|
83
|
+
- spec/agents_spec.rb
|
84
|
+
- spec/spec.opts
|
85
|
+
- spec/spec_helper.rb
|
data/History.rdoc
DELETED
data/Manifest
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
Gemfile
|
2
|
-
History.rdoc
|
3
|
-
Manifest
|
4
|
-
README.rdoc
|
5
|
-
Rakefile
|
6
|
-
lib/user-agent.rb
|
7
|
-
lib/user-agent/agent.rb
|
8
|
-
lib/user-agent/version.rb
|
9
|
-
spec/agent_spec.rb
|
10
|
-
spec/agents_spec.rb
|
11
|
-
spec/spec.opts
|
12
|
-
spec/spec_helper.rb
|
13
|
-
tasks/docs.rake
|
14
|
-
tasks/gemspec.rake
|
15
|
-
tasks/spec.rake
|
data/tasks/docs.rake
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
|
2
|
-
namespace :docs do
|
3
|
-
|
4
|
-
desc 'Remove rdoc products'
|
5
|
-
task :remove => [:clobber_docs]
|
6
|
-
|
7
|
-
desc 'Build docs, and open in browser for viewing (specify BROWSER)'
|
8
|
-
task :open do
|
9
|
-
browser = ENV["BROWSER"] || "safari"
|
10
|
-
sh "open -a #{browser} doc/index.html"
|
11
|
-
end
|
12
|
-
|
13
|
-
end
|
data/tasks/gemspec.rake
DELETED