Commit graph

55 commits

Author SHA1 Message Date
Tom Hughes
ca30b879f6 Eliminate deprecated scope and association arguments 2013-09-21 11:35:46 +01:00
Tom Hughes
7e896d758d Return GPX traces as application/gpx+xml instead of text/xml 2013-09-09 16:23:38 +01:00
Tom Hughes
b3e540a6b6 Improve tests for trace RSS feeds 2013-05-10 22:48:26 +01:00
Tom MacWright
221ca3c1fa Improve user page navigation menu
Add counts to edits, blocks, and traces; don't show blocks if there
are none; and move OAuth to the settings page.
2012-08-10 08:26:48 +01:00
Tom Hughes
5a8c4faf3e Replace deprecated methods with modern equivalents 2012-02-15 17:48:17 +00:00
Tom Hughes
3227f40193 Make more use of named scopes 2011-11-14 09:42:51 +00:00
Tom Hughes
8ae5d94b2f Update some more queries to use AREL in place of deprecated methods 2011-11-14 09:42:51 +00:00
Tom Hughes
71f1554212 Make trace API a proper CRUD API like other object types 2010-10-11 23:09:27 +01:00
Tom Hughes
9caa2046ca Include description and tags in GPX details API response 2010-10-11 19:10:42 +01:00
Tom Hughes
77ce1b2809 Ignore empty tags. Closes #2311. 2009-09-24 23:27:13 +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
Štefan Baebler
9afb533280 added comment for future generations 2009-07-07 22:50:46 +00:00
Štefan Baebler
ebbcf63f0d Introducing comma as tag separator (if present, otherwise it behaves as before), allowing spaces in tags. fixes #2032 2009-07-07 22:05:03 +00:00
Thomas Wood
9bb9de0fbe Require auth on calls to /trace/create, and pass through to form if called without params. Adjust validations on traces to prevent dual error messages on description (validates_presence_of catches the empty string removed from length validation)
More changes to come for api_create
References #1510
2009-01-23 01:19:45 +00:00
Shaun McDonald
a5e5cbc739 Adding a lower and upper length on various web site varchar fields. Fixes one test. 2008-10-15 16:20:43 +00:00
Tom Hughes
6d7e69d4d3 Make the location of the GPX traces configurable. 2008-08-07 11:31:42 +00:00
Tom Hughes
8dbaf76e7c Ignore any files in an __MACOSX folder in a zip file, as these are
metadata files added by the MAC OS X zip tool.
2008-07-31 08:06:09 +00:00
Tom Hughes
fb5f6bb4a2 Rework GPX import daemon to use libxml2 for speed. 2008-07-30 08:37:05 +00:00
Tom Hughes
7d9bf3634c Work around the fact that exists? no longer works for models with
no primary key.
2008-06-07 22:40:39 +00:00
Tom Hughes
112ee9266c Make sure the recorded first point for a trace really is the first
point and not the last. Closes #709.
2008-04-27 12:27:46 +00:00
Tom Hughes
c0d2ad40c3 Work round ruby's half assed Tempfile class which, because for some
reason it is implemented by delegating to File (by inheriting from
DelegateClass(File)) rather than by inheriting from it, does not
actually look like a File, and hence does not look like an IO (in
that it does not respond to kind_of? IO calls).

In ruby 1.8.5 this doesn't matter as REXML checks that the source
it has been given responds to the methods it wants (using respond_to?
which is handled properly by DelegateClass) but in 1.8.4 which we
are running on rails2 REXML uses kind_of? to see if the source is
one it can use.
2008-03-06 12:43:10 +00:00
Tom Hughes
07e8449625 Allow a GPX to be fetched in XML format by fetching data.xml instead
of data (the data method returns it in the format it is stored in).

