guevara 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f58362850aca1d07cc5f908b70c4ce191bb980e3
4
- data.tar.gz: 09f73431c56f52808db6216c6a91b44318916139
3
+ metadata.gz: 55ab0f86248f8824421a1b9c2030268e9d709f8c
4
+ data.tar.gz: 8c3b980d27f000a61c151a054f3164aa7b3a98ad
5
5
  SHA512:
6
- metadata.gz: f9cf60939fd3f0ee3a4fd53945137011b434b1eb564f2af54967957d6639dac13ec4d916ff0cb0fd20ce90ed65c9217fb65b9d6c471d16988970f10a027e9327
7
- data.tar.gz: 8762e796e63f6c1716b41ca44e4630fccee4fdff91e95e0a500e224549dfa285a4b18f31830a28e64fb9912c597fbfb124f1b37f00214376b5770783ea50074e
6
+ metadata.gz: 9d8d72ce9674b3a0f7c63722aaba9998d3406860cea668b4d2e9d8df145ef987a619f4dca6eb6928cdf5c6e3277fbe7f7541e7404f3cfe1bb583b5a031243e88
7
+ data.tar.gz: c844c3a7b0c5b12d53182970e5b43753214e1874300df4b9227914952bceb94c06b15d9b5352d52ce18c398cfb656c29494e35f074adf0af7abb3c197989d9a4
data/lib/guevara/entry.rb CHANGED
@@ -12,7 +12,7 @@ module Guevara
12
12
 
13
13
  def fields
14
14
  ["6%<transaction_code>2d",
15
- "%<routing_number>9d",
15
+ "%<routing_number>09d",
16
16
  "%<account_number>-17.17s",
17
17
  "%<amount>010d",
18
18
  "%<id>-15.15s",
@@ -1,3 +1,3 @@
1
1
  module Guevara
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/test/test_entry.rb CHANGED
@@ -2,7 +2,7 @@ require_relative 'helper.rb'
2
2
  require_relative '../lib/guevara/entry'
3
3
 
4
4
  setup do
5
- Guevara::Entry.new(
5
+ {
6
6
  type: 'debit',
7
7
  account_type: 'checking',
8
8
  routing_number: 103100195,
@@ -12,11 +12,19 @@ setup do
12
12
  name: 'marge baker',
13
13
  origin_id: '12345678',
14
14
  number: 1
15
- )
15
+ }
16
16
  end
17
17
 
18
- test 'generates the entry detail record' do |entry_record|
18
+ test 'generates the entry detail record' do |entry_attrs|
19
+ entry_record = Guevara::Entry.new entry_attrs
19
20
  debugger_equal entry_record.to_s, <<NACHA
20
21
  6271031001953ACCOUNT234 0000001600FD00AFA8A0F7 marge baker 1123456780000001
21
22
  NACHA
22
23
  end
24
+
25
+ test 'routing number with leading zeroes if they are removed' do |entry_attrs|
26
+ entry_record = Guevara::Entry.new entry_attrs.merge(:routing_number => 195)
27
+ debugger_equal entry_record.to_s, <<NACHA
28
+ 6270000001953ACCOUNT234 0000001600FD00AFA8A0F7 marge baker 1123456780000001
29
+ NACHA
30
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guevara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gaston Ramos
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-29 00:00:00.000000000 Z
12
+ date: 2014-10-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -122,4 +122,3 @@ test_files:
122
122
  - test/test_file_control.rb
123
123
  - test/test_file_generation.rb
124
124
  - test/test_file_header.rb
125
- has_rdoc: