rack-simple_user_agent 0.2.1 → 0.2.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: 8cc8cbb7878164a3ecb9a79801473a3e2111f96c
4
- data.tar.gz: ecd67765c33faf332bc81994aabbf4b1c59634b7
3
+ metadata.gz: 8ba7fef2f942164b42f111eaab0271530cf64af4
4
+ data.tar.gz: 3ad5b568e8675cad9b5295394129346564d0390e
5
5
  SHA512:
6
- metadata.gz: 27b82814e1f239a96434c7a2c9a5e613b4318695388c3592581e38e975531a8c042e7fa641af7657f572a24d67d2714a625590d5864b3cb64a46e95bf880303c
7
- data.tar.gz: 4be9cd7634d942227be2e7e417bd33995fda2fb428b6a228c1b8a81cab6566c0ad60e75f6e6fe607c020bf064be216390a7ef6f8e8bdaa2b50e8549eb8aee744
6
+ metadata.gz: 700eb49a714b3aeb5e8a9ea4b9fbe2b2e6f204a9fb13be20bbfe69d0757d1b58cbe862aca8af4f8a45a700026ef8abc47d4779f9737e5296029724189333751d
7
+ data.tar.gz: c8b6382f6e1dbf6b2a9a819d116ec7c6ae01886cef77d272d2c56821a5b526793df0357ba36f4cf45bc183d849d0124f4054845e5415b7f5c511d83375bbbd0d
data/.travis.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  language: ruby
2
+ cache: bundler
2
3
  rvm:
3
- - 2.2
4
- - 2.3.0
4
+ - 2.2.4
5
+ - 2.3.1
5
6
  before_install: gem install bundler -v 1.11.2
data/README.md CHANGED
@@ -5,11 +5,13 @@
5
5
  [![Coverage Status](https://coveralls.io/repos/github/toshimaru/rack-simple_user_agent/badge.svg)](https://coveralls.io/github/toshimaru/rack-simple_user_agent)
6
6
  [![Code Climate](https://codeclimate.com/github/toshimaru/rack-simple_user_agent/badges/gpa.svg)](https://codeclimate.com/github/toshimaru/rack-simple_user_agent)
7
7
 
8
- Rack::SimpleUserAgent is Rack::Request extension which detects smartphone from user-agent string. There is no complicated logic for the detection, it simply checks if user-agent includes particular string.
8
+ Rack::SimpleUserAgent is Rack::Request extension which detects user-agent from request user-agent string. No complicated logic for the detection, it simply(stupidly) checks if user-agent includes particular string.
9
+
10
+ **[ANNOUNCEMENT] Current `request.from_smartphone?` behavior is going to be changed in the next version. Please don't use `request.from_smartphone?`, use `request.from_smartphone?`, `request.from_android?` instead depending on the use case.**
9
11
 
10
12
  ## Installation
11
13
 
12
- Add this line to your application's Gemfile:
14
+ Add this line to your application's `Gemfile`:
13
15
 
14
16
  ```ruby
15
17
  gem 'rack-simple_user_agent'
@@ -19,7 +21,9 @@ gem 'rack-simple_user_agent'
19
21
 
20
22
  ### on Rails
21
23
 
22
- Bundling 'rack-simple_user_agent' automatically makes Rack::SimpleUserAgent methods available. It's convenient when you use the feature [Action Pack Variants](http://guides.rubyonrails.org/4_1_release_notes.html#action-pack-variants) (as of Rails4.1).
24
+ Installing `rack-simple_user_agent` automatically makes all detection methods available. These methods are useful when you use the Rails' [Action Pack Variants](http://guides.rubyonrails.org/4_1_release_notes.html#action-pack-variants) (as of Rails4.1).
25
+
26
+ For example, you can use below detection methods in your Rails application.
23
27
 
24
28
  - `request.from_smartphone?`
25
29
  - `request.from_android?`
@@ -49,7 +53,7 @@ request ── from_smartphone?
49
53
  │ ├── from_android?
50
54
  │ │   ├── from_android_mobile?
51
55
  │ │   └── from_android_tablet?
52
- │ ├── from_iphone?
56
+ │ ├── from_ios?
53
57
  │ │   ├── from_ipad?
54
58
  │ │   ├── from_iphone?
55
59
  │ │   └── from_ipod?
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class SimpleUserAgent
3
- VERSION = "0.2.1".freeze
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-simple_user_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - toshimaru
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-09 00:00:00.000000000 Z
11
+ date: 2016-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  version: '0'
155
155
  requirements: []
156
156
  rubyforge_project:
157
- rubygems_version: 2.4.5.1
157
+ rubygems_version: 2.5.1
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: Rack::SimpleUserAgent is stupidly simple UA detector