🚀 DAY 4 OF LAUNCH WEEK: Introducing GitHub Actions Scanning Support.Learn more →
Socket
Book a DemoInstallSign in
Socket

bank_lookup

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bank_lookup

bundlerRubygems
Version
0.2.1
Version published
Maintainers
2
Created
Source

This is a tiny project that provides a super simple lookup table for bank routing numbers to bank names.

Note: Currently, we simply load the routing numbers and bank names into memory. There are approximately 20,656 banks in the database, so this will likely take up a few megabytes of memory in each process that loads the BankLookup::DB into memory.

Usage

In your Gemfile:

gem 'bank_lookup'

You need to instruct the gem to parse the database file. This gem ships with a file that will be periodically updated (you can also suppply your own). In an initializer, make sure you load the DB by parsing the data file:

# config/initializers/bank_lookup.rb
BankLookup::Parser.parse

Mount the API in your router:

MyApp::Application.routes.draw do
  mount BankLookup::API => 'lookup'
end

Now get some bank names:

curl https://example.com/lookup/bank_name?number=121202211
# => {"name":"CHARLES SCHWAB BANK","pretty_name":"Charles Schwab Bank"}

FAQs

Package last updated on 11 Mar 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts