Commit Graph

4204 Commits

Author SHA1 Message Date
Risto Lahtela
194d07a9b7
Update versions.txt 2020-03-21 16:37:54 +02:00
Risto Lahtela
6470832ef6 Fixed ResourceSvc file write if no directory exists 2020-03-21 16:01:15 +02:00
Risto Lahtela
b7c84980e3 Bump API version, add Capabilities:
- PAGE_EXTENSION_RESOLVERS
- PAGE_EXTENSION_RESOURCES
2020-03-20 22:26:03 +02:00
Risto Lahtela
38bb2ce61c Added ResponseBuilder#setContent(WebResource) 2020-03-20 22:26:03 +02:00
Risto Lahtela
4fd19bbc5e Removed PlanFiles#getCustomizableResourceOrDefault 2020-03-20 22:26:03 +02:00
Risto Lahtela
ff6f960a84 Renamed Resource snippet Positions 2020-03-20 22:26:03 +02:00
Risto Lahtela
7860557a2d Changed resource settings to not use dot 2020-03-20 22:26:02 +02:00
Risto Lahtela
dae96ef53d Implemented ResourceSvc
- Customizable resources
- Snippets
- Fixed issue with a web resource being fetched on enable (favicon in ResponseResolver)
- Fixed some issues with Config#addNode used in an orElse block of Optional
- Deprecated PlanFiles#getCustomizableResourceOrDefault
2020-03-20 22:26:02 +02:00
Risto Lahtela
f2ba301880 Made CapabilityService more resilient
Affects issues:
- Fixed #1356
2020-03-20 22:26:02 +02:00
Risto Lahtela
648cdb1a0c Added a ResourceService
- Allows customizable files
- Allows js and css addition to html files
2020-03-20 22:26:02 +02:00
dependabot-preview[bot]
a0a6710ad3 Bump dagger from 2.26 to 2.27 in /Plan
Bumps [dagger](https://github.com/google/dagger) from 2.26 to 2.27.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.26...dagger-2.27)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-20 05:39:46 +00:00
dependabot-preview[bot]
f741d4bc85 Bump dagger-compiler from 2.26 to 2.27 in /Plan
Bumps [dagger-compiler](https://github.com/google/dagger) from 2.26 to 2.27.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.26...dagger-2.27)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-20 05:31:21 +00:00
Risto Lahtela
4087909355
Update plugin_request.md 2020-03-16 18:27:46 +02:00
Risto Lahtela
178480a104
Update bug_report.md 2020-03-16 18:26:54 +02:00
Risto Lahtela
dd78ed734d
Update versions.txt 2020-03-14 13:15:28 +02:00
dependabot-preview[bot]
421d8cd2c4 Bump mockito-junit-jupiter from 3.3.0 to 3.3.3 in /Plan
Bumps [mockito-junit-jupiter](https://github.com/mockito/mockito) from 3.3.0 to 3.3.3.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.3.0...v3.3.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-14 10:58:26 +00:00
dependabot-preview[bot]
e60e025870 Bump mockito-core from 3.3.0 to 3.3.3 in /Plan
Bumps [mockito-core](https://github.com/mockito/mockito) from 3.3.0 to 3.3.3.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.3.0...v3.3.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-14 10:50:15 +00:00
Risto Lahtela
d6f35a6fc4 Fixed db test running BeforeEach method multiple times 2020-03-14 12:40:29 +02:00
Risto Lahtela
bf7e47eb4c Fixed DBPatchMySQLRegressionTest using wrong database 2020-03-14 12:40:28 +02:00
Risto Lahtela
e2e86cadc3 Extension RemoveEverythingTransaction test 2020-03-14 12:40:28 +02:00
Risto Lahtela
3e1f8e3c47 Split even more queries from DatabaseTest:
- Backup tests
- Nickname tests
- Ping tests (new tests)
- Server tests
- TPS tests
- World name tests
- UserInfo & BaseUser tests
- RemoveEverythingTransaction tests to each query test
2020-03-14 12:40:28 +02:00
Risto Lahtela
463b2edb02 Split more queries from DatabaseTest:
- WebUserQueriesTest for WebUser related queries
- More Session related queries
- Reduced checkstyle file length 1750 -> 1000
- Reduced checkstyle class fanout complexity 87 -> 60
- Reduced checkstyle cyclomatic complexity 18 -> 17
2020-03-14 12:40:27 +02:00
Risto Lahtela
fd6877dcad Split Session related queries to own test class:
- Added a lot of new utility methods to RandomData
- Fixed a bug where duplicate PlayerKills were queried
  This bug was discovered by accident when PlayerKill saving was randomized
  for the tests.
- Testing constant REGISTER_TIME extracted
- String truncation constant extracted for KillsTable
  This was causing some Session equals issues due to truncated weapon names
- Session now sorts PlayerKill list as this was assumed in some places.
2020-03-14 12:40:27 +02:00
Risto Lahtela
b49baa1275 Split Geolocation related queries to own test 2020-03-14 12:40:26 +02:00
Rsl1122
952cac1fbf Split ActivityIndexQueries to own Test class 2020-03-14 12:40:25 +02:00
Risto Lahtela
ea209aceb3 Split database tests to 2 classes 2020-03-14 12:40:25 +02:00
Risto Lahtela
b339800650 Removed JUnit 4 2020-03-14 12:40:23 +02:00
Risto Lahtela
aca9d22e1f Applied theme to pages properly
New utility UnaryChain:
- Allows writing nested modifications as a chain
2020-03-14 12:40:23 +02:00
Risto Lahtela
77d33c991a Moved NotFoundException to API 2020-03-14 12:40:22 +02:00
Risto Lahtela
68be3117b1 Moved BadRequestException to API
Changed Bad Request response to JSON:
{
    "status": 400,
    "error": "message",
    "target": "/requested/target"
}
2020-03-14 12:40:21 +02:00
Risto Lahtela
0a8b0e273c Fixed checkstyle on newer JDKs
See https://github.com/gradle/gradle/issues/8286 for more information
2020-03-14 12:40:21 +02:00
Risto Lahtela
c204ce9b1b Fixed some code smells & bugs 2020-03-14 12:40:19 +02:00
Rsl1122
f869de01b8 Applied Locale to Pages 2020-03-14 12:40:00 +02:00
Rsl1122
420e098d41 Moved ServerPage colors to the JSON responses 2020-03-14 12:39:57 +02:00
Rsl1122
a8126f6669 Rename VersionCheckSystem -> VersionChecker 2020-03-14 12:39:56 +02:00
Rsl1122
b5d07de18b Removed unused code 2020-03-14 12:39:55 +02:00
Rsl1122
1ab5f3473d Refactored JSONResolvers to use the new API 2020-03-14 12:39:53 +02:00
Rsl1122
2b1b459a37 Refactored static resource resolution 2020-03-14 12:39:32 +02:00
Rsl1122
77dbc74cc5 Refactored Root page redirect
- Fixed issue where response code was not set
- Fixed ResponseSender not setting values for response headers
- Changed ResponseResolver to mostly use Response instead of _old
2020-03-14 12:39:31 +02:00
Rsl1122
6ed6dd1f9f Refactored Resolver to use new Request class
URIPath and URIQuery were not enough info on the Request
In addition the Request supports
- WebUser
- Request Headers
- Request method (GET, POST etc)
2020-03-14 12:39:30 +02:00
Rsl1122
4a1234f9b4 Refactored /server page to use ResolverService 2020-03-14 12:39:28 +02:00
Rsl1122
e997289a20 Refactored /players page to use ResolverService
- Changed all css, js and png requests on player page to use relative address.
- Changed the export accordingly

Deprecated a lot of the old response factory methods
2020-03-14 12:38:32 +02:00
Rsl1122
2914966650 Refactored /players page to use ResolverService
Deprecated a lot of the old response factory methods
2020-03-14 12:37:25 +02:00
Rsl1122
2736ba042a Refactored /debug page to use ResolverService
Some issues that were identified:
- Going to /debug/ makes the style requests return the debug page content
  because the /debug resolver is used
- In the future when / is to be resolved it might override a bunch of requests.
- Use of RequestTarget as incompatible with URIPath for some reason which lead to infinite
  redirect, so the attempted change was reverted before this commit.
- Some Responses are using PlanFiles to obtain a html file (SRP violation)

Rest of the pages still use the old resolution that is now deprecated.
2020-03-14 12:37:23 +02:00
Rsl1122
9c74c40f72 Renamed some Service related classes 2020-03-14 12:35:06 +02:00
Rsl1122
96837dbcd0 Tested and fixed URLTarget behavior
Now properly omits previous segments and uses the same code for getPart.
You can read the javadocs or tests if you want to figure out the behavior
2020-03-14 12:35:05 +02:00
Rsl1122
7f0341087e Implemented a CompositeResolver
Allows building tree-like structure for resolution
2020-03-14 12:35:05 +02:00
Rsl1122
e7da714f55 Initial draft of ResolverService
Affects issues:
- #1288
2020-03-14 12:35:05 +02:00
Risto Lahtela
62f3f46678 DB Clean now takes server UUID into account
Affects issues:
- Fixed #1341
2020-03-13 11:48:34 +02:00
Risto Lahtela
aef0aa5447 Player export now has per method path replacers
This should stop issues from concurrent calls to the exporter.

Affects issues:
- Fixed #1352
2020-03-13 11:39:54 +02:00