pedicel-pay 0.0.2 → 0.0.3

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
  SHA256:
3
- metadata.gz: 68626ff88a9448225853d1c8547535236f4a734fe850618a3cf5ee7593c4ccee
4
- data.tar.gz: 64cbedfe02190675426b05e0db34f386be38c38c46a4d00029bd22578630f687
3
+ metadata.gz: 367c31ed8b6dde587ae072ebbd40206db194e249c946cf4a84e1f939c9352891
4
+ data.tar.gz: 6b147be0f6dd592f1a4597624f5de9108eaac99cebfe472b7ff919f6ded07c8c
5
5
  SHA512:
6
- metadata.gz: 070601a57849d8d89aff29301cf9b299beba45f6f0ba6d2922f4be7c969c4d69ad0cf0e108bc0946116f078fad7fb349dd712ed063da856bc854d2da8f3f54ef
7
- data.tar.gz: 92b6937df63bd603bd8abf06a261b57af47aa9898a4a8cfbf179079f8e74f4bf4a9b658028a58561098b07704b75e0223ef7668f83424ade10d245bcac24bf86
6
+ metadata.gz: b2a84e2d4bf091153bdae40d1d8109b21e9cff88358ba5f51d53c38adf4dbbf239d0121e59723276f8898ba95e2c5ac9ef6a17b614c75e6b8d13dfa79f6a1b2b
7
+ data.tar.gz: 6ce9deb968f28e6153bcfa99a815b61c2003dd5855d0ba9d491ca695086079aa9f690876aad2a062db1ebc6e95d954589bfab7d38a1251449a7ebacf10069f46
@@ -14,9 +14,9 @@ module PedicelPay
14
14
  :version
15
15
 
16
16
  def initialize(unencrypted_data: nil, encrypted_data: nil, header: nil, signature: nil, version: 'EC_v1')
17
- @unencrypted_data = unencrypted_data
17
+ @unencrypted_data = unencrypted_data || TokenData.new
18
18
  @encrypted_data = encrypted_data
19
- @header = header
19
+ @header = header || TokenHeader.new
20
20
  @signature = signature
21
21
  @version = version
22
22
  end
@@ -35,10 +35,10 @@ module PedicelPay
35
35
  raise Error, 'no encrypted data' unless encrypted_data
36
36
 
37
37
  {
38
- 'data' => Base64.strict_encode64(encrypted_data),
39
- 'header' => header.to_hash,
40
- 'signature' => signature,
41
- 'version' => version,
38
+ data: Base64.strict_encode64(encrypted_data),
39
+ header: header.to_hash,
40
+ signature: signature,
41
+ version: version,
42
42
  }
43
43
  end
44
44
 
@@ -17,11 +17,11 @@ module PedicelPay
17
17
  raise Error, 'missing ephemeral_pubkey' unless ephemeral_pubkey
18
18
 
19
19
  result = {
20
- 'ephemeralPublicKey' => Base64.strict_encode64(Helper.ec_key_to_pkey_public_key(ephemeral_pubkey).to_der),
21
- 'publicKeyHash' => pubkey_hash,
22
- 'transactionId' => Helper.bytestring_to_hex(transaction_id),
20
+ ephemeralPublicKey: Base64.strict_encode64(Helper.ec_key_to_pkey_public_key(ephemeral_pubkey).to_der),
21
+ publicKeyHash: pubkey_hash,
22
+ transactionId: Helper.bytestring_to_hex(transaction_id),
23
23
  }
24
- result.merge!('applicationData' => data_hash) if data_hash
24
+ result.merge!(applicationData: data_hash) if data_hash
25
25
 
26
26
  result
27
27
  end
@@ -1,3 +1,3 @@
1
1
  module PedicelPay
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pedicel-pay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clearhaus A/S
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-07 00:00:00.000000000 Z
11
+ date: 2018-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -24,20 +24,34 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '12.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '12.3'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: pedicel
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - "~>"
32
46
  - !ruby/object:Gem::Version
33
- version: 0.0.2
47
+ version: '0.0'
34
48
  type: :runtime
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
52
  - - "~>"
39
53
  - !ruby/object:Gem::Version
40
- version: 0.0.2
54
+ version: '0.0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: thor
43
57
  requirement: !ruby/object:Gem::Requirement