Sone.git
2 years ago💚 Declare output for “writeVersion” task
David ‘Bombe’ Roden [Fri, 26 Aug 2022 09:55:30 +0000 (11:55 +0200)]
💚 Declare output for “writeVersion” task

2 years ago🐛 🐛 Fix too-long URLs on pages with mane unloaded elements
David ‘Bombe’ Roden [Fri, 26 Aug 2022 09:55:16 +0000 (11:55 +0200)]
🐛 🐛 Fix too-long URLs on pages with mane unloaded elements

All the URLs were collected into a single URL for a GET requests and browsers
and servers may not like it that long.

2 years ago👷 Update Gradle to 7.5
David ‘Bombe’ Roden [Sun, 24 Jul 2022 12:22:46 +0000 (14:22 +0200)]
👷 Update Gradle to 7.5

2 years ago✅ Fix tests failing with non-English locales
David ‘Bombe’ Roden [Sat, 23 Jul 2022 21:57:33 +0000 (23:57 +0200)]
✅ Fix tests failing with non-English locales

For most of the tests it was sufficient to use the OverrideLocale TestRule added in the previous commit but in one case the creation of a date formatter needed to be delayed so that it uses the update locale during the test.

2 years ago✅ Add JUnit Rule to override locales during tests
David ‘Bombe’ Roden [Sat, 23 Jul 2022 21:24:13 +0000 (23:24 +0200)]
✅ Add JUnit Rule to override locales during tests

Some tests fail when run with a non-English locale. This was found by debbiedub (see https://github.com/Bombe/Sone/pull/23) but their proposed solution was not quite to my liking.

This TestRule will store the JVM’s current default locale and set a custom locale before running a test. After the test the previous locale will be restored, in order not to mess up any other tests.

2 years ago👷 Remove FindBugs plugin
David ‘Bombe’ Roden [Sat, 16 Apr 2022 11:51:11 +0000 (13:51 +0200)]
👷 Remove FindBugs plugin

It cannot handle Kotlin and it will not be getting any upgrades. It also
prevents me from updating Gradle so it has to go. It will probably be replaced
by detekt once Gradle has been updated.

2 years ago✅ Fix failing memory database test
David ‘Bombe’ Roden [Sat, 16 Apr 2022 11:45:52 +0000 (13:45 +0200)]
✅ Fix failing memory database test

The test failed because of timing issues with the rate limiter when saving post
replies. The first part of the fix is to inject the rate limiter in the
constructor. The second part would be to create a special rate limiter that
only ever lets the first request pass and not the second one but for now a rate
limit of 1 element per 1000 seconds should be enough, even for the slowest
tests… unless it isn’t.

There are other rate limiters in the memory database which can cause other
tests to fail at random times in the future. Those will be left as an exercise
for another day.

3 years agoFix test names that cause problems on Windows
David ‘Bombe’ Roden [Mon, 27 Sep 2021 14:48:03 +0000 (16:48 +0200)]
Fix test names that cause problems on Windows

I think I already complained about nobody ever compiling Sone on Windows
before, didn't I? Yes, I think I did.

3 years agoImprove names of startup-related tests
David ‘Bombe’ Roden [Mon, 27 Sep 2021 14:08:29 +0000 (16:08 +0200)]
Improve names of startup-related tests

Because honestly, what does "new config" even mean? Nobody knows unless
they also know the implementation (which ties a boolean value to an
annotation named "NewConfig") so stating clearly in which scenarios the
tests are running is preferrable. Like, by A LOT.

3 years agoUpdate Kotlin to latest 1.4
David ‘Bombe’ Roden [Mon, 27 Sep 2021 13:24:10 +0000 (15:24 +0200)]
Update Kotlin to latest 1.4

Somehow JetBrains keeps releasing new versions of Kotlin whenever I take
a step back for a week (or a year :D) so I have to keep updating this.

3 years agoFix incorrect comparison
David ‘Bombe’ Roden [Mon, 27 Sep 2021 12:34:26 +0000 (14:34 +0200)]
Fix incorrect comparison

The result of Object.equals(Object) will _always_ be non-null because a
primitive is always non-null. So once we use the correct method to check
the result of the equals call everything will be fine.

3 years agoReplace image implementation test with Kotlin version
David ‘Bombe’ Roden [Mon, 27 Sep 2021 12:34:03 +0000 (14:34 +0200)]
Replace image implementation test with Kotlin version

3 years agoMerge branch 'update/java-11-lts' into next
David ‘Bombe’ Roden [Mon, 27 Sep 2021 11:30:44 +0000 (13:30 +0200)]
Merge branch 'update/java-11-lts' into next

3 years agoMake test work with Java 8, too
David ‘Bombe’ Roden [Mon, 27 Sep 2021 11:03:39 +0000 (13:03 +0200)]
Make test work with Java 8, too

Because the Files.writeString method was only added in Java 11 but I
still want Sone to be compilable and runnable with Java 8 because
a) it's what I still use (yes, I'm proper ashamed) and b) it's probably
what many other people still use as long as Freenet doesn't bundle its
own Java (which it really should).

