cuculungwa 0.0.49 → 0.0.50

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cuculungwa.rb +7 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f45bf3c17ffb6579693b551a541e8030c9193f7
4
- data.tar.gz: 9a4a89d19d083c1db6477dd45ac5b50b3243a26f
3
+ metadata.gz: c5e0aa9b39c881cc9901f4dc218f123ef1a11b11
4
+ data.tar.gz: 634814c9cf12e349fb72ff2626c71d1d79a09185
5
5
  SHA512:
6
- metadata.gz: 6dec2ebb0f55808b87ddb58240cbcf9380857be75b014f2fb9ba51fd31907001da7a8bb94886cbabd1eff3efc758aa89f7ac36bc3375fc6186307fbab01756ab
7
- data.tar.gz: d7bb22bc915fdadd579f818681e68e2b32d28c15d44135db81a633e5766a6d4dd7ebd2af4516f8db274743c21d32773eb5c0b4e381ec61a6bae07701e5d520ed
6
+ metadata.gz: 579774628549a8e27de3615273814bd822bb8acb07f93dcc9bd10034d982542840933765a69fb4d7ada7234975e0e9aeea6c549b2bf8463ab424f22a6d78a971
7
+ data.tar.gz: b0ed47f9df4f173492c159cfa4b0580ae8aec7a9357c3e1c479ef4af6bc60c188b97234973c08eb16bfc8231802be45c74e95f2dba49ec4dde981ad108f15562
@@ -130,6 +130,12 @@ module GenerateData
130
130
  end
131
131
  end
132
132
 
133
+ def pl_iban_formatter(number)
134
+ number = number.gsub(/\s+/, "").gsub('PL','')
135
+ number = number[0..1] + ' ' + number[2..-1].gsub(/(.{4})/, '\1 ').strip
136
+ return number
137
+ end
138
+
133
139
  def pl_iban_generator(data_type = 'positive_set', bank_prefix = nil, polish_format = false)
134
140
  # data_type: if you want correct iban use positive_set, anything else will return 00111122223333444455556666
135
141
  # bank_prefix: if you want specify bank prefix (minimum 4 and maximum 8 digits)
@@ -155,7 +161,7 @@ module GenerateData
155
161
  end
156
162
 
157
163
  if polish_format
158
- number[0..1] + ' ' + number[2..-1].gsub(/(.{4})/, '\1 ').strip
164
+ pl_iban_formatter(number)
159
165
  else
160
166
  number
161
167
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cuculungwa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.49
4
+ version: 0.0.50
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Kaftanski
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-05-14 00:00:00.000000000 Z
14
+ date: 2015-05-18 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: aruba