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: 521f1caac9da8ab56239995a813114366042f253
4
- data.tar.gz: 015b026de7eb83c13d4f9cd53bb7ed13982d72de
3
+ metadata.gz: 6db9366b9631a4533c2fa612a5996cf672f0bdaa
4
+ data.tar.gz: ec318d897d3a081495b768ba4a1a771d078580ed
5
5
  SHA512:
6
- metadata.gz: 063ae33e0a11cb94c92a753818727ffbd6f08d8423360d934de4e7c21d8a035633193f81d70d2d832ee46f3dff32d65fb23dcc60303a1663444f558e4d590d62
7
- data.tar.gz: 33fd80806fc3210db265bdb5b0847fcd2cff95b205ac501274411e78b4e9e83d799c9507ab7ac746f8fd2d6d87aaaf294932e5632e73e4d23bac8a99de400887
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
- # SB微信偶尔会再重新发一次get请求,但是不会带上signature,timestamp,nonce的参数
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 "#{custcurrent_weixin_tokenom_adapter.to_s} must inherite WexinAdapter"
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)
@@ -43,7 +43,7 @@ module WeixinRailsMiddleware
43
43
  end
44
44
 
45
45
  def custom_adapter
46
- @custom_adapter ||= WeixinRailsMiddleware.config.custom_adapter.to_s.constantize
46
+ @custom_adapter ||= WeixinRailsMiddleware.config.custom_adapter.to_s
47
47
  end
48
48
  end
49
49
  end
@@ -1,3 +1,3 @@
1
1
  module WeixinRailsMiddleware
2
- VERSION = "1.2.5"
2
+ VERSION = "1.2.6"
3
3
  end
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.5
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-16 00:00:00.000000000 Z
11
+ date: 2014-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties