Skip to content

Commit

Permalink
chore: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-s committed Jul 9, 2024
1 parent 6dad82d commit 18af076
Show file tree
Hide file tree
Showing 4 changed files with 181 additions and 115 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ public K8sDeploymentRunnable run(K8sDeploymentRunnable runnable) throws K8sFrame
.stream()
.collect(
Collectors.toMap(
c -> Base64.getUrlEncoder().withoutPadding().encodeToString(c.getName().getBytes()),
c ->
Base64
.getUrlEncoder()
.withoutPadding()
.encodeToString(c.getName().getBytes()),
c ->
new String(
Base64.getDecoder().decode(c.getBase64()),
Expand All @@ -120,12 +124,25 @@ public K8sDeploymentRunnable run(K8sDeploymentRunnable runnable) throws K8sFrame
)
)
.orElseGet(Map::of),
contextSourcesOpt
.map(contextSources -> Map.of("context-sources-map.txt",
contextSources.stream()
.map(c -> Base64.getUrlEncoder().withoutPadding().encodeToString(c.getName().getBytes()) + "," + c.getName() + "\n")
.collect(Collectors.joining(""))
)).orElseGet(Map::of)
contextSourcesOpt
.map(contextSources ->
Map.of(
"context-sources-map.txt",
contextSources
.stream()
.map(c ->
Base64
.getUrlEncoder()
.withoutPadding()
.encodeToString(c.getName().getBytes()) +
"," +
c.getName() +
"\n"
)
.collect(Collectors.joining(""))
)
)
.orElseGet(Map::of)
)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ public K8sJobRunnable run(K8sJobRunnable runnable) throws K8sFrameworkException
.stream()
.collect(
Collectors.toMap(
c -> Base64.getUrlEncoder().withoutPadding().encodeToString(c.getName().getBytes()),
c ->
Base64
.getUrlEncoder()
.withoutPadding()
.encodeToString(c.getName().getBytes()),
c ->
new String(
Base64.getDecoder().decode(c.getBase64()),
Expand All @@ -134,11 +138,24 @@ public K8sJobRunnable run(K8sJobRunnable runnable) throws K8sFrameworkException
)
.orElseGet(Map::of),
contextSourcesOpt
.map(contextSources -> Map.of("context-sources-map.txt",
contextSources.stream()
.map(c -> Base64.getUrlEncoder().withoutPadding().encodeToString(c.getName().getBytes()) + "," + c.getName() + "\n")
.collect(Collectors.joining(""))
)).orElseGet(Map::of)
.map(contextSources ->
Map.of(
"context-sources-map.txt",
contextSources
.stream()
.map(c ->
Base64
.getUrlEncoder()
.withoutPadding()
.encodeToString(c.getName().getBytes()) +
"," +
c.getName() +
"\n"
)
.collect(Collectors.joining(""))
)
)
.orElseGet(Map::of)
)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ public K8sServeRunnable run(K8sServeRunnable runnable) throws K8sFrameworkExcept
.stream()
.collect(
Collectors.toMap(
c -> Base64.getUrlEncoder().withoutPadding().encodeToString(c.getName().getBytes()),
c ->
Base64
.getUrlEncoder()
.withoutPadding()
.encodeToString(c.getName().getBytes()),
c ->
new String(
Base64.getDecoder().decode(c.getBase64()),
Expand All @@ -106,12 +110,25 @@ public K8sServeRunnable run(K8sServeRunnable runnable) throws K8sFrameworkExcept
)
)
.orElseGet(Map::of),
contextSourcesOpt
.map(contextSources -> Map.of("context-sources-map.txt",
contextSources.stream()
.map(c -> Base64.getUrlEncoder().withoutPadding().encodeToString(c.getName().getBytes()) + "," + c.getName() + "\n")
.collect(Collectors.joining(""))
)).orElseGet(Map::of)
contextSourcesOpt
.map(contextSources ->
Map.of(
"context-sources-map.txt",
contextSources
.stream()
.map(c ->
Base64
.getUrlEncoder()
.withoutPadding()
.encodeToString(c.getName().getBytes()) +
"," +
c.getName() +
"\n"
)
.collect(Collectors.joining(""))
)
)
.orElseGet(Map::of)
)
);

Expand Down
Loading

0 comments on commit 18af076

Please sign in to comment.