Commit graph

92 commits

Author SHA1 Message Date
John Firebaugh
ee6e0d5c0b Remove unused parameter 2012-11-25 15:14:47 -04:00
Enno Brehm
6a09f49e71 Implement API endpoint to query permissions. 2012-05-05 15:28:45 +01:00
Tom Hughes
b255a333c5 Specify the username when generating a URL for a trace 2012-03-10 13:05:39 +00:00
Peter Gray
95d899786a Refactor bounding box code
Moved duplicated code into the BoundingBox class, and pass around
BoundingBox objects instead of lists of bounds.
2011-11-14 09:42:57 +00:00
Tom Hughes
071c3581e9 Disable CSRF token verification for API methods 2011-11-14 09:42:55 +00:00
Tom Hughes
226c41be69 Update ActiveRecord queries to use arel 2011-11-14 09:42:44 +00:00
Tom Hughes
7369b7427c Remove bogus trailing slash from GPX namespace URL 2010-12-02 19:23:38 +00:00
Tom Hughes
f07819d81a Rework application configuration
Use a preinitializer to load the settings from application.yml so
that they are available as early as possible. All settings can also
be overridden using environment variables.

The ad-hoc settins in environment.rb are then moved to this new
system so we have one consistent location for settings.
2010-08-04 22:06:05 +01:00
Tom Hughes
1e6bcb6c2d Made the trackpoints call return a more sensible filename. 2010-01-27 13:51:15 +00:00
Tom Hughes
5451310d3c Revert half baked attempt at poi api call - this needs much more
thought before it's ready.
2009-12-14 22:19:51 +00:00
Frederik Ramm
fb912fba71 this is kind of a "suggested change" for the API controller to
support an additional "restriction" parameter for the "map" 
call (only value currently supported: nodes_only to return only
nodes). i would have liked to implement "tagged_nodes_only" as
well but was unsure how to do that best. feel free to make up 
some other way instead to improve node access for POI editors,
or drop this altogether if you have some other grand plan.
2009-12-14 21:29:00 +00:00
Tom Hughes
565171486f Add extra visibility options for GPS traces, and enhance the API call
that returns trace data to return more information if the owner of the
trace has allowed it. Based on a patch from Matt Amos.
2009-08-13 17:06:11 +00:00
Tom Hughes
2f3e23f6eb Move to version 2.3.2 of rails. 2009-06-04 08:08:24 +00:00
Shaun McDonald
d4954bc7b1 Raising an exception in Ruby requires a .new. Add a timeout line to the capabilities call. 2009-05-21 14:05:09 +00:00
Tom Hughes
b38684e59e Add a global timeout that is applied to most API requests. 2009-05-20 22:18:36 +00:00
Tom Hughes
fa13a11a94 Optimise retrieval of full relations. 2009-05-15 09:10:50 +00:00
Shaun McDonald
a41f1b297b No need to define a constand for the appconfig var. Removes a warning when running under rails 2.2.2 2009-05-08 14:20:26 +00:00
Tom Hughes
9acc6d3288 Eager load node and way details when processing a map call. 2009-04-28 16:26:06 +00:00
Tom Hughes
bf31791f65 Add a changeset cache to stop us looking up the same changeset over
and over again when processing a map call.
2009-04-28 13:40:30 +00:00
Tom Hughes
a7ea614dd0 Finish removing old request counting logic. 2009-04-26 23:27:40 +00:00
Tom Hughes
72b05157ae Remove old code to exit after 10000 requests as the memory limit code
should do a better job of controlling things.
2009-04-26 23:14:20 +00:00
Shaun McDonald
0b94234a6b adding the maximum number of elements in a changeset to the capabilities call, including test update 2009-04-22 11:03:22 +00:00
Tom Hughes
5449cf4adc Merge 14394:14533 from trunk. 2009-04-16 21:11:12 +00:00
Tom Hughes
09fdee5493 Add a "database readonly" state that allows all writes to the database
to be suppressed.
2009-04-14 14:27:30 +00:00
Matt Amos
afcb345014 Moved a bunch of time functions into UTC. Fixes bugs which we only see for 4 hours a year. 2009-03-29 01:31:04 +00:00
Tom Hughes
c8ee135104 Merge 12304:14009 from trunk. 2009-03-08 13:02:37 +00:00
Tom Hughes
07c1cd6b98 Update to use libxml 1.0.0 gem. 2009-03-08 11:34:46 +00:00
Andy Allan
7058d836f7 use boolean flags when using boolean columns 2008-11-07 13:24:18 +00:00
Shaun McDonald
e932a69bd7 Additional api tests for the changes. Also making sure that you cannot request a change of 0 length, so that you can detect erronious input. 2008-11-03 18:05:19 +00:00
Shaun McDonald
635daf1773 Adding a restriction to prevent more than 2000 nodes to be added to any way. Tests still need to be written. Capabilities api request also updated. 2008-11-03 00:12:18 +00:00
Shaun McDonald
b45dd63283 cover the other extreme in the map bounary sanitizeation. Ading some documentation, which is parsed when running rake doc:app. Fixing up a couple of tests. 2008-10-26 23:43:37 +00:00
Shaun McDonald
3e9ceb0c38 more testing of the api. Changing the generator so that it is a constant to come in line with the server url and the api version. Adding tracepoints per page to the capabilities api call. Better error message for api call. 2008-10-19 07:09:04 +00:00
Shaun McDonald
24b21e4a29 additional consistency checks. making the error message for the number of nodes use the configured number of nodes, rather than a hard coded number. minor improvements to the way controller functional tests. Not sure if they should be turned into integration tests. 2008-10-12 22:32:51 +00:00
Shaun McDonald
d9e070e069 Doing a resync from mainline 8633:10895. There was one simple to resolve conflict on app/models/node.rb. Also moving the migrations for API0.6 to new sequence numbers since there was some new migrations added to mainline, where the migration numbers would conflict if not moved. 2008-09-25 15:06:05 +00:00
Tom Hughes
d6e047d7d4 Optimise finding of relations, partially reversing change #8443 but in
a more rails like way.
2008-07-16 23:42:59 +00:00
Tom Hughes
6644f115c9 Add bounds to map responses. Closes #1011. 2008-07-08 09:52:08 +00:00
Shaun McDonald
5f8ab9e924 Merge changes from trunk 7673:8632. 2008-07-03 13:06:24 +00:00
Tom Hughes
def60c1935 Railsify relation selection (aka ripping out the f***in SQL). 2008-06-24 23:42:39 +00:00
Christopher Schmidt
6aa9ec599f Make capabilities report the current version for from/to version
identifier
2008-05-11 21:23:38 +00:00
Christopher Schmidt
412472212b change 'no nodes' response to use API_VERSION in output 2008-05-11 21:21:30 +00:00
Tom Hughes
cb3992f5a1 Mark map responses as attachments. 2008-04-19 13:35:02 +00:00
Tom Hughes
ddb003f0f2 Headers is an array not a function... 2008-04-19 13:29:10 +00:00
Tom Hughes
d13ef1db02 More work on export tab. 2008-04-14 23:46:10 +00:00
Richard Fairhurst
ae142c554b Potlatch 0.8 - be afraid, be very, very afraid 2008-03-19 01:03:51 +00:00
Tom Hughes
d0d396f9b6 Fix indentation. 2008-02-03 15:38:53 +00:00
Xin Zheng
2e2956d126 patched controller section of #648 2008-01-25 16:32:24 +00:00
Xin Zheng
6de965520b added application.yml, refactored map method 2008-01-23 16:43:30 +00:00
Tom Hughes
bee38e63a3 Make things work with multipart keys. 2008-01-23 09:53:35 +00:00
Tom Hughes
d29a319ab0 Add an API call to find the map tiles which have changed in a given period. 2007-10-09 23:41:26 +00:00
Tom Hughes
ac8a24e79e Cope with empty areas better. 2007-10-07 12:44:27 +00:00