wirecard_sepa 0.1.2 → 0.1.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
  SHA1:
3
- metadata.gz: 6f4973b11b84922100635e24a2b0602ee0ccecbf
4
- data.tar.gz: 0cf6f83b49abfcce56cc7d6f5fc31a1567ad11a2
3
+ metadata.gz: 412fab80efb71ea7ad640b40e64ea80e7eed2d18
4
+ data.tar.gz: 2134aca9536af5f86882fc83b3eb9601c5f74127
5
5
  SHA512:
6
- metadata.gz: 857ffa44477f0804c427497103fd83944e7a3f85458d87c2e77b8309b11b6ee602be8e8e4c73f0acc131432f782e0267be599028986846e5a832997e9014a95c
7
- data.tar.gz: 8abd6bf8c09e3fc355217edade3a2a87ec583c3b5e14ad9aae2b562d4137e61d60345d821423b0cd9687b077eff4aa19a59afbe6d71dc35b0b181a17f85c025f
6
+ metadata.gz: 6358b080c557307bc3e5aa82f020638bd5085557777d001589e71703e0fec766f9b154009406e4fb423137a61d6f584a6b00e05a5d144bcf3d78e0718074a0e9
7
+ data.tar.gz: 5745409d6e78966ae4ad10354da80ad8df501ef3f1306a35b4dfac45f87ac632d2ecc814e48ecbaead7d05b2f26cc1de834a68f65fdd876e87d137d866f807f5
data/.codeclimate.yml ADDED
@@ -0,0 +1,8 @@
1
+ # Save as .codeclimate.yml (note leading .) in project root directory
2
+ languages:
3
+ Ruby: true
4
+ JavaScript: true
5
+ PHP: true
6
+ Python: true
7
+ # exclude_paths:
8
+ # - "foo/bar.rb"
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  .DS_Store
2
2
  Gemfile.lock
3
3
  /pkg/
4
+ .tags
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.1.3] - 2015-09-17
2
+ ### Fixed
3
+ - Treat response body according to their given charset, normally UTF-8
4
+
1
5
  ## [0.1.2] - 2015-09-09
2
6
  ### Fixed
3
7
  - Params for a debit return may now contain special chars without leading to a malformed XML doc.
@@ -38,13 +38,17 @@ module WirecardSepa
38
38
 
39
39
  private
40
40
 
41
+ # Wirecard API returns correct charset (UTF-8), but the resulting
42
+ # body is encoded in (ASCII-8BIT), so we enforce it.
41
43
  def post(request_xml)
42
- Typhoeus.post(
44
+ response = Typhoeus.post(
43
45
  config.api_url,
44
46
  body: request_xml,
45
47
  userpwd: http_auth_credentials,
46
48
  headers: { 'Content-Type' => 'application/xml' }
47
49
  )
50
+ response.body.force_encoding response.headers['Content-Type'][/charset=(.*)/, 1]
51
+ response
48
52
  end
49
53
 
50
54
  def add_auth_params_and_custom_fields(params)
@@ -1,3 +1,3 @@
1
1
  module WirecardSepa
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
@@ -45,7 +45,7 @@ describe WirecardSepa::DirectDebit::Request do
45
45
 
46
46
  it 'can handle special chars' do
47
47
  params[:account_holder_first_name] = 'Firma'
48
- params[:account_holder_last_name] = 'Muscle Line Poerschke © & Rez Gbr.'
48
+ params[:account_holder_last_name] = 'Müller & Schmidt gGmbh'
49
49
  expect(errors).to be_empty
50
50
  end
51
51
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wirecard_sepa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - betterplace developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-09 00:00:00.000000000 Z
11
+ date: 2015-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -129,6 +129,7 @@ executables: []
129
129
  extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
+ - ".codeclimate.yml"
132
133
  - ".gitignore"
133
134
  - ".rspec"
134
135
  - ".travis.yml"
@@ -202,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
203
  version: '0'
203
204
  requirements: []
204
205
  rubyforge_project:
205
- rubygems_version: 2.4.8
206
+ rubygems_version: 2.4.5.1
206
207
  signing_key:
207
208
  specification_version: 4
208
209
  summary: Wirecard SEPA implementation