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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fae9d23b6a5f6a7097f3c5b261ef9d96b4d13c13
4
- data.tar.gz: dc696a2ae5d01dce2fd5c1f9828d0ac9d9b1fd97
3
+ metadata.gz: 4fdc2aa647a36bd28b57fe7531d6ea9d6850c165
4
+ data.tar.gz: 00d06cc6f88caa9195a37f616feefb7944f28166
5
5
  SHA512:
6
- metadata.gz: 4b8321fe47c205e17616fbc76ffbbe9bfc75cbe28d299fc87a17680519778f67ca448f06a879bb7541b52f6faa0cbef1f1686c31f1e87773f2fe46e82edaed74
7
- data.tar.gz: 3f5fcbef7c348fb0e3d719be0750f96beeadd18f766ef9655d675d8a9e05192bbf99d0794930a617eafbad7091b5c27a439f7e7223c67894d8b4290fb471a114
6
+ metadata.gz: d2dc80af386533775ff220ca6333cc410622cae44e41a290ccc4148eb9b180030795ceb8c3ce055c1bdc7f3027c081379dabc7dcd4b22364e1e294c81493c2e7
7
+ data.tar.gz: 36e8ebf0de7f700635158734ae8a493fd2e56c3bd43cd10723ed3632bae2f079ef9852b83e52c1c4b02af85595f2a3a2acb50f0834b54dcdef76b21cb42cae36
@@ -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
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  module Metro2
2
- VERSION = "1.1.4"
2
+ VERSION = "1.1.5"
3
3
 
4
4
  def self.version_string
5
5
  str = VERSION.split('.')
Binary file
@@ -32,7 +32,7 @@ describe Metro2::Records::HeaderSegment do
32
32
  '123 Report Dr Address CA 91111'.ljust(96, ' '),
33
33
  '5555555555',
34
34
  'Upstart Engineer metro 2 gem'.ljust(40, ' '),
35
- '01104',
35
+ '01105',
36
36
  ' ' * 156
37
37
  ]
38
38
  header_str = @header.to_metro2
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
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: 2015-06-25 00:00:00.000000000 Z
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.4.6
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