]> git.openstreetmap.org Git - rails.git/log
rails.git
8 years agoReplace fixtures with a factory for old_node_tags
Andy Allan [Sun, 30 Oct 2016 14:36:33 +0000 (15:36 +0100)]
Replace fixtures with a factory for old_node_tags

Also includes a slight simplification of the old_node_tags tests.

8 years agoReplace changeset_tags fixtures with a factory.
Andy Allan [Sun, 30 Oct 2016 11:45:02 +0000 (12:45 +0100)]
Replace changeset_tags fixtures with a factory.

8 years agoRemove the changesets_subscribers fixture.
Andy Allan [Sun, 30 Oct 2016 11:23:23 +0000 (12:23 +0100)]
Remove the changesets_subscribers fixture.

Since there is no ChangesetsSubscribers model, we can't use a factory.
Instead we create the associations explicitly when needed.

8 years agoRefactor the gravatar email changes to use webmock stubbing
Andy Allan [Sun, 30 Oct 2016 10:06:35 +0000 (11:06 +0100)]
Refactor the gravatar email changes to use webmock stubbing

The main reason for doing this is to make the tests easier to read,
rather than having to look up both the gravatar fixture, and then
correlate that with the users fixture. Putting the expected response
code in the tests is much more explicit.

8 years agoUse webmock to power the with_http_stubs helper
Andy Allan [Sat, 29 Oct 2016 17:40:48 +0000 (19:40 +0200)]
Use webmock to power the with_http_stubs helper

This involves a small amount of changing the fixtures since we're
using the regexp and not the full url matching powers of webmock.

8 years agoStub out requests to gravatar.com during tests.
Andy Allan [Fri, 28 Oct 2016 12:44:07 +0000 (13:44 +0100)]
Stub out requests to gravatar.com during tests.

8 years agoStub out requests to hostip.info during tests
Andy Allan [Fri, 28 Oct 2016 12:43:13 +0000 (13:43 +0100)]
Stub out requests to hostip.info during tests

These are detecting the correct locale for showing terms during signup

8 years agoAdd webmock to intercept real http connections during tests
Andy Allan [Fri, 28 Oct 2016 12:35:48 +0000 (13:35 +0100)]
Add webmock to intercept real http connections during tests

Intercepting real http connections also allows running the test
suite without an internet connection.

