rack-body_classes 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc7d86b8df2ce7b7aa90d6f6c8bbd296dd6ebb24
4
- data.tar.gz: 4c98bb0a9eb0b13b4ca18697307dacf2ea52f757
3
+ metadata.gz: 88ac398d3e59613aa3bcadaac5ff3457531b44eb
4
+ data.tar.gz: 2d48235a57572d55a2849c23cd6c617d3e0b68f6
5
5
  SHA512:
6
- metadata.gz: 4d9d8078ec67e995486269ce1f8a18877fd50be922f29787bcec4a3937869cb28c5465a999038d09f2ef452bc3e8bb872276f88003896f738074bef4c1fe9137
7
- data.tar.gz: 49a135ba32810023c624facdd47ad856101a59ed3244f3e54d55fa474b4e61ead638d7e2b808bc121dad4953f08fe60aaa660e6ff71a61e15300e9373cb3e58e
6
+ metadata.gz: 187db5543f8d3b6628c02e8b8168f60e2da92ad3bf90479a5c43ecf515f8c1a290c20fe920222cc76f0318845c681ddbf40c791d4e0768b138939275afce1b96
7
+ data.tar.gz: 931010e2a2410ffcde8b22b51450056ffbb1fca1550e1347e44aa38378352c52b129b0f30058891c524ebdff06b62c8e1f453b5aec380106423e1d98693c6f90
@@ -22,6 +22,7 @@ module Rack
22
22
  private
23
23
 
24
24
  def mobile_esp(user_agent, http_accept)
25
+ return 'unknown-device' if user_agent.nil? || http_accept.nil?
25
26
  mobileesp = MobileESPConverted::UserAgentInfo.new(user_agent, http_accept)
26
27
  return :mobile if mobileesp.is_tier_generic_mobile || mobileesp.is_tier_iphone || mobileesp.is_tier_rich_css
27
28
  return :tablet if mobileesp.is_tier_tablet
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class BodyClasses
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
@@ -6,6 +6,6 @@ require 'spec_helper'
6
6
  describe Rack::BodyClasses do
7
7
  it "returns body classes" do
8
8
  get '/'
9
- last_response.body.must_match(/<body class="desktop other other0"><\/body>/)
9
+ last_response.body.must_match(/<body class="unknown-device other other0"><\/body>/)
10
10
  end
11
11
  end
@@ -20,7 +20,6 @@ include Rack::Test::Methods
20
20
  require 'sinatra/base'
21
21
  class App < Sinatra::Base
22
22
  use Rack::BodyClasses
23
- enable :logging
24
23
 
25
24
  get '/' do
26
25
  %Q{<html><head></head><body class="#{env['rack.body_classes']}"></body></html>}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-body_classes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Marden