view · edit · sidebar · attach · print · history

< Niklaus.20170601-fix-importer-problems | Index | Niklaus.20170530-virbac-error >>

20170531-xmlconv-rack

Summary

  • Port sandoz.bbmb.ch to use the rack based SBSM
  • Port sandoz.xmlconv.bbmb.ch to use the rack based SBSM
  • Allow setting e-mail address in CSV-Importer for virbac and vetoquinol
  • Keep in Mind

Commits

Index

Allow setting e-mail address in CSV-Importer for virbac and vetoquinol

Pushed commits:

Port xmlconv to use the rack based SBSM

Makeing all unit tests pass. Done. But how should I handle 501? In test/test_i2/position.rb there is a test which expects 501:<EAN13>. In lib/xmlconv/i2/position.rb this is commented how. What is correct?

Port sandoz.xmlconv.bbmb.ch to use the rack based SBSM

As we only have to serve propharma, I try to remove all doc/*.rbx files. config.ru starts up. Has (expected) polling errors, but sending e-mail via DestinationMail fails. Why? There is no unit test for DestinationMail. Moved from using TMail to the Mail gem. Removing stuff for Ruby-Versions < 2.0.

Made message about Polling-Errors more explicit. Made polling_interval configurable, as I do not want to receive an error mail every minute.

Testing using curl -v http://sandoz.xmlconv.bbmb.ngiger.ch/propharma -d@test/data/confuse.xml shows in the apache error log File does not exist: /var/www/sandoz.xmlconv.bbmb.ch/doc/propharma. Must fix that.

But first I try to login to /sandoz.xmlconv.bbmb.ngiger.ch. But this faills with

undefined method `transactions' for #<XmlConvApp:0x0055e90f669ba0>
/home/niklaus/git/sbsm/lib/sbsm/session.rb:140:in `method_missing'
/home/niklaus/git/xmlconv/lib/xmlconv/state/login.rb:14:in `login'
/home/niklaus/git/sbsm/lib/sbsm/state.rb:197:in `_trigger'
/home/niklaus/git/sbsm/lib/sbsm/state.rb:186:in `trigger'
/home/niklaus/git/sbsm/lib/sbsm/session.rb:219:in `block in process_rack'
/home/niklaus/git/sbsm/lib/sbsm/session.rb:208:in `synchronize'
/home/niklaus/git/sbsm/lib/sbsm/session.rb:208:in `process_rack'
/home/niklaus/git/sbsm/lib/sbsm/app.rb:119:in `call'

Fixed this problem. Now I see the list of all transactions, but trying to display on results in the next error. Fixed this one, too.

Now I am able to see the list, sort it via ID, Absender, Zeit, Empfänger, Status and reverting the sort on each column. This takes however quite some time when we sort by Status or Empfänger, as we have 1414 items.

Trying to make the curl (POST) test work. Currently it responds with the login prompt. Must find on how I can handle the POST requests directly in the XmlConv-App. Maybe in the login or global state.

By modifying SBSM to extract some additional information from the Rack-env, I collected enough information to be able to call in lib/xmlconv/state/login.rb

pry(#<XmlConv::State::Login>)> res = session.app.execute_with_response(transaction)
NoMethodError: undefined method `deliveries' for nil:NilClass
from /var/www/sandoz.xmlconv.bbmb.ch/lib/conversion/sunstore_bdd.rb:42:in `respond'

Problem is that I did not pass the XML-preamble.

Pushing some changes, that are okay to xmlconv.

view · edit · sidebar · attach · print · history
Page last modified on May 31, 2017, at 05:07 PM