openstreetmap-website
https://github.com/openstreetmap/openstreetmap-website
Ruby
The Rails application that powers OpenStreetMap
DiffReader#commit
Consume the XML diff and try to commit it to the database. This code is *not* transactional, so code which calls it should ensure that the appropriate transaction block is in place. On a failure to meet preconditions (e.g: optimistic locking fails) an exception subclassing OSM::APIError will be thrown.
Edit
git clone [email protected]:openstreetmap/openstreetmap-website.git
cd openstreetmap-website
open lib/diff_reader.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-DiffReader-commit-for-pr
# Commit to gitgit add lib/diff_reader.rbgit commit -m "better docs for DiffReader#commit"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-DiffReader-commit-for-pr
hub pull-request
# Celebrate!