Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 53 lines (36 sloc) 1.289 kb
edb9708 @tj Docs
tj authored
1 = User Agent
78e11d0 @tj Initial commit
tj authored
2
edb9708 @tj Docs
tj authored
3 User agent parser.
4
5 == Example
6
b88b5f7 @jnunemaker Updated readme with platform.
authored
7 agent = UserAgent.new('Mozilla/5.0 (Windows; U; Windows NT 6.0; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9')
8 agent.name # => :safari
9 agent.version # => '4.0.3'
10 agent.engine # => :webkit
edb9708 @tj Docs
tj authored
11 agent.engine_version # => '531.9'
b88b5f7 @jnunemaker Updated readme with platform.
authored
12 agent.platform # => :windows
13 agent.os # => 'Windows Vista'
a9227e3 @jnunemaker Cleanup/style.
authored
14
5ff62dd @tj Added Wii support
tj authored
15 == Supported Agents
16
17 * Safari
c3ff8be @tj Added Konqueror support
tj authored
18 * Chrome
b04ec4f @jnunemaker Added FF to readme.
authored
19 * Firefox
5ff62dd @tj Added Wii support
tj authored
20 * Opera
21 * IE
c3ff8be @tj Added Konqueror support
tj authored
22 * Konqueror
55df6e7 @tj Added PS3 Support
tj authored
23 * PS3
293b09d @tj Added PSP support
tj authored
24 * PSP
5ff62dd @tj Added Wii support
tj authored
25 * Wii
6b979be @jnunemaker A few more tweaks to readme/gemspec.
authored
26
27 == Install
28
29 $ gem install user_agent
30
31 == Note on Patches/Pull Requests
32
33 * Fork the project.
34 * Make your feature addition or bug fix.
35 * Add tests for it. This is important so I don't break it in a future version unintentionally.
36 * Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
37 * Send me a pull request. Bonus points for topic branches.
38
39 == Copyright
40
41 See LICENSE for details.
42
43 == Maintenance
44
5d8b0c6 @jnunemaker More readme.
authored
45 Originally written by TJ Holowaychuk, but I (John Nunemaker) will be maintaining this fork of it for the forseeable future.
46
47 == Verified Ruby Versions
48
49 * REE 1.8.7
50 * MRI 1.9.2
51
52 Should work on all, but these are the ones I will for sure be checking against.
Something went wrong with that request. Please try again.