Skip to content

Commit

Permalink
Remove trailing spaces in names coming from ZurRose
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiger committed Apr 27, 2015
1 parent 810facb commit 3c701bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/oddb2xml/extractor.rb
Expand Up @@ -490,7 +490,7 @@ def to_hash
:line => line.chomp,
:ean => ean13,
:vat => line[96],
:description => line[10..59], # .sub(/\s+$/, ''),
:description => line[10..59].sub(/\s+$/, ''),
:additional_desc => '',
:pharmacode => pharma_code,
:price => sprintf("%.2f", line[60,6].gsub(/(\d{2})$/, '.\1').to_f),
Expand Down
1 change: 1 addition & 0 deletions spec/extractor_spec.rb
Expand Up @@ -186,5 +186,6 @@
end
#it { expect(subject.to_hash.keys.first).to eq("7680316950157") }
it "should set the correct SALECD cmut code" do expect(subject.to_hash.values.first[:cmut]).to eq("3") end
it "should set the correct SALECD description" do expect(subject.to_hash.values.first[:description]).to eq("SOFRADEX Gtt Auric 8 ml") end
end
end

0 comments on commit 3c701bf

Please sign in to comment.