browser_warrior 0.3.0 → 0.4.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: 4b558de70b5f31ae83c9b4e6b63f9e0bf440e3d4
4
- data.tar.gz: efdefbc83f4753aea608eca81b952d0e2d8e64f8
3
+ metadata.gz: e01062f08d8f3f8bfe12e5a07ad9b73a393d0cc7
4
+ data.tar.gz: 84e0699a838d8a1ccf419b337af91f5a0a32f54f
5
5
  SHA512:
6
- metadata.gz: aa3c294ffbb1da83f7d587a823ad701b42402460937d2c4199e4311f855066bf0ff03cb95cea51463926fe7bd0ac833c306b3778d82b7e06b06a5339f157d7d0
7
- data.tar.gz: bd82c93fd1f9f434d9c1f9051c94e1f4649571ee1c47fd06fb1a4f068376ef7dabe96ead37544274d21136815fce63689410965e87dd80967382856ecb7c6821
6
+ metadata.gz: 3ec67fc6e96fbaba8790d15abfd614d37e2776facdb0eb5cc8150222ad6c9d1508f3e78ba0a2a111ed315fc0445d30d650c318ae399003f4320cbfb59899c932
7
+ data.tar.gz: 123f5f32182e8f7f17f68f32fa13baeba2440d34ac10d347d88921ca0af49bdd17c2f82929ffbe3e5286e5835b2ca4d6fed6ad25f0f3aa3c22e4485368b4fe0b
data/README.md CHANGED
@@ -1,12 +1,11 @@
1
1
  # BrowserWarrior
2
2
 
3
- Are you a warrior? Do you dare to reject your ie 6/7/8 user?
3
+ Are you a warrior? Are you brave enough to reject your IE 6/7/8 users?
4
4
 
5
- Yes, at now we should say YES.
5
+ It is time to say YES.
6
6
 
7
- **BrowserWarrior** make the action super easy.
8
-
9
- Make your Ruby on Rails 5 Application rejecting ie6/7/8 with only one line code. ( Notice: only support Rails 5 now, we will do more work to support 4 & 3 )
7
+ **BrowserWarrior** makes this super easy with one line of code.
8
+ Note: Only Rails 5 is supported at this time. Support for 3 & 4 is being worked on.
10
9
 
11
10
  ```ruby
12
11
  # in your Gemfile
@@ -15,21 +14,24 @@ gem 'browser_warrior'
15
14
 
16
15
  And then:
17
16
  ```bash
18
- $ bundle
17
+ $ bundle install
19
18
  ```
20
19
 
21
- No need more code!!
20
+ That's it.
21
+
22
+ All IE 6/7/8 users will be redirected to a page that suggests they should upgrade their browsers.
22
23
 
23
- Then all of ie 6/7/8 user will be rejected to a page that suggests upgrading their browsers.
24
+ Upgrading browser screenshot (en)
25
+ ![screenshot](https://github.com/80percent/browser_warrior/raw/master/img/browser-en.jpg)
24
26
 
25
- Upgrading browser screenshot
27
+ Upgrading browser screenshot (zh-CN)
26
28
  ![screenshot](https://github.com/80percent/browser_warrior/raw/master/img/browser.png)
27
29
 
28
- ## More configuration
30
+ ## Configuration
29
31
 
30
- **QA**: Can I add more unsupported browsers?
32
+ **Question**: Can I add more unsupported browsers?
31
33
 
32
- Very easy. Execute:
34
+ Very easy. Run:
33
35
 
34
36
  ```bash
35
37
  $ rails g browser_warrior:install
@@ -37,36 +39,30 @@ $ rails g browser_warrior:install
37
39
 
38
40
  It will generate `browser_warrior.rb` in `config/initializers/`.
39
41
 
40
- Edit it.
41
-
42
- There is a `browser` object that you can easily custom your requirement.
42
+ There is a `browser` object that you can easily customize.
43
43
 
44
44
  See more: <https://github.com/fnando/browser#usage>
45
45
 
46
- **QA**: Can I custom the suggested browser page?
46
+ **Question**: Can I customize the suggested browser page?
47
47
 
48
- Sure. Execute:
48
+ Sure. Run:
49
49
 
50
50
  ```bash
51
51
  $ rails g browser_warrior:views
52
52
  ```
53
53
 
54
- It will generate `view` and `css` files for you.
55
- Then edit them.
54
+ It will generate `view` and `css` files for you that can be edited.
56
55
 
57
- Easy, is it?
56
+ Nice and easy.
58
57
 
59
58
  ## i18n
60
59
 
61
- `BrowserWarrior` will render the correct page based on your i18n locale config.
62
-
63
- Now it supports `en` and `zh-CN`.
64
-
65
- You can easily add more locale pages.
60
+ `BrowserWarrior` will render the correct page based on your i18n locale config.
61
+ It currently supports `en` and `zh-CN`, and you can add more locale pages easily.
66
62
 
67
- ## Extra Good Advise
63
+ ## Advice
68
64
 
