API 0.4 Updates - work on traces pages + pagination, edit tab, some API testing
* traces - added some routes, replicated data access / pagination, but presentation and pending file control not complete * edit - setup so that applet can be loaded + token authorisation enabled * API - tests out ok against applet, but had to change segment-node associations * misc - gems version required upgraded to 1.2.3 (latest stable rails version), changed some find_first to find(:first... calls
This commit is contained in:
parent
e7c2d2a211
commit
d07277efba
25 changed files with 248 additions and 93 deletions
|
@ -14,7 +14,7 @@ development:
|
|||
adapter: mysql
|
||||
database: openstreetmap
|
||||
username: openstreetmap
|
||||
password: openstreetmap
|
||||
password:
|
||||
host: localhost
|
||||
|
||||
# Warning: The database defined as 'test' will be erased and
|
||||
|
|
|
@ -5,10 +5,13 @@
|
|||
# ENV['RAILS_ENV'] ||= 'production'
|
||||
|
||||
# Specifies gem version of Rails to use when vendor/rails is not present
|
||||
RAILS_GEM_VERSION = '1.1.6'
|
||||
RAILS_GEM_VERSION = '1.2.3'
|
||||
|
||||
# Bootstrap the Rails environment, frameworks, and default configuration
|
||||
require File.join(File.dirname(__FILE__), 'boot')
|
||||
|
||||
# Application constants needed for routes.rb - must go before Initializer call
|
||||
API_VERSION = ENV['OSM_API_VERSION'] || '0.4'
|
||||
|
||||
Rails::Initializer.run do |config|
|
||||
# Settings in config/environments/* take precedence those specified here
|
||||
|
@ -51,8 +54,6 @@ end
|
|||
# end
|
||||
|
||||
# Include your application configuration below
|
||||
|
||||
API_VERSION = ENV['OSM_API_VERSION'] || '0.4'
|
||||
SERVER_URL = ENV['OSM_SERVER_URL'] || 'www.openstreetmap.org'
|
||||
|
||||
ActionMailer::Base.server_settings = {
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
ActionController::Routing::Routes.draw do |map|
|
||||
|
||||
# API
|
||||
API_VERSION = '0.4' # change this in envronment.rb too
|
||||
map.connect "api/#{API_VERSION}/node/create", :controller => 'node', :action => 'create'
|
||||
map.connect "api/#{API_VERSION}/node/:id/history", :controller => 'old_node', :action => 'history', :id => nil
|
||||
map.connect "api/#{API_VERSION}/node/:id", :controller => 'node', :action => 'rest', :id => nil
|
||||
map.connect "api/#{API_VERSION}/node/:id/history", :controller => 'old_node', :action => 'history', :id => nil # TODO is this :id => nil correct? looks like it would throw away essential info - if it does check all these id => nils
|
||||
map.connect "api/#{API_VERSION}/node/:id", :controller => 'node', :action => 'rest', :id => nil
|
||||
map.connect "api/#{API_VERSION}/nodes", :controller => 'node', :action => 'nodes', :id => nil
|
||||
|
||||
map.connect "api/#{API_VERSION}/segment/create", :controller => 'segment', :action => 'create'
|
||||
|
@ -33,12 +32,17 @@ ActionController::Routing::Routes.draw do |map|
|
|||
map.connect '/traces', :controller => 'trace', :action => 'list'
|
||||
map.connect '/traces/page/:page', :controller => 'trace', :action => 'list'
|
||||
map.connect '/traces/mine', :controller => 'trace', :action => 'mine'
|
||||
map.connect '/traces/mine/page/:page', :controller => 'trace', :action => 'mine'
|
||||
map.connect '/traces/mine/tag/:tag', :controller => 'trace', :action => 'mine'
|
||||
map.connect '/traces/mine/tag/:tag/page/:page', :controller => 'trace', :action => 'mine'
|
||||
map.connect '/traces/rss', :controller => 'trace', :action => 'georss'
|
||||
map.connect '/traces/user/:display_name/', :controller => 'trace', :action => 'list', :id => nil
|
||||
map.connect '/traces/user/:display_name/', :controller => 'trace', :action => 'list', :id => nil
|
||||
map.connect '/traces/user/:display_name/page/:page', :controller => 'trace', :action => 'list', :id => nil
|
||||
map.connect '/traces/user/:display_name/:id', :controller => 'trace', :action => 'view', :id => nil
|
||||
map.connect '/traces/user/:display_name/:id/picture', :controller => 'trace', :action => 'picture', :id => nil
|
||||
map.connect '/traces/user/:display_name/:id/icon', :controller => 'trace', :action => 'icon', :id => nil
|
||||
map.connect '/traces/tag/:tag/', :controller => 'trace', :action => 'list', :id => nil
|
||||
map.connect '/traces/tag/:tag', :controller => 'trace', :action => 'list', :id => nil
|
||||
map.connect '/traces/tag/:tag/page/:page', :controller => 'trace', :action => 'list', :id => nil
|
||||
|
||||
# fall through
|
||||
map.connect ':controller/:action/:id'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue