Skip to content

Commit

Permalink
Fixed NINCD for LPPV items
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiger committed Nov 25, 2015
1 parent 3ad6a1d commit 72e3452
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion History.txt
@@ -1,7 +1,7 @@
=== 2.2.8 / ?????

* Improved spec tests against all XSD elements
* NINCD with value 20 LPPV is never generated
* Fixed NINCD for LPPV items

=== 2.2.7 / 24.11.2015

Expand Down
2 changes: 1 addition & 1 deletion lib/oddb2xml/builder.rb
Expand Up @@ -1103,7 +1103,7 @@ def build_person
Oddb2xml.add_hash(_builder.to_xml)
end
def detect_nincd(de_idx)
if @lppvs[de_idx[:ean]] # LPPV
if @lppvs[de_idx[:ean].to_s] # LPPV
20
elsif @items[de_idx[:pharmacode]] # BAG-XML (SL/LS)
10
Expand Down
2 changes: 1 addition & 1 deletion lib/oddb2xml/downloader.rb
Expand Up @@ -183,7 +183,7 @@ def download
file = File.join(WorkDir, 'XMLPublications.zip')
Oddb2xml.log "BagXmlDownloader #{__LINE__}: #{file}"
unless Oddb2xml.skip_download(file)
Oddb2xml.log "BagXmlDownloader #{__LINE__}: #{file}"
Oddb2xml.log "BagXmlDownloader #{__LINE__}: #{file}"
begin
response = @agent.get(@url)
response.save_as(file)
Expand Down
Binary file modified spec/data/swissmedic_package.xlsx
Binary file not shown.
1 change: 1 addition & 0 deletions spec/downloader_spec.rb
Expand Up @@ -385,6 +385,7 @@ def unzip_files(zipfile_name, directory=Dir.pwd)
it_behaves_like 'any downloader'
context 'when download is called' do
let(:xml) {
VCR.eject_cassette
VCR.use_cassette('oddb2xml', :tag => :bag_xml) do
@downloader.download
end
Expand Down
2 changes: 1 addition & 1 deletion spec/extractor_spec.rb
Expand Up @@ -4,7 +4,7 @@
require "#{Dir.pwd}/lib/oddb2xml/downloader"
ENV['TZ'] = 'UTC' # needed for last_change
LAST_CHANGE = "2015-07-03 00:00:00 +0000"
NR_PACKS = 23
NR_PACKS = 24

def common_before
@savedDir = Dir.pwd
Expand Down

0 comments on commit 72e3452

Please sign in to comment.