69
- I advise adding the code below to your base layout( e.g. `application.html.erb` ):
65
+ I suggest adding the code below to your base layout( e.g. `application.html.erb` ):
70
66
 
71
67
  ```html
72
68
  // app/layouts/application.html.erb
@@ -79,11 +75,12 @@ I advise adding the code below to your base layout( e.g. `application.html.erb`
79
75
 
80
76
  - [x] Release 0.1.0, one line code to support rejecting old browser page
81
77
  - [x] I18n support ( 0.3.0 )
82
- - [ ] Extend support rails 4 and rails 3.
83
- - [ ] Design a mechanism to support more than one themes.
78
+ - [ ] Extend support to rails 4 and rails 3.
79
+ - [ ] Extend support to more than one theme.
84
80
 
85
81
  ## Contributing
86
- [windy](https://github.com/windy)
82
+ [windy](https://github.com/windy)
83
+ [azah](https://github.com/azah) (Fixing EN grammar)
87
84
 
88
85
  ## License
89
86
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -20,11 +20,14 @@
20
20
  }
21
21
  .browser-warrior-dialog {
22
22
  position: absolute;
23
- top: 20%;
24
23
  left: 50%;
25
24
  margin-left: -340px;
25
+ top: 50%;
26
+ margin-top: -230px;
26
27
  padding: 40px;
27
28
  background: #FAFAFA;
29
+ width: 665px;
30
+ height: 380px;
28
31
  }
29
32
  .browser-warrior-title {
30
33
  font-size: 20px;
@@ -8,36 +8,36 @@
8
8
  <div class="browser-warrior-mask">
9
9
  <div class="browser-warrior-dialog" id="browser-warrior-dialog">
10
10
  <div class="browser-warrior-text">
11
- <h1 class="browser-warrior-title">You are using old IE browser!</h1>
11
+ <h1 class="browser-warrior-title">Unsupported Browser Detected</h1>
12
12
  <p class="browser-warrior-para">
13
- This browser maybe cause security problem, and it will be a bad user experience to visit our website.
13
+ This website has been built using modern HTML standards. The current browser will not interpret the page correctly and introduce layout descrepencies with text and images.
14
14
  </p>
15
15
  <p class="browser-warrior-para">
16
- Wrong text location, confused layout, not-worked feature maybe happen.
16
+ In addition to our website not behaving as intented, out-of-date browsers often have exploitable security issues.
17
17
  </p>
18
18
  <p class="browser-warrior-para">
19
- We do NOT support your browser, please see these below:
19
+ Please use a browser supported by this website:
20
20
  </p>
21
21
  <div class="browser-warrior-para">
22
- <a class="browser-warrior-browser-link" href="https://www.google.com/search?q=chrome" target="_blank" hidefocus>
22
+ <a class="browser-warrior-browser-link" href="https://www.google.com/search?q=google+chrome+browser" target="_blank" hidefocus>
23
23
  <i class="browser-warrior-browser-icon browser-warrior-browser-icon-chrome"></i>
24
- Chrome Browser
24
+ Google Chrome Browser
25
25
  </a>
26
- <a class="browser-warrior-browser-link" href="https://www.google.com/search?q=firefox" target="_blank" hidefocus>
26
+ <a class="browser-warrior-browser-link" href="https://www.google.com/search?q=mozilla+firefox+browser" target="_blank" hidefocus>
27
27
  <i class="browser-warrior-browser-icon browser-warrior-browser-icon-firefox"></i>
28
- Firefox Browser
28
+ Mozilla Firefox Browser
29
29
  </a>
30
- <a class="browser-warrior-browser-link" href="https://www.google.com/search?q=opera" target="_blank" hidefocus>
30
+ <a class="browser-warrior-browser-link" href="https://www.google.com/search?q=opera+browser" target="_blank" hidefocus>
31
31
  <i class="browser-warrior-browser-icon browser-warrior-browser-icon-opera"></i>
32
32
  Opera Browser
33
33
  </a>
34
- <a class="browser-warrior-browser-link" href="https://www.google.com/search?q=ie" target="_blank" hidefocus>
34
+ <a class="browser-warrior-browser-link" href="https://www.google.com/search?q=microsoft+browser" target="_blank" hidefocus>
35
35
  <i class="browser-warrior-browser-icon browser-warrior-browser-icon-ie"></i>
36
- Upgrade your IE Browser
36
+ Microsoft Edge/IE Browsers
37
37
  </a>
38
38
  </div>
39
39
  <p class="browser-warrior-para">
40
- Please choose and install one, then visit our website again.
40
+ After updating you will no longer see this page.
41
41
  </p>
42
42
  </div>
43
43
  </div>
@@ -1,3 +1,3 @@
1
1
  module BrowserWarrior
2
- VERSION = '0.3.0'
2
+ VERSION = '0.4.0'
3
3
  end
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.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yafeilee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-24 00:00:00.000000000 Z
11
+ date: 2016-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails