Commit graph

204 commits

Author SHA1 Message Date
Tom Hughes
29cc21c599 Drop user tokens table 2024-02-28 21:02:54 +00:00
Gregory Igelmund
efc61f1315 Add basic structures for UserMute and Message muting logic
Including models, migration, controllers, views & locales.
2023-12-19 12:57:47 -05:00
Andy Allan
c44e936bfb Remove normalisation of immutable keyword
This was no longer required after removing the database functions.
2023-12-06 13:59:58 +00:00
Andy Allan
791db6e892 Remove the references to plpgsql extension
This has been built-in since postgresql 9.0
2023-12-06 13:50:02 +00:00
Andy Allan
36045859af Remove the sequence type normalisation
This can mask important matters with the definition of sequences
2023-12-06 13:36:52 +00:00
Andy Allan
16d3c77427 Remove the timestamp normalisation
The precision of the timestamps is controlled in our migrations,
and so any mismatch should be marked as an error.

The ar_internal_metadata is not controlled, but is timestamp(6) for
rails 6.0+ installations, and so this won't fail in CI.
2023-12-06 13:36:52 +00:00
Andy Allan
4c77f9d780 Add comment for btree_gist to structure.sql
Refs #4298
2023-12-06 13:36:52 +00:00
Tom Hughes
675b89ddb7 Strengthen the tokens used in email reply addresses 2023-11-07 17:52:31 +00:00
Tom Hughes
55a05d9e80 Use secure_compare to compare passwords and tokens
It's unlikely there is an explotable attack here given than network
latencies and variability will swamp any local timing differences but
it's best practice and there's no reason not to.
2023-11-07 17:22:40 +00:00
Tom Hughes
f37ea2fae3 Update to rails 7.1.1 2023-10-18 18:26:13 +01:00
Tom Hughes
d238a90244 Merge remote-tracking branch 'upstream/pull/4053' 2023-05-31 18:38:10 +01:00
Tom Hughes
e9de1537f9 Merge remote-tracking branch 'upstream/pull/4052' 2023-05-31 18:37:23 +01:00
Andy Allan
d6d16dedb9 Simplify ruby installations
Refs #4048

* We don't currently need a specific version suffix on the package names,
  since ubuntu only ships with one ruby version (and newer versions on
  e.g. 23.04 are fine).
* We don't need to explicitly install libruby, since it's pulled in by
  other packages as required.
* Ubuntu again ships a decent enough version of bundler for our needs,
  so we don't need to install it via rubygems.
2023-05-31 17:55:53 +01:00
Andy Allan
7842c1f283 Use the db:create command for vagrant provisioning
This is to align with the INSTALL.md instructions
2023-05-31 16:09:14 +01:00
Andy Allan
75e3227508 Update vagrant provisioning for 22.04
Refs #4048

* geckodriver is now inside the firefox snap package
* the yarnpkg package is completely broken, see
  https://bugs.launchpad.net/ubuntu/+source/node-yarnpkg/+bug/2003697
2023-05-31 15:36:13 +01:00
Tom Hughes
6bb178a079 Normalise timestamp types for database structure comparison 2023-05-30 18:57:09 +01:00
Tom Hughes
ce256ee661 Merge remote-tracking branch 'upstream/pull/4023' 2023-04-26 18:19:52 +01:00
Andy Allan
7a85ce0c12 Use rails to migrate database for vagrant
This brings the vagrant provisioning script into line with the
installation notes, docker and CI.
2023-04-26 16:36:22 +01:00
Andy Allan
f4651f68e2 Remove apache packages from install instructions and vagrant provisioning
These are unnecessary for development environments, and are not used in
the Fedora instructions nor in the Dockerfile.
2023-04-26 14:23:57 +01:00
Andy Allan
581bf517cb Use bin/yarn consistently for installations
Since rails 7, the `rails yarn:install` command no longer uses
bin/yarn and so a) doesn't detect yarn binaries named "yarnpkg"
(e.g. Ubuntu) and b) doesn't allow us to pass any flags to yarn,
(e.g. "--ignore-engines").

Since we want to avoid making the installation more difficult (by
e.g. installing yarn from other sources, or requiring particular
node versions) we can instead just use our existing bin/yarn script.

The reason Dockerfile did its own thing was to avoid pulling in
big chunks of rails, but bin/yarn is a standalone ruby script.

Fixes #3579
2023-01-11 13:58:54 +00:00
mmd-osm
f40e1911fe update-wiki-pages: process KeyPrefixDescription template 2022-12-30 08:48:57 +01:00
mmd-osm
0b76b22a2b update-wiki-pages: adding retry and timeout 2022-12-28 16:16:49 +01:00
Andy Allan
479c1575e1 Remove tile_for_point SQL functions
This removes both the pl/pgsql version and the shared library version
of the `tile_for_point` SQL function. This function was only used in some
old migrations, and is not required for production usage.

Removing this function simplifies the installation and configuration for
new developers.

These SQL functions are separate from the `tile_for_point` ruby/C function
which is part of the quad_tile gem. This function is still used when
creating and updating database records.

Fixes #3110.
2022-12-07 17:22:50 +00:00
Tom Hughes
12c1d5e6c0 Merge remote-tracking branch 'upstream/pull/3126' 2022-12-03 10:59:14 +00:00
Grant Slater
a89b867495
Fix statistics script to use absolute links 2022-07-29 20:55:17 +03:00
Tom Hughes
9fe69b0b7f Teach database structure normalise to ignore btree_gist comment 2022-05-09 18:39:14 +01:00
Andy Allan
9809750401 Remove imagemagick from dependencies 2022-03-09 17:18:43 +00:00
Tom Hughes
ddb140f387 Switch to using vips for image processing 2022-03-02 19:44:56 +00:00
Tom Hughes
b5f06e06c1 Fix rubocop Rails/TimeZone warnings 2022-03-01 22:55:10 +00:00
Harry Wood
448fd1b3bd Fix vagrant storage.yml config
Tell vagrant to copy the example storage.yml config file into place as per INSTALL.md instructions. Allows the migrations to run.
2022-02-12 00:13:42 +00:00
Tom Hughes
81c3ebe03c Remove xid_to_int4 postgres function
Fixes #3288
2021-08-06 00:15:40 +01:00
Andy Allan
6c5c36deac Automatically enable the btree_gist extension
This simplifies the install instructions. Loading from structure.sql is already handled.
2021-03-10 18:24:36 +00:00
Fredrik
7917c1cc92
Escape characters 2021-02-17 21:53:04 +00:00
Fredrik
49e06f2f14
Update statistics 2021-02-17 21:32:38 +00:00
mmd-osm
4e6d729529 Remove /api/0.6/changes endpoint
Also removes sql functions which are only used by this endpoint
2021-02-03 14:06:34 +00:00
Tom Hughes
0654be27f9 Fix new rubocop warnings 2021-01-11 19:17:31 +00:00
Tom Hughes
efef67447b Add actions workflow to run tests 2020-12-09 22:07:40 +00:00
Tom Hughes
bfffe7ed96 Prefer string interpolation to concatenation 2020-11-13 11:32:28 +00:00
Andy Allan
8fb3aa48e2 Fix call to UserMailer in message delivery
Fixes #2895
2020-10-20 13:58:08 +02:00
Tom Hughes
c1c459734d Merge remote-tracking branch 'upstream/pull/2864' 2020-10-01 08:57:36 +01:00
Andy Allan
865d20af80 Use the db:seed task to load languages
This is seed data that should reasonably be loaded into every database,
even those that are otherwise empty (e.g. no geo data). Using the seeds
process means that it will usually be loaded by default, and is easier
to find for existing rails developers.
2020-09-30 15:09:49 +02:00
Andy Allan
76f141fbd5 Remove unused locale scripts
We no longer need these scripts, given our current translatewiki workflows
2020-09-30 13:17:43 +02:00
Tom Hughes
e9483dcc5d Attempt to modernise vagrant configuration 2020-08-25 20:57:50 +01:00
Tom Hughes
93c15f377a Extend cleanup script to cleanup old OAuth tokens 2020-08-22 16:15:09 +01:00
Tom Hughes
abca51e4d8 Fix some Style/StringConcatenation warnings 2020-08-09 19:48:16 +01:00
Tom Hughes
f721f94d42 Ignore emails from inactive users
Fixes #2758
2020-08-07 17:19:49 +01:00
Tom Hughes
ea59d95f4a Fix some new rubocop warnings 2020-08-06 22:27:30 +01:00
Tom Hughes
0e2a66e8de Fix new rubocop warnings 2020-08-06 18:42:16 +01:00
Andy Allan
46c3e70ec6 Remove some unused scripts 2020-06-03 16:15:24 +02:00
Tom Hughes
a7781f62cf Update vagrant provision script for switch to selenium 2020-04-22 16:44:53 +01:00