metro_2 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metro_2.rb +2 -2
- data/lib/metro_2/fields.rb +2 -2
- data/lib/metro_2/version.rb +1 -1
- data/metro_2-1.1.4.gem +0 -0
- data/spec/records/header_segment_spec.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fdc2aa647a36bd28b57fe7531d6ea9d6850c165
|
4
|
+
data.tar.gz: 00d06cc6f88caa9195a37f616feefb7944f28166
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2dc80af386533775ff220ca6333cc410622cae44e41a290ccc4148eb9b180030795ceb8c3ce055c1bdc7f3027c081379dabc7dcd4b22364e1e294c81493c2e7
|
7
|
+
data.tar.gz: 36e8ebf0de7f700635158734ae8a493fd2e56c3bd43cd10723ed3632bae2f079ef9852b83e52c1c4b02af85595f2a3a2acb50f0834b54dcdef76b21cb42cae36
|
data/lib/metro_2.rb
CHANGED
@@ -169,14 +169,14 @@ module Metro2
|
|
169
169
|
ACCOUNT_STATUS[:voluntary_surrender]])
|
170
170
|
end
|
171
171
|
|
172
|
-
def self.alphanumeric_to_metro2(val, required_length, permitted_chars)
|
172
|
+
def self.alphanumeric_to_metro2(val, required_length, permitted_chars, name)
|
173
173
|
# Left justified and blank-filled
|
174
174
|
val = val.to_s
|
175
175
|
|
176
176
|
return ' ' * required_length if val.empty?
|
177
177
|
|
178
178
|
unless !!(val =~ permitted_chars)
|
179
|
-
raise ArgumentError.new("Content (#{val}) contains invalid characters")
|
179
|
+
raise ArgumentError.new("Content (#{val}) contains invalid characters in field '#{name}'")
|
180
180
|
end
|
181
181
|
|
182
182
|
if val.size > required_length
|
data/lib/metro_2/fields.rb
CHANGED
@@ -17,7 +17,7 @@ module Metro2
|
|
17
17
|
# to_metro2
|
18
18
|
define_method "#{name}_to_metro2" do
|
19
19
|
val = instance_variable_get("@#{name}")
|
20
|
-
Metro2.alphanumeric_to_metro2(val, required_length, permitted_chars)
|
20
|
+
Metro2.alphanumeric_to_metro2(val, required_length, permitted_chars, name)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
@@ -52,7 +52,7 @@ module Metro2
|
|
52
52
|
# to_metro2
|
53
53
|
|
54
54
|
define_method "#{name}_to_metro2" do
|
55
|
-
Metro2.alphanumeric_to_metro2(val, required_length, permitted_chars)
|
55
|
+
Metro2.alphanumeric_to_metro2(val, required_length, permitted_chars, name)
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
data/lib/metro_2/version.rb
CHANGED
data/metro_2-1.1.4.gem
ADDED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metro_2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Mascarenhas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -77,6 +77,7 @@ files:
|
|
77
77
|
- metro_2-1.1.1.gem
|
78
78
|
- metro_2-1.1.2.gem
|
79
79
|
- metro_2-1.1.3.gem
|
80
|
+
- metro_2-1.1.4.gem
|
80
81
|
- metro_2.gemspec
|
81
82
|
- spec/records/base_segment_spec.rb
|
82
83
|
- spec/records/header_segment_spec.rb
|
@@ -102,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
103
|
version: '0'
|
103
104
|
requirements: []
|
104
105
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.
|
106
|
+
rubygems_version: 2.5.1
|
106
107
|
signing_key:
|
107
108
|
specification_version: 4
|
108
109
|
summary: Create Metro 2 format files for credit reporting
|