Thank you for opening a pull request and contributing to AsciidoctorJ!
Please take a bit of time giving some details about your pull request:
Kind of change
[x] Bug fix
[ ] New non-breaking feature
[ ] New breaking feature
[ ] Documentation update
[ ] Build improvement
Description
What is the goal of this pull request?
This PR fixes #1230.
1230 mentioned that we have a fallback when returning the version of the packaged Asciidoctor version.
This PR removes that fallback and would fail hard with a NullPointerException if the generated file containing the version numbers is not available.
Additionally a test makes sure that the generated file is available.
How does it achieve that?
Remove the fallback, and enhance the tests.
Are there any alternative ways to implement this?
We could search the class path for the asciidoctor gemspec and parse that, or maybe call some API exposed by JRuby to query the gems (or a Ruby-native API).
Are there any implications of this pull request? Anything a user must know?
No, everything should work as before.
Issue
If this PR fixes an open issue, please add a line of the form:
Fixes #1230
Release notes
Please add a corresponding entry to the file CHANGELOG.adoc
The upstream build obviously won't work with that.
I'll try to figure out a way to adapt the test accordingly.
Maybe I can make the version available to the test via a system property.
…en using --version
Thank you for opening a pull request and contributing to AsciidoctorJ!
Please take a bit of time giving some details about your pull request:
Kind of change
Description
What is the goal of this pull request?
This PR fixes #1230.
1230 mentioned that we have a fallback when returning the version of the packaged Asciidoctor version.
This PR removes that fallback and would fail hard with a NullPointerException if the generated file containing the version numbers is not available. Additionally a test makes sure that the generated file is available.
How does it achieve that?
Remove the fallback, and enhance the tests.
Are there any alternative ways to implement this?
We could search the class path for the asciidoctor gemspec and parse that, or maybe call some API exposed by JRuby to query the gems (or a Ruby-native API).
Are there any implications of this pull request? Anything a user must know?
No, everything should work as before.
Issue
If this PR fixes an open issue, please add a line of the form:
Fixes #1230
Release notes
Please add a corresponding entry to the file CHANGELOG.adoc