Skip to content

Commit

Permalink
style: format codebase according to new JuliaFormatter version
Browse files Browse the repository at this point in the history
  • Loading branch information
bauglir committed Jun 23, 2022
1 parent a536a50 commit 6e5c26b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 23 deletions.
13 changes: 3 additions & 10 deletions src/Kroki.jl
Expand Up @@ -203,15 +203,8 @@ const LIMITED_DIAGRAM_SUPPORT = Dict{AbstractString, Tuple{Symbol, Vararg{Symbol
),
# Although all diagram types support SVG, these _only_ support SVG so are
# included separately
"image/svg+xml" => (
:bpmn,
:bytefield,
:excalidraw,
:nomnoml,
:pikchr,
:svgbob,
:wavedrom
),
"image/svg+xml" =>
(:bpmn, :bytefield, :excalidraw, :nomnoml, :pikchr, :svgbob, :wavedrom),
"text/plain" => (:c4plantuml, :plantuml),
)

Expand Down Expand Up @@ -296,7 +289,7 @@ for diagram_type in map(
:call,
:Diagram,
QuoteNode(Symbol($diagram_type)),
Expr(:call, string, interpolate(specification)...)
Expr(:call, string, interpolate(specification)...),
)
end
end
Expand Down
21 changes: 13 additions & 8 deletions src/kroki/service.jl
Expand Up @@ -60,14 +60,19 @@ function executeDockerCompose(cmd::Vector{String})
captured_stdout = IOBuffer()

try
run(pipeline(
`docker-compose --file $(SERVICE_DEFINITION_FILE) --project-name krokijl $cmd`;
stderr = captured_stderr,
stdout = captured_stdout,
))
run(
pipeline(
`docker-compose --file $(SERVICE_DEFINITION_FILE) --project-name krokijl $cmd`;
stderr = captured_stderr,
stdout = captured_stdout,
),
)
catch exception
exception isa Base.IOError &&
throw(ErrorException("Missing dependencies! Docker and/or Docker Compose do not appear to be available"))
exception isa Base.IOError && throw(
ErrorException(
"Missing dependencies! Docker and/or Docker Compose do not appear to be available",
),
)

throw(DockerComposeExecutionError(String(take!(captured_stderr))))
end
Expand Down Expand Up @@ -139,7 +144,7 @@ function status()

service_symbols = Symbol.(split(services_with_state, '\n'; keepempty = false))

(; [ service => running for service in service_symbols ]...)
(; [service => running for service in service_symbols]...)
end

merge(services_by_state...)
Expand Down
8 changes: 4 additions & 4 deletions test/kroki/service_test.jl
Expand Up @@ -141,8 +141,8 @@ end

# The following explicitly uses `match_mode=:any` to prevent having
# to specify log messages caused by changes to `ENDPOINT`
returned = @test_logs (:info, "Starting Kroki service components.") match_mode =
:any start!()
returned =
@test_logs (:info, "Starting Kroki service components.") match_mode = :any start!()

# Ensure nothing gets returned from a call to `start!` instead of
# `Process`es from the `docker-compose` execution
Expand Down Expand Up @@ -211,8 +211,8 @@ end

# The following explicitly uses `match_mode=:any` to prevent having to
# specify log messages caused by changes to `ENDPOINT`
returned = @test_logs (:info, "Stopping Kroki service components.") match_mode =
:any stop!()
returned =
@test_logs (:info, "Stopping Kroki service components.") match_mode = :any stop!()

# Ensure nothing gets returned from a call to `stop!` instead of
# `Process`es from the `docker-compose` execution
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Expand Up @@ -165,7 +165,7 @@ end
# needs to be manually implemented, so needs dedicated testing
message = "Z"
diagram = plantuml"X -> Y: $(message ^ 5)"
@test occursin(message ^ 5, diagram.specification)
@test occursin(message^5, diagram.specification)
end
end

Expand Down

0 comments on commit 6e5c26b

Please sign in to comment.