blz 0.1.4.20140608 → 0.1.4.20140907
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/blz.gemspec +4 -3
- data/data/2014_06_09.tsv.gz +0 -0
- data/lib/blz.rb +13 -11
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 050b4b8dd5ab87a324b645090384b26d2a91a51d
|
4
|
+
data.tar.gz: 77afb27c12ed63290b1955da78a03dfc4aeb530c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b1106e5ffc748d5656b84913d183413746566bbbc356f00902ae4d56d9672da8f653ebe75ef8114951d46a53a1c8f1cba186ac894cbc9a0bfbafd33c53c0858
|
7
|
+
data.tar.gz: aa1eba1a4ad9ab6328bd87d9a3bf88d1a28860ecfe17f01bb5e3061980d59d52ab46e5b7a8797691643b12da66f147ffe697be58966f3cc0478641e84b53b0bf
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
# 0.1.4.
|
1
|
+
# 0.1.4.20140907, released 2014-06-26
|
2
|
+
|
3
|
+
* BLZ data file for cycle 2014-06-09 to 2014-09-07 added
|
4
|
+
* generalized finder for `BLZ::DATA_FILE`
|
5
|
+
|
6
|
+
# 0.1.4.20140608, released 2014-02-13
|
2
7
|
|
3
8
|
* BLZ data file for cycle 2014-03-03 to 2014-06-08 added
|
4
9
|
* compressed data files for smaller gem size
|
data/blz.gemspec
CHANGED
@@ -4,7 +4,7 @@ extra_rdoc_files = ['CHANGELOG.md', 'LICENSE', 'README.md']
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'blz'
|
7
|
-
s.version = '0.1.4.
|
7
|
+
s.version = '0.1.4.20140907'
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.summary = "BLZ (Bankleitzahlen) for Ruby"
|
10
10
|
|
@@ -19,6 +19,7 @@ EOF
|
|
19
19
|
s.author = 'Oliver Eilhard'
|
20
20
|
s.email = 'oliver.eilhard@gmail.com'
|
21
21
|
s.homepage = 'http://github.com/olivere/blz'
|
22
|
+
s.license = 'MIT'
|
22
23
|
|
23
24
|
s.files = `git ls-files`.split("\n") - ['.gitignore']
|
24
25
|
s.bindir = 'bin'
|
@@ -29,7 +30,7 @@ EOF
|
|
29
30
|
s.test_files = []
|
30
31
|
|
31
32
|
s.add_development_dependency 'bundler', '~> 1.2'
|
32
|
-
s.add_development_dependency 'rdoc', '~> 2.5'
|
33
|
-
s.add_development_dependency 'rake', '>=
|
33
|
+
s.add_development_dependency 'rdoc', '~> 2.5', '>= 2.5.3'
|
34
|
+
s.add_development_dependency 'rake', '~> 10.3', '>= 10.3.2'
|
34
35
|
end
|
35
36
|
|
Binary file
|
data/lib/blz.rb
CHANGED
@@ -9,21 +9,23 @@
|
|
9
9
|
|
10
10
|
module BLZ
|
11
11
|
DATA_FILE = begin
|
12
|
-
now
|
12
|
+
now = Time.now
|
13
|
+
glob = Dir[ File.join(File.dirname(__FILE__), '../data/*.tsv.gz') ].sort
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
file2time = proc do |f|
|
16
|
+
match = f.match /(?<y>\d{4})_(?<m>\d\d)_(?<d>\d\d)\.tsv\.gz$/
|
17
|
+
Time.new match[:y], match[:m], match[:d]
|
18
|
+
end
|
19
|
+
|
20
|
+
filename = glob.find {|c| now <= file2time[c] } || glob.last
|
21
|
+
|
22
|
+
# sanity check
|
23
|
+
t = file2time[filename]
|
24
|
+
if t < Time.new(2013, 12, 9) || now > t + (90 * 24 * 60 * 60)
|
22
25
|
warn '[BLZ] The data provided may not be accurate.'
|
23
|
-
'2014_03_03.tsv.gz'
|
24
26
|
end
|
25
27
|
|
26
|
-
|
28
|
+
filename
|
27
29
|
end
|
28
30
|
end
|
29
31
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.4.
|
4
|
+
version: 0.1.4.20140907
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oliver Eilhard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -31,6 +31,9 @@ dependencies:
|
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '2.5'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 2.5.3
|
34
37
|
type: :development
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -38,20 +41,29 @@ dependencies:
|
|
38
41
|
- - "~>"
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '2.5'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 2.5.3
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: rake
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '10.3'
|
45
54
|
- - ">="
|
46
55
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
56
|
+
version: 10.3.2
|
48
57
|
type: :development
|
49
58
|
prerelease: false
|
50
59
|
version_requirements: !ruby/object:Gem::Requirement
|
51
60
|
requirements:
|
61
|
+
- - "~>"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '10.3'
|
52
64
|
- - ">="
|
53
65
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
66
|
+
version: 10.3.2
|
55
67
|
description: |
|
56
68
|
BLZ (Bankleitzahlen) is a small library for looking up
|
57
69
|
the widely used bank identifier code system in Germany
|
@@ -78,11 +90,13 @@ files:
|
|
78
90
|
- data/2012_06_04.tsv.gz
|
79
91
|
- data/2013_12_09.tsv.gz
|
80
92
|
- data/2014_03_03.tsv.gz
|
93
|
+
- data/2014_06_09.tsv.gz
|
81
94
|
- lib/blz.rb
|
82
95
|
- lib/blz/bank.rb
|
83
96
|
- test/test_bank.rb
|
84
97
|
homepage: http://github.com/olivere/blz
|
85
|
-
licenses:
|
98
|
+
licenses:
|
99
|
+
- MIT
|
86
100
|
metadata: {}
|
87
101
|
post_install_message:
|
88
102
|
rdoc_options: []
|
@@ -100,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
114
|
version: '0'
|
101
115
|
requirements: []
|
102
116
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.2.
|
117
|
+
rubygems_version: 2.2.1
|
104
118
|
signing_key:
|
105
119
|
specification_version: 4
|
106
120
|
summary: BLZ (Bankleitzahlen) for Ruby
|