sepa 0.0.19 → 0.0.20

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: d75033937c180d496d10dc6fdfc6fb66b52d8784
4
- data.tar.gz: 9a9a5c484fcdde9e1498b27345f8cb758279b96f
3
+ metadata.gz: d3b4d36cf0cb4dd7325c4363781cbd085db63f38
4
+ data.tar.gz: 5ff46adc5b6cea34be5b5b828a3a9700dcf1792c
5
5
  SHA512:
6
- metadata.gz: 37b47194ed56a516a6e162b113d5db6f929913e0ad434f446fdff69f35e0e12320c747f679f7c286ce6adc401085406082127680009b5b5803e77ce834527875
7
- data.tar.gz: 02a182a32f13c526a0a5364523c99ffec035b1b220cf1cdc15c482dbb658e6c185527c937748b8313d6d9f08577f6f159b39a50656ab8835882dc37f2495b727
6
+ metadata.gz: e297df97367f92c02a03239ed86fb1cd0b187b1dfb662e28b36e753e875aea72364802a820b52e874ecc0caa96d41bc52441bbda6fcd88d233408e246974a2eb
7
+ data.tar.gz: ee644daba446041404f2d734dcdc9a33b569a7dc7684315d0d15d4f3ef3df4f8ab9ada386b14a3d3d81a01ea25647160151b293992467c30f7e60ad2a5edad5d
@@ -30,7 +30,7 @@ class Sepa::DirectDebitOrder
30
30
 
31
31
  def county_code name
32
32
  return "" if blank?(name)
33
- name = name.upcase
33
+ name = name.upcase.strip
34
34
  return name if name.match(/^[A-Z]{2}$/)
35
35
  country = ISO3166::Country.find_country_by_name(name)
36
36
  country ? country.alpha2 : ""
@@ -130,7 +130,7 @@ class Sepa::DirectDebitOrder
130
130
  hsh["#{prefix}.postal_address.post_code"] = postcode unless blank? postcode
131
131
  hsh["#{prefix}.postal_address.town_name"] = town unless blank? town
132
132
  end
133
- hsh["#{prefix}.postal_address.country"] = cc unless blank? cc
133
+ hsh["#{prefix}.postal_address.country"] = cc unless blank? cc
134
134
 
135
135
  unless opts[:pain_008_001_version] == "02"
136
136
  hsh["#{prefix}.contact_details.name"] = contact_name unless blank? contact_name
@@ -1,3 +1,3 @@
1
1
  module Sepa
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
3
3
  end
@@ -18,8 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.add_dependency 'builder'
19
19
  gem.add_dependency 'aduki'
20
20
  gem.add_dependency 'countries', "~> 0.9.3"
21
- gem.add_development_dependency 'rspec', '~> 2.9'
22
- gem.add_development_dependency 'rspec_numbering_formatter'
21
+ gem.add_development_dependency 'rspec'
23
22
 
24
23
  gem.files = `git ls-files`.split($/)
25
24
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -44,7 +44,8 @@ describe Sepa::DirectDebitOrder do
44
44
  sepa_now = Time.local(1992, 2, 28, 18, 30, 0, 0, 0)
45
45
  Time.stub(:now).and_return sepa_now
46
46
 
47
- creditor = Sepa::DirectDebitOrder::Party.new "Mon École", "3, Livva de Getamire", nil, "75022", "Paris", "Frankreich", "M. le Directeur", "+33 999 999 999", "directeur@monecole.softify.com"
47
+ # leading/trailing whitespace breaks country recognition
48
+ creditor = Sepa::DirectDebitOrder::Party.new "Mon École", "3, Livva de Getamire", nil, "75022", "Paris", " Frankreich ", "M. le Directeur", "+33 999 999 999", "directeur@monecole.softify.com"
48
49
  creditor_account = Sepa::DirectDebitOrder::BankAccount.new "FRGOO GOOY ADDA 9999 999", "FRGGYELLOW99"
49
50
  sepa_identifier = sepa_identifier_class.new "FR123ZZZ010203"
50
51
  payment = Sepa::DirectDebitOrder::CreditorPayment.new creditor, creditor_account, "MONECOLE_PAYMENTS_20130703", Date.parse("2013-07-10"), sepa_identifier, [dd00, dd01, dd10, dd11, dd20, dd21, dd30, dd31]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sepa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Conan Dalton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-10 00:00:00.000000000 Z
11
+ date: 2019-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
@@ -54,20 +54,6 @@ dependencies:
54
54
  version: 0.9.3
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '2.9'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '2.9'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec_numbering_formatter
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
59
  - - ">="
@@ -174,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
160
  version: '0'
175
161
  requirements: []
176
162
  rubyforge_project:
177
- rubygems_version: 2.2.2
163
+ rubygems_version: 2.5.2.3
178
164
  signing_key:
179
165
  specification_version: 4
180
166
  summary: 'pain.008.001.04 and pain.008.001.02 CustomerDirectDebitInitiation ISO20022