useragent 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,6 +8,8 @@ class UserAgent
8
8
  GeckoBrowsers = %w(
9
9
  Firefox
10
10
  Camino
11
+ Iceweasel
12
+ Seamonkey
11
13
  ).freeze
12
14
 
13
15
  def browser
@@ -4,7 +4,8 @@ class UserAgent
4
4
  def self.extend?(agent)
5
5
  agent.application &&
6
6
  agent.application.comment &&
7
- agent.application.comment[0] == "compatible"
7
+ agent.application.comment[0] == "compatible" &&
8
+ agent.application.comment[1] =~ /MSIE/
8
9
  end
9
10
 
10
11
  def browser
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: useragent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Peek
@@ -9,11 +9,11 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-01 00:00:00 -05:00
12
+ date: 2009-11-11 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
16
- description: UserAgent is a Ruby library that parses and compares HTTP User Agents.
16
+ description: " UserAgent is a Ruby library that parses and compares HTTP User Agents.\n"
17
17
  email: josh@joshpeek.com
18
18
  executables: []
19
19
 
@@ -22,8 +22,6 @@ extensions: []
22
22
  extra_rdoc_files: []
23
23
 
24
24
  files:
25
- - README
26
- - LICENSE
27
25
  - lib/user_agent/browsers/all.rb
28
26
  - lib/user_agent/browsers/gecko.rb
29
27
  - lib/user_agent/browsers/internet_explorer.rb
@@ -57,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
55
  version:
58
56
  requirements: []
59
57
 
60
- rubyforge_project: useragent
58
+ rubyforge_project:
61
59
  rubygems_version: 1.3.5
62
60
  signing_key:
63
61
  specification_version: 3
data/LICENSE DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2009 Joshua Peek
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README DELETED
@@ -1,21 +0,0 @@
1
- UserAgent
2
- =========
3
-
4
- UserAgent is a Ruby library that parses and compares HTTP User Agents.
5
-
6
-
7
- Example
8
- =======
9
-
10
- Browser = Struct.new(:browser, :version)
11
- SupportedBrowsers = [
12
- Browser.new("Safari", "3.1.1"),
13
- Browser.new("Firefox", "2.0.0.14"),
14
- Browser.new("Internet Explorer", "7.0")
15
- ]
16
-
17
- user_agent = UserAgent.parse(request.user_agent)
18
- SupportedBrowsers.detect { |browser| user_agent >= browser }
19
-
20
-
21
- Copyright (c) 2009 Joshua Peek, released under the MIT license