spec/downloader_spec.rb in oddb2xml-2.1.9 vs spec/downloader_spec.rb in oddb2xml-2.2.0
- old
+ new
@@ -138,10 +138,9 @@
c.before_record(:swissmedic) do |i|
if i.response.headers['Content-Disposition'] and /www.swissmedic.ch/.match(i.request.uri)
puts "#{Time.now}: URI was #{i.request.uri}"
m = /filename=.([^\d]+)/.match(i.response.headers['Content-Disposition'][0])
puts "#{Time.now}: SwissmedicDownloader #{m[1]} (#{i.response.body.size} bytes)."
- # binding.pry
if m and true
name = m[1].chomp('_')
swissmedic_dir = File.join(Oddb2xml::WorkDir, 'swissmedic')
FileUtils.makedirs(swissmedic_dir)
xlsx_name = File.join(swissmedic_dir, name + '.xlsx')