weixin_rails_middleware 1.2.5 → 1.2.6
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: 6db9366b9631a4533c2fa612a5996cf672f0bdaa
|
4
|
+
data.tar.gz: ec318d897d3a081495b768ba4a1a771d078580ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cffb01093785287807a353e690deba238e5e8d0176ff4c23eb36dbe34068637c084cd73fb416ce7d299d6c060361d0d587da6e36b2b07df2884b8132bc4c511
|
7
|
+
data.tar.gz: 141c682ad9f7e3b8079d6293cdcc31e88281c314d67a9c738c25beaee7dda91458c7445730a24afe976a62f383fafd8b9bbb1ccdb6d35d6b923509543ad4ea3e
|
@@ -9,7 +9,7 @@ module WeixinRailsMiddleware
|
|
9
9
|
def initialize(weixin_params)
|
10
10
|
@weixin_secret_key = weixin_params[:weixin_secret_key]
|
11
11
|
# 以下参数为什么加空字符串默认值的原因:
|
12
|
-
#
|
12
|
+
# 微信偶尔会再重新发一次get请求,但是不会带上signature,timestamp,nonce的参数
|
13
13
|
# 一个预防措施吧。
|
14
14
|
@signature = weixin_params[:signature] || ''
|
15
15
|
@timestamp = weixin_params[:timestamp] || ''
|
@@ -19,10 +19,10 @@ module WeixinRailsMiddleware
|
|
19
19
|
|
20
20
|
def self.init_with(weixin_params)
|
21
21
|
if custom_adapter.present?
|
22
|
-
if custom_adapter.superclass != self
|
23
|
-
raise "#{
|
22
|
+
if custom_adapter.constantize.superclass != self
|
23
|
+
raise "#{custom_adapter.to_s} must inherite WexinAdapter"
|
24
24
|
end
|
25
|
-
return custom_adapter.new(weixin_params)
|
25
|
+
return custom_adapter.constantize.new(weixin_params)
|
26
26
|
end
|
27
27
|
if weixin_token_string.present?
|
28
28
|
SinglePublicAccount.new(weixin_params)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weixin_rails_middleware
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lanrion
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|