new_alipay 0.1.0 → 0.1.1

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: 5aab313870916203fa6f44f249aa0a2046f9c753
4
- data.tar.gz: 9c7b79ab9cac499ddc68fea2dc4948d35921ee3b
3
+ metadata.gz: b61fcb516bf6b3803a3bca4031a253c3aa4f2a48
4
+ data.tar.gz: 414b38565273496e82f75c7d9840494735431663
5
5
  SHA512:
6
- metadata.gz: fcd47aaba0b36968f9ed7e47fd785ae47568c09171fb9198b24f9ef875f9e71c161d2af6e1831a73f26aa8feb4db6081ba1c3ddc39a20535fce7792b91afc87b
7
- data.tar.gz: 1182d94d9648398a6747316bf398ac11e247216c9ee9c6af0d5b173b4a61a18039588cf3c7a288ba1bf74e787715e00747003d5bd7d86a276f7f52a10efaf447
6
+ metadata.gz: 6e36ac03860bf145e281e8b931ba94305870608861d42fb4948b8a712416c92aec0389741637bba45de763c50b9f7785d92a93780820467e39b0828dba1b3997
7
+ data.tar.gz: a3ec90cd55c1eec9a17afbdccadfeb534aaf3720ea20a33bf7567c52528a168c3b9eacf885e45a494054c7b37220a99c15a84560409d99c8cbcc897f75981984
@@ -1,3 +1,3 @@
1
1
  module NewAlipay
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/new_alipay.rb CHANGED
@@ -6,7 +6,7 @@ require 'base64'
6
6
 
7
7
  module NewAlipay
8
8
  class << self
9
- attr_accessor :seller_email, :partner, :key
9
+ attr_accessor :seller_email, :partner, :key, :rsa_private_key_path
10
10
  end
11
11
  module_function
12
12
 
@@ -33,7 +33,7 @@ module NewAlipay
33
33
  #rsa签名
34
34
  def rsa_sign(signing_str)
35
35
  #读取私钥文件
36
- private_key_content = File.read(Rails.root ? File.join(Rails.root, "config", "alipay/quick/key/rsa_private_key.pem") : './config/alipay/quick/key/rsa_private_key.pem')
36
+ private_key_content = File.read(self.rsa_private_key_path || "./config/alipay/quick/key/rsa_private_key.pem")
37
37
 
38
38
  p private_key_content
39
39
  private_key = OpenSSL::PKey::RSA.new private_key_content
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: new_alipay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - saxer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-14 00:00:00.000000000 Z
11
+ date: 2015-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler