dibs_hmac 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c8cdf2315181bd560efd1859a088e5367ad797a4
4
- data.tar.gz: b82640e561de710d469f81be3b3e265b14b744be
3
+ metadata.gz: 8427a390f211ec0d585c643042391c9e5a287e87
4
+ data.tar.gz: 668357bcb2eb27c1e49b250986b1425007db4d16
5
5
  SHA512:
6
- metadata.gz: 0356e974cf6a98e2f5d17cba4e86044cff67082bd6009235570452497eb88553e7a6be91f920e69e39c012314c19f2c704621066ca6fcfb0346c64789494a269
7
- data.tar.gz: ee5a8ec557c9cd6488e982823ded2bc216d8d0768aaa20cad64fc617e7a5bd2f22be43f8f09dd7828a20f87f0137f03573af198312e6e3d0c624d93d21085a34
6
+ metadata.gz: 384d335e33d1632dbd7054364b66bbf5301b06473036c09943cda7df2fd48208690e0a2d6f693d5fac8ca0db28beb96a3bcaa4d22fd0eb66b8f272cbc8ced580
7
+ data.tar.gz: 145170fb750af3744b73492a4700857c9d29b3039e6867a2750d6837bae813b25ee12a4f62313cde42921ab33b91a2881755de062828b2427a6b8aff6a929a75
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.2.0 (2016-06-07)
2
+
3
+ - Added missing fields to allowed fields.
4
+
1
5
  # 0.1.3 (2015-08-24)
2
6
 
3
7
  - Remove deprecation warnings and added support for newer ruby versions.
data/README.md CHANGED
@@ -9,7 +9,11 @@ If you find this useful please tell me in an email.
9
9
 
10
10
  ## Short changelog
11
11
 
12
- # 0.1.3 (2015-08-24)
12
+ **0.2.0 (2016-06-07)**
13
+
14
+ - Added missing fields to allowed fields.
15
+
16
+ **0.1.3 (2015-08-24)**
13
17
 
14
18
  - Remove deprecation warnings and added support for newer ruby versions.
15
19
 
@@ -17,14 +21,15 @@ If you find this useful please tell me in an email.
17
21
 
18
22
  ### Calculate mac
19
23
 
20
- dibs_params = {:amount => "100", :merchant => "2222", ....}
21
-
22
- mac = DIBS::HMAC.calculate(dibs_params, Rails.application.config.dibs_hmac_key)
24
+ ```ruby
25
+ dibs_params = {:amount => "100", :merchant => "2222", ....}
23
26
 
27
+ mac = DIBS::HMAC.calculate(dibs_params, Rails.application.config.dibs_hmac_key)
28
+ ```
24
29
  ### Validate response from DIBS
25
-
26
- raise "INVALID REQUEST" unless DIBS::HMAC.valid?(params, Rails.application.config.dibs_hmac_key)
27
-
30
+ ```ruby
31
+ raise "INVALID REQUEST" unless DIBS::HMAC.valid?(params, Rails.application.config.dibs_hmac_key)
32
+ ```
28
33
 
29
34
  ## Contributing to dibs_hmac
30
35
 
@@ -37,6 +42,6 @@ If you find this useful please tell me in an email.
37
42
 
38
43
  ## Copyright
39
44
 
40
- Copyright (c) 2013 Björn Blomqvist. See LICENSE.txt for
45
+ Copyright (c) 2013 - 2015 Björn Blomqvist and others. See LICENSE.txt for
41
46
  further details.
42
47
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.2.0
data/dibs_hmac.gemspec CHANGED
@@ -2,20 +2,19 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: dibs_hmac 0.1.3 ruby lib
5
+ # stub: dibs_hmac 0.2.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "dibs_hmac"
9
- s.version = "0.1.3"
9
+ s.version = "0.2.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Bj\u{f6}rn Blomqvist"]
14
- s.date = "2015-08-24"
14
+ s.date = "2016-06-07"
15
15
  s.description = "An implementation of DIBS Message authentication code. Has correct sorting and rules for which params to include. So far it only includes the params for DIBS Payment Window."
16
16
  s.email = "bjorn@bjornblomqvist.se"
17
17
  s.extra_rdoc_files = [
18
- "CHANGELOG.md",
19
18
  "LICENSE.txt",
20
19
  "README.md"
21
20
  ]
@@ -36,7 +35,7 @@ Gem::Specification.new do |s|
36
35
  ]
37
36
  s.homepage = "http://github.com/bjornblomqvist/dibs_hmac"
38
37
  s.licenses = ["LGPL"]
39
- s.rubygems_version = "2.4.6"
38
+ s.rubygems_version = "2.5.1"
40
39
  s.summary = "An implementation of DIBS Message authentication code."
41
40
 
42
41
  if s.respond_to? :specification_version then
data/lib/dibs/hmac.rb CHANGED
@@ -68,9 +68,12 @@ module DIBS
68
68
  acquirerDeliveryPostalCode
69
69
  acquirerDeliveryPostalPlace
70
70
  acquirerDeliveryCountryCode
71
+ expandOrderInformation
72
+ ticketId
73
+ merchantId
71
74
  }.strip.split("\n").map {|name| name.strip }
72
-
73
-
75
+
76
+
74
77
  def self.calculate(params, key)
75
78
  param_string = ""
76
79
  params.keys.sort.each do |key|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dibs_hmac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Björn Blomqvist
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2016-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -73,7 +73,6 @@ email: bjorn@bjornblomqvist.se
73
73
  executables: []
74
74
  extensions: []
75
75
  extra_rdoc_files:
76
- - CHANGELOG.md
77
76
  - LICENSE.txt
78
77
  - README.md
79
78
  files:
@@ -110,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
109
  version: '0'
111
110
  requirements: []
112
111
  rubyforge_project:
113
- rubygems_version: 2.4.6
112
+ rubygems_version: 2.5.1
114
113
  signing_key:
115
114
  specification_version: 4
116
115
  summary: An implementation of DIBS Message authentication code.