]> git.openstreetmap.org Git - rails.git/commitdiff
Renaming the include action to expand_bbox in the changeset controller.
authorShaun McDonald <shaun@shaunmcdonald.me.uk>
Wed, 26 Nov 2008 11:36:10 +0000 (11:36 +0000)
committerShaun McDonald <shaun@shaunmcdonald.me.uk>
Wed, 26 Nov 2008 11:36:10 +0000 (11:36 +0000)
app/controllers/changeset_controller.rb
config/routes.rb
test/functional/changeset_controller_test.rb

index d7764d995cce4b2139c679cdbb6c0af53b843af2..fad797cdc4a14ff604fc2710560c2d3efb685adb 100644 (file)
@@ -70,7 +70,7 @@ class ChangesetController < ApplicationController
   # increase the size of the bounding box. this is a hint that clients can
   # set either before uploading a large number of changes, or changes that
   # the client (but not the server) knows will affect areas further away.
   # increase the size of the bounding box. this is a hint that clients can
   # set either before uploading a large number of changes, or changes that
   # the client (but not the server) knows will affect areas further away.
-  def include
+  def expand_bbox
     # only allow POST requests, because although this method is
     # idempotent, there is no "document" to PUT really...
     if request.post?
     # only allow POST requests, because although this method is
     # idempotent, there is no "document" to PUT really...
     if request.post?
index 88fa0a55196e1eb25e3b1447092d2a1a8e74286b..b99dfd2ca56964c12ba3ba48c69b13aff443aad7 100644 (file)
@@ -6,7 +6,7 @@ ActionController::Routing::Routes.draw do |map|
   map.connect "api/#{API_VERSION}/changeset/create", :controller => 'changeset', :action => 'create'
   map.connect "api/#{API_VERSION}/changeset/:id/upload", :controller => 'changeset', :action => 'upload', :id => /\d+/
   map.connect "api/#{API_VERSION}/changeset/:id/download", :controller => 'changeset', :action => 'download', :id => /\d+/
   map.connect "api/#{API_VERSION}/changeset/create", :controller => 'changeset', :action => 'create'
   map.connect "api/#{API_VERSION}/changeset/:id/upload", :controller => 'changeset', :action => 'upload', :id => /\d+/
   map.connect "api/#{API_VERSION}/changeset/:id/download", :controller => 'changeset', :action => 'download', :id => /\d+/
-  map.connect "api/#{API_VERSION}/changeset/:id/include", :controller => 'changeset', :action => 'include', :id => /\d+/
+  map.connect "api/#{API_VERSION}/changeset/:id/expand_bbox", :controller => 'changeset', :action => 'expand_bbox', :id => /\d+/
   map.connect "api/#{API_VERSION}/changeset/:id", :controller => 'changeset', :action => 'read', :id => /\d+/, :conditions => { :method => :get }
   map.connect "api/#{API_VERSION}/changeset/:id", :controller => 'changeset', :action => 'update', :id => /\d+/, :conditions => { :method => :put }
   map.connect "api/#{API_VERSION}/changeset/:id/close", :controller => 'changeset', :action => 'close', :id =>/\d+/
   map.connect "api/#{API_VERSION}/changeset/:id", :controller => 'changeset', :action => 'read', :id => /\d+/, :conditions => { :method => :get }
   map.connect "api/#{API_VERSION}/changeset/:id", :controller => 'changeset', :action => 'update', :id => /\d+/, :conditions => { :method => :put }
   map.connect "api/#{API_VERSION}/changeset/:id/close", :controller => 'changeset', :action => 'close', :id =>/\d+/
index 47cd95c241a9915dbf53df19546dfa3a73425c8d..2ff6bee331cf803e7df940c181b6475150686c54 100644 (file)
@@ -851,7 +851,7 @@ EOF
   # call the include method and assert properties of the bbox
   def check_after_include(changeset_id, lon, lat, bbox)
     content "<osm><node lon='#{lon}' lat='#{lat}'/></osm>"
   # call the include method and assert properties of the bbox
   def check_after_include(changeset_id, lon, lat, bbox)
     content "<osm><node lon='#{lon}' lat='#{lat}'/></osm>"
-    post :include, :id => changeset_id
+    post :expand_bbox, :id => changeset_id
     assert_response :success, "Setting include of changeset failed: #{@response.body}"
 
     # check exactly one changeset
     assert_response :success, "Setting include of changeset failed: #{@response.body}"
 
     # check exactly one changeset