sepafm 1.1.0 → 1.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: 6baff59782f24a508d2560a71b776fcb5374d598
4
- data.tar.gz: 85b220374605d706461e301fc477574481635e31
3
+ metadata.gz: 59d1503f2191a8fe0d94b0cbb6e4aebbd6f8bc54
4
+ data.tar.gz: 788288cbfcd600a419779c1652f4037d64217d41
5
5
  SHA512:
6
- metadata.gz: 38454e6cac847fa6e23de5785b3e2db8c134a486ac8d124b8ca0b5e8f12c24b6a3bc4181541de0dad43135430d7a15c51cf16b0e76821d8ad3d0fbfde75489f0
7
- data.tar.gz: de324888c9ea1b78f817b688ffbffacc11bcc4f1496cc3a9e48f22d2955e8db07aa02b0b356ca4ed7844b9e875e95e51bba71ed992faaa35ba8907f6c37aa5b1
6
+ metadata.gz: 7395035ca74dd424039e6f7e30e769470f6375e59c7a7db90392c5b806a7749bc22481db2b56eaf8208b6a8b3049e9dd6b40d3cd0e9b3ec490cc542a0d46d963
7
+ data.tar.gz: 3669f2f1d92cffa92299b556e2fa7936ffad7d5c76c1bd05a0d8b57f3b64ae6abed1c3e89f23f8dbb2b3e65b9532d73299960318b3a180dd41ce9c2708ffbbd9
@@ -198,5 +198,7 @@ module Sepa
198
198
  set_node(@template, 'bxd|ReceiverId', 'DABAFIHH')
199
199
  end
200
200
 
201
+ def set_application_request; end
202
+
201
203
  end
202
204
  end
@@ -215,7 +215,7 @@ module Sepa
215
215
 
216
216
  # Sets nodes for generic requests, application request is base64 encoded here.
217
217
  def common_set_body_contents
218
- set_node @template, 'bxd|ApplicationRequest', @application_request.to_base64
218
+ set_application_request
219
219
  set_node @template, 'bxd|SenderId', @customer_id
220
220
  set_node @template, 'bxd|RequestId', request_id
221
221
  set_node @template, 'bxd|Timestamp', iso_time
@@ -223,5 +223,9 @@ module Sepa
223
223
  set_node @template, 'bxd|UserAgent', "Sepa Transfer Library version #{VERSION}"
224
224
  end
225
225
 
226
+ def set_application_request
227
+ set_node @template, 'bxd|ApplicationRequest', @application_request.to_base64
228
+ end
229
+
226
230
  end
227
231
  end
data/lib/sepa/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Sepa
2
2
 
3
3
  # The current version of the gem
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
@@ -260,4 +260,12 @@ class DanskeGenericSoapBuilderTest < ActiveSupport::TestCase
260
260
  end
261
261
  end
262
262
 
263
+ test 'application request is encrypted' do
264
+ application_request = decode(@doc.at('bxd|ApplicationRequest', bxd: BXD).content)
265
+ application_request = Nokogiri::XML(application_request)
266
+
267
+ assert_nil application_request.at('ApplicationRequest')
268
+ assert_not_nil application_request.at('xenc|EncryptedData')
269
+ end
270
+
263
271
  end
@@ -4,7 +4,7 @@ class TestSepa < ActiveSupport::TestCase
4
4
 
5
5
  def test_version_must_be_defined
6
6
  refute_nil Sepa::VERSION
7
- assert_equal "1.1.0", Sepa::VERSION
7
+ assert_equal "1.1.1", Sepa::VERSION
8
8
  end
9
9
 
10
10
  end
data/test/test_helper.rb CHANGED
@@ -4,7 +4,7 @@ require 'dotenv'
4
4
  Dotenv.load
5
5
 
6
6
  if ENV['CODECLIMATE_REPO_TOKEN']
7
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
7
+ SimpleCov.formatters = [
8
8
  SimpleCov::Formatter::HTMLFormatter,
9
9
  CodeClimate::TestReporter::Formatter
10
10
  ]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sepafm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joni Kanerva
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-11-25 00:00:00.000000000 Z
13
+ date: 2015-11-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel