X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/67dd9e4c9d487bdb5f38a09dc0c99def4989326e..3da2a95cea6b5efa760b378b45d9223d4b76657d:/lib/osm.rb diff --git a/lib/osm.rb b/lib/osm.rb index 8902e6c9e..393011dac 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -281,6 +281,23 @@ module OSM end end + # Raised when the note provided is already closed + class APINoteAlreadyClosedError < APIError + def initialize(note) + @note = note + end + + attr_reader :note + + def status + :conflict + end + + def to_s + "The note #{@note.id} was closed at #{@note.closed_at}" + end + end + # Helper methods for going to/from mercator and lat/lng. class Mercator include Math @@ -460,6 +477,9 @@ module OSM root = XML::Node.new 'osm' root['version'] = API_VERSION.to_s root['generator'] = GENERATOR + root['copyright'] = COPYRIGHT_OWNER + root['attribution'] = ATTRIBUTION_URL + root['license'] = LICENSE_URL doc.root = root return doc end