Closes #534.
2008-01-23 13:40:47 +00:00
Tom Hughes
6595f97c53 Make the name of the lon/lng virtual attribute on trace points consistent. 2007-09-28 23:19:19 +00:00
Tom Hughes
9afb35449b Change the gps_points table to store latitude and longitude values to
seven decimal places to given a worse case precision of about 1cm.
2007-09-18 23:29:47 +00:00
Tom Hughes
4954f65061 Don't bother deleting points which don't exist before importing a
trace - this avoids locking the table in the common case where there
are no points to delete.
2007-09-04 16:22:03 +00:00
Tom Hughes
9861ca8001 Move tag validation to the right place. 2007-08-19 09:16:33 +00:00
Tom Hughes
7dbb746fde Throw an exception if saving the imported trace fails. 2007-08-19 09:11:59 +00:00
Tom Hughes
44051f30d8 Make the gpx/id/data API call work, and make gpx/create a POST method
so arguments can be handled more robustly.
2007-08-16 23:04:18 +00:00
Tom Hughes
9e0226113c Don't bother setting user_id for each tracepoint - it is redundant as
the same information can be found by joining to gpx_files. It is also
never used, so the column is going to be removed.
2007-07-20 07:51:46 +00:00
Tom Hughes
30f740178f Use a full path to find the file command. 2007-07-18 08:37:46 +00:00
Tom Hughes
16358a1d39 Improve MIME type determination for trace files. 2007-07-17 14:45:04 +00:00
Tom Hughes
bce2c88336 Provide a more sensible suggested filename when downloading traces. 2007-07-17 14:34:22 +00:00
Tom Hughes
dcad29dad0 Split the rest action into sparate read, update and delete actions thus
allowing authorization to be done on a per-action basis without worring
about the method. This should make the user API work.

Also do a lot of cleanup of the controllers.
2007-06-27 17:27:10 +00:00
Tom Hughes
d781f42016 Avoid reading traces and trace images into memory when sending them to
the client, and make sure the MIME type is correct for trace files.
2007-06-21 23:19:25 +00:00
Tom Hughes
8284352436 Support tar archives of traces, with optional gzip or bzip2 compression. 2007-06-21 10:50:18 +00:00
Tom Hughes
6464d84c62 Add support for bzip2 compressed trace files. 2007-06-18 12:31:47 +00:00
Tom Hughes
7ecc1c4f21 Fix rm call to actually work... 2007-06-15 11:28:58 +00:00
Tom Hughes
bd5793f7a6 Improve reporting of errors in GPX uploads, and allow private traces
to be uploaded once again.
2007-06-12 08:52:19 +00:00
Tom Hughes
81021a1081 Only validate the presence of a description on create as we have old
records in the database with no description.
2007-06-10 09:08:22 +00:00
Tom Hughes
a7d41f09eb Refactor GPX import code to make reimporting old traces easier. 2007-06-09 23:34:50 +00:00
Steve Coast
c72f6a4182 fix based from TomH-Home 2007-06-07 00:38:09 +00:00
Richard Fairhurst
6efdcaa993 Latest Potlatch, plus TomH's GPX fix 2007-06-06 09:59:59 +00:00
Steve Coast
a0e8c35c1b various things from TomH 2007-05-29 23:25:41 +00:00
Steve Coast
e25cbb009a various gpx bits 2007-05-10 22:14:11 +00:00
Steve Coast
49a1b4ef29 gpx api fixes 2007-04-07 17:55:37 +00:00
Steve Coast
01cfcbd845 GPX api done 2007-04-07 17:48:34 +00:00
Steve Coast
4434bac3b4 gpx import now fully works 2007-04-07 14:06:26 +00:00
Dan Moore
2709027882 API 0.4: User rename, view trace links, tag filter summary / see all link, traces testing 2007-03-29 22:14:39 +00:00
Dan Moore
d07277efba 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
2007-03-23 23:13:19 +00:00
Steve Coast
6559db51df various gpx rails things 2006-12-06 17:55:22 +00:00