Skip to content

Commit

Permalink
Merge pull request #192 from razorpay/release/1.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Patlola Praveen Kumar Reddy authored Jul 28, 2020
2 parents 063b363 + ca8f9b5 commit 5de129f
Show file tree
Hide file tree
Showing 16 changed files with 55 additions and 19 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## UNRELEASED

## 1.5.4

### Changed

- Metadata updates
- Optimized memory consumption in php tests.
- New Banks:
- KBKB : Kookmin Bank
- SUSB : Suco Souharda Sahakari Bank

## 1.5.3

### Changed
Expand Down
4 changes: 2 additions & 2 deletions ifsc.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

Gem::Specification.new do |s|
s.name = 'ifsc'
s.version = '1.5.3'
s.date = '2020-04-08'
s.version = '1.5.4'
s.date = '2020-07-08'
s.summary = 'IFSC code database to help you validate IFSC codes'
s.description = 'A simple gem by @razorpay to help you validate your IFSC codes. IFSC codes are bank codes within India'
s.authors = ['Abhay Rana', 'Nihal Gonsalves']
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule IFSC.Mixfile do
def project do
[
app: :ifsc,
version: "1.5.3",
version: "1.5.4",
elixir: "~> 1.5",
start_permanent: Mix.env == :prod,
description: description(),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ifsc",
"version": "1.5.3",
"version": "1.5.4",
"description": "This is part of the IFSC toolset released by Razorpay. You can find more details about the entire release at [ifsc.razorpay.com](https://ifsc.razorpay.com). Includes only a validation library as of now.",
"main": "src/node/index.js",
"directories": {
Expand Down
1 change: 1 addition & 0 deletions scraper/scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pushd data

# Compress the $BANK.json files
tar --gzip --create --file by-bank.tar.gz by-bank
tar cvf by-bank.tar by-bank
rm --recursive --force by-bank/

# Delete all the sheets for a much smaller
Expand Down
2 changes: 1 addition & 1 deletion scraper/scripts/methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def parse_rtgs(banks)

# There is a second header in the middle of the sheet.
# :facepalm: RBI
next if row['IFSC'] == 'IFSC_CODE'
next if row['IFSC'].nil? or ['IFSC_CODE', 'BANK OF BARODA', '', 'KPK HYDERABAD'].include?(row['IFSC'])

original_ifsc = row['IFSC']
row['IFSC'] = row['IFSC'].upcase.gsub(/[^0-9A-Za-z]/, '').strip
Expand Down
2 changes: 1 addition & 1 deletion src/IFSC.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/banknames.json
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@
"KATX": "Kattappana Urban Co-operative Bank",
"KAYX": "Kanyakumari District Central Co-operative Bank",
"KBCX": "Kanakamahalakshmi Co-operative Bank",
"KBKB": "Kookmin Bank",
"KBNX": "Khambhat Nagarik Sahakari Bank",
"KBSX": "Krishna Bhima Samruddhi Local Area Bank",
"KCBL": "Kapol Co-operative Bank",
Expand Down Expand Up @@ -996,6 +997,7 @@
"RSBL": "Rajgurunagar Sahakari Bank",
"RSBX": "Raigad Sahakari Bank",
"RSCB": "Rajasthan State Co-operative Bank",
"RSSB": "Rajarshi Shahu Sahakari Bank",
"RSSX": "Rajarshi Shahu Sahakari Bank",
"RSUX": "Radhasoami Urban Co-operative Bank",
"RSVX": "Rajarshi Shahu Govt Servants Co-operative Bank Kolh",
Expand Down Expand Up @@ -1168,6 +1170,7 @@
"SUNB": "Surat National Co-operative Bank",
"SURX": "Siddheshwar Urban Co-operative Bank Maryadit Sillod",
"SURY": "Suryoday Small Finance Bank",
"SUSB": "Suco Souharda Sahakari Bank",
"SUSX": "Sirsi Urban Sahakari Bank",
"SUTB": "Sutex Co-operative Bank",
"SUVX": "Suvarnayug Sahakari Bank",
Expand Down Expand Up @@ -1345,6 +1348,7 @@
"UTKS": "Utkarsh Small Finance Bank",
"UTKX": "Uttarakhand State Co-operative Bank",
"UTZX": "Uttarkashi Zila Sahkari Bank",
"UUCB": "Udaipur Urban Co-operative Bank",
"UUCX": "Udaipur Urban Co-operative Bank",
"VADX": "Valsad District Central Co-operative Bank",
"VAIX": "Vaishya Sahakari Bank Mumbai",
Expand Down
15 changes: 10 additions & 5 deletions src/banks.json
Original file line number Diff line number Diff line change
Expand Up @@ -8386,7 +8386,8 @@
"apbs": true,
"ach_credit": true,
"ach_debit": true,
"nach_debit": false
"nach_debit": false,
"upi": true
},
"NNSX": {
"code": "NNSX",
Expand Down Expand Up @@ -10093,7 +10094,8 @@
"apbs": true,
"ach_credit": true,
"ach_debit": true,
"nach_debit": false
"nach_debit": false,
"upi": true
},
"SACX": {
"code": "SACX",
Expand Down Expand Up @@ -10548,7 +10550,8 @@
"apbs": true,
"ach_credit": true,
"ach_debit": true,
"nach_debit": false
"nach_debit": false,
"upi": true
},
"SDHX": {
"code": "SDHX",
Expand Down Expand Up @@ -11364,7 +11367,8 @@
"apbs": true,
"ach_credit": true,
"ach_debit": true,
"nach_debit": false
"nach_debit": false,
"upi": true
},
"SPTX": {
"code": "SPTX",
Expand Down Expand Up @@ -13576,7 +13580,8 @@
"apbs": true,
"ach_credit": true,
"ach_debit": true,
"nach_debit": false
"nach_debit": false,
"upi": true
},
"VADX": {
"code": "VADX",
Expand Down
4 changes: 4 additions & 0 deletions src/node/bank.js
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ module.exports = Object.freeze({
KATX: 'KATX',
KAYX: 'KAYX',
KBCX: 'KBCX',
KBKB: 'KBKB',
KBNX: 'KBNX',
KBSX: 'KBSX',
KCBL: 'KCBL',
Expand Down Expand Up @@ -995,6 +996,7 @@ module.exports = Object.freeze({
RSBL: 'RSBL',
RSBX: 'RSBX',
RSCB: 'RSCB',
RSSB: 'RSSB',
RSSX: 'RSSX',
RSUX: 'RSUX',
RSVX: 'RSVX',
Expand Down Expand Up @@ -1167,6 +1169,7 @@ module.exports = Object.freeze({
SUNB: 'SUNB',
SURX: 'SURX',
SURY: 'SURY',
SUSB: 'SUSB',
SUSX: 'SUSX',
SUTB: 'SUTB',
SUVX: 'SUVX',
Expand Down Expand Up @@ -1344,6 +1347,7 @@ module.exports = Object.freeze({
UTKS: 'UTKS',
UTKX: 'UTKX',
UTZX: 'UTZX',
UUCB: 'UUCB',
UUCX: 'UUCX',
VADX: 'VADX',
VAIX: 'VAIX',
Expand Down
7 changes: 7 additions & 0 deletions src/patches/banks/upi-enabled-banks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ banks:
- AIRP
- ALLA
- AMCB
- AMDN
- ANDB
- APBL
- APGB
Expand All @@ -21,6 +22,7 @@ banks:
- ASBL
- AUBL
- BACB
- BARA
- BARB
- BCBM
- BDBL
Expand Down Expand Up @@ -99,6 +101,7 @@ banks:
- NKGS
- NSPB
- NTBL
- NNSB
- ORBC
- PASX
- PGBX
Expand All @@ -116,12 +119,15 @@ banks:
- RMGB
- RNSB
- SAGX
- SACB
- SBIN
- SCBL
- SCOB
- SDCX
- SIBL
- SIDC
- SPCB
- SPSX
- SRCB
- SSDX
- SUBX
Expand All @@ -145,6 +151,7 @@ banks:
- UTBI
- UTGX
- UTIB
- UUCX
- VARA
- VGBX
- VIJB
Expand Down
4 changes: 4 additions & 0 deletions src/php/Bank.php
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ class Bank
const KATX = 'KATX';
const KAYX = 'KAYX';
const KBCX = 'KBCX';
const KBKB = 'KBKB';
const KBNX = 'KBNX';
const KBSX = 'KBSX';
const KCBL = 'KCBL';
Expand Down Expand Up @@ -1000,6 +1001,7 @@ class Bank
const RSBL = 'RSBL';
const RSBX = 'RSBX';
const RSCB = 'RSCB';
const RSSB = 'RSSB';
const RSSX = 'RSSX';
const RSUX = 'RSUX';
const RSVX = 'RSVX';
Expand Down Expand Up @@ -1172,6 +1174,7 @@ class Bank
const SUNB = 'SUNB';
const SURX = 'SURX';
const SURY = 'SURY';
const SUSB = 'SUSB';
const SUSX = 'SUSX';
const SUTB = 'SUTB';
const SUVX = 'SUVX';
Expand Down Expand Up @@ -1349,6 +1352,7 @@ class Bank
const UTKS = 'UTKS';
const UTKX = 'UTKX';
const UTZX = 'UTZX';
const UUCB = 'UUCB';
const UUCX = 'UUCX';
const VADX = 'VADX';
const VAIX = 'VAIX';
Expand Down
4 changes: 4 additions & 0 deletions src/ruby/bank.rb
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ module Bank
KATX = :KATX
KAYX = :KAYX
KBCX = :KBCX
KBKB = :KBKB
KBNX = :KBNX
KBSX = :KBSX
KCBL = :KCBL
Expand Down Expand Up @@ -999,6 +1000,7 @@ module Bank
RSBL = :RSBL
RSBX = :RSBX
RSCB = :RSCB
RSSB = :RSSB
RSSX = :RSSX
RSUX = :RSUX
RSVX = :RSVX
Expand Down Expand Up @@ -1171,6 +1173,7 @@ module Bank
SUNB = :SUNB
SURX = :SURX
SURY = :SURY
SUSB = :SUSB
SUSX = :SUSX
SUTB = :SUTB
SUVX = :SUVX
Expand Down Expand Up @@ -1348,6 +1351,7 @@ module Bank
UTKS = :UTKS
UTKX = :UTKX
UTZX = :UTZX
UUCB = :UUCB
UUCX = :UUCX
VADX = :VADX
VAIX = :VAIX
Expand Down
2 changes: 1 addition & 1 deletion tests/php/CoverageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testNames()
{
// For some reason the CSV header is picked up as a IFSC code
// Skip the check while this is fixed.
$exceptions = ['IFSC'];
$exceptions = ['IFSC', 'KPKH'];
foreach ($this->bankCodes as $code)
{
if (!in_array($code, $exceptions))
Expand Down
7 changes: 1 addition & 6 deletions tests/php/DatasetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,15 @@ public function testIFSCDotCsv() {
* compression helps keep the download file size for releases low.
*/
public function testBankFiles() {
$gzFile = __DIR__ . "/../../scraper/scripts/data/by-bank.tar.gz";
$tarFile = __DIR__ . "/../../scraper/scripts/data/by-bank.tar";

$dir = tempnam(sys_get_temp_dir(), '') . '.dir';

@unlink($tarFile);
mkdir($dir);

$p = new PharData($gzFile);
$p->decompress();

// unarchive from the tar
$phar = new PharData($tarFile);
print_r($phar->extractTo($dir));
$phar->extractTo($dir);

foreach(glob("$dir/by-bank/*.json") as $json) {
$data = json_decode(file_get_contents($json), true);
Expand Down
4 changes: 3 additions & 1 deletion wercker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ build:
cwd: scraper/scripts
- script:
name: Copy artifacts
code: cp scraper/scripts/data/* $WERCKER_REPORT_ARTIFACTS_DIR/
code: cp `ls | egrep -v '^by-bank.tar$'` $WERCKER_REPORT_ARTIFACTS_DIR/
cwd: scraper/scripts/data

# This is the ruby gem that we have
rubygem:
box: ruby
Expand Down

0 comments on commit 5de129f

Please sign in to comment.