rails.git
3 years agoUpdate to rails 5.0.4
Tom Hughes [Thu, 1 Jun 2017 21:41:39 +0000 (22:41 +0100)]
Update to rails 5.0.4

3 years agoUpdate to rails 4.2.9
Tom Hughes [Tue, 27 Jun 2017 07:18:16 +0000 (08:18 +0100)]
Update to rails 4.2.9

3 years agoRework coordinates to avoid scientific formatting of small numbers. Fixes #1509
Andy Allan [Fri, 23 Jun 2017 13:03:57 +0000 (14:03 +0100)]
Rework coordinates to avoid scientific formatting of small numbers. Fixes #1509

3 years agoRefactor AMF encodevalue routine
Tom Hughes [Wed, 21 Jun 2017 20:20:41 +0000 (21:20 +0100)]
Refactor AMF encodevalue routine

Simplify the switch, and raise an exception if we see an unexpected
type rather than just logging and then accidentally triggering a odd
error by returning true when a string is expected.

3 years agoUpdate bundle
Tom Hughes [Tue, 20 Jun 2017 18:03:14 +0000 (19:03 +0100)]
Update bundle

3 years agoDisable removeUnknownsAndDefaults instead of removeUselessStrokeAndFill
Tom Hughes [Wed, 14 Jun 2017 14:25:47 +0000 (15:25 +0100)]
Disable removeUnknownsAndDefaults instead of removeUselessStrokeAndFill

3 years agoConvert XML document to a string when returning it
Tom Hughes [Tue, 13 Jun 2017 11:55:13 +0000 (12:55 +0100)]
Convert XML document to a string when returning it

Otherwise the Rak::ETag module will throw an exception when it
tries to test if the response is empty.

3 years agoDisable removeUselessStrokeAndFill svgo plugin
Bryan Housel [Mon, 12 Jun 2017 22:43:19 +0000 (18:43 -0400)]
Disable removeUselessStrokeAndFill svgo plugin
see https://github.com/openstreetmap/iD/issues/4105

3 years agoNo need to precompile traffico anymore, as it's been removed
Bryan Housel [Mon, 12 Jun 2017 22:36:50 +0000 (18:36 -0400)]
No need to precompile traffico anymore, as it's been removed

3 years agoUpdate to iD v2.2.2
Bryan Housel [Mon, 12 Jun 2017 15:24:59 +0000 (11:24 -0400)]
Update to iD v2.2.2

3 years agoRemove old traffico mapillary signs library from Vendorfile
Bryan Housel [Mon, 12 Jun 2017 15:22:53 +0000 (11:22 -0400)]
Remove old traffico mapillary signs library from Vendorfile

3 years agoUpdate bundle
Tom Hughes [Sun, 11 Jun 2017 18:32:51 +0000 (19:32 +0100)]
Update bundle

3 years agoAdd explicit primary key declaration for changeset subscriptions
Tom Hughes [Tue, 6 Jun 2017 19:33:09 +0000 (20:33 +0100)]
Add explicit primary key declaration for changeset subscriptions

This table has a composite primary key and although we don't really
rely on that at all rails 5.0 warns about itif you don't explcitly
declare it in order to trigger the CPK extension.

3 years agoRemove deprecated get_via_direct and post_via_redirect methods
Tom Hughes [Mon, 5 Jun 2017 22:04:50 +0000 (23:04 +0100)]
Remove deprecated get_via_direct and post_via_redirect methods

3 years agoUse explicit to_unsafe_h method when converting parameters to a hash
Tom Hughes [Mon, 5 Jun 2017 21:32:55 +0000 (22:32 +0100)]
Use explicit to_unsafe_h method when converting parameters to a hash

3 years agoReplace deprecated ActiveModel::Errors get/set methods
Tom Hughes [Mon, 5 Jun 2017 21:31:13 +0000 (22:31 +0100)]
Replace deprecated ActiveModel::Errors get/set methods

3 years agoReplace deprecated env method with request.env
Tom Hughes [Mon, 5 Jun 2017 21:30:50 +0000 (22:30 +0100)]
Replace deprecated env method with request.env

3 years agoUse distinct instead of uniq which is deprecated
Tom Hughes [Sun, 4 Jun 2017 21:49:10 +0000 (22:49 +0100)]
Use distinct instead of uniq which is deprecated

3 years agoReplace render :nothing with non-deprecated alternatives
Tom Hughes [Sun, 4 Jun 2017 21:44:31 +0000 (22:44 +0100)]
Replace render :nothing with non-deprecated alternatives

