[openstreetmap/openstreetmap-website] [WIP] XML generation: nodes, ways, relations, map controller → view (#2223)

mmd notifications at github.com
Tue May 7 20:21:33 UTC 2019


As the issue title suggests, this is still very much WIP with the intention to gather some early feedback, go through a number of iterations to fix issues, etc.

Topic in this PR:

Move the XML generation from the controller to the view for the following controllers:

- nodes_controller
- ways_controller
- relations_controller
- old_controller
- map_controller

TODO:

- [ ] Remove XML generation methods in models
- [ ] Add "redaction" flag in XML response, check if anything else if missing
- [ ] A good approach to keep using changeset_cache, user_display_name_cache



You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/2223

-- Commit Summary --

  * Move xml gen. into view for (old) nodes, ways, relations, map

-- File Changes --

    M app/controllers/api/map_controller.rb (24)
    M app/controllers/api/nodes_controller.rb (16)
    M app/controllers/api/old_controller.rb (19)
    M app/controllers/api/relations_controller.rb (49)
    M app/controllers/api/ways_controller.rb (42)
    A app/views/api/map/_bounds.xml.builder (8)
    A app/views/api/map/_node.xml.builder (24)
    A app/views/api/map/_relation.xml.builder (19)
    A app/views/api/map/_way.xml.builder (19)
    A app/views/api/map/index.xml.builder (8)
    A app/views/api/nodes/index.xml.builder (5)
    A app/views/api/nodes/show.xml.builder (5)
    A app/views/api/old_nodes/_old_node.xml.builder (24)
    A app/views/api/old_nodes/history.xml.builder (5)
    A app/views/api/old_nodes/version.xml.builder (5)
    A app/views/api/old_relations/_old_relation.xml.builder (19)
    A app/views/api/old_relations/history.xml.builder (5)
    A app/views/api/old_relations/version.xml.builder (5)
    A app/views/api/old_ways/_old_way.xml.builder (19)
    A app/views/api/old_ways/history.xml.builder (5)
    A app/views/api/old_ways/version.xml.builder (5)
    A app/views/api/relations/full.xml.builder (7)
    A app/views/api/relations/index.xml.builder (5)
    A app/views/api/relations/relations_for_node.xml.builder (5)
    A app/views/api/relations/relations_for_relation.xml.builder (5)
    A app/views/api/relations/relations_for_way.xml.builder (5)
    A app/views/api/relations/show.xml.builder (5)
    A app/views/api/ways/full.xml.builder (6)
    A app/views/api/ways/index.xml.builder (5)
    A app/views/api/ways/show.xml.builder (5)
    A app/views/api/ways/ways_for_node.xml.builder (5)
    M config/routes.rb (38)
    M test/controllers/api/changesets_controller_test.rb (2)
    M test/controllers/api/map_controller_test.rb (18)
    M test/controllers/api/nodes_controller_test.rb (20)
    M test/controllers/api/old_nodes_controller_test.rb (42)
    M test/controllers/api/old_relations_controller_test.rb (48)
    M test/controllers/api/old_ways_controller_test.rb (50)
    M test/controllers/api/relations_controller_test.rb (66)
    M test/controllers/api/ways_controller_test.rb (22)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/2223.patch
https://github.com/openstreetmap/openstreetmap-website/pull/2223.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2223
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190507/98df568d/attachment-0001.html>


More information about the rails-dev mailing list