[openstreetmap/openstreetmap-website] Search and latlon/nominatim query resources (PR #5868)
Anton Khorev
notifications at github.com
Mon Mar 31 05:01:32 UTC 2025
Includes #5863.
Removes nonstandard action names from geocoder controller. Renames this controller to *search* because path is *search*, path helper is *search_path*, javascript controller is *search.js*.
Takes three search actions out of this controller and makes them nested *_query* resources:
- latlon_query
- osm_nominatim_query
- osm_nominatim_reverse_query
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/5868
-- Commit Summary --
* Move search fetch url construction to controller
* Permit search parameters separately for each source
* Add viewbox param to Nominatim link in search results
* Remove RuboCop AssignmentInCondition exclusion for search
* Merge search params with regexp captures property
* Remove escape_query method from geocoder
* Move osm nominatim url methods to concerns
* Move search query templates
* Create search query base class
* Create latlon search query resource
* Create osm nominatim search query resource
* Create osm nominatim reverse search query resource
* Clean up geocoder after moving out queries
* Replace geocoder with search resource
-- File Changes --
M .rubocop.yml (1)
M .rubocop_todo.yml (1)
M app/abilities/ability.rb (2)
M app/assets/javascripts/index/search.js (33)
A app/controllers/concerns/osm_nominatim_methods.rb (33)
D app/controllers/geocoder_controller.rb (252)
A app/controllers/searches/latlon_queries_controller.rb (43)
A app/controllers/searches/osm_nominatim_queries_controller.rb (61)
A app/controllers/searches/osm_nominatim_reverse_queries_controller.rb (34)
A app/controllers/searches/queries_controller.rb (23)
A app/controllers/searches_controller.rb (72)
M app/helpers/geocoder_helper.rb (2)
M app/views/layouts/_search.html.erb (5)
R app/views/searches/queries/create.html.erb (0)
R app/views/searches/queries/error.html.erb (0)
R app/views/searches/show.html.erb (4)
M config/locales/en.yml (18)
M config/routes.rb (11)
M test/abilities/abilities_test.rb (7)
A test/controllers/searches/latlon_queries_controller_test.rb (55)
A test/controllers/searches/osm_nominatim_queries_controller_test.rb (45)
A test/controllers/searches/osm_nominatim_reverse_queries_controller_test.rb (33)
A test/controllers/searches/queries_controller_test.rb (32)
R test/controllers/searches_controller_test.rb (148)
M test/controllers/site_controller_test.rb (2)
M test/system/search_test.rb (24)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/5868.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5868.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5868
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5868 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250330/b7c1983a/attachment.htm>
More information about the rails-dev
mailing list