Commit graph

1388 commits

Author SHA1 Message Date
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
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
Shaun McDonald
96dfe22fb0 Validations on the way tags, with unit tests 2008-11-18 16:21:32 +00:00
Shaun McDonald
1818679416 Make the dates and times that the server deals with UTC. This is probably required for changeset, as they could auto close instantly when the clocks go forward by one hour. 2008-11-17 19:11:54 +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
Shaun McDonald
5254f79c08 Verify that the key and value isn't getting mixed up by having them different. verify the error message is the same when returning the user conflict on closing changeset test. 2008-11-17 15:00:19 +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
Matt Amos
98b15bef45 Implemented changeset tags updating via the update method. 2008-11-17 11:45:50 +00:00
Matt Amos
e57e2c497c Altered tests on AMF controller so that they give failures instead of errors. Return format seems to have changed, so someone who knows more about AMF controller should have a look. 2008-11-17 11:12:48 +00:00
Richard Fairhurst
6690a9a09b changeset comments and a couple of other small fixes 2008-11-16 13:30:02 +00:00
Shaun McDonald
d74e2196a0 Freezing composite primary key so that we can apply TomH's patch to it, and that way Potlatch will work in Rails mode without a problem. Please test. 2008-11-15 01:11:27 +00:00
Richard Fairhurst
0a57413d3e finished Rails-friendly amf_controller. Note that this requires Tom's patched composite_primary_keys to work unless you tell Potlatch to use SQL reads 2008-11-14 17:36:38 +00:00
Shaun McDonald
6bca4b66d1 More unit test stubs 2008-11-14 17:28:16 +00:00
Shaun McDonald
57e2d5a8f5 Unit tests work again. Fixed the set fixture class that I should. Adding 2 length checks to the user preference controller. 2008-11-14 16:26:56 +00:00
Shaun McDonald
c8b70c1c72 Adding some more unit test stubs that need filling out. Adding changeset tags fixture. Indentation fix in way model. 2008-11-14 02:06:04 +00:00
Shaun McDonald
bdd5c317a7 Adding some more diary entry tests. Making the RSS feed links more portable, by using the SERVER_URL constant. Fixing the validation for the length of the language of diary entries until the i18n branch is integrated. 2008-11-13 17:20:40 +00:00
Shaun McDonald
797cbaab1e Covering the case of an entry not being found. More diary entry tests. 2008-11-12 18:48:58 +00:00
Frederik Ramm
ad9e48120a replaced "wtf does this do" comment by something explaining what it does. 2008-11-12 00:11:57 +00:00
Shaun McDonald
22f3d7ce2e more diary entry test 2008-11-11 18:33:08 +00:00
Shaun McDonald
995c9df195 more diary entry tests, and a minor fix to the relation member that makes the code a bit more readable. 2008-11-11 18:07:59 +00:00
Shaun McDonald
f3e382732a slight more work on the diary test 2008-11-10 19:21:59 +00:00
Andy Allan
d717f2d02a Postgres adapter, and make migration 022 db-agnostic 2008-11-10 19:14:00 +00:00
Andy Allan
9f64b0848f nil protection - mysql however has a default for enums, which is why it wasn't a problem before 2008-11-10 17:10:55 +00:00
Matt Amos
e79fd07638 Made relations ordered. Added some tests for this. Otherwise interface is unchanged. 2008-11-10 15:41:05 +00:00
Matt Amos
0be6dd860f Ooops, forgot to commit the routes for the changeset query and include calls. 2008-11-10 15:37:34 +00:00
Andy Allan
f2093eb4c4 boolean correctness 2008-11-10 11:47:20 +00:00
Andy Allan
e1dde5cffc forgot the test change from 11866 2008-11-10 11:39:10 +00:00
Andy Allan
fc99863df9 In YAML yes is a boolean keyword: also fix test that was erroneously asserting success 2008-11-10 11:32:17 +00:00
Richard Fairhurst
3065af398d 0.6-friendly Potlatch (work in progress). DO NOT SET POTLATCH_USE_SQL=false as it won't work 2008-11-09 23:50:03 +00:00
Shaun McDonald
5ed41857f7 adding first integration for testing user diaries, as multiple controllers are required. more work required. 2008-11-09 19:51:56 +00:00
Andy Allan
4adeeb51ad remove indexes before renaming tables (some dbs have database-level index namespaces) and unsigned is also a mysqlism 2008-11-09 19:30:22 +00:00
Dave Stubbs
2aa3daf0e0 amf get*_history tests and related fixes 2008-11-09 18:48:16 +00:00
Dave Stubbs
436470b057 a few more amf tests and associated bug fixes 2008-11-09 17:41:38 +00:00
Shaun McDonald
b6c354b31b fixing the tests due to a osm -> diffChange and moving to floats 2008-11-09 16:49:27 +00:00
Dave Stubbs
322d293007 update nodes/ways/relation XML to include user id as well as display name 2008-11-09 16:43:09 +00:00
Frederik Ramm
81ca9cfabf return user id AND name with changeset get request 2008-11-09 16:12:23 +00:00