-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
metanorma/metanorma-docker#55 make plantuml aware of imagesdir #204
Conversation
CAMOBAP
commented
Feb 7, 2020
- (URGENT) Failure when building document inside container metanorma-docker#55
@@ -305,7 +305,7 @@ | |||
end | |||
|
|||
it "processes the PlantUML macro with imagesdir" do | |||
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)).gsub(%r{spec/assets/[^.]+\.}, "spec/assets/_."))).to be_equivalent_to xmlpp(<<~"OUTPUT") | |||
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)).gsub(%r{spec/assets/[^./]+\.}, "spec/assets/_."))).to be_equivalent_to xmlpp(<<~"OUTPUT") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [192/80]
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@@ -254,7 +254,7 @@ | |||
end | |||
|
|||
it "processes the PlantUML macro" do | |||
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)).gsub(%r{plantuml/plantuml[^.]+\.}, "plantuml/_."))).to be_equivalent_to xmlpp(<<~"OUTPUT") | |||
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)).gsub(%r{plantuml/plantuml[^./]+\.}, "plantuml/_."))).to be_equivalent_to xmlpp(<<~"OUTPUT") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [192/80]
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
||
FileUtils.mv outfile, path | ||
|
||
imagesdir ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/MultilineTernaryOperator: Avoid multi-line ternary operators, use if or unless instead.
File.exist?(path) or return | ||
|
||
# TODO: this should raise failure if the destination path is not writable! | ||
File.writable?(path) or return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/AndOr: Use || instead of or.
# TODO: this should raise failure if the destination path already exists! | ||
File.exist?(path) or return | ||
|
||
# TODO: this should raise failure if the destination path is not writable! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [82/80]
path.mkpath | ||
|
||
# TODO: this should raise failure if the destination path already exists! | ||
File.exist?(path) or return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/AndOr: Use || instead of or.
path = Pathname.new(localdir) + (imagesdir || "plantuml") | ||
path.mkpath | ||
|
||
# TODO: this should raise failure if the destination path already exists! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [81/80]
umlfile.unlink | ||
File.join(path,File.basename(outfile)) | ||
|
||
path = Pathname.new(localdir) + (imagesdir || "plantuml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @CAMOBAP795 !