<< Rdbi | Index | Ruby193p0 >>
Planned modification for migrating ch.oddb.org from Ruby 1.9.3 to Ruby 2.0/2.1/2.2
In parallel Niklaus wants to 
- use docker to be able to run tests without blocking other works and/or being able to work on two branches concurrently
- Setup a small database with just a few (eg. 5 to 20 IKSNR) to speed up unit/watir tests
Stuff fixed includes:
return Iconv.iconv('UTF-8//IGNORE', 'UTF-8', (s + ' ') ).first[0..-2]
by
string.encode("UTF-8", :invalid => :replace, :undef => :replace, :replace => "?")
We will create a separate branch ruby2.0 for this new feature.
- Create gems (or at least github-projects therefor) for any gem that has patch (columninfo/row for dbi, notification for paypal)
- Migrate first all used gems to Ruby 2.0
- Update Gemfile to use current version of all gems
- Remove cruft
- Use a tool like https://github.com/danmayer/coverband on thinpower to identify unused code
- Use (if possible) only one mail library (currently we are using mail, rmail and tmail). See  ipn. Rmail is used by sbsm upto version 1.2.3.
- Fix changed syntax for Ruby 2.0/2.1
- Try whether rubinius or jruby offer compelling reasons (speed, used memory, better debugging/profiling tools) to switch from MRI
- Use Time.utc instead of Time.local to make unit-tests pass under travis-ci.
Gems that must run under Ruby 2.0 include:
- spreadsheet. Works fine with ruby 2.x. But we could live without it if we 
- drop the compatibility mode in swissmedic-diff
- drop/migrate plugin/atc_less
- drop/migrate plugin/narcotic
- drop/migrate plugin/ouwerkerk
- drop/migrate plugin/vaccines
 
- swissmedic-diff
- sbsm which has the following problems
- rmail must be replaced by mail. Done with in github/ngiger/sbsm. See commit Use Mail instead of..
- sbsm uses uri_parset generated by rockit version 0.3.8 which cannot be found anymore. It is unclear for me, whether this is used at all or nor.
 
- dbi
- dbd-pg
Open problems are:
- We have some patches in Ruby (e.g. csv.rb, rexml/source.rb). Do we still need them? Shouldn't we better use monkey patching to avoid tinkering with installed rubies (and having to apply the patches each time we re/install a new ruby version)?
- YAML-Engine: Psych or Syck. For the moment I just required 'syck', but I don't know whether this will work with our Postgresql database. But Psych is now the default YAML under Ruby 2.x.
TestCases are:
- All unit test
- watir tests
- import_daily (with reimporting new BSV)
- export_daily
- GUI-admin interface to create new packages, etc.
Postponed tasks when Ruby 2.x ready:
- Remove LECACY_INTERFACE from all views