3 years agoFix test so it runs on Windows, too
David ‘Bombe’ Roden [Mon, 27 Sep 2021 09:36:28 +0000 (11:36 +0200)]
Fix test so it runs on Windows, too

This also means that nobody ever tried to compile Sone on Windows. I
mean, I know that _I_ didn't do it but seeing that apparently nobody
else in the whole wide world has done it kinda makes me sad. Anyway,
it's a simple fix.

3 years agoFix ambiguous import for Module
David ‘Bombe’ Roden [Mon, 27 Sep 2021 09:36:15 +0000 (11:36 +0200)]
Fix ambiguous import for Module

And this is the reason why everybody should be using single-class
imports and star imports should be avoided. The Module class (or
interface?) was added in Java 9 because of the whole module business and
now the star imports are suddenly ambiguous. Lesson learned!

3 years ago🐛 Restore ability to change languages on-the-fly
David ‘Bombe’ Roden [Sun, 6 Jun 2021 09:13:13 +0000 (11:13 +0200)]
🐛 Restore ability to change languages on-the-fly

Hieronymus (sone://-wFZ6ezwU3QgvM1u8~uiLbtjxSQ19tuqn4Q94lvTrwE) noticed that
changing the language in Fred’s web interface didn’t change Sone’s language
anymore.

Part of my (ongoing) restructuring of Sone’s source code is abstracting away
all the parts that are hard to test, i.e. every interaction with Freenet
itself and the translation mechanisms are a part of that. So when I introduced
a Translation object I completely forgot that it’s possible to change the
language during runtime.

Luckily that is easily solvable using a Supplier instead of the concrete
BaseL10n object. In theory that does have a performance impact (because now
there are at least two more function calls involved per translation) but I am
quite confident that the additional time actually used by this is far below
the 1-ms range so I am not worried about it.

4 years ago🔥 Remove unused method from identity loader
David ‘Bombe’ Roden [Sun, 18 Oct 2020 13:21:45 +0000 (15:21 +0200)]
🔥 Remove unused method from identity loader

4 years ago💄 Try to undo Fred’s CSS mess
David ‘Bombe’ Roden [Wed, 19 Aug 2020 17:19:42 +0000 (19:19 +0200)]
💄 Try to undo Fred’s CSS mess

4 years ago🚚 Move shells closer to the interfaces
David ‘Bombe’ Roden [Sat, 8 Aug 2020 20:30:18 +0000 (22:30 +0200)]
🚚 Move shells closer to the interfaces

4 years ago🎨 Store shells instead of full posts in in-memory database
David ‘Bombe’ Roden [Thu, 6 Aug 2020 20:03:35 +0000 (22:03 +0200)]
🎨 Store shells instead of full posts in in-memory database

4 years ago🎨 Replace test post builder with Kotlin version
David ‘Bombe’ Roden [Thu, 6 Aug 2020 18:57:08 +0000 (20:57 +0200)]
🎨 Replace test post builder with Kotlin version

4 years ago🎨 Replace in-memory post with Kotlin version
David ‘Bombe’ Roden [Thu, 6 Aug 2020 18:28:46 +0000 (20:28 +0200)]
🎨 Replace in-memory post with Kotlin version

4 years ago🌐 Mention that WoT takes time to create identities
David ‘Bombe’ Roden [Thu, 6 Aug 2020 11:59:02 +0000 (13:59 +0200)]
🌐 Mention that WoT takes time to create identities

4 years ago🎨 Specify types of locks explicitely
David ‘Bombe’ Roden [Wed, 5 Aug 2020 20:28:15 +0000 (22:28 +0200)]
🎨 Specify types of locks explicitely

4 years ago⚡️ Use shell to store reply data
David ‘Bombe’ Roden [Wed, 5 Aug 2020 20:22:51 +0000 (22:22 +0200)]
⚡️ Use shell to store reply data

4 years ago🎨 Replace in-memory post reply with Kotlin version
David ‘Bombe’ Roden [Wed, 5 Aug 2020 20:04:51 +0000 (22:04 +0200)]
🎨 Replace in-memory post reply with Kotlin version

4 years ago🐛 Fix NPE during Sone removal
David ‘Bombe’ Roden [Wed, 29 Jul 2020 22:12:13 +0000 (00:12 +0200)]
🐛 Fix NPE during Sone removal

4 years ago✅ Rewrite test to not use mocks
David ‘Bombe’ Roden [Mon, 27 Jul 2020 22:34:49 +0000 (00:34 +0200)]
✅ Rewrite test to not use mocks

4 years ago✅ Use dummy WOT connector for identity loader test
David ‘Bombe’ Roden [Mon, 27 Jul 2020 20:34:42 +0000 (22:34 +0200)]
✅ Use dummy WOT connector for identity loader test

4 years ago✅ Rewrite test without using mocks
David ‘Bombe’ Roden [Mon, 27 Jul 2020 20:14:13 +0000 (22:14 +0200)]
✅ Rewrite test without using mocks

4 years ago🎨 Remove template context factory from web interface API
David ‘Bombe’ Roden [Thu, 2 Jul 2020 17:09:04 +0000 (19:09 +0200)]
🎨 Remove template context factory from web interface API

4 years ago🚚 Move new elements mock to test objects
David ‘Bombe’ Roden [Wed, 1 Jul 2020 20:13:57 +0000 (22:13 +0200)]
🚚 Move new elements mock to test objects

4 years ago🔥 Remove methods from web interface
David ‘Bombe’ Roden [Wed, 1 Jul 2020 20:10:48 +0000 (22:10 +0200)]
🔥 Remove methods from web interface

4 years ago🎨 Use new elements container in AJAX pages
David ‘Bombe’ Roden [Wed, 1 Jul 2020 20:07:15 +0000 (22:07 +0200)]
🎨 Use new elements container in AJAX pages

4 years ago🎨 Add container for new posts/replies
David ‘Bombe’ Roden [Wed, 1 Jul 2020 19:22:03 +0000 (21:22 +0200)]
🎨 Add container for new posts/replies

4 years ago🚚 Rename test for list notification filter
David ‘Bombe’ Roden [Wed, 1 Jul 2020 16:57:17 +0000 (18:57 +0200)]
🚚 Rename test for list notification filter

4 years ago♻️ Extract interface for list notification filter
David ‘Bombe’ Roden [Wed, 1 Jul 2020 16:56:14 +0000 (18:56 +0200)]
♻️ Extract interface for list notification filter

4 years ago🚚 Rename test to match name of tested class
David ‘Bombe’ Roden [Sun, 28 Jun 2020 22:11:37 +0000 (00:11 +0200)]
🚚 Rename test to match name of tested class

4 years ago🎨 Clean up imports
David ‘Bombe’ Roden [Sun, 28 Jun 2020 22:11:12 +0000 (00:11 +0200)]
🎨 Clean up imports

4 years ago🎨 Replace list notification filter with Kotlin version
David ‘Bombe’ Roden [Sun, 28 Jun 2020 22:10:43 +0000 (00:10 +0200)]
🎨 Replace list notification filter with Kotlin version

4 years ago🎨 Use Kotlin arrow type instead of Predicate
David ‘Bombe’ Roden [Sun, 28 Jun 2020 19:51:19 +0000 (21:51 +0200)]
🎨 Use Kotlin arrow type instead of Predicate

4 years ago♻️ Replace reply visibility filter interface with Kotlin version
David ‘Bombe’ Roden [Sun, 28 Jun 2020 19:23:24 +0000 (21:23 +0200)]
♻️ Replace reply visibility filter interface with Kotlin version

4 years ago♻️ Supply default implementation for predicate
David ‘Bombe’ Roden [Sun, 28 Jun 2020 19:11:20 +0000 (21:11 +0200)]
♻️ Supply default implementation for predicate

4 years ago♻️ Extract interface for reply visibility filter
David ‘Bombe’ Roden [Sat, 27 Jun 2020 21:12:45 +0000 (23:12 +0200)]
♻️ Extract interface for reply visibility filter

4 years ago🎨 Rewrite test to not use mocks
David ‘Bombe’ Roden [Sat, 27 Jun 2020 20:49:55 +0000 (22:49 +0200)]
🎨 Rewrite test to not use mocks

4 years ago♻️ Move some code to package’s Testing.kt
David ‘Bombe’ Roden [Sat, 27 Jun 2020 20:48:51 +0000 (22:48 +0200)]
♻️ Move some code to package’s Testing.kt

4 years ago🎨 Replace reply visibility filter with Kotlin version
David ‘Bombe’ Roden [Tue, 23 Jun 2020 04:31:52 +0000 (06:31 +0200)]
🎨 Replace reply visibility filter with Kotlin version

4 years ago♻️ Move predicate method into interface
David ‘Bombe’ Roden [Sat, 20 Jun 2020 18:49:59 +0000 (20:49 +0200)]
♻️ Move predicate method into interface

4 years ago♻️ Extract interface from post visibility filter
David ‘Bombe’ Roden [Sat, 20 Jun 2020 18:30:25 +0000 (20:30 +0200)]
♻️ Extract interface from post visibility filter

4 years ago🎨 Use Java’s Predicate in reply visibility filter
David ‘Bombe’ Roden [Sat, 20 Jun 2020 12:48:22 +0000 (14:48 +0200)]
🎨 Use Java’s Predicate in reply visibility filter

4 years ago🎨 Use Java’s Predicate in post visibility filter
David ‘Bombe’ Roden [Sat, 20 Jun 2020 12:41:17 +0000 (14:41 +0200)]
🎨 Use Java’s Predicate in post visibility filter

4 years ago🎨 Replace list notification filter test with Kotlin version
David ‘Bombe’ Roden [Sat, 20 Jun 2020 12:16:36 +0000 (14:16 +0200)]
🎨 Replace list notification filter test with Kotlin version

4 years ago🎨 Rename method to create replies for tests
David ‘Bombe’ Roden [Sat, 20 Jun 2020 09:29:18 +0000 (11:29 +0200)]
🎨 Rename method to create replies for tests

4 years ago♻️ Rewrite test to avoid mocks
David ‘Bombe’ Roden [Thu, 18 Jun 2020 21:18:37 +0000 (23:18 +0200)]
♻️ Rewrite test to avoid mocks

4 years ago🚚 Move test identity creation to Mocks.kt
David ‘Bombe’ Roden [Thu, 18 Jun 2020 21:17:52 +0000 (23:17 +0200)]
🚚 Move test identity creation to Mocks.kt

4 years ago⬆️ Upgrade Kotlin version
David ‘Bombe’ Roden [Thu, 18 Jun 2020 21:15:49 +0000 (23:15 +0200)]
⬆️ Upgrade Kotlin version

4 years ago🎨 Replace test for PostVisibilityFilter with Kotlin version
David ‘Bombe’ Roden [Thu, 18 Jun 2020 17:37:02 +0000 (19:37 +0200)]
🎨 Replace test for PostVisibilityFilter with Kotlin version

4 years ago🐛 Fix breaking parser on invalid SSK/USKs
David ‘Bombe’ Roden [Wed, 17 Jun 2020 17:47:28 +0000 (19:47 +0200)]
🐛 Fix breaking parser on invalid SSK/USKs

4 years ago🎨 Clean up imports
David ‘Bombe’ Roden [Tue, 26 May 2020 16:53:12 +0000 (18:53 +0200)]
🎨 Clean up imports

4 years ago🎨 Specify types for mocks explicitely
David ‘Bombe’ Roden [Tue, 26 May 2020 16:51:59 +0000 (18:51 +0200)]
🎨 Specify types for mocks explicitely

4 years ago🐛 Merge loaded identites to have all trust values
David ‘Bombe’ Roden [Tue, 5 May 2020 20:39:07 +0000 (22:39 +0200)]
🐛 Merge loaded identites to have all trust values

4 years ago♻️ Refactor parts of identity removal
David ‘Bombe’ Roden [Fri, 1 May 2020 14:01:40 +0000 (16:01 +0200)]
♻️ Refactor parts of identity removal

4 years ago⚗ Use a multimap to keep track of registered USKs
David ‘Bombe’ Roden [Fri, 1 May 2020 12:51:23 +0000 (14:51 +0200)]
⚗ Use a multimap to keep track of registered USKs

4 years ago🔊 Add debug logging for unregistering USKs
David ‘Bombe’ Roden [Thu, 30 Apr 2020 12:51:31 +0000 (14:51 +0200)]
🔊 Add debug logging for unregistering USKs

4 years ago🔊 Use java.util logger instead of custom logger
David ‘Bombe’ Roden [Wed, 29 Apr 2020 12:39:50 +0000 (14:39 +0200)]
🔊 Use java.util logger instead of custom logger

4 years ago🔀 Merge tag 'v82' into next
David ‘Bombe’ Roden [Tue, 28 Apr 2020 08:51:49 +0000 (10:51 +0200)]
🔀 Merge tag 'v82' into next

Version 82:

* Add stricter WoT filtering.
* Add 🇮🇹 translation (thanks, Costantino Beretta!).

4 years ago🔀 Merge branch 'release/v82' master v82
David ‘Bombe’ Roden [Tue, 28 Apr 2020 08:44:24 +0000 (10:44 +0200)]
🔀 Merge branch 'release/v82'

4 years ago🔖 Update Sone version
David ‘Bombe’ Roden [Tue, 28 Apr 2020 08:43:57 +0000 (10:43 +0200)]
🔖 Update Sone version

4 years ago⬆️ Update homepage edition
David ‘Bombe’ Roden [Tue, 28 Apr 2020 08:43:22 +0000 (10:43 +0200)]
⬆️ Update homepage edition

4 years ago🇮🇹 Add Italian translation
David ‘Bombe’ Roden [Sun, 19 Apr 2020 13:57:00 +0000 (15:57 +0200)]
🇮🇹 Add Italian translation

4 years ago🌐 Update translations
David ‘Bombe’ Roden [Sun, 19 Apr 2020 13:56:33 +0000 (15:56 +0200)]
🌐 Update translations

4 years ago💄 Move “Save” button back to bottom of page
David ‘Bombe’ Roden [Sun, 19 Apr 2020 13:34:12 +0000 (15:34 +0200)]
💄 Move “Save” button back to bottom of page

4 years ago✨ Apply strict filtering when getting identities
David ‘Bombe’ Roden [Sat, 18 Apr 2020 22:20:42 +0000 (00:20 +0200)]
✨ Apply strict filtering when getting identities

4 years ago✨ Add option for “strict filtering” to options page
David ‘Bombe’ Roden [Sat, 18 Apr 2020 22:11:25 +0000 (00:11 +0200)]
✨ Add option for “strict filtering” to options page

4 years ago🚧 Add processing of strict-filtering option
David ‘Bombe’ Roden [Sat, 18 Apr 2020 21:55:05 +0000 (23:55 +0200)]
🚧 Add processing of strict-filtering option

4 years ago🚧 Add strict filtering to preferences loader
David ‘Bombe’ Roden [Sat, 18 Apr 2020 21:49:46 +0000 (23:49 +0200)]
🚧 Add strict filtering to preferences loader

4 years ago🚧 Add option for “strict filtering”
David ‘Bombe’ Roden [Sat, 18 Apr 2020 21:47:52 +0000 (23:47 +0200)]
🚧 Add option for “strict filtering”

4 years ago✅ Use real event bus in test
David ‘Bombe’ Roden [Sat, 18 Apr 2020 21:32:12 +0000 (23:32 +0200)]
✅ Use real event bus in test

4 years ago🚧 Use strictly-filtered identities
David ‘Bombe’ Roden [Sat, 18 Apr 2020 15:13:18 +0000 (17:13 +0200)]
🚧 Use strictly-filtered identities

4 years ago🚧 Load ALL identities instead of only trusted ones
David ‘Bombe’ Roden [Sat, 18 Apr 2020 14:46:49 +0000 (16:46 +0200)]
🚧 Load ALL identities instead of only trusted ones

4 years ago🚚 Rename method to better reflect purpose
David ‘Bombe’ Roden [Sat, 18 Apr 2020 14:33:44 +0000 (16:33 +0200)]
🚚 Rename method to better reflect purpose

4 years ago🚧 Try to only allow identities that have no or positive trust
David ‘Bombe’ Roden [Sat, 18 Apr 2020 14:14:41 +0000 (16:14 +0200)]
🚧 Try to only allow identities that have no or positive trust

4 years ago🚧 Disregard identities that don’t trust anyone
David ‘Bombe’ Roden [Fri, 17 Apr 2020 23:29:40 +0000 (01:29 +0200)]
🚧 Disregard identities that don’t trust anyone

4 years ago🔊 Log how much trust-all would reduce identity amount
David ‘Bombe’ Roden [Fri, 17 Apr 2020 18:14:36 +0000 (20:14 +0200)]
🔊 Log how much trust-all would reduce identity amount

4 years ago♻️ Slightly improve messy expression
David ‘Bombe’ Roden [Thu, 9 Apr 2020 17:10:02 +0000 (19:10 +0200)]
♻️ Slightly improve messy expression

4 years ago🔥 Remove unnecessary imports
David ‘Bombe’ Roden [Wed, 8 Apr 2020 08:08:59 +0000 (10:08 +0200)]
🔥 Remove unnecessary imports

4 years ago🔥 Remove unused “create” flag
David ‘Bombe’ Roden [Tue, 7 Apr 2020 20:41:15 +0000 (22:41 +0200)]
🔥 Remove unused “create” flag

4 years ago🔥 Remove more session manager usages
David ‘Bombe’ Roden [Tue, 7 Apr 2020 19:56:29 +0000 (21:56 +0200)]
🔥 Remove more session manager usages

4 years ago🔥 Remove more session managers
David ‘Bombe’ Roden [Tue, 7 Apr 2020 19:38:27 +0000 (21:38 +0200)]
🔥 Remove more session managers

4 years ago🔥 Remove unused session manager from page toadlet
David ‘Bombe’ Roden [Tue, 7 Apr 2020 19:29:46 +0000 (21:29 +0200)]
🔥 Remove unused session manager from page toadlet

4 years ago🔥 Delegate session provider in web interface
David ‘Bombe’ Roden [Tue, 7 Apr 2020 19:12:22 +0000 (21:12 +0200)]
🔥 Delegate session provider in web interface

4 years ago🚧 Configure session provider in Sone module
David ‘Bombe’ Roden [Tue, 7 Apr 2020 18:49:11 +0000 (20:49 +0200)]
🚧 Configure session provider in Sone module

4 years ago🚧 Add session provider implementation
David ‘Bombe’ Roden [Tue, 7 Apr 2020 18:47:03 +0000 (20:47 +0200)]
🚧 Add session provider implementation

4 years ago🔥 Remove “create” flag from session provider interface
David ‘Bombe’ Roden [Tue, 7 Apr 2020 18:29:47 +0000 (20:29 +0200)]
🔥 Remove “create” flag from session provider interface

4 years ago🔥 Remove session manager from freenet request
David ‘Bombe’ Roden [Tue, 7 Apr 2020 16:59:26 +0000 (18:59 +0200)]
🔥 Remove session manager from freenet request

4 years ago🔥 Remove session access from freenet request
David ‘Bombe’ Roden [Tue, 7 Apr 2020 14:28:12 +0000 (16:28 +0200)]
🔥 Remove session access from freenet request

4 years ago🚨 Suppress deprecation warning
David ‘Bombe’ Roden [Tue, 7 Apr 2020 09:22:45 +0000 (11:22 +0200)]
🚨 Suppress deprecation warning

4 years ago🚚 Move Kotlin files to correct source path
David ‘Bombe’ Roden [Tue, 7 Apr 2020 08:43:51 +0000 (10:43 +0200)]
🚚 Move Kotlin files to correct source path

4 years ago🎨 Replace default option with Kotlin version
David ‘Bombe’ Roden [Tue, 7 Apr 2020 08:40:07 +0000 (10:40 +0200)]
🎨 Replace default option with Kotlin version