3 years agoSanitise parameters used in URL generation
Tom Hughes [Sun, 4 Jun 2017 18:57:27 +0000 (19:57 +0100)]
Sanitise parameters used in URL generation

3 years agoReplace render :nothing with head
Tom Hughes [Sun, 4 Jun 2017 18:56:39 +0000 (19:56 +0100)]
Replace render :nothing with head

3 years agoReplace deprecated xxx_filter methods with xxx_action
Tom Hughes [Sat, 3 Jun 2017 16:23:44 +0000 (17:23 +0100)]
Replace deprecated xxx_filter methods with xxx_action

3 years agoReplace deprecated Mime::XXX with Mime[:xxx]
Tom Hughes [Sat, 3 Jun 2017 16:22:01 +0000 (17:22 +0100)]
Replace deprecated Mime::XXX with Mime[:xxx]

3 years agoAvoid using format as a URL parameter name
Tom Hughes [Fri, 2 Jun 2017 20:53:53 +0000 (21:53 +0100)]
Avoid using format as a URL parameter name

This prevents rails confusing it with the builtin format
parameter derived from the URL extension.

3 years agoMake delete button translatable
Tom Hughes [Sat, 3 Jun 2017 11:04:00 +0000 (12:04 +0100)]
Make delete button translatable

3 years agoMerge remote-tracking branch 'openstreetmap/pull/1553'
Tom Hughes [Fri, 2 Jun 2017 19:34:17 +0000 (20:34 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1553'

3 years agoAdd delete button to message view
Hamel Desai [Fri, 2 Jun 2017 19:31:59 +0000 (20:31 +0100)]
Add delete button to message view

Fixes #1504
Closes #1557

3 years agoSanitise parameters used in URL generation
Tom Hughes [Fri, 2 Jun 2017 19:26:33 +0000 (20:26 +0100)]
Sanitise parameters used in URL generation

3 years agoRemove duplicate size specification for user image
Tom Hughes [Fri, 2 Jun 2017 18:26:33 +0000 (19:26 +0100)]
Remove duplicate size specification for user image

Either the size or the width and height can be passed but passing
both doesn't make any sense and in rails 5.0 will error.

3 years agoRemove all use of the :text option to render
Tom Hughes [Fri, 2 Jun 2017 15:24:28 +0000 (16:24 +0100)]
Remove all use of the :text option to render

It doesn't actually do what it says, as it sets the content type
to text/html not text/plain so is just confusing and as a result
has been deprecated in newer rails versions.

3 years agoRemove conditions from delete_all
Tom Hughes [Fri, 2 Jun 2017 14:55:03 +0000 (15:55 +0100)]
Remove conditions from delete_all

Passing conditions directory to delete_all is deprecated
in rails 5.0 so use a separate where instead.

3 years agoRescue LoadError instead of MissingSourceFile
Tom Hughes [Fri, 2 Jun 2017 14:47:52 +0000 (15:47 +0100)]
Rescue LoadError instead of MissingSourceFile

MissingSourceFile is just an alias for LoadError in rails 4.2 and
in rails 5.0 it is no longer present.

3 years agoRemove arguments from assert_nothing_raised
Tom Hughes [Fri, 2 Jun 2017 14:44:16 +0000 (15:44 +0100)]
Remove arguments from assert_nothing_raised

It has never done anything with the argument and rails 5.0 warns
that rails 5.1 will remove the argument.

3 years agoMove monkey patch modules to the OpenStreetMap namespace
Tom Hughes [Fri, 2 Jun 2017 14:38:45 +0000 (15:38 +0100)]
Move monkey patch modules to the OpenStreetMap namespace

Having them in the OSM namespace risks blocking autoloading
of the lib/osm.rb code by defining the OSM constant.

3 years agoFix rubocop warnings
Tom Hughes [Thu, 1 Jun 2017 22:46:53 +0000 (23:46 +0100)]
Fix rubocop warnings

3 years agoUpdate bundle
Tom Hughes [Thu, 1 Jun 2017 22:40:26 +0000 (23:40 +0100)]
Update bundle

3 years agoFix up monkey patching of ActiveRecord for migrations
Tom Hughes [Thu, 1 Jun 2017 22:18:18 +0000 (23:18 +0100)]
Fix up monkey patching of ActiveRecord for migrations

3 years agoReplace alias_method_chain with Module#prepend
Tom Hughes [Thu, 1 Jun 2017 21:41:03 +0000 (22:41 +0100)]
Replace alias_method_chain with Module#prepend

3 years agoDrop monkey patches that are no longer required
Tom Hughes [Thu, 1 Jun 2017 21:33:06 +0000 (22:33 +0100)]
Drop monkey patches that are no longer required

3 years agoDrop hack used for rails 4 upgrade
Tom Hughes [Thu, 1 Jun 2017 21:29:50 +0000 (22:29 +0100)]
Drop hack used for rails 4 upgrade

3 years agoEnsure closed changesets appear in the feed, and update some misleading comments.
Andy Allan [Thu, 1 Jun 2017 14:43:51 +0000 (15:43 +0100)]
Ensure closed changesets appear in the feed, and update some misleading comments.

3 years agoRemove test fixtures.
Andy Allan [Thu, 1 Jun 2017 10:01:17 +0000 (11:01 +0100)]
Remove test fixtures.

3 years agoRemove remaining references to fixtures.
Andy Allan [Thu, 1 Jun 2017 10:00:50 +0000 (11:00 +0100)]
Remove remaining references to fixtures.

3 years agoRemove the api_fixtures helper
Andy Allan [Thu, 1 Jun 2017 09:59:48 +0000 (10:59 +0100)]
Remove the api_fixtures helper

This is no longer required, as the tests no longer use fixtures.

3 years agoRubocop fixes.
Andy Allan [Thu, 1 Jun 2017 09:58:34 +0000 (10:58 +0100)]
Rubocop fixes.

3 years agocreate nodes from factories for the api changes test.
Andy Allan [Thu, 1 Jun 2017 09:52:05 +0000 (10:52 +0100)]
create nodes from factories for the api changes test.

3 years agoUpdate amf_controller tests to use a factory-generated user for credentials.
Andy Allan [Wed, 31 May 2017 17:51:08 +0000 (18:51 +0100)]
Update amf_controller tests to use a factory-generated user for credentials.

3 years agoUpdate the user list pagination test to avoid counting users from fixtures.
Andy Allan [Wed, 31 May 2017 17:43:28 +0000 (18:43 +0100)]
Update the user list pagination test to avoid counting users from fixtures.

3 years agoRefactor the user list test to use factory-built users and explicit assertions.
Andy Allan [Wed, 31 May 2017 17:40:13 +0000 (18:40 +0100)]
Refactor the user list test to use factory-built users and explicit assertions.

3 years agoUse factories to generate the relations
Andy Allan [Wed, 31 May 2017 17:21:24 +0000 (18:21 +0100)]
Use factories to generate the relations

3 years agoUse the user factory to generate login details.
Andy Allan [Wed, 31 May 2017 17:15:24 +0000 (18:15 +0100)]
Use the user factory to generate login details.

3 years agoRefactor the assert_changeset helper to take an array of changesets, instead of ids.
Andy Allan [Wed, 31 May 2017 17:08:20 +0000 (18:08 +0100)]
Refactor the assert_changeset helper to take an array of changesets, instead of ids.

3 years agoOnly use changesets from factories for the test_query changeset controller tests.
Andy Allan [Wed, 31 May 2017 17:02:56 +0000 (18:02 +0100)]
Only use changesets from factories for the test_query changeset controller tests.

3 years agoCreate objects via factories, rather than implicity relying on fixtures.
Andy Allan [Wed, 31 May 2017 16:53:07 +0000 (17:53 +0100)]
Create objects via factories, rather than implicity relying on fixtures.

3 years agoRework the changeset feed tests.
Andy Allan [Wed, 31 May 2017 16:39:58 +0000 (17:39 +0100)]
Rework the changeset feed tests.

These now include explicit tests for the changesets expected, as
well as refactoring so that they don't rely on fixtures.

3 years agoCreate nodes explicitly rather than relying on fixtures.
Andy Allan [Wed, 31 May 2017 16:10:39 +0000 (17:10 +0100)]
Create nodes explicitly rather than relying on fixtures.

3 years agoAdd ways into the database explicitly, rather than relying on preloaded fixtures.
Andy Allan [Wed, 31 May 2017 16:03:48 +0000 (17:03 +0100)]
Add ways into the database explicitly, rather than relying on preloaded fixtures.

3 years agoCreate a redaction object before testing the index page lists it.
Andy Allan [Wed, 31 May 2017 15:57:30 +0000 (16:57 +0100)]
Create a redaction object before testing the index page lists it.

3 years agoUse a user factory in order to log in.
Andy Allan [Wed, 31 May 2017 15:52:08 +0000 (16:52 +0100)]
Use a user factory in order to log in.

3 years agoRefactor changeset tags model test to remove dependency on fixtures.
Andy Allan [Wed, 31 May 2017 15:49:17 +0000 (16:49 +0100)]
Refactor changeset tags model test to remove dependency on fixtures.

3 years agoUpdate rubocop class length limit.
Andy Allan [Wed, 31 May 2017 15:24:46 +0000 (16:24 +0100)]
Update rubocop class length limit.

3 years agorefactor remaining amf controller tests to use factories.
Andy Allan [Wed, 31 May 2017 15:09:27 +0000 (16:09 +0100)]
refactor remaining amf controller tests to use factories.

3 years agoRefactor some controller tests to use factories.
Andy Allan [Wed, 31 May 2017 15:08:34 +0000 (16:08 +0100)]
Refactor some controller tests to use factories.

3 years agoRefactor remaining relation model tests to use factories.
Andy Allan [Wed, 31 May 2017 13:59:11 +0000 (14:59 +0100)]
Refactor remaining relation model tests to use factories.

3 years agoRefactor some controller tests to use factories.
Andy Allan [Wed, 31 May 2017 13:51:53 +0000 (14:51 +0100)]
Refactor some controller tests to use factories.

3 years agoRefactor various controller tests to use factories.
Andy Allan [Wed, 31 May 2017 13:35:35 +0000 (14:35 +0100)]
Refactor various controller tests to use factories.

3 years agoRefactor remaining way model tests to use factories.
Andy Allan [Wed, 31 May 2017 13:17:25 +0000 (14:17 +0100)]
Refactor remaining way model tests to use factories.

3 years agoConvert more changeset controller tests to use factories.
Andy Allan [Wed, 31 May 2017 11:29:42 +0000 (12:29 +0100)]
Convert more changeset controller tests to use factories.

3 years agoRefactor more changeset controller tests to use factories.
Andy Allan [Wed, 31 May 2017 10:33:32 +0000 (11:33 +0100)]
Refactor more changeset controller tests to use factories.

3 years agoConvert more changeset controller tests to use factories.
Andy Allan [Wed, 31 May 2017 09:59:29 +0000 (10:59 +0100)]
Convert more changeset controller tests to use factories.

3 years agoRefactor user_changeset_comments integration test to use factories.
Andy Allan [Thu, 25 May 2017 08:52:37 +0000 (09:52 +0100)]
Refactor user_changeset_comments integration test to use factories.

3 years agoRefactor a few tests to use changeset factories.
Andy Allan [Thu, 25 May 2017 08:47:18 +0000 (09:47 +0100)]
Refactor a few tests to use changeset factories.

3 years agoUpdate wiki_pages.yml
mmd-osm [Tue, 30 May 2017 17:53:13 +0000 (19:53 +0200)]
Update wiki_pages.yml

3 years agoLocalisation updates from https://translatewiki.net.
Niklas Laxström [Mon, 29 May 2017 06:04:46 +0000 (08:04 +0200)]
Localisation updates from https://translatewiki.net.

3 years agoAdd string for GraphHopper car profile
Tom Hughes [Wed, 24 May 2017 20:20:41 +0000 (21:20 +0100)]
Add string for GraphHopper car profile

3 years agoInclude car profile for GraphHopper routing
Peter Karich [Mon, 22 May 2017 20:20:09 +0000 (22:20 +0200)]
Include car profile for GraphHopper routing

Closes #1547

3 years agoRefactor more changeset_controller tests to use factories.
Andy Allan [Wed, 24 May 2017 16:31:56 +0000 (17:31 +0100)]
Refactor more changeset_controller tests to use factories.

3 years agoRefactor some changesets controller tests to use factories.
Andy Allan [Wed, 24 May 2017 16:03:07 +0000 (17:03 +0100)]
Refactor some changesets controller tests to use factories.

3 years agoRefactor the changeset query tests to use factories.
Andy Allan [Wed, 24 May 2017 15:28:58 +0000 (16:28 +0100)]
Refactor the changeset query tests to use factories.

Unfortunately some references to fixtures have to remain until they
are finally removed.

3 years agoConvert more relation controller tests to use factories.
Andy Allan [Wed, 24 May 2017 14:52:31 +0000 (15:52 +0100)]
Convert more relation controller tests to use factories.

3 years agoConvert remaining node_controller tests to use factories.
Andy Allan [Wed, 17 May 2017 15:49:19 +0000 (16:49 +0100)]
Convert remaining node_controller tests to use factories.

3 years agoLocalisation updates from https://translatewiki.net.
Siebrand Mazeland [Sun, 21 May 2017 07:56:50 +0000 (09:56 +0200)]
Localisation updates from https://translatewiki.net.

3 years agoLocalisation updates from https://translatewiki.net.
Niklas Laxström [Sat, 20 May 2017 09:04:19 +0000 (11:04 +0200)]
Localisation updates from https://translatewiki.net.

3 years agoPlay a bit of whack-an-seo-mole
Tom Hughes [Thu, 18 May 2017 14:02:21 +0000 (15:02 +0100)]
Play a bit of whack-an-seo-mole

3 years agoMerge remote-tracking branch 'openstreetmap/pull/1521'
Tom Hughes [Wed, 17 May 2017 19:37:01 +0000 (20:37 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1521'

3 years agoEnsure invisible_way is actually deleted
Andy Allan [Wed, 17 May 2017 15:05:23 +0000 (16:05 +0100)]
Ensure invisible_way is actually deleted

3 years agoUpdate more relation_controller tests to use factories.
Andy Allan [Wed, 17 May 2017 10:59:22 +0000 (11:59 +0100)]
Update more relation_controller tests to use factories.

3 years agoRefactor some relation_controller tests to use factories.
Andy Allan [Wed, 17 May 2017 10:29:11 +0000 (11:29 +0100)]
Refactor some relation_controller tests to use factories.

3 years agoRefactor the relation_for_nwr tests to use factories
Andy Allan [Wed, 17 May 2017 10:11:04 +0000 (11:11 +0100)]
Refactor the relation_for_nwr tests to use factories

This is a bit verbose, since the original tests assumed various other
entities were silently not selected. This also improves the tests
since it considers the case of how to handle a relation with the
target member appearing more than once.

3 years agoRefactor get_nodes_undelete test to use factories instead of fixtures.
Andy Allan [Wed, 17 May 2017 09:30:28 +0000 (10:30 +0100)]
Refactor get_nodes_undelete test to use factories instead of fixtures.

3 years agoRefactor remaining way model tests to use factories.
Andy Allan [Wed, 17 May 2017 08:56:44 +0000 (09:56 +0100)]
Refactor remaining way model tests to use factories.

Note that test_max_nodes_per_way_limit still has issues - see #1516

3 years agoUpdate to iD v2.2.1
Bryan Housel [Fri, 12 May 2017 14:42:31 +0000 (10:42 -0400)]
Update to iD v2.2.1

3 years agoLocalisation updates from https://translatewiki.net.
Niklas Laxström [Thu, 11 May 2017 06:51:49 +0000 (08:51 +0200)]
Localisation updates from https://translatewiki.net.

3 years agoMore amf_controller tests converted to use factories.
Andy Allan [Wed, 10 May 2017 17:14:15 +0000 (18:14 +0100)]
More amf_controller tests converted to use factories.

3 years agoRefactor more amf_controller tests to use factories.
Andy Allan [Wed, 10 May 2017 16:34:16 +0000 (17:34 +0100)]
Refactor more amf_controller tests to use factories.

3 years agoRefactor putway method tests to use factories
Andy Allan [Wed, 10 May 2017 16:14:13 +0000 (17:14 +0100)]
Refactor putway method tests to use factories

This involved decoding a lot of magic numbers, to figure out which
were node_ids and which were other things (versions, coordinates etc)

3 years agoRefactor some more amf_controller tests to use factories.
Andy Allan [Wed, 10 May 2017 15:57:29 +0000 (16:57 +0100)]
Refactor some more amf_controller tests to use factories.

The timestamp truncation thing was a pain to figure out.

3 years agoMerge remote-tracking branch 'openstreetmap/pull/1538'
Tom Hughes [Wed, 10 May 2017 16:01:06 +0000 (17:01 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1538'

3 years agoRefactor old_relation_controller tests to use factories.
Andy Allan [Wed, 10 May 2017 12:53:35 +0000 (13:53 +0100)]
Refactor old_relation_controller tests to use factories.

3 years agoUpdate old_ways_controller tests to use factories.
Andy Allan [Wed, 10 May 2017 12:38:10 +0000 (13:38 +0100)]
Update old_ways_controller tests to use factories.