Skip to content

Commit

Permalink
Remove unnecessary spaces from ARTICLE.PKG_SIZE in oddb_calc.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiger committed Mar 4, 2015
1 parent 3a6c278 commit 7eb4923
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions History.txt
@@ -1,5 +1,6 @@
=== 1.9.8 / 04.03.2015

* Remove unnecessary spaces from ARTICLE.PKG_SIZE in oddb_calc.xml
* Remove unnecessary spaces from ARTICLE.NAME in oddb_calc.xml
* Emit comment for compositions, eg. 'Solvens: aqua ad iniectabilia.'
* Renamed COMPOSITION to COMPONENT in COMPOSITIONS
Expand Down
2 changes: 1 addition & 1 deletion lib/oddb2xml/builder.rb
Expand Up @@ -666,7 +666,7 @@ def build_calc
xml.ARTICLE {
xml.GTIN ean13
xml.NAME info.name
xml.PKG_SIZE package_size
xml.PKG_SIZE info.pkg_size
xml.SELLING_UNITS info.selling_units
# xml.COUNT info.count
# xml.MULTI info.multi
Expand Down
2 changes: 1 addition & 1 deletion lib/oddb2xml/calc.rb
Expand Up @@ -185,7 +185,7 @@ def self.update_active_agent(name, part)
public
def initialize(name = nil, size = nil, unit = nil, active_substance = nil, composition= nil)
@name = name ? name.gsub(/\s\s+/, ' ') : name
@pkg_size = size
@pkg_size = size ? size.to_s.gsub(/\s\s+/, ' ') : nil
@unit = unit
# @pkg_size, @galenic_group, @galenic_form =
search_galenic_info
Expand Down
2 changes: 2 additions & 0 deletions spec/calc_spec.rb
Expand Up @@ -260,6 +260,8 @@ def url
expect(File.exists?(full)).to eq true
}
xml = File.read(File.join(Oddb2xml::WorkDir, 'oddb_calc.xml'))
m = />.* /.match(xml)
m.should eq nil
doc = REXML::Document.new xml
gtin = '7680540151009'
ean12 = '7680' + sprintf('%05d',tst_naropin.iksnr_A) + sprintf('%03d',tst_naropin.pack_K)
Expand Down
Binary file modified spec/data/swissmedic_package-galenic.xlsx
Binary file not shown.

0 comments on commit 7eb4923

Please sign in to comment.