Tom Hughes
cebb05a3ba
Merge remote-tracking branch 'upstream/pull/2187'
2019-03-27 10:38:46 +00:00
Andy Allan
0e09252840
Check validity token in changesets controller
...
It makes no difference today, but prevents problems in future if
methods accepting post requests are added to this controller in future.
2019-03-27 11:24:31 +01:00
Andy Allan
3834ed45e6
erblint: avoid parentheses for method calls with no arguments
2019-03-27 10:59:10 +01:00
Andy Allan
6d0100b91d
erblint: prefer double quoted strings
2019-03-27 10:57:00 +01:00
Andy Allan
e22266f8c4
Exclude most views from string literal checks
...
This allows us to work through them slowly, while preventing errors
from creeping into directories that already pass.
2019-03-27 10:42:16 +01:00
Andy Allan
74b91c0e3e
erblint: Add or remove curly braces around hash parameters as required
2019-03-27 10:30:48 +01:00
Andy Allan
040c0184a4
erblint: use hash rocket syntax
2019-03-27 10:03:56 +01:00
Tom Hughes
c82fdf8e0f
Merge remote-tracking branch 'upstream/pull/2168'
2019-03-26 21:11:51 +00:00
Tom Hughes
71c5cb21c5
Exclude files in the vendor directory from erb-lint rubocop checks
2019-03-26 20:52:43 +00:00
Tom Hughes
4adc6680ee
Fix capitalisation of div tag
2019-03-26 20:52:43 +00:00
Andy Allan
227e1b134d
Update coding style section of the contribution guide to describe our use of rubocop and erblint
2019-03-26 20:52:43 +00:00
Andy Allan
ce8c388deb
Add erblint to travis
2019-03-26 20:52:43 +00:00
Andy Allan
d6a2515cb0
Introduce erb-lint for linting erb files
...
This also allows running rubocop on the ruby code within the erb
files.
2019-03-26 20:52:43 +00:00
Andy Allan
4dd0a74a3b
Whitespace fixes to various erb files
2019-03-26 20:23:35 +00:00
Andy Allan
c703a3d1a7
Whitespace fixes for messages erb files
2019-03-26 20:23:35 +00:00
Andy Allan
9077419ca8
Whitespace fixes for layouts erb files
2019-03-26 20:23:35 +00:00
Andy Allan
0625c1effb
Whitespace fixes for diary_entry erb files
2019-03-26 20:23:35 +00:00
Andy Allan
3c410bcd7e
Whitespace fixes for browse erb files
2019-03-26 20:23:35 +00:00
Andy Allan
df49529237
Whitespace fixes for errors erb files
2019-03-26 20:23:35 +00:00
Andy Allan
e3470746bf
Whitespace fixes for oauth_clients erb files
2019-03-26 20:23:35 +00:00
Andy Allan
84bdc5d048
Whitespace fixes for issues erb files
2019-03-26 20:23:35 +00:00
Andy Allan
5029db24fa
Whitespace fixes for users erb files
2019-03-26 20:23:35 +00:00
Andy Allan
aa9e9a5eb1
Whitespace fixes for user_blocks erb files
2019-03-26 20:23:35 +00:00
Andy Allan
68a5aa5ed8
Whitespace fixes for notifier erb views
2019-03-26 20:23:35 +00:00
Andy Allan
38cfc35eb2
Whitespace fixes for site erb files
2019-03-26 20:23:35 +00:00
Andy Allan
bbd44f8099
Whitespace fixes in traces erb files
2019-03-26 20:23:35 +00:00
Tom Hughes
9afcf14dfa
Prefer String#match? over butt ugly Regexp#match?
2019-03-26 20:23:35 +00:00
Tom Hughes
5a5aa5f880
Target ruby 2.5.1 to match Ubuntu
2019-03-26 20:23:35 +00:00
Andy Allan
773ef195d4
Rubocop fixes for ruby 2.5
2019-03-26 20:23:35 +00:00
Andy Allan
3eb6d15db1
Upgrade minimum version of ruby to 2.5
...
This prepares the way for gems that depend on newer ruby, and also
prepares for the rails 6 upgrade.
2019-03-26 20:23:35 +00:00
Tom Hughes
dcfe326f65
Merge remote-tracking branch 'upstream/pull/2175'
2019-03-26 19:14:04 +00:00
Tom Hughes
d6af4450d1
Prefer String#match? over butt ugly Regexp#match?
2019-03-26 19:12:18 +00:00
Tom Hughes
f4c761a0ed
Target ruby 2.5.1 to match Ubuntu
2019-03-26 19:08:36 +00:00
translatewiki.net
9a1728c202
Localisation updates from https://translatewiki.net .
2019-03-25 19:07:09 +01:00
Tom Hughes
6e3aaea877
Queue trace related jobs in the traces queue
2019-03-24 17:08:57 +00:00
Tom Hughes
37f8f8a28c
Merge remote-tracking branch 'upstream/pull/2131'
2019-03-23 12:08:41 +00:00
Tom Hughes
951564eed1
Merge remote-tracking branch 'upstream/pull/2186'
2019-03-23 12:01:05 +00:00
Tom Hughes
cba7945a5b
Use strings consistently for database/api/gpx status
2019-03-23 11:59:42 +00:00
translatewiki.net
591abd4358
Localisation updates from https://translatewiki.net .
2019-03-21 11:04:08 +01:00
Andy Allan
19c2f6d485
Move more api-only methods into api_controller
2019-03-20 15:08:36 +01:00
Andy Allan
8d207e7de0
Mark all methods in api_controller and application_controller as private
...
They aren't designed to be used as request endpoints, so there's no
need for them to be public.
2019-03-20 15:08:36 +01:00
Andy Allan
dad36f2fca
Use a lambda in order to pass parameters in before_actions
...
This avoid calling methods on a new instance of the controller, and
therefore allows these methods to be marked as private.
As a bonus, rubocop can now parse them and warn when they refer to
actions that don't exist in the controller.
2019-03-20 15:08:36 +01:00
Andy Allan
94d19ae567
Move the authorize method to api_controller
2019-03-20 14:39:17 +01:00
Andy Allan
742291a840
Simplify deny_access handling
...
Now that we have all api controllers inheriting from a common base,
it's easier to override the deny_access handler without having to
switch between both.
Fixes #2064
2019-03-20 14:39:17 +01:00
Andy Allan
3bb07e29ec
Refactor api controllers to inherit from a common ApiController
2019-03-20 14:16:15 +01:00
Andy Allan
c1bf73bee4
Use an enumerator for gpx.points, and process the the points in batches
2019-03-20 10:35:40 +01:00
Andy Allan
07fdcf638e
Raise exception if there is an error, and import tracepoints in batches
2019-03-20 10:35:40 +01:00
Andy Allan
400db58036
Use activerecord-import for bulk importing tracepoint records
...
Non-rigourous testing shows a significant speedup, even on ssds.
2019-03-20 10:35:40 +01:00
Tom Hughes
53cc1d2d11
Fix travis
2019-03-19 14:08:43 +00:00
Tom Hughes
7ccd11ebf3
Merge remote-tracking branch 'upstream/pull/2182'
2019-03-19 13:29:49 +00:00