-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #224 from razorpay/release/1.5.13
- Loading branch information
Showing
15 changed files
with
118 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
def sanitize(str) | ||
return nil if str.nil? or str.length==0 | ||
["┬ô", "┬û",'┬ö','┬Æ','┬á','┬æ','┬ù','ý','ý','┬á'].each do |pattern| | ||
str.gsub!(pattern,' ') | ||
end | ||
str.gsub!('É','e') | ||
str.gsub!('Æ','a') | ||
str.gsub!('É','e') | ||
# Remove all spaces (including nbsp) at the start and end of the string | ||
str.gsub(/\A[[:space:]]+|[[:space:]]+\z/, '') | ||
end | ||
|
||
# Some rows have last 2 columns shifted by 2 | ||
# Check for numeric values of STATE in RTGEB0815.xlsx for examples | ||
# This checks and fixes those | ||
def fix_row_alignment_for_rtgs(row) | ||
# List of recognized states | ||
unless KNOWN_STATES.include? row['CITY2'].to_s.strip | ||
log "#{row['IFSC']} has an unknown state (#{row['CITY2']}), please check" | ||
exit 1 | ||
end | ||
# Start right shifting from the right-most column | ||
row['PHONE'] = row['STD CODE'] | ||
# Move STATE's numeric value to STD CODE | ||
row['STD CODE'] = row['STATE'] | ||
row['STATE'] = row['CITY2'] | ||
# Fix CITY2 value by duplicating CITY1 | ||
row['CITY2'] = row['CITY1'] | ||
return row | ||
end |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.