Commit graph

1254 commits

Author SHA1 Message Date
Shaun McDonald
e5674abd2c bug fix. Adding some transactions to amf controller, and adding the missing version to putway method signature. 2008-12-15 18:57:12 +00:00
Tom Hughes
018c861630 Align table heading properly. Closes #1405. 2008-12-15 17:45:45 +00:00
Shaun McDonald
eb9138813c Return, rather than allow a second render to happen. Closes #1407 2008-12-14 23:16:27 +00:00
Shaun McDonald
721dd9c27d resync from rails_port 11795:12304 2008-12-12 19:29:27 +00:00
Shaun McDonald
fac8b5d28a Log the request on a few requests when there is a bad request, probably should do this in a few more places. This makes it easier to see why we are getting errors/bad requests. 2008-12-12 19:04:28 +00:00
Shaun McDonald
c76e60f052 Improving the not found handling of preferences. adding a user preference test. adding some utility methods to the test helper 2008-12-12 18:54:03 +00:00
Tom Hughes
9b1b6be371 Optimise lookup of traces with a given tag. 2008-12-12 15:17:14 +00:00
Shaun McDonald
541c24b23d capture the too many way nodes error, and give the user an error message 2008-12-12 11:24:40 +00:00
Shaun McDonald
b051dd11af Making amf controller act more like the xml apis 2008-12-11 17:22:15 +00:00
Shaun McDonald
814822120a Don't give an error when you access the login page when you are logged in. Instead take you to the page in the referer or the home page. 2008-12-11 15:05:53 +00:00
Shaun McDonald
8bf0a3197c some more progress towards making amf_controller do version checking of nodes before deleting them 2008-12-11 10:38:36 +00:00
Shaun McDonald
eafcf91ceb some further progress to amf controller checking the version numbers. 2008-12-10 18:07:30 +00:00
Matt Amos
aeaf2d2d20 Added missing version to the pure rails AMF controller. More stringent tests on whichways. 2008-12-10 14:31:07 +00:00
Matt Amos
3ed9ac21b5 Some fixes to the rails part of the AMF controller and associated test. 2008-12-10 13:23:21 +00:00
Shaun McDonald
b7335940e2 Some improvements for the XML parsing, as there are somethings that we don't need, like timestamp and visibility, thus hopefully bringing a speedup in the xml parsing. Some more AMF controller fixes, plenty more to go though. 2008-12-09 18:44:11 +00:00
Shaun McDonald
59c69a642f the user id may be negative, so that osmosis can create changesets for users that are anonymous, which it uses a negative id for, as a special id. 2008-12-08 15:32:29 +00:00
Shaun McDonald
2e41c35479 Adding the ability to see the min/max lat/lon for a changeset in the data browser. Adding file for the nice message that should show when a user is missing in the message controller. 2008-12-08 15:30:19 +00:00
Shaun McDonald
c0b4c1b905 Adding some amf create poi tests. Minor bugfix tweaks to the amf controller 2008-12-08 14:22:34 +00:00
Shaun McDonald
ec97c63e5c Fix for the refactoring commited yesterday, based on review by Dave Stubbs 2008-12-05 11:08:58 +00:00
Shaun McDonald
e9527b363d Refactoring the amf controller, and all models so that save_with_history! is now private. Everyone should use create_with_history, delete_with_history, and update_from instead. Also gets the amf controller to do version checks in the node/way/relation models. Needs checked. This breaks Potlatch until #1376 is fixed. 2008-12-04 17:30:17 +00:00
Shaun McDonald
d9c6758ee6 turning the session off for the changeset controller, to come in line with the other api controllers 2008-12-04 14:36:21 +00:00
Shaun McDonald
1a7ab3570c Deal with active record not found exceptions when creating message. Some tidying of html. For some reason in rails 2.1.2 having a comment at the end of a line, in the view, means that the closing tag needs to be on the next line. 2008-12-03 12:56:02 +00:00
Shaun McDonald
073c866032 adding link to download the full changeset xml 2008-12-02 18:44:50 +00:00
Shaun McDonald
bbbf256986 Actually set the instance var when closing the changeset 2008-12-01 18:47:03 +00:00
Shaun McDonald
e989b1a880 ensure that uploads that don't supply a lat and lon for a node. Adding related test and fixing other tests. 2008-12-01 18:32:54 +00:00
Shaun McDonald
6e98e324e5 better handling of duplicate tags. Extra validation in the tests. 2008-11-28 17:38:23 +00:00
Shaun McDonald
2ed84e26cd Adding pagination to the changesets, thus allowing you to browe large changesets, without MySQL complaining about memory. Probably needs some fine tuning. You currently can only page one of nodes, ways, and relations, without manually setting the relations. Fixing deprection notice for the classic_pagination plugin. 2008-11-27 17:06:43 +00:00
Matt Amos
299b671522 Moved transaction boundary to cover used-by tests on deletion so that the database can help prevent race conditions. 2008-11-26 14:49:56 +00:00
Matt Amos
1ffb5c1502 Moved changeset consistency checks to library code. 2008-11-26 12:56:42 +00:00
Shaun McDonald
a4e5e8437f Renaming the include action to expand_bbox in the changeset controller. 2008-11-26 11:36:10 +00:00
Tom Hughes
2a121cfc41 Add a delete method for the user model. 2008-11-25 23:53:21 +00:00
Shaun McDonald
8348493ccb Some improvements to the error messages that are returned by the api. 2008-11-25 18:59:35 +00:00
Shaun McDonald
1375095343 More model validations. Fixing one test. 2008-11-25 17:23:47 +00:00
Richard Fairhurst
ecefee485b various fixes/enhancements, including a couple to the 0.5 version 2008-11-25 00:15:30 +00:00
Shaun McDonald
0ff1214f86 Make the role in relations optional, with a test to make sure it is. Also start moving the errors reading the xml to exceptions, thus making it possible to give meaningful error messages, when bad xml is sent (More work is required on this including doing the same for nodes and ways). With the latest gems update it seems that the lib xml handling was broken, using the newer method. Adding the content type for the exceptions. 2008-11-24 18:55:24 +00:00
Harry Wood
152cb13a02 cosmetic tweaks to diary interface. icon for new entries link 2008-11-24 00:40:04 +00:00
Matt Amos
783528830a Fixed bug in changeset idle timeout. Fixed another with a spurious require. 2008-11-21 12:53:09 +00:00
Shaun McDonald
e2c0e51e45 Closes #1350 through updating amf_controller to use the newer closed_at method of determining whether a changeset is closed. Richard please check the rest of the amf controller for more things that may reference the open field that is no longer available. Use is_open? to determine if a changeset is open. Fix indentation in amf controller. Fix minor bug in the links to changesets in the data brower. 2008-11-20 21:23:44 +00:00
Shaun McDonald
d6b4b8c8a1 Changeset tag unit tests 2008-11-19 18:00:52 +00:00
Shaun McDonald
ffbc4d5cb2 More tag validations, and finishing the node/way/relation tests. 2008-11-19 17:23:15 +00:00
Shaun McDonald
55d511bf21 Remember whether the user set the public checkbox on GPX upload as a user preference. Closes #827 2008-11-18 20:22:09 +00:00
Shaun McDonald
b7b2b502cf Relation Tag testing. Also sort the belong_to/has_many for user/changeset/old_way. 2008-11-18 18:50:24 +00:00
Tom Hughes
990dcedc4c Require the user to be logged in for those methods which make no
sense otherwise.
2008-11-18 17:23:40 +00:00
Tom Hughes
f77ce935a4 Fix syntax of status only renders. Closes #1345. 2008-11-18 17:19:37 +00:00
Shaun McDonald
96dfe22fb0 Validations on the way tags, with unit tests 2008-11-18 16:21:32 +00:00
Matt Amos
a90be5e69a Migration to add close-time to changesets. This replaces the boolean 'open' attribute. Added checks to ensure that the maximum lifetime and number of changes in a changeset are enforced. Added some tests. 2008-11-17 19:00:01 +00:00
Shaun McDonald
9a4ea6bfd0 Adding validations for the length of node tags, and the presence of the id (and version). More tests, including some boiler plate tests. 2008-11-17 18:53:09 +00:00
Matt Amos
495bd7f1f0 Made user input parsing more robust in changeset query method. Added tests. 2008-11-17 15:30:46 +00:00
Matt Amos
28839fd150 Fixed some bugs in changeset query code. Added more test cases. 2008-11-17 14:32:15 +00:00
Matt Amos
519d402cb2 Added tests for changeset close method. 2008-11-17 11:59:42 +00:00