rubyritas / ach

Helper for building ACH files in Ruby
MIT License
111 stars 75 forks source link

Line endings? #49

Closed minter closed 6 years ago

minter commented 7 years ago

Hello!

I used this gem to generate an ACH file for our bank, submitted via their https connector. The feedback that we got from the bank was that the file was invalid due to "extra blank lines" between each line of the file.

I saw that the file used Windows line endings (CRLF), and converted it to use UNIX line endings (LF), then resubmitted the file. It worked properly after that change.

I see in the code that it's joining lines with CRLF (https://github.com/jm81/ach/blob/master/lib/ach/ach_file.rb#L54) - is that something that's in the spec, but Bank Of America wants something different? Or something that might be useful to be tunable when building a file with the gem?

jm81 commented 7 years ago

To the best of my memory, CRLF is just what the bank I first used this with required; I don't see it in the spec now at least. I think it would definitely be useful for that to be tunable (my first thought is it could possibly just be a argument to the to_s method). I can look at it more this weekend, and if you would like to do a PR, that would be great. Thanks for bringing this up, it's one of those things I just have never thought through.

minter commented 6 years ago

Thanks!