Commit graph

68 commits

Author SHA1 Message Date
Tom Hughes
582402ba8f Prefer keyword arguments when method has optional boolean arguments 2020-11-13 10:22:55 +00:00
Tom Hughes
0e2a66e8de Fix new rubocop warnings 2020-08-06 18:42:16 +01:00
Andy Allan
a41d500b9f Create an ApplicationRecord for models to inherit from
This is the default for Rails 5+, and also paves the way for
multiple database support.
2019-11-27 11:50:48 +01:00
Tom Hughes
135ec35a91 Fix numericality validation to use correct integer only constraint
Fixes #2355
2019-08-22 12:14:06 +01:00
Andy Allan
8ae8768cd3 Update annotations to show 'using' clause on indexes 2019-05-29 12:02:50 +02:00
Andy Allan
4377e2bd55 Update annotations to correctly show bigint types 2019-05-29 11:52:20 +02:00
Tom Hughes
9f57f60b87 Fix new rubocop warnings 2019-04-23 09:33:34 +01:00
Frederik Ramm
538bfed8a6 Move changeset XML generation to a view 2019-03-16 15:30:18 +00:00
Tom Hughes
64146b4f36 Fix Style/SafeNavigation rubocop warnings 2018-09-22 17:21:06 +01:00
Tom Hughes
6c2093b29d Fix new rubocop warnings 2018-09-22 17:12:29 +01:00
mmd-osm
fe644bbd72 Include num_changes in changeset xml response 2018-08-14 10:57:13 +02:00
mmd-osm
cea403dce0 Remove BBOX expansion performance optimization
Closes #1749
Fixes #1742
2018-02-14 17:23:06 +00:00
Tom Hughes
2c52c91b39 Make changeset#query preload users, tags and comments 2017-12-04 07:54:19 +00:00
Andy Allan
b2a8df0bd7 Add annotate gem and associated rake task. Annotate models. 2017-10-22 22:18:26 +01:00
Tom Hughes
8dae890a76 Fix rubocop warnings 2017-10-05 19:18:38 +01:00
Tom Hughes
9b89d4eefe Remove conditions from delete_all
Passing conditions directory to delete_all is deprecated
in rails 5.0 so use a separate where instead.
2017-06-02 16:33:48 +01:00
Frederik Ramm
ad2b4fe12a Reduce maximum changeset size to 10k changes
Ten thousand changes ought to be enough for any normal mapping activity.

Automatic edits and imports are controlled by scripts anyway so it doesn't
make a difference to them as they just have to adapt the limit.

The reason for my suggestion is that large changesets are becoming
increasingly difficult to handle due to frequent timeouts when trying
to load and process them.

The changeset size limit is returned by the API in the "capabilities" request
so client software that honours that information will automatically pick up
the new limit.

Closes #1259
2017-01-31 18:15:42 +00:00
Tom Hughes
5d3ecffa28 Fix new rubocop warnings 2016-02-05 13:35:26 +00:00
Tom Hughes
8fe1899596 Fix rubocop warnings 2016-01-19 09:51:24 +00:00
Tom Hughes
f04211b172 Improve test coverage 2015-02-27 00:40:37 +00:00
Tom Hughes
dbe165bbb3 Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
Tom Hughes
dc2a2c8ebd Standardise on double quoted strings 2015-02-20 19:47:26 +00:00
Tom Hughes
5cbd4038ed Fix rubocop style issues 2015-02-20 08:56:16 +00:00
Tom Hughes
ef7f3d800c Fix most auto-correctable rubocop issues 2015-02-20 08:56:16 +00:00
Tom Hughes
34e3e51456 Cleanup trailing whitespace 2015-02-20 08:56:16 +00:00
Łukasz Gurdek
14ac1babc2 Changeset discussions
Add support for commenting on changesets with RSS feeds and email
notification of comments to other commenters and people that have
chosen to subscribe to a changeset.
2014-10-23 21:24:51 +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
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
036632bad3 Avoid noise on console when running tests 2011-11-14 09:42:53 +00:00
Tom Hughes
fc25c3d412 Rename all ID columns that aren't unique
Having a table with a column called ID that is only part of the
primary key really doesn't work as rails likes to treat ID as a
special name so it becomes impossible to assign to it or read it.
2011-11-14 09:42:52 +00:00
Tom Hughes
0dba53c023 Declare callbacks explicitly 2011-11-14 09:42:43 +00:00
Matt Amos
cb4f1e62a0 Don't compare changeset bbox coordinates when they may be nil
The code assumed that the changeset bounding box would only be
updated with a valid bounding box, but this isn't the case when
dealing with certain corner cases, including when removing
deleted members from relations.
2011-07-06 08:50:08 +01:00
Tom Hughes
9deeae3f96 Remove validates_associated_of calls which target the user model as
we have a number of users with minor validation failures.
2010-02-25 21:50:09 +00:00
Shaun McDonald
094855be22 Actually the changeset doesn't need an id attribute in the xml. It is simply fetched as a parameter in the url. Thanks for pointing it out Frederik. We really need more tests so that things like this are thought about more before committing potentially significant changes. 2009-12-15 23:53:19 +00:00
Shaun McDonald
43a28065b1 Change the way that the changeset parsing is done, so that it is in line with the nodes/ways/relations and gives much nicer error messages. Adding some tests too to back up those changes. 2009-12-06 02:13:30 +00:00
Tom Hughes
0f6dda6050 Qualify SCALE properly - apparently object visibility when running the
test suite is not the same as when running live... Rails FAIL!
2009-08-16 10:36:16 +00:00
Matt Amos
d0e47d30e4 Fixes bug #2152 by preventing over-expansion of bboxes beyond the world range. 2009-08-16 00:19:18 +00:00
Harry Wood
3415aa4689 label changesets as (big) based on their bbox area 2009-05-15 16:24:55 +00:00
Matt Amos
1ceb4ab9ba Fixed bug #1816 - the timeout updating logic should have been in a before_save handler, not in save_with_tags. 2009-05-12 13:54:37 +00:00
Shaun McDonald
5bc558e355 Should have a .new when raising error 2009-04-14 12:00:26 +00:00
Thomas Wood
c64ebb9139 Add has_valid_bbox? method to Changeset model to tidy checking for bbox, and fix edge case where no bbox would cause changeset browsing to die. 2009-04-09 11:18:31 +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
Matt Amos
76708eefcf Fixed bug in changeset closing and querying where the number of elements exceeded the maximum. Added a fixture for this. 2009-02-07 17:45:27 +00:00
Matt Amos
d6a1ccf6b4 removed comments which apparently no-one bothers to read anyway. since no-one reads the comments, changed changeset model to use Time instead of DateTime. will probably have to change it back later, when someone else who doesn't read comments comes along. 2008-12-23 15:59:56 +00:00
Richard Fairhurst
2b8bde9055 Potlatch for API 0.6 now saving ways happily with node versioning... I think 2008-12-18 00:32:02 +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
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
bbbf256986 Actually set the instance var when closing the changeset 2008-12-01 18:47:03 +00:00
Shaun McDonald
1375095343 More model validations. Fixing one test. 2008-11-25 17:23:47 +00:00