Must test parsing e-mail using a real example. Was unable to create programmatically a correct xml message. Therefore created test/data/simple_email.txt. Made the test/test_util/polling_manager.rb parse it correctly. Also added a real received message email@example.com to test.
Problem was a wrong RubyAddPath in /etc/apache2/vhosts.d/sandoz.xmlconv.bbmb.ch.conf which pointed to a no longer installed version of xmlconv. Added a warning about it in the spec test.
Now polling seems to work okay. But the http-POST test fails. Code is now shorter and clearer.
Removed noise in the logs with commit Commented out debug message which was emitted every minute
Adapting the xmlconv.gemspec to make it loadable under Ruby 1.8.6 as on fastpower we still use mod_ruby 1.8.6 which must be able to load the xmlconv gem.
My apache config is not correct for 1.8.6 as I get the following error in the apache2/error_log
[Wed Jun 22 11:22:03 2016] [notice] caught SIGTERM, shutting down [Wed Jun 22 11:22:06 2016] [notice] Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.2g mod_ruby/1.3.0 Ruby/1.8.6(2009-06-08) configured -- resuming normal operations [Wed Jun 22 11:22:06 2016] [error] mod_ruby: failed to require apache/ruby-run [Wed Jun 22 11:22:06 2016] [error] mod_ruby: error in ruby [Wed Jun 22 11:22:06 2016] [error] mod_ruby: -e:1:in `require': no such file to load -- apache/ruby-run (LoadError) [Wed Jun 22 11:22:06 2016] [error] mod_ruby: failed to require apache/ruby-run
Fixed gen_mod_ruby186 to look like
#!/bin/bash -v cd mod_ruby make clean /usr/local/bin/ruby186/bin/ruby ./configure.rb \ --with-apxs=/usr/sbin/apxs \ --with-apr-includes=/usr/include/apr-1 \ --prefix=/usr/local/ruby186 make make install cp mod_ruby.so /usr/lib64/apache2/modules/mod_ruby186.so
Now I find the following error in the apache error log
[Wed Jun 22 11:43:18 2016] [error] mod_ruby: failed to require xmlconv/util/destination. This was a typo. After fixing it I get the next error
/usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/odba-1.1.2/lib/odba/storage.rb:8:in `require': no such file to load -- dbi (LoadError)
Resuming: I installed the following ruby 186 gems:
RubyAddPath /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/ydbi-0.5.3/lib in the Apache sandoz.xmlconv.bbmb.ch.conf. I see the following error
Wed Jun 22 12:01:17 2016] [error] mod_ruby: from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' Wed Jun 22 12:01:17 2016] [error] mod_ruby: from /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/xmlconv-1.0.7/lib/xmlconv/util/mail.rb:4
Must change the code in xmlconv to exclude this require. Done. Now the http POST test passes again.
Merge Icon 32x32 from zeno with commit added Textaenderungen.png with 32x32 size.
Fixed the problem with commit Make change_log link work for evidentia
After pull the changes into thinpower the icon looks good and link works under evidentia.ch, too.
The tables and images do not display correctly.
compare the FIs with those on https://amiko.oddb.org.
jobs/update_textinfo_swissmedicinfo --reparse --target=fi 65360 to see, whether we have any errors.
The ch.oddb-fiparse daemon does no longer start up correctly, as it cannot find the gem rpdf2txt. Calling
sudo /usr/local/bin/gem193 list rpdf2txt fixed this problem.
Still not found the correct place where the wrong image link is generated. Could correct the problem. Pushed commit Save images in correct directory
See that in the tables we ignore line breaks. Therefore lists like Bronchopneumonie,Furunkel, appear on the same line. These items belong to the css class s18, which is inside a <p> element. Added a unit test test_table_cell_with_paragraph for this problem in ext/fiparse/test/test_fachinfo_hpricot.rb. Looks like my proposed change affects only one other test case which is also about handling new lines.
The generated FI looks much better now. As our CSS gives a generous margin around each cell, empty cells are way too high in this case. See:
Pushed commit Convert paragraphs inside a table cell to <br>
Creating a Gemfile, readme.md. Copying and adapting the etc files from fastpower. Setting mail_suppress_sending to true. cc is not yasaka but ngiger. Creating services virbac.bbmb.ch-yus and virbac.bbmb.ch. Creating get_db_virbac_bbmb_yus and get_db_virbac_bbmb.
/service/virbac.bbmb.ch/run looks now like
#!/bin/sh exec 2>&1 cd /var/www/virbac.bbmb.ch exec sudo -u bbmb /usr/local/bin/ruby231 -I/var/www/virbac.bbmb.ch/lib -rydim/invoice /usr/local/bin/bbmbd config=/var/www/virbac.bbmb.ch/etc/config.yml
/service/virbac.bbmb.ch-yus/run looks now like
#!/bin/sh exec 2>&1 exec sudo -u bbmb /usr/local/bin/ruby186/bin/yusd -rubygems config=/var/www/virbac.bbmb.ch/etc/yus.yml
sudo -u bbmb /usr/local/bin/ruby231 -I/var/www/virbac.bbmb.ch/lib -rydim/invoice /usr/local/bin/bbmbd config=/var/www/virbac.bbmb.ch/etc/config.yml gives me the following error
<..> /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require': cannot load such file -- encoding/character/utf-8 (LoadError) from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require' from /var/www/virbac.bbmb.ch/lib/bbmb/util/csv_importer.rb:11:in `<top (required)>' from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require' from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require' from /usr/local/lib/ruby/gems/2.3.0/gems/bbmb-2.0.4/bin/bbmbd:13:in `block in <module:BBMB>' from /usr/local/lib/ruby/gems/2.3.0/gems/bbmb-2.0.4/bin/bbmbd:12:in `each' from /usr/local/lib/ruby/gems/2.3.0/gems/bbmb-2.0.4/bin/bbmbd:12:in `<module:BBMB>' from /usr/local/lib/ruby/gems/2.3.0/gems/bbmb-2.0.4/bin/bbmbd:11:in `<top (required)>' from /usr/local/bin/bbmbd:23:in `load' from /usr/local/bin/bbmbd:23:in `<main>'
Added virbac.bbmb.ngiger.ch to the alias in
/etc/conf.d/hostname and activated it running
sudo service hostname restart. Copied the apache config virbac.bbmb.ch.conf from fastpower and adapted the Servername. After moving logo.git and bbmb.css to the doc/ressources/sandoz directory the virbac looks fine.
Same steps for vetoquinol. Does not startup up yet correctly because of missing ssl certificate ?