banktools-de 0.0.3 → 0.0.4

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: 89114d9d963ca0aaba7ed20b2347965289b4c46e
4
- data.tar.gz: bb9412ad2010aa834351d0ec94f4663c950ae1a3
3
+ metadata.gz: 5453ad9542d81acd4a0653df094a95d8b2b3aeb0
4
+ data.tar.gz: 05623115c4c2e589c48878a538dcdbc81171dc0c
5
5
  SHA512:
6
- metadata.gz: e686988439bb9ef324ded10e87c8d9639db2d97828320ea36a6deb5fac4453c0300e2ddbf9214c814eab261ae0c9dad5e286c0785364aa9e73406d83ec6a3704
7
- data.tar.gz: d2a368d77d104022ab247d5cb21b50cbd62ce0b7b2b85e7cb61b1964be62e43e717ed0e43b082e8937b19366ec23ee4f20987c89434033c81367733e377812cf
6
+ metadata.gz: 36a975456c36e233e0a3d5e42ccdab38ba9c88e0b17bd915e97b982fe0e5bd477f6795ca3c4af8c8b1ca4d7209410ad3e16ab38fac483a1ab7e1666017ec2f5c
7
+ data.tar.gz: c86193338004fc5df9262877e71608356064704ccbc0b0ca49d79d49bb5440768dbe2cf27a01f7f1fa500bdfeff8d83412d66739febea51e25d7816d643d2093
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Ruby gem to validate, normalize/prettify and interpret German Bankleitzahl (BLZ) and bank account numbers.
4
4
 
5
- When in doubt, this library aims to err on the side of allowing too much.
5
+ When in doubt, this library aims to err on the side of allowing too much. We've yet to find clear specs, so be aware that the current validation rules are *very* forgiving.
6
6
 
7
7
  If we got anything wrong, please file an issue or contribute a fix yourself.
8
8
 
@@ -17,11 +17,13 @@ If we got anything wrong, please file an issue or contribute a fix yourself.
17
17
  blz.normalize # => "100 700 24"
18
18
  blz.valid? # => true
19
19
  blz.errors # => []
20
+ blz.bank_name # => "Deutsche Bank PGK Berlin"
20
21
 
21
22
  bad_blz = BankTools::DE::BLZ.new("1X")
22
23
  bad_blz.normalize # => "1X"
23
24
  bad_blz.valid? # => false
24
25
  bad_blz.errors # => [ :too_short, :invalid_characters ]
26
+ blz.bank_name # => nil
25
27
 
26
28
  # Account
27
29
 
@@ -42,6 +44,27 @@ If we got anything wrong, please file an issue or contribute a fix yourself.
42
44
  # or: rake
43
45
 
44
46
 
47
+ ## Update BLZ data
48
+
49
+ Bundesbank provide a mapping from BLZ to bank name that appears to be updated regularly:
50
+
51
+ <http://www.bundesbank.de/Redaktion/DE/Standardartikel/Kerngeschaeftsfelder/Unbarer_Zahlungsverkehr/bankleitzahlen_download.html>
52
+
53
+ As a gem maintainer, run
54
+
55
+ rake download URL="http://www.bundesbank.de/…/blz_2013_12_09_xls.xlsx?__blob=publicationFile"
56
+
57
+ providing a URL for the latest unpacked XLSX version of the data.
58
+
59
+ You can provide a local path if you want.
60
+
61
+ This will overwrite the local data file, which should ship with the gem.
62
+
63
+ Updates appear to ship for periods of 3 months, provided the month before a period starts. We've seen these periods:
64
+ * 2013-09-09 - 2013-12-08
65
+ * 2013-12-09 - 2014-03-02
66
+
67
+
45
68
  ## Installation
46
69
 
47
70
  Add this line to your application's Gemfile:
data/Rakefile CHANGED
@@ -1,6 +1,13 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
+ require "bank_tools/de/blz_downloader"
3
4
 
4
5
  RSpec::Core::RakeTask.new(:spec)
5
6
 
6
7
  task :default => :spec
8
+
9
+ desc "Download BLZ data file"
10
+ task :download do
11
+ url = ENV["URL"]
12
+ BankTools::DE::BLZDownloader.new(url).run
13
+ end
data/banktools-de.gemspec CHANGED
@@ -21,4 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "bundler", "~> 1.5"
22
22
  spec.add_development_dependency "rake"
23
23
  spec.add_development_dependency "rspec"
24
+ spec.add_development_dependency "creek" # XLSX parsing
24
25
  end