openstreetmap-website
https://github.com/openstreetmap/openstreetmap-website
Ruby
The Rails application that powers OpenStreetMap
ConsistencyValidations#check_consistency
Generic checks that are run for the updates and deletes of node, ways and relations. This code is here to avoid duplication, and allow the extention of the checks without having to modify the code in 6 places for all the updates and deletes. Some of these tests are needed for creates, but are currently not run :-( This will throw an exception if there is an inconsistency
Edit
git clone [email protected]:openstreetmap/openstreetmap-website.git
cd openstreetmap-website
open app/models/concerns/consistency_validations.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-ConsistencyValidations-check_consistency-for-pr
# Commit to gitgit add app/models/concerns/consistency_validations.rbgit commit -m "better docs for ConsistencyValidations#check_consistency"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-ConsistencyValidations-check_consistency-for-pr
hub pull-request
# Celebrate!