browser_warrior 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e04ae00071f215455bec6f0112266d785085225e
|
|
4
|
+
data.tar.gz: 0b59fde22b9ea6454dac3dcc8a632ae094089f2a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2bdb59ccdde7ebb83368d86106de84794241a40658dca616c5e82d17b77862ed9acdf24fc0e493ad93add18c307e4c4fe66b3d492ee455f32d9a433c0e04507a
|
|
7
|
+
data.tar.gz: a23b543d11665d2bf4ece022248f9acc4d061da02180ebbcd61f42d3d7c36c5f5284c3892951dd4124d08f25b4782553765ae685a7eb803d386a1dc392692f05
|
data/lib/browser_warrior.rb
CHANGED
|
@@ -24,8 +24,8 @@ module BrowserWarrior
|
|
|
24
24
|
return
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
-
# ignore
|
|
28
|
-
if request.
|
|
27
|
+
# ignore non-get request
|
|
28
|
+
if ! request.get?
|
|
29
29
|
return
|
|
30
30
|
end
|
|
31
31
|
|
|
@@ -41,6 +41,9 @@ module BrowserWarrior
|
|
|
41
41
|
next true if Rails.env.test?
|
|
42
42
|
next true if browser.bot?
|
|
43
43
|
|
|
44
|
+
# Allow weixin callback
|
|
45
|
+
next true if browser.platform.other?
|
|
46
|
+
|
|
44
47
|
if ! browser.modern?
|
|
45
48
|
next false
|
|
46
49
|
end
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
BrowserWarrior.detect do |browser|
|
|
2
|
+
next true if Rails.env.test?
|
|
3
|
+
next true if browser.bot?
|
|
4
|
+
|
|
5
|
+
# Allow weixin callback
|
|
6
|
+
next true if browser.platform.other?
|
|
7
|
+
|
|
2
8
|
# See https://github.com/fnando/browser#usage for more usage
|
|
3
|
-
# Webkit, Firefox 17+, IE 9+ and Opera 12+
|
|
9
|
+
# Allow Webkit, Firefox 17+, IE 9+ and Opera 12+
|
|
4
10
|
if ! browser.modern?
|
|
5
|
-
|
|
6
|
-
false
|
|
7
|
-
else
|
|
8
|
-
true
|
|
11
|
+
next false
|
|
9
12
|
end
|
|
13
|
+
|
|
14
|
+
next true
|
|
10
15
|
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.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- yafeilee
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-06-
|
|
11
|
+
date: 2018-06-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|