canada_payment 0.0.1 → 0.1.0

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: d7eeef44cc2f4829a2f6d92131aafe852000aad5
4
- data.tar.gz: 36807e158fb8dfcb978df6213bd942c1e3b6806b
3
+ metadata.gz: 8d51011a3a2f02bfb492262d44748bbdfd06f7ad
4
+ data.tar.gz: 23b2ba425b237c59ccdcc346aad0d5bf801f4fa2
5
5
  SHA512:
6
- metadata.gz: eb7d448670d96434a01c1ae60cf41683c09f8345dff9c54be934bae77726902a6466033763d4334bf7484525d3a101fc4412bf30804328902faf4085ccc0f296
7
- data.tar.gz: 10303c98593a3c8b0526ca02799d8a8705f0b07a42b2d05a7160c83ab1f4c9bd9227f5f932b0538770529597f4d04e128a40077aeb4f08b9adf59efd1c4174c8
6
+ metadata.gz: fa3cc07651136e4c27f630e2a154380068033338add9cff228d91481e4446a123ab743fc72eda6edc37aae2fec0a13fdd5610c84c7d0a14beb4de70e2e4fe83e
7
+ data.tar.gz: e2555a80a0c882d709d12e1a08b974e3fac6a8cd062af400f00236da84bbb1227e4c9f67c3bf747d95cb5adaf34c4b7c1160ab90c79a9acdec1904742031edff
@@ -31,4 +31,5 @@ Gem::Specification.new do |spec|
31
31
  spec.add_development_dependency "terminal-notifier-guard"
32
32
  spec.add_development_dependency "faker"
33
33
  spec.add_development_dependency "simplecov"
34
+ spec.add_development_dependency "simplecov-gem-profile"
34
35
  end
@@ -31,11 +31,12 @@ module CanadaPayment::EFT::CPA005::Debit
31
31
  @test = test
32
32
  end
33
33
 
34
- def file_output
35
- header_record + line_records
34
+ # BASE CLASS OVERRIDES
35
+
36
+ def file_header
37
+ "$$AA01CPA1464[#{@test ? 'TEST' : 'PROD'}[NL$$"
36
38
  end
37
39
 
38
- # BASE CLASS OVERRIDES
39
40
  def header_record
40
41
  'A' +
41
42
  zero_padded('1', 9) +
@@ -102,18 +103,14 @@ module CanadaPayment::EFT::CPA005::Debit
102
103
  output[-1] += segment.to_s
103
104
  end
104
105
 
105
- # fill last row with blank segments
106
- unless output[-1].nil?
107
- while output[-1].length < RECORD_LENGTH
108
- output[-1] += Segment.blank_values
109
- end
110
- end
106
+ # fill last row with spaces if it doesn't contain 6 transactions
107
+ output[-1] += " " * (RECORD_LENGTH - output[-1].length)
111
108
 
112
109
  output
113
110
  end
114
111
 
115
112
  def to_s
116
- header_record + "\n" + basic_records.join("\n") + "\n" + trailer_record
113
+ file_header + "\n" + header_record + "\n" + basic_records.join("\n") + "\n" + trailer_record
117
114
  end
118
115
  alias_method :output, :to_s
119
116
 
@@ -68,27 +68,6 @@ module CanadaPayment::EFT::CPA005::Debit
68
68
  end
69
69
  alias_method :output, :to_s
70
70
 
71
- def self.blank_values
72
- ' ' * 3 +
73
- '0' * 10 +
74
- '0' * 6 +
75
- '0' * 9 +
76
- ' ' * 12 +
77
- '0' * 22 +
78
- '0' * 3 +
79
- ' ' * 15 +
80
- ' ' * 30 +
81
- ' ' * 30 +
82
- ' ' * 10 +
83
- ' ' * 19 +
84
- '0' * 9 +
85
- ' ' * 12 +
86
- ' ' * 15 +
87
- ' ' * 22 +
88
- ' ' * 2 +
89
- ' ' * 11
90
- end
91
-
92
71
  private
93
72
 
94
73
  def formatted_transaction_code
@@ -1,3 +1,3 @@
1
1
  module CanadaPayment
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canada_payment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carl Mercier
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-28 00:00:00.000000000 Z
11
+ date: 2017-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -150,6 +150,20 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: simplecov-gem-profile
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
153
167
  description: This library allows you to easily create ACH/EFT CPA005 files from Ruby.
154
168
  email:
155
169
  - foss@carlmercier.com
@@ -198,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
212
  version: '0'
199
213
  requirements: []
200
214
  rubyforge_project:
201
- rubygems_version: 2.6.11
215
+ rubygems_version: 2.6.13
202
216
  signing_key:
203
217
  specification_version: 4
204
218
  summary: Canadian ACH/EFT files in Ruby