Closed domgold closed 9 years ago
I think you're right that this is an encoding issue. As part of #48 I'm reworking the Ruby/Java interfacing code in a way that should make things more robust. That will probably also fix this. I'll make sure to test my changes on Windows as well. Unfortunately Windows isn't supported on Travis yet so it's not covered by the automated test runs.
My previous comment was actually completely incorrect since graphviz is invoked directly; not through the Java bridge. The code in cli_generator.rb is reading the generated file using mode 'r' which does newline processing. Switching to mode 'rb' resolves the issue.
I've been able to reproduce this and confirmed it is fixed in 1.3.0.preview.3.
:+1:
Btw, I just found out that appveyor.com offers CI builds on Windows machines. You could look into getting the build setup there so that we can catch these issues early on and keep them at bay.
I'll see what I can do for the appveyor builds. Getting basic tests up and running should be feasible. I think I'll skip shaape and blockdiag initially though. Those two have a bunch of additional dependencies that are going to be a pain to get set up on windows.
Basic setup for appveyor is done. I still need to fix a ruby gems SSL certificate issue and get graphviz installed, but that should be too much of a problem.
Excellent! I'll be diving into appveyor config for core, so I'll share any tips I discover.
Almost there. Biggest hurdle was that the rubygems version is out of data which causes SSL certificate failures when using https://rubygems.org as source. I tried updating ruby gems but then gem install seemed to hang. I'm using http://rubygems.org as source now when the build runs on appveyor.
@mojavelinux alright, the builds are up and running and the test are passing. The setup in asciidoctor-diagrams apveyor.yml is the only one I was able to get working. Here's some notes on the work I did
gem sources -r
). rubygems is out of date which causes certificate validation errors. Updating rubygems seems to cause gem install calls to hang; reason unknown.gem sources -a
). On ruby 2.x this triggers a y/n user prompt. On windows you can't < yes
so it's easier to circumvent this. gem install bundler
with --source http://...
insteadBeyond that the setup is almost identical to the travis one.
Awesome!!! :beers:
Got a link to the AppVeyor build results?
(Btw, we should probably get an Asciidoctor organization setup on AppVeyor so we can share permissions. I'll look into it when I get the build setup for Asciidoctor core).
https://ci.appveyor.com/project/pepijnve/asciidoctor-diagram They're referenced from the README via status badges.
Nice!
@pepijnve would you be willing to switch the AppVeyor build to point to the asciidoctor account?
Here are the relevant URLs:
It's setup exactly the same, so you should just be able to change those two values and it will just work. You can control the webhook URL in the settings tab of the repo. The badge URL goes in the README.
Here's the project URL on AppVeyor.
https://ci.appveyor.com/project/asciidoctor/asciidoctor-diagram
I'll send you the credentials for the asciidoctor account on AppVeyor.
README updated and verified that the web hook is working correctly.
Most excellent!
Asciidoctor is on AppVeyor now in full force!
When I render the following block:
I get the following error message:
(RuntimeError) Invalid PNG signature
I am using the basic maven setup from the maven examples (asciidoctor-diagram-example) on a french Windows 7 Pro.
I patched the file 'png.rb' which causes this error by returning a size by default. With this patched version the png file gets created but is corrupted.
I suspect this being an encoding issue UTF-8 vs ISO.
(Btw, I also tried generating the png on my command line with the exact same parameters and it works.)
Below the complete error output.