8 years agoMerge remote-tracking branch 'openstreetmap/pull/1349'
Tom Hughes [Sat, 29 Oct 2016 17:08:31 +0000 (18:08 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1349'

8 years agoMerge remote-tracking branch 'openstreetmap/pull/1348'
Tom Hughes [Sat, 29 Oct 2016 15:26:16 +0000 (16:26 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1348'

8 years agoAvoid double-escaping diary entry titles
Andy Allan [Sat, 29 Oct 2016 14:54:42 +0000 (16:54 +0200)]
Avoid double-escaping diary entry titles

The XML builder takes care of the escaping, and adding h() lead to
double-escaped titles in the RSS feed.

8 years agoUse dc:creator for note RSS feeds
Andy Allan [Sat, 29 Oct 2016 15:14:56 +0000 (17:14 +0200)]
Use dc:creator for note RSS feeds

The author tag is reserved for email addresses

8 years agoUse dc:creator for diary entry RSS
Andy Allan [Sat, 29 Oct 2016 15:10:21 +0000 (17:10 +0200)]
Use dc:creator for diary entry RSS

The author tag is reserved for email addresses, and we already use
dc:creator in other feeds.

8 years agoUse a full url for the image in the diary rss feed.
Andy Allan [Sat, 29 Oct 2016 15:08:16 +0000 (17:08 +0200)]
Use a full url for the image in the diary rss feed.

Picked up by a validator, see
https://validator.w3.org/feed/docs/error/InvalidFullLink.html

8 years agoMake the image title match the feed title in diary rss
Andy Allan [Sat, 29 Oct 2016 15:05:30 +0000 (17:05 +0200)]
Make the image title match the feed title in diary rss

This is recommended at https://validator.w3.org/feed/docs/warning/ImageTitleDoesntMatch.html

8 years agoRequire user_roles fixtures
Tom Hughes [Thu, 27 Oct 2016 11:15:28 +0000 (12:15 +0100)]
Require user_roles fixtures

8 years agoUpdate mailmap
Tom Hughes [Thu, 27 Oct 2016 10:57:32 +0000 (11:57 +0100)]
Update mailmap

8 years agoMerge remote-tracking branch 'openstreetmap/pull/1344'
Tom Hughes [Thu, 27 Oct 2016 10:51:36 +0000 (11:51 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1344'

8 years agoEnsure IE/Edge compatibility for routing drag&drop
Mormegil [Thu, 27 Oct 2016 10:34:07 +0000 (12:34 +0200)]
Ensure IE/Edge compatibility for routing drag&drop

Use the DataTransfer interface properly, using the `text` format, as
IE/Edge does not support much more. We can JSON-serialize anything
there, even though right now, only a single string would be enough.

Also, IE does not support .setDragImage, so check for support prior
to calling.

Fixes #1343

8 years agoReset database before running tests
Tom Hughes [Wed, 26 Oct 2016 20:34:38 +0000 (21:34 +0100)]
Reset database before running tests

8 years agoMerge remote-tracking branch 'openstreetmap/pull/1339'
Tom Hughes [Wed, 26 Oct 2016 14:54:42 +0000 (15:54 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1339'

8 years agoMerge remote-tracking branch 'openstreetmap/pull/1338'
Tom Hughes [Wed, 26 Oct 2016 14:48:56 +0000 (15:48 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1338'

8 years agoMerge remote-tracking branch 'openstreetmap/pull/1337'
Tom Hughes [Wed, 26 Oct 2016 14:41:30 +0000 (15:41 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1337'

8 years agoMerge remote-tracking branch 'openstreetmap/pull/1336'
Tom Hughes [Wed, 26 Oct 2016 14:35:18 +0000 (15:35 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1336'

8 years agoMerge remote-tracking branch 'openstreetmap/pull/1335'
Tom Hughes [Wed, 26 Oct 2016 14:34:49 +0000 (15:34 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1335'

8 years agoConvert the languages fixtures to a factory
Andy Allan [Wed, 26 Oct 2016 12:14:52 +0000 (13:14 +0100)]
Convert the languages fixtures to a factory

For some tests, the existance of an 'en' language is assumed by
the database structure (not null default 'en'::character varying) so
this can be created in a setup block.

8 years agoReplace messages fixtures with a factory.
Andy Allan [Wed, 26 Oct 2016 10:41:18 +0000 (11:41 +0100)]
Replace messages fixtures with a factory.

8 years agoSuppress XML parsing errors.
Andy Allan [Wed, 26 Oct 2016 09:35:03 +0000 (10:35 +0100)]
Suppress XML parsing errors.

This technique was already used in app/models/changeset.rb

This suppresses the error messages when parsing invalid XML, but
the exceptions are still raised, as tested in test_from_xml_double_lat
in test/models/node_test.rb

8 years agoReplace user_preferences fixture with a factory.
Andy Allan [Wed, 26 Oct 2016 09:07:49 +0000 (10:07 +0100)]
Replace user_preferences fixture with a factory.

8 years agoReplace hardcoded user id with a reference to the relevant user fixture
Andy Allan [Wed, 26 Oct 2016 08:57:31 +0000 (09:57 +0100)]
Replace hardcoded user id with a reference to the relevant user fixture

This makes it easier to figure out what the 1 refers to.

8 years agoConvert ACL fixture to a factory, and add some tests
Andy Allan [Wed, 26 Oct 2016 08:15:56 +0000 (09:15 +0100)]
Convert ACL fixture to a factory, and add some tests

The fixture was unused, so I took the opportunity to put in a couple
of basic model tests.

8 years agoKeep layer labels on top of the tiles in the layer switcher
Tom Hughes [Fri, 21 Oct 2016 14:23:37 +0000 (15:23 +0100)]
Keep layer labels on top of the tiles in the layer switcher

Fixes #1334

8 years agoUpdate bundle
Tom Hughes [Fri, 21 Oct 2016 08:19:12 +0000 (09:19 +0100)]
Update bundle

8 years agoFix rubocop warnings
Tom Hughes [Thu, 20 Oct 2016 21:00:56 +0000 (22:00 +0100)]
Fix rubocop warnings

8 years agoReplace quova with support for local Maxmind GeoIP lookups
Tom Hughes [Thu, 20 Oct 2016 20:32:43 +0000 (21:32 +0100)]
Replace quova with support for local Maxmind GeoIP lookups

8 years agoMerge remote-tracking branch 'openstreetmap/pull/1332'
Tom Hughes [Wed, 19 Oct 2016 11:22:42 +0000 (12:22 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1332'

8 years agoLoad user and language fixtures for diary model tests
Tom Hughes [Wed, 19 Oct 2016 11:17:20 +0000 (12:17 +0100)]
Load user and language fixtures for diary model tests

8 years agoUpdate schema
Tom Hughes [Wed, 19 Oct 2016 10:58:08 +0000 (11:58 +0100)]
Update schema

8 years agoMerge remote-tracking branch 'openstreetmap/pull/1331'
Tom Hughes [Wed, 19 Oct 2016 10:52:17 +0000 (11:52 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1331'

8 years agoMerge remote-tracking branch 'openstreetmap/pull/1330'
Tom Hughes [Wed, 19 Oct 2016 10:52:14 +0000 (11:52 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1330'

8 years agoRemove unused countries fixture.
Andy Allan [Wed, 19 Oct 2016 10:47:22 +0000 (11:47 +0100)]
Remove unused countries fixture.

8 years agoUse model relations when creating objects from factories
Andy Allan [Wed, 19 Oct 2016 10:32:08 +0000 (11:32 +0100)]
Use model relations when creating objects from factories

Rather than passing around record ids explicitly, we can use the
model relations and pass around the models. This makes reading the
tests slightly simpler to read.

8 years agoReplace user_blocks fixture with a factory.
Andy Allan [Wed, 19 Oct 2016 09:57:40 +0000 (10:57 +0100)]
Replace user_blocks fixture with a factory.

Traits are used here to make the tests easier to read, and the
different traits can be combined where necessary.

8 years agoReplace WordPress logo with correct version
Karim Osman [Tue, 18 Oct 2016 15:59:56 +0000 (17:59 +0200)]
Replace WordPress logo with correct version

See https://wordpress.org/about/logos/ for official source.

Closes #1329

8 years agoLocalisation updates from https://translatewiki.net.
Niklas Laxström [Mon, 17 Oct 2016 18:54:17 +0000 (20:54 +0200)]
Localisation updates from https://translatewiki.net.

8 years agoPatch classes on the locate control
Marco Antonio Frias Butrón [Sun, 16 Oct 2016 20:26:19 +0000 (16:26 -0400)]
Patch classes on the locate control

This patches the map on the user page in the same way as the main map.

Closes #1328

8 years agoAdd cursor style on close icon
Marco Antonio Frias Butrón [Sun, 16 Oct 2016 20:09:00 +0000 (16:09 -0400)]
Add cursor style on close icon

Without this the close icon for the routing panel doesn't change the
pointer as it isn't a link and isn't in a close-wrap container.

Closes #1327

8 years agoLocalisation updates from https://translatewiki.net.
Niklas Laxström [Thu, 13 Oct 2016 06:34:09 +0000 (08:34 +0200)]
Localisation updates from https://translatewiki.net.

8 years agoFix rubocop warning
Tom Hughes [Wed, 12 Oct 2016 18:28:10 +0000 (19:28 +0100)]
Fix rubocop warning

8 years agoMerge remote-tracking branch 'openstreetmap/pull/1309'
Tom Hughes [Wed, 12 Oct 2016 18:11:07 +0000 (19:11 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1309'

8 years agoMerge remote-tracking branch 'openstreetmap/pull/1322'
Tom Hughes [Wed, 12 Oct 2016 18:07:55 +0000 (19:07 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1322'

8 years agomerge upstream/master and resolve conflicts from https://github.com/openstreetmap...
Mikel Maron [Wed, 12 Oct 2016 14:52:05 +0000 (10:52 -0400)]
merge upstream/master and resolve conflicts from https://github.com/openstreetmap/openstreetmap-website/pull/1318

8 years agoReplace changeset_comments fixtures with a factory.
Andy Allan [Wed, 12 Oct 2016 14:43:54 +0000 (15:43 +0100)]
Replace changeset_comments fixtures with a factory.

There's little point in testing ChangesetComment.count so I've removed that
test.

8 years agoRemove reference to standard layer in "no key" message
Tom Hughes [Wed, 12 Oct 2016 14:06:03 +0000 (15:06 +0100)]
Remove reference to standard layer in "no key" message

Fixes #1319

8 years agoRemove unnecessary controller references from the redirect hashes.
Andy Allan [Wed, 12 Oct 2016 13:32:49 +0000 (14:32 +0100)]
Remove unnecessary controller references from the redirect hashes.

Rails redirect_to uses the current controller by default, so there
is no need to re-iterate this in the code when the redirect targets
the current controller.

The short-form is already used elsewhere, this just tidies up those
which were still using the long-form.

8 years agoUpdate structure.sql
Mikel Maron [Wed, 12 Oct 2016 01:22:00 +0000 (21:22 -0400)]
Update structure.sql

8 years agoadding back trailing newlines
Mikel Maron [Wed, 12 Oct 2016 00:45:44 +0000 (20:45 -0400)]
adding back trailing newlines

8 years agoadding back trailing newlines
Mikel Maron [Wed, 12 Oct 2016 00:44:58 +0000 (20:44 -0400)]
adding back trailing newlines

8 years agolast minor fixes
Mikel Maron [Wed, 12 Oct 2016 00:42:10 +0000 (20:42 -0400)]
last minor fixes

8 years agorubocop clean up
Mikel Maron [Tue, 11 Oct 2016 19:44:37 +0000 (15:44 -0400)]
rubocop clean up

8 years agobreak out author subscriptions to its own migration
Mikel Maron [Tue, 11 Oct 2016 01:18:03 +0000 (21:18 -0400)]
break out author subscriptions to its own migration

8 years agoAdd a note_with_comments factory
Tom Hughes [Mon, 10 Oct 2016 14:08:11 +0000 (15:08 +0100)]
Add a note_with_comments factory

8 years agoMakr author/author_ip tests more consistent
Tom Hughes [Mon, 10 Oct 2016 12:54:58 +0000 (13:54 +0100)]
Makr author/author_ip tests more consistent

8 years agoMerge remote-tracking branch 'openstreetmap/pull/1312'
Tom Hughes [Mon, 10 Oct 2016 12:48:09 +0000 (13:48 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1312'

8 years agoclean up comments
Mikel Maron [Fri, 7 Oct 2016 13:04:44 +0000 (09:04 -0400)]
clean up comments

8 years agofix rubocop warnings
Mikel Maron [Fri, 7 Oct 2016 10:36:14 +0000 (06:36 -0400)]
fix rubocop warnings

8 years agofix rubocop warnings
Mikel Maron [Fri, 7 Oct 2016 10:32:05 +0000 (06:32 -0400)]
fix rubocop warnings

8 years agocss in right place; fix structure.sql
Mikel Maron [Fri, 7 Oct 2016 01:47:29 +0000 (21:47 -0400)]
css in right place; fix structure.sql

8 years agotests passing
Mikel Maron [Fri, 7 Oct 2016 01:33:47 +0000 (21:33 -0400)]
tests passing

8 years agomore idiomatic models for diary entry subscriptions
Mikel Maron [Fri, 7 Oct 2016 00:31:10 +0000 (20:31 -0400)]
more idiomatic models for diary entry subscriptions

8 years agoRemove the note and note_comments fixtures
Andy Allan [Thu, 6 Oct 2016 08:17:58 +0000 (09:17 +0100)]
Remove the note and note_comments fixtures

You may need to run "DELETE FROM notes" and "DELETE FROM note_comments"
on your local test database.

8 years agoUpdate notes_controller_test to use note and note_comment factories
Andy Allan [Thu, 6 Oct 2016 08:15:47 +0000 (09:15 +0100)]
Update notes_controller_test to use note and note_comment factories

I've ported across the naming for each note from the old fixture names.
This helps in the mega-tests where multiple notes are tested at the
same time.

The number or results have changed in some tests, since there's little
point in creating e.g. 5 note comments when 2 is enough to test the
functionality.

8 years agoUpdate site_controller_test to use note and note_comment factories.
Andy Allan [Thu, 6 Oct 2016 08:04:06 +0000 (09:04 +0100)]
Update site_controller_test to use note and note_comment factories.

8 years agoUpdate browse_controller_test to use note and note_comment factories.
Andy Allan [Thu, 6 Oct 2016 08:03:31 +0000 (09:03 +0100)]
Update browse_controller_test to use note and note_comment factories.

8 years agoFix bugs->notes in comment
Andy Allan [Thu, 6 Oct 2016 07:59:24 +0000 (08:59 +0100)]
Fix bugs->notes in comment

8 years agoUpdate note model tests to use factories.
Andy Allan [Thu, 6 Oct 2016 07:56:45 +0000 (08:56 +0100)]
Update note model tests to use factories.

The NoteTest.test_visible? has changed slightly, so that the second
test of .visible? is using a closed note, which is a more useful test
than the original.

8 years agoAdd factories for notes and note_comments
Andy Allan [Thu, 6 Oct 2016 07:52:17 +0000 (08:52 +0100)]
Add factories for notes and note_comments

8 years agoLocalisation updates from https://translatewiki.net.
Niklas Laxström [Thu, 6 Oct 2016 06:14:08 +0000 (08:14 +0200)]
Localisation updates from https://translatewiki.net.

8 years agoReplace friends fixture with a factory
Andy Allan [Wed, 5 Oct 2016 12:18:45 +0000 (13:18 +0100)]
Replace friends fixture with a factory

8 years agonot api endpoints, moved to button, fixed notifier message, fixed tests
Mikel Maron [Tue, 4 Oct 2016 02:20:04 +0000 (22:20 -0400)]
not api endpoints, moved to button, fixed notifier message, fixed tests

8 years agoWIP diary comment subscriptions
Mikel Maron [Mon, 3 Oct 2016 19:04:22 +0000 (15:04 -0400)]
WIP diary comment subscriptions

8 years agoUpdate leaflet to 1.0.1
Tom Hughes [Fri, 30 Sep 2016 13:21:20 +0000 (14:21 +0100)]
Update leaflet to 1.0.1

8 years agoPatch classes on the locate control
Tom Hughes [Fri, 30 Sep 2016 10:15:18 +0000 (11:15 +0100)]
Patch classes on the locate control

This replaces the patching of the vendored source that we had been
doing before and which we always forget to apply after updating it.

Fixes #1306

8 years agoRemove z-index override from leaflet controls on small screens
Tom Hughes [Fri, 30 Sep 2016 08:03:24 +0000 (09:03 +0100)]
Remove z-index override from leaflet controls on small screens

Fixes #1305

8 years agoPatch leaflet-locationfilter for leaflet 1.x support
Tom Hughes [Tue, 27 Sep 2016 17:15:17 +0000 (18:15 +0100)]
Patch leaflet-locationfilter for leaflet 1.x support

https://github.com/kajic/leaflet-locationfilter/issues/22
https://github.com/kajic/leaflet-locationfilter/pull/23

8 years agoUpdate leaflet to 1.0.0
Tom Hughes [Tue, 27 Sep 2016 17:14:32 +0000 (18:14 +0100)]
Update leaflet to 1.0.0

8 years agoLocalisation updates from https://translatewiki.net.
Niklas Laxström [Thu, 29 Sep 2016 06:03:12 +0000 (08:03 +0200)]
Localisation updates from https://translatewiki.net.

8 years agoExtend donation drive banner end date to 2016-oct-31
Bryan Housel [Wed, 28 Sep 2016 15:18:32 +0000 (11:18 -0400)]
Extend donation drive banner end date to 2016-oct-31

8 years agoLocalisation updates from https://translatewiki.net.
Niklas Laxström [Tue, 27 Sep 2016 12:28:28 +0000 (14:28 +0200)]
Localisation updates from https://translatewiki.net.

8 years agoMerge remote-tracking branch 'openstreetmap/pull/1298'
Tom Hughes [Mon, 26 Sep 2016 11:40:01 +0000 (12:40 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1298'

8 years agoFix rubocop warnings
Tom Hughes [Mon, 26 Sep 2016 11:38:54 +0000 (12:38 +0100)]
Fix rubocop warnings

8 years agoCentre loading icon
Tom Hughes [Mon, 26 Sep 2016 11:33:37 +0000 (12:33 +0100)]
Centre loading icon

8 years agoAdd links to new approved OSMF privacy policy and some rewording.
Simon Poole [Mon, 26 Sep 2016 11:16:31 +0000 (13:16 +0200)]
Add links to new approved OSMF privacy policy and some rewording.

8 years agolook for extra place tags in Nominatim search results
Sarah Hoffmann [Mon, 26 Sep 2016 10:08:42 +0000 (12:08 +0200)]
look for extra place tags in Nominatim search results

Administrative boundaries at municipality level are generally
better described by the place node (as town, village etc.).
Nominatim exports the place type in extratags if it was able
to merge place nodes with admin boundaries. Use this preferably
to create the descriptive term.

8 years agoRemove SOTM 2016 banner, add Donation Drive 2016 Banner
Bryan Housel [Mon, 26 Sep 2016 02:58:25 +0000 (22:58 -0400)]
Remove SOTM 2016 banner, add Donation Drive 2016 Banner

8 years agoLocalisation updates from https://translatewiki.net.
Niklas Laxström [Thu, 22 Sep 2016 05:57:05 +0000 (07:57 +0200)]
Localisation updates from https://translatewiki.net.

8 years agoAdd thunderforest API key to embedded maps
Tom Hughes [Wed, 21 Sep 2016 19:04:15 +0000 (20:04 +0100)]
Add thunderforest API key to embedded maps

Fixes #1293

8 years agoFix some rubocop warnings
Tom Hughes [Thu, 15 Sep 2016 21:41:07 +0000 (22:41 +0100)]
Fix some rubocop warnings

8 years agoUpdate to rails 4.2.7.1
Tom Hughes [Thu, 15 Sep 2016 21:26:48 +0000 (22:26 +0100)]
Update to rails 4.2.7.1

8 years agoMerge remote-tracking branch 'openstreetmap/pull/1285'
Tom Hughes [Thu, 15 Sep 2016 18:21:21 +0000 (19:21 +0100)]
Merge remote-tracking branch 'openstreetmap/pull/1285'