Commit graph

91 commits

Author SHA1 Message Date
Tom Hughes
40b452ac74 Use a view to build the trace RSS feed and get rid of OSM::GeoRSS 2013-09-18 18:23:03 +01:00
Tom Hughes
15d29c646b Strengthen password hashing algorithm 2013-08-14 00:23:03 +01:00
Tom Hughes
f03c8637f7 Extract common code for parsing floats 2013-06-24 22:44:17 +01:00
Tom Hughes
d74d4f8d19 Add a reopen API call for notes 2013-06-10 18:52:50 +01:00
Tom Hughes
c809f79912 Tidy up user preferences controller 2013-05-10 16:03:37 +01:00
Tom Hughes
ae27f7adbe Make the API reject changes to closed notes 2013-02-05 18:08:42 +00:00
Grant Slater
2805118a60 Add CC BY-SA 2.0 copyright/attribution/license attributes to <osm> 2012-09-11 18:46:37 +01:00
Matt Amos
67dd9e4c9d Adding first cut of Redactions support
Redactions support hiding historical versions of elements and
collecting meta-data about that action together.
2012-04-05 13:46:36 +01:00
Tom Hughes
8f4a9a4b87 Make spam scoring work with new rich text system 2012-03-17 16:36:58 +00:00
Tom Hughes
a6c36b9133 Remove unncessary include of RMagick 2012-02-21 10:46:27 +00:00
Tom Hughes
c6b295ab2d Include autogenerated links when calculating the spam score 2012-01-21 15:59:27 +00:00
Tom Hughes
3aa1c46aef Use OSM::Timer (and hence SystemTimer) consistently 2012-01-06 09:13:52 +00:00
Tom Hughes
00a605a2a8 Use Timeout if SystemTimer isn't loaded 2012-01-06 09:11:23 +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
e1213a4651 Use Rails.xxx instead of RAILS_XXX 2011-11-14 09:42:40 +00:00
Tom Hughes
c98328a8f8 Coerce the API version to a string 2011-09-24 17:02:27 +01: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
6ca26591df Ignore unknown countries when doing geolocation 2010-05-13 15:32:46 +01:00
Tom Hughes
303e5d3eb9 Merge branch 'master' into terms
Conflicts:
	config/application.yml
	lib/osm.rb
	public/stylesheets/common.css
2010-05-07 22:23:20 +01:00
Tom Hughes
d80f260b8b Implement OSM.spam_score to return a spam score for a piece of text 2010-05-06 17:18:33 +01:00
Matt Amos
972278a223 Some styling changes. Changed drop-down into radio buttons. Tried, and failed, to get the 'decline' link to look like a button. 2010-04-27 00:36:44 +01:00
Matt Amos
9a9e13af90 Bit more work on the contributor terms page - still very much a work-in-progress. 2010-04-12 23:55:05 +00:00
Tom Hughes
1844a19f48 Add support for GeoIP lookups using Quova. 2009-11-25 00:52:44 +00:00
Tom Hughes
436daaff15 Catch domain exceptions as we approach the poles and handle them by
setting the longitude bounds to select a stripe right around the world
which is what they are tending to as we approach the poles.

Closes #2488.
2009-11-22 13:35:51 +00:00
Tom Hughes
291350850d Say which way is too long. 2009-07-15 13:34:14 +00:00
Tom Hughes
5de81dc4b0 More work on optimisation the location of nearby users - it turns out
that getting the database to do the filtering is much better as it
avoids us constructing thousands of user objects only to then throw
most of them away again.
2009-06-05 09:30:31 +00:00
Tom Hughes
40e920bd52 Create a proper exception class for invalid bounding box exceptions. 2009-05-26 23:47:45 +00:00
Matt Amos
2006c416d2 Fixed typo. 2009-05-21 21:24:29 +00:00
Tom Hughes
4a4d89138c Rationalise API error classes by getting of the render_opts method which
was never used except to extract the data it contained. Instead each class
now has a status method that returns the HTTP status code to use and a
to_s method to return a textual description of the error.
2009-05-21 19:28:39 +00:00
Richard Fairhurst
8100be1e8d Potlatch 1.0 2009-05-21 00:30:33 +00:00
Tom Hughes
b38684e59e Add a global timeout that is applied to most API requests. 2009-05-20 22:18:36 +00:00
Matt Amos
3d0ca940d2 Using an around_handler for catching and rendering errors in most of the API controller methods. This simplifies the code and makes errors and error messages a bit more consistent. Also added a utility method for checking the HTTP method. 2009-05-20 17:39:59 +00:00
Tom Hughes
ed68d524de Use a local lookup table for country bounding boxes rather than relying
on geonames.org being able to do it in a reasonable time.
2009-05-11 16:50:09 +00:00
Shaun McDonald
0b6d9ce877 Improve the node/way/relation already deleted error message, and get rid bug in way model with missing new in exception 2009-04-27 11:49:56 +00:00
Richard Fairhurst
9b4271ed8c pass common API error text through to Potlatch so it can be shown to the user 2009-04-24 17:44:52 +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
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
Matt Amos
783528830a Fixed bug in changeset idle timeout. Fixed another with a spurious require. 2008-11-21 12: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
22005a38a6 Error message for version mismatch is now more informative. 2008-11-08 14:07:34 +00:00
Shaun McDonald
183ffc7864 Adding an extra test to make sure that the correct response is returned when an invalid changeset action is uploaded. 2008-11-03 18:54: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
Matt Amos
dc2a959037 Added tests for changeset upload code. Refactored diff reading code and put it into /lib. Changed the route of a changeset upload to explicitly refer to the changeset it applies to (i.e: resource). 2008-10-23 15:14:17 +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
Matt Amos
b56f57ec43 Fixed up delete methods on nodes, ways and relations to return the new version number and added some more tests. 2008-10-14 14:27:12 +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
2b7a40069f adding the controller code to be able to get a specific version of a node, way or relation. Add some node checks on update. Some code indentation cleanup. 2008-10-08 18:03:41 +00:00
Shaun McDonald
e1b205913c Fix the data config, so that the development database is not the same as the test database. Make a good stab at getting the creates and updates for relations working, adding some new error exceptions. Some code indentation cleanup. 2008-10-08 15:42:42 +00:00