Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure compatiblity with /lib/exporter.rb in MapKnitter #5

Open
jywarren opened this issue Mar 17, 2019 · 8 comments
Open

Ensure compatiblity with /lib/exporter.rb in MapKnitter #5

jywarren opened this issue Mar 17, 2019 · 8 comments

Comments

@jywarren
Copy link
Member

There've been minimal changes to the library itself, but 2 to watch out for are:

  1. changes of object.lat to object[:lat] everywhere, similar for [:nodes_array]
  2. change of image.url to string image_url in run_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.

@jywarren
Copy link
Member Author

This should use usable as in the tests, after including the gem, and then:

require "./lib/mapknitterExporter"

Although I think it'll be require 'mapknitterExporter' -- probably!

@jywarren
Copy link
Member Author

Also we need to pass in this nice MockExport object:

class MockExport
attr_accessor :status, :tms, :geotiff, :zip, :jpg
def save
puts "saved"
end
end

@jywarren
Copy link
Member Author

MockExport is what will write the status.json files, whenever we save!

@jywarren
Copy link
Member Author

Following publiclab/mapknitter#364 (comment)

@jywarren
Copy link
Member Author

And we'll have to refactor from the simplified version here: #6 !!

@jywarren
Copy link
Member Author

After refactoring "root" we should be ok to do this.

@jywarren
Copy link
Member Author

OK, #530 brings mapknitter up to date with the latest of this gem!

@jywarren
Copy link
Member Author

er, publiclab/mapknitter#530

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant