Skip to content

Commit

Permalink
feat: support only WeasyPrint Service v63.1.0
Browse files Browse the repository at this point in the history
Refs: #300
  • Loading branch information
grigoriev committed Jan 7, 2025
1 parent 3725e4e commit dc32483
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,13 @@ private boolean sameDocument(@Nullable String projectId, @NotNull String spaceId
.toList();

for (IModule module : modules) {
String[] locationParts = module.getModuleLocation().getLocationPath().split("/");
if (locationParts.length == 2) {
result.add(new DocumentCollectionEntry(
module.getProjectId(),
locationParts[0],
locationParts[1],
module.getRevision()
));
}
DocumentCollectionEntry documentCollectionEntry = new DocumentCollectionEntry(
module.getProjectId(),
module.getModuleFolder(),
module.getModuleName(),
module.getRevision()
);
result.add(documentCollectionEntry);
}

return result;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/versions.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
weasyprint-service.version=62.4.6
weasyprint-service.version=63.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -248,18 +248,16 @@ void testGetDocumentsFromCollection() {
IModule mockModule1 = mock(IModule.class);
IModule mockModule2 = mock(IModule.class);

ILocation mockLocation1 = mock(ILocation.class);
ILocation mockLocation2 = mock(ILocation.class);

when(mockModule1.getModuleLocation()).thenReturn(mockLocation1);
when(mockModule1.getProjectId()).thenReturn(projectId);
when(mockModule1.getModuleFolder()).thenReturn("space 1");
when(mockModule1.getModuleName()).thenReturn("test Module1");
when(mockModule1.getRevision()).thenReturn("1");

when(mockModule2.getModuleLocation()).thenReturn(mockLocation2);
when(mockModule2.getProjectId()).thenReturn(projectId);
when(mockModule2.getModuleFolder()).thenReturn("_default");
when(mockModule2.getModuleName()).thenReturn("test Module2");
when(mockModule2.getRevision()).thenReturn("2");

when(mockLocation1.getLocationPath()).thenReturn("space 1/test Module1");
when(mockLocation2.getLocationPath()).thenReturn("_default/test Module2");

IBaselineCollectionElement mockElement1 = mock(IBaselineCollectionElement.class);
IBaselineCollectionElement mockElement2 = mock(IBaselineCollectionElement.class);

Expand Down

0 comments on commit dc32483

Please sign in to comment.