sinatra-weixin-robot 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  module Sinatra
2
2
  module WeiXinRobot
3
- VERSION = '0.0.2' unless const_defined? :VERSION
3
+ VERSION = '0.0.3' unless const_defined? :VERSION
4
4
  def self.version
5
5
  "Sinatra::WeiXinRobot v#{VERSION}"
6
6
  end
@@ -8,8 +8,8 @@ module Sinatra
8
8
  module RobotHelpers
9
9
  def generate_signature(token=nil)
10
10
  weixin_token = token || settings.wexin_token
11
- signature, timestamp, nonce = params[:signature], params[:timestamp], params[:nonce]
12
- weixin_sha1 = [token, timestamp.to_s, nonce.to_s].sort!.join
11
+ timestamp, nonce = params[:timestamp], params[:nonce]
12
+ weixin_sha1 = [weixin_token.to_s, timestamp.to_s, nonce.to_s].sort!.join
13
13
  Digest::SHA1.hexdigest(weixin_sha1)
14
14
  end
15
15
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-weixin-robot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: