Ensure compatiblity with /lib/exporter.rb in MapKnitter
jywarren opened this issue · comments
There've been minimal changes to the library itself, but 2 to watch out for are:
- changes of
object.lat
toobject[:lat]
everywhere, similar for[:nodes_array]
- change of
image.url
to stringimage_url
inrun_export
Here's a diff of the file from the original copy in from MapKnitter:
e140646...bf375b6#diff-174ec2997e5f3c6e51179e598ab47217R314
We should be able to get MapKnitter to install this gem and still pass it's test at /tests/unit/exporter_test.rb
if we respect these changes.
This should use usable as in the tests, after including the gem, and then:
Although I think it'll be require 'mapknitterExporter'
-- probably!
Also we need to pass in this nice MockExport object:
mapknitter-exporter/test/exporter_test.rb
Lines 125 to 133 in bf375b6
MockExport
is what will write the status.json
files, whenever we save
!
Following publiclab/mapknitter#364 (comment)
And we'll have to refactor from the simplified version here: #6 !!
After refactoring "root" we should be ok to do this.
OK, #530 brings mapknitter up to date with the latest of this gem!