browser_warrior 0.5.0 → 0.6.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18501db93a774c9ba1dbfab875cabb3c23b4450e
|
4
|
+
data.tar.gz: dc93592b9fd15bc439bb33a34a02934414f5821f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 268a80cb55c18d1c3b8721e08e3c44491c3deba118f54924a0d40a698f68fd2bf3acc1db05d01c01152299af9c7a80a50a0cb3362cf5aac69951764658df60a9
|
7
|
+
data.tar.gz: cf0496e92a780ed8d4e1a960640d00c0fb77f5aeb8e492ba970649ac5b9571a17c1e4d161484125d3dda1229deb366b994e64727de50383ba77a4a7cb94f73cb
|
data/README.md
CHANGED
@@ -4,8 +4,9 @@ Are you a warrior? Are you brave enough to reject your IE 6/7/8 users?
|
|
4
4
|
|
5
5
|
It is time to say YES.
|
6
6
|
|
7
|
-
**BrowserWarrior** makes this super easy with one line of code.
|
8
|
-
|
7
|
+
**BrowserWarrior** makes this super easy with one line of code.
|
8
|
+
|
9
|
+
**Note**: Only Rails 5.0 & 5.1 is supported at this time.
|
9
10
|
|
10
11
|
```ruby
|
11
12
|
# in your Gemfile
|
@@ -57,7 +58,7 @@ Nice and easy.
|
|
57
58
|
|
58
59
|
## i18n
|
59
60
|
|
60
|
-
`BrowserWarrior` will render the correct page based on your i18n locale config.
|
61
|
+
`BrowserWarrior` will render the correct page based on your i18n locale config.
|
61
62
|
It currently supports `en` and `zh-CN`, and you can add more locale pages easily.
|
62
63
|
|
63
64
|
## Advice
|
@@ -79,8 +80,8 @@ I suggest adding the code below to your base layout( e.g. `application.html.erb`
|
|
79
80
|
- [ ] Extend support to more than one theme.
|
80
81
|
|
81
82
|
## Contributing
|
82
|
-
[windy](https://github.com/windy)
|
83
|
-
[azah](https://github.com/azah) (Fixing EN grammar)
|
83
|
+
*[windy](https://github.com/windy)
|
84
|
+
*[azah](https://github.com/azah) (Fixing EN grammar)
|
84
85
|
|
85
86
|
## License
|
86
87
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/lib/browser_warrior.rb
CHANGED
@@ -14,6 +14,10 @@ module BrowserWarrior
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def check_browser_warrior!
|
17
|
+
# ignore detect rails inline controller
|
18
|
+
if params[:controller] == 'rails/welcome'
|
19
|
+
return
|
20
|
+
end
|
17
21
|
browser = ::Browser.new(request.user_agent)
|
18
22
|
if ! BrowserWarrior.do_detect(browser)
|
19
23
|
render 'browser_warrior/index', layout: false
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: browser_warrior
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yafeilee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
128
|
rubyforge_project:
|
129
|
-
rubygems_version: 2.6.
|
129
|
+
rubygems_version: 2.6.6
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: Make your Rails app reject your ie 6/7/8 user just one line code
|