Commit graph

9243 commits

Author SHA1 Message Date
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
Michael Reichert
aae6a787e5 Add banner against EU Copyright Directive
Set end date to 2019-03-26 because the topic is tabled on 26 March
according to the agenda.
2019-03-18 22:39:10 +01:00
translatewiki.net
793c9364c5 Localisation updates from https://translatewiki.net. 2019-03-18 08:57:33 +01:00
Tom Hughes
e7ab3de654 Move application.yml check to config initializer 2019-03-17 11:15:34 +00:00
Tom Hughes
141df02e67 Move status into the settings object
Only the very early boot code needs to look at the value
from the environment directly.
2019-03-17 11:15:34 +00:00
Tom Hughes
6600221fe3 Fix database offline mode 2019-03-17 11:15:34 +00:00
Tom Hughes
165aa0fa61 Sort gitignore 2019-03-16 15:41:35 +00:00
Tom Hughes
fafbb5e688 Add comment 2019-03-16 15:40:23 +00:00
Tom Hughes
e3ed9988ce Merge remote-tracking branch 'upstream/pull/2177' 2019-03-16 15:39:03 +00:00
Tom Hughes
874fddf499 Merge remote-tracking branch 'upstream/pull/2164' 2019-03-16 15:31:29 +00:00
Andy Allan
d98683abfb Rubocop fix 2019-03-16 15:30:41 +00:00
Andy Allan
987398ad2a Rubocop fixes 2019-03-16 15:30:41 +00:00
Andy Allan
656ed0af76 Move changeset builder views to the api namespace 2019-03-16 15:30:41 +00:00
Frederik Ramm
538bfed8a6 Move changeset XML generation to a view 2019-03-16 15:30:18 +00:00
Tom Hughes
6547ac26f5 Add missing dependency 2019-03-15 10:44:16 +00:00
Tom Hughes
9695cc8535 Add missing dependencies 2019-03-15 10:18:29 +00:00
Tom Hughes
370573c165 Update to rails 5.2.2.1 2019-03-15 09:30:17 +00:00
Tom Hughes
3799e8034e Update bundle 2019-03-15 09:27:38 +00:00
Tom Hughes
8949737692 Add Spanish attribution to copyright page
Fixes #2179
2019-03-15 09:17:52 +00:00
translatewiki.net
8d3b0b79ef Localisation updates from https://translatewiki.net. 2019-03-14 13:14:50 +01:00
Andy Allan
25d89a63cb Remove application.yml step from travis config 2019-03-13 18:41:57 +01:00
Andy Allan
fd47078b14 Provide a helpful warning if there's an application.yml file detected 2019-03-13 18:20:08 +01:00
Andy Allan
7d57fb8c28 Add some settings validations 2019-03-13 18:06:23 +01:00
Andy Allan
e1cacdbe0e Update documentation for new approach to settings 2019-03-13 18:06:23 +01:00
Andy Allan
b3e74b0650 Instruct sprockets to recompile this file based on the settings files changing 2019-03-13 18:06:23 +01:00
Andy Allan
9af31c2254 Only take the STATUS configuration from the environment
This allows us to remove the preinitializer-based configuration parsing.
2019-03-13 18:06:23 +01:00
Andy Allan
5eef38a6b6 Drop the old environment variable parsing
It's likely unused, and incompatible with environment variable parsing from Config
2019-03-13 18:06:23 +01:00
Andy Allan
d102c9aaf4 Move all settings to settings.yml
We leave the STATUS setting alone, since it's required before rails
boots. The test-specific settings now live in config/settings/test.yml
2019-03-13 18:06:23 +01:00
Andy Allan
7b08270526 Install config gem for settings management 2019-03-13 18:06:23 +01:00
Andy Allan
1ca77d6dda Rubocop fixes for ruby 2.5 2019-03-13 10:33:33 +01:00
Andy Allan
f28e236bdd 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-13 10:28:50 +01:00
translatewiki.net
e01a0e7124 Localisation updates from https://translatewiki.net. 2019-03-11 11:29:31 +01:00
Tom Hughes
7ccf6964e3 Prevent leading and trailing whitespace on email addresses 2019-03-08 11:17:51 +00:00
Tom Hughes
e174eb762f Strip leading and trailing whitespace for email authentication
Fixes #2173
2019-03-08 10:59:57 +00:00
translatewiki.net
b7834aa827 Localisation updates from https://translatewiki.net. 2019-03-07 16:23:12 +01:00
Tom Hughes
be0e33862f Merge remote-tracking branch 'upstream/pull/2167' 2019-03-06 17:23:46 +00:00
Andy Allan
2c21dd4906 Silence the simplecov output message
It's very rare for the information in this message to be useful or
actionable when running the tests, so it's best to silence the message.
2019-03-06 09:54:05 +01:00
Richard Fairhurst
bd79c197cc
Update OS copyright year 2019-02-28 21:44:44 +00:00