hippo 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ 0.5.4 - 2013/08/06
2
+ * Handle whitespace prefixed segment identifiers. This allows you to parse a
3
+ file that has been output with indentation (to signify loops/segments).
1
4
  0.5.3 - 2013/02/27
2
5
  * Fix issue with repeating whitespace inside a field. (resolves #2)
3
6
  0.5.2 - 2013/01/02
@@ -19,7 +19,8 @@ module Hippo
19
19
 
20
20
  def parsed_segments
21
21
  @segments ||= @unparsed_data.split(@segment_separator).collect do |segment_string|
22
- segment = Hippo::Segments.const_get(segment_string.split(@field_separator).first).new(:parent => self)
22
+ segment_identifier = segment_string.split(@field_separator).first
23
+ segment = Hippo::Segments.const_get(segment_identifier.lstrip).new(:parent => self)
23
24
 
24
25
  segment.parse(segment_string)
25
26
 
data/lib/hippo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hippo
2
- VERSION = "0.5.3" unless defined?(Hippo::VERSION)
2
+ VERSION = "0.5.4" unless defined?(Hippo::VERSION)
3
3
  end
data/test/test_parser.rb CHANGED
@@ -126,4 +126,13 @@ class TestParser < MiniTest::Unit::TestCase
126
126
  ts.parse(child_loop_string)
127
127
  assert_equal 'TSS*Multiple Parents~', ts.values[2].to_s
128
128
  end
129
+
130
+ def test_strips_leading_whitespace_from_segment_identifier
131
+ initial_string = " ST*Test~\n TSS*Blah*BOOM~"
132
+ ts = Hippo::TransactionSets::Test::Base.new
133
+
134
+ ts.parse(initial_string)
135
+
136
+ assert_equal ts.TSS.TSS02, 'BOOM'
137
+ end
129
138
  end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hippo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Robert Jackson
@@ -9,25 +10,28 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2013-02-27 00:00:00.000000000 Z
13
+ date: 2013-08-06 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: minitest
16
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
17
19
  requirements:
18
- - - '>='
20
+ - - ! '>='
19
21
  - !ruby/object:Gem::Version
20
22
  version: '0'
21
23
  type: :development
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
24
27
  requirements:
25
- - - '>='
28
+ - - ! '>='
26
29
  - !ruby/object:Gem::Version
27
30
  version: '0'
28
31
  - !ruby/object:Gem::Dependency
29
32
  name: rake
30
33
  requirement: !ruby/object:Gem::Requirement
34
+ none: false
31
35
  requirements:
32
36
  - - ~>
33
37
  - !ruby/object:Gem::Version
@@ -35,6 +39,7 @@ dependencies:
35
39
  type: :development
36
40
  prerelease: false
37
41
  version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
38
43
  requirements:
39
44
  - - ~>
40
45
  - !ruby/object:Gem::Version
@@ -324,26 +329,33 @@ files:
324
329
  - test/test_transaction_sets_base.rb
325
330
  homepage: http://github.com/promedical/hippo
326
331
  licenses: []
327
- metadata: {}
328
332
  post_install_message:
329
333
  rdoc_options: []
330
334
  require_paths:
331
335
  - lib
332
336
  required_ruby_version: !ruby/object:Gem::Requirement
337
+ none: false
333
338
  requirements:
334
- - - '>='
339
+ - - ! '>='
335
340
  - !ruby/object:Gem::Version
336
341
  version: '0'
342
+ segments:
343
+ - 0
344
+ hash: -489077228287388914
337
345
  required_rubygems_version: !ruby/object:Gem::Requirement
346
+ none: false
338
347
  requirements:
339
- - - '>='
348
+ - - ! '>='
340
349
  - !ruby/object:Gem::Version
341
350
  version: '0'
351
+ segments:
352
+ - 0
353
+ hash: -489077228287388914
342
354
  requirements: []
343
355
  rubyforge_project: hippo
344
- rubygems_version: 2.0.0
356
+ rubygems_version: 1.8.25
345
357
  signing_key:
346
- specification_version: 4
358
+ specification_version: 3
347
359
  summary: HIPAA Transaction Set Generator/Parser
348
360
  test_files:
349
361
  - test/test_helper.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 0f480c873a13b7d66b732366a2ae455b9510b264
4
- data.tar.gz: 2631446673a5bd3404ffdf4d74dea113df053ae3
5
- SHA512:
6
- metadata.gz: c9fc9b3460242ff84228515dd17d0f70428e811f9f234258f457eeebb1d6c758a53907b280cc80aac0c720054d5eedfa1e6c7f74011e0fae0bd522e4fd459c63
7
- data.tar.gz: c8007094aa9368a04d9043cbc044d53870fd374c2f86db5974f9435a728d07b68f012960c52622950128a0b33e4cfd636ca8a1c4d9368cb2e4b9230f062ce818