bigbrother 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +17 -0
- data/lib/bigbrother.rb +12 -0
- data/lib/bigbrother/extensions/string.rb +15 -0
- data/lib/bigbrother/routing_number.rb +30 -0
- metadata +49 -0
data/README.md
ADDED
data/lib/bigbrother.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
module BigBrother
|
2
|
+
module Extensions
|
3
|
+
module String
|
4
|
+
def routing_number?
|
5
|
+
BigBrother::RoutingNumber::valid_routing_number?(self)
|
6
|
+
end
|
7
|
+
|
8
|
+
def routing_info
|
9
|
+
BigBrother::RoutingNumber::routing_info(self)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
::String.__send__(:include, BigBrother::Extensions::String)
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module BigBrother
|
2
|
+
module RoutingNumber
|
3
|
+
extend self
|
4
|
+
|
5
|
+
def valid_routing_number?(number)
|
6
|
+
found = BigBrother::NUMBERS.find do |row|
|
7
|
+
row[0].strip == number
|
8
|
+
end
|
9
|
+
|
10
|
+
!!found
|
11
|
+
end
|
12
|
+
|
13
|
+
def routing_info(number)
|
14
|
+
bank = BigBrother::NUMBERS.find do |row|
|
15
|
+
row[0].strip == number
|
16
|
+
end
|
17
|
+
|
18
|
+
return {} unless bank
|
19
|
+
|
20
|
+
{
|
21
|
+
routing_number: number,
|
22
|
+
name: bank[2],
|
23
|
+
address: bank[3],
|
24
|
+
city: bank[4],
|
25
|
+
state: bank[5],
|
26
|
+
zip: bank[6]
|
27
|
+
}
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bigbrother
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Nick Kezhaya
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-11-05 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: This information is usually hard to find. I've included a relatively
|
15
|
+
up-to-date CSV that contains all routing numbers and information for each bank.
|
16
|
+
email: nick@whitepaperclip.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- lib/bigbrother/extensions/string.rb
|
22
|
+
- lib/bigbrother/routing_number.rb
|
23
|
+
- lib/bigbrother.rb
|
24
|
+
- README.md
|
25
|
+
homepage: http://github.com/whitepaperclip/BigBrother
|
26
|
+
licenses: []
|
27
|
+
post_install_message:
|
28
|
+
rdoc_options: []
|
29
|
+
require_paths:
|
30
|
+
- lib
|
31
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
+
none: false
|
33
|
+
requirements:
|
34
|
+
- - ! '>='
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0'
|
37
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
39
|
+
requirements:
|
40
|
+
- - ! '>='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0'
|
43
|
+
requirements: []
|
44
|
+
rubyforge_project:
|
45
|
+
rubygems_version: 1.8.24
|
46
|
+
signing_key:
|
47
|
+
specification_version: 3
|
48
|
+
summary: Routing number validation and querying.
|
49
|
+
test_files: []
|