hippo 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG +2 -0
- data/lib/hippo/separator.rb +8 -10
- data/lib/hippo/version.rb +1 -1
- data/test/test_segments_base.rb +11 -0
- metadata +11 -18
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0f480c873a13b7d66b732366a2ae455b9510b264
|
4
|
+
data.tar.gz: 2631446673a5bd3404ffdf4d74dea113df053ae3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c9fc9b3460242ff84228515dd17d0f70428e811f9f234258f457eeebb1d6c758a53907b280cc80aac0c720054d5eedfa1e6c7f74011e0fae0bd522e4fd459c63
|
7
|
+
data.tar.gz: c8007094aa9368a04d9043cbc044d53870fd374c2f86db5974f9435a728d07b68f012960c52622950128a0b33e4cfd636ca8a1c4d9368cb2e4b9230f062ce818
|
data/CHANGELOG
CHANGED
data/lib/hippo/separator.rb
CHANGED
@@ -55,18 +55,16 @@ module Hippo
|
|
55
55
|
}x
|
56
56
|
end
|
57
57
|
|
58
|
+
def regexp_escaped_separators
|
59
|
+
Regexp.escape(@composite_separator) +
|
60
|
+
Regexp.escape(@field_separator) +
|
61
|
+
Regexp.escape(@segment_separator)
|
62
|
+
end
|
63
|
+
|
58
64
|
def empty_field_regexp
|
59
|
-
%r{([
|
60
|
-
#{Regexp.escape(@composite_separator)}
|
61
|
-
#{Regexp.escape(@field_separator)}
|
62
|
-
#{Regexp.escape(@segment_separator)}
|
63
|
-
])
|
65
|
+
%r{([#{regexp_escaped_separators}])
|
64
66
|
\s+
|
65
|
-
([
|
66
|
-
#{Regexp.escape(@composite_separator)}
|
67
|
-
#{Regexp.escape(@field_separator)}
|
68
|
-
#{Regexp.escape(@segment_separator)}
|
69
|
-
])
|
67
|
+
([#{regexp_escaped_separators}])
|
70
68
|
}x
|
71
69
|
end
|
72
70
|
|
data/lib/hippo/version.rb
CHANGED
data/test/test_segments_base.rb
CHANGED
@@ -187,4 +187,15 @@ class TestSegmentsBase < MiniTest::Unit::TestCase
|
|
187
187
|
seg = Hippo::Segments::STC.new.parse(input_string)
|
188
188
|
assert_equal input_string + '~', seg.to_s
|
189
189
|
end
|
190
|
+
|
191
|
+
def test_empty_fields_are_removed
|
192
|
+
n1 = Hippo::Segments::N1.new.parse("N1*PE* *XX*1234567890")
|
193
|
+
assert_equal "N1*PE**XX*1234567890~", n1.to_s
|
194
|
+
end
|
195
|
+
|
196
|
+
def test_remove_empty_fields_doesnt_change_populated_fields
|
197
|
+
original = "N1*PE*SOME RANDOM NAME HERE*XX*1234567890"
|
198
|
+
n1 = Hippo::Segments::N1.new.parse(original)
|
199
|
+
assert_equal original + '~', n1.to_s
|
200
|
+
end
|
190
201
|
end
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hippo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
5
|
-
prerelease:
|
4
|
+
version: 0.5.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Robert Jackson
|
@@ -10,40 +9,36 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-27 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: minitest
|
17
|
-
prerelease: false
|
18
16
|
requirement: !ruby/object:Gem::Requirement
|
19
17
|
requirements:
|
20
|
-
- -
|
18
|
+
- - '>='
|
21
19
|
- !ruby/object:Gem::Version
|
22
20
|
version: '0'
|
23
|
-
none: false
|
24
21
|
type: :development
|
22
|
+
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
24
|
requirements:
|
27
|
-
- -
|
25
|
+
- - '>='
|
28
26
|
- !ruby/object:Gem::Version
|
29
27
|
version: '0'
|
30
|
-
none: false
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: rake
|
33
|
-
prerelease: false
|
34
30
|
requirement: !ruby/object:Gem::Requirement
|
35
31
|
requirements:
|
36
32
|
- - ~>
|
37
33
|
- !ruby/object:Gem::Version
|
38
34
|
version: 10.0.2
|
39
|
-
none: false
|
40
35
|
type: :development
|
36
|
+
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
38
|
requirements:
|
43
39
|
- - ~>
|
44
40
|
- !ruby/object:Gem::Version
|
45
41
|
version: 10.0.2
|
46
|
-
none: false
|
47
42
|
description: HIPAA Transaction Set Generator/Parser
|
48
43
|
email:
|
49
44
|
- robertj@promedicalinc.com
|
@@ -329,27 +324,26 @@ files:
|
|
329
324
|
- test/test_transaction_sets_base.rb
|
330
325
|
homepage: http://github.com/promedical/hippo
|
331
326
|
licenses: []
|
327
|
+
metadata: {}
|
332
328
|
post_install_message:
|
333
329
|
rdoc_options: []
|
334
330
|
require_paths:
|
335
331
|
- lib
|
336
332
|
required_ruby_version: !ruby/object:Gem::Requirement
|
337
333
|
requirements:
|
338
|
-
- -
|
334
|
+
- - '>='
|
339
335
|
- !ruby/object:Gem::Version
|
340
336
|
version: '0'
|
341
|
-
none: false
|
342
337
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
343
338
|
requirements:
|
344
|
-
- -
|
339
|
+
- - '>='
|
345
340
|
- !ruby/object:Gem::Version
|
346
341
|
version: '0'
|
347
|
-
none: false
|
348
342
|
requirements: []
|
349
343
|
rubyforge_project: hippo
|
350
|
-
rubygems_version:
|
344
|
+
rubygems_version: 2.0.0
|
351
345
|
signing_key:
|
352
|
-
specification_version:
|
346
|
+
specification_version: 4
|
353
347
|
summary: HIPAA Transaction Set Generator/Parser
|
354
348
|
test_files:
|
355
349
|
- test/test_helper.rb
|
@@ -359,4 +353,3 @@ test_files:
|
|
359
353
|
- test/test_parser.rb
|
360
354
|
- test/test_segments_base.rb
|
361
355
|
- test/test_transaction_sets_base.rb
|
362
|
-
has_rdoc:
|