Added Ruby 2.2.3 for travis-ci in spreadsheet. See commit Add travis build for Ruby 2.2.3
Added Branch ruby2x in ngiger/oddb.org. Committed Made oddb.org run many unit tests under Ruby 2.2.3.
Failing test/suite.rb are test_util and test_view. For the view it looks as Ruby 2.x has a different order for hashes and some problems might come from htmlgrid.
Looking at the watir test, to see if everything is still okay. Fixed a problem that the URL for amiko changed, using the constants from the lnf. Also some interaction text changed. Medical products display differently, too.
Working on adding a diff support when updating a fachinfo. Moved ChangeLogItem from Fachinfo -> FachinfoDocument and using only fields time and diff (Diffy::Diff). Adapted test_model/fachinfo.rb to reflect this changes.
Adding a test change using
ch.oddb> registration('57813').fachinfo.de.unwanted_effects.next_section.next_paragraph << "Änderungen Niklaus" -> Änderungen Niklaus -> undefined method `odba_story' for #<ODDB::FachinfoDocument2001:0x007f78c556fd98> ch.oddb> registration('57813').fachinfo.de.odba_store -> #<ODDB::FachinfoDocument2001:0x007f78c556fd98> ch.oddb> /.*niklaus.*/i.match(registration('57813').fachinfo.de.text) -> Änderungen NiklausÜberdosierung
Is displayed correctly via http://oddb-ci2.dyndns.org/de/gcc/fachinfo/reg/57813. But it is no longer present after restarting oddbd.
The FI for Alfuzosin 57422 was modified today. Therefore loading an database of September and running jobs/update_textinfo_swissmedicinfo --reparse --target=both 00485 57422
to tests changes for modified and unmodified FI and PI.
Verifying with bin/admin shows, that no change_log was created
ch.oddb> registration('61338').sequences.keys -> ["01", "02"] ch.oddb> registration('61338').fachinfo.de.text[-150..-1] -> enius i.v. Trockensub 1500 mg Durchstfl 10. (B)Zulassungsinhaberin Fresenius Kabi (Schweiz) AG, 6370 Oberdorf NW.Stand der Information September 2014. # Wait for import ch.oddb> registration('61338').fachinfo.de.text[-150..-1] -> Fresenius i.v. Trockensub 1500 mg Durchstfl 10. [B]Zulassungsinhaberin Fresenius Kabi (Schweiz) AG, 6370 Oberdorf NW.Stand der Information Juni 2015. ch.oddb> registration('61338').fachinfo.de.change_log -> [] ch.oddb> registration('61338').sequences.keys -> ["01", "02", "00"]
Also the sequence '00' was created. This must be corrected!!
I am having problems storing the Diffy::Diff. Pry reports
[16] pry(ODDB::TextInfoPlugin)> updated_fi.de.add_change_log_item(old_text_de, new_text) TypeError: can't dump File from /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/marshal.rb:10:in `dump' [17] pry(ODDB::TextInfoPlugin)> new_text.size => 17817 [18] pry(ODDB::TextInfoPlugin)> old_text_de.size => 17451 [19] pry(ODDB::TextInfoPlugin)> old_text_de.class => String [20] pry(ODDB::TextInfoPlugin)> old_text_de.class => String [23] pry(ODDB::TextInfoPlugin)> tst = Diffy::Diff.new(old_text_de, new_text) <..> \ Kein Zeilenumbruch am Dateiende. +Durchstichfläschchen zu 1.5 mg und Lösungsmittelampullen zu 1 ml: 3 + 3 (A) +Durchstichfläschchen zu 7.5 mg und Lösungsmittelampullen zu 5 ml: 1 + 1 (A)Zulassungsinhaberin +sanofi-aventis (schweiz) ag, 1214 Vernier/GE.Stand der Information +Juli 2015. \ Kein Zeilenumbruch am Dateiende. [22] pry(ODDB::TextInfoPlugin)> tst.to_s.size => 24246
Must look deep into odba, to see show I can change this.