Drop external tools: vectory is now pure Ruby (0.11.0) - #69
Merged
Conversation
Vectory no longer shells out to Inkscape, Ghostscript, or any other external binary. All format conversions are handled by pure-Ruby gems: - SVG / EMF: emfsvg (both directions) - EPS/PS / SVG: postsvg (both directions) - Cross-format (e.g. Eps to Ps): two-step via SVG intermediate - Emf dimensions: emf header bounds (no Inkscape query) - Svg dimensions: width/height attribute, then viewBox BREAKING: PDF support removed. Vectory::Pdf, *.to_pdf, and related infrastructure are gone. The library is now SVG/EPS/PS/EMF only. Code removed: - lib/vectory/pdf.rb - lib/vectory/inkscape_wrapper.rb - lib/vectory/ghostscript_wrapper.rb - lib/vectory/platform.rb (only used by wrappers) - lib/vectory/conversion/* (strategy registry for external tools) - Ukiryu dependency (only used by wrappers) - Errors: InkscapeNotFoundError, GhostscriptNotFoundError, InkscapeQueryError - CLI status codes for those errors - Configuration: inkscape_path, ghostscript_path accessors Test fixtures regenerated via scripts/regenerate_fixtures.rb. Version bumped to 0.11.0 (minor: breaking change in pre-1.0 semver).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Vectory no longer shells out to Inkscape, Ghostscript, or any external binary. All conversions are pure Ruby:
emfsvgpostsvgDimensions come from format-native metadata (SVG attributes/viewBox, EMF header bounds, EPS/PS
%%BoundingBox). No Inkscape query calls.BREAKING: PDF support removed.
Vectory::Pdf,*.to_pdf, and related infrastructure are gone. Vectory is now SVG/EPS/PS/EMF only. The library is no longer a wrapper around external tools — it is a pure-Ruby pairwise vector converter.Bumps to 0.11.0 (minor: pre-1.0 semver treats breaking changes as minor).
Deleted
lib/vectory/pdf.rblib/vectory/inkscape_wrapper.rblib/vectory/ghostscript_wrapper.rblib/vectory/platform.rb(only used by wrappers)lib/vectory/conversion.rb+lib/vectory/conversion/*.rb(strategy registry for external tools)Ukiryuruntime dependency (only used by wrappers)InkscapeNotFoundError,GhostscriptNotFoundError,InkscapeQueryErrorinkscape_path,ghostscript_pathaccessors and their env-var loadersspec/vectory/pdf_spec.rb,spec/vectory/inkscape_wrapper_spec.rbRewired
Svg#to_eps,Svg#to_ps: nowPostsvg.to_eps/to_psEps#to_ps,Eps#to_emf,Ps#to_eps,Ps#to_emf: now via SVG intermediate (no PDF)Emf#to_eps,Emf#to_ps: now via SVG intermediate (no Inkscape)Emf#height/width: fromEmf.parse(content).header.boundsSvg#height/width: width/height attr → viewBox →NotImplementedErrorVector#height/widthfallback: now raisesNotImplementedError(was: Inkscape)Added
scripts/regenerate_fixtures.rb— one-shot script to regenerate allspec/examples/*/ref.*via the new pipelineTest plan
bundle exec rspec— 170/170 pass (was 193; removed 23 stale tests for Inkscape/Ghostscript/PDF error paths and PDF class itself)Caveats
postsvg and emfsvg have known upstream limitations:
EPS/PS/SVG files using those features will silently degrade. Acceptable for vectory's test fixtures (verified by the regeneration script). Real-world users with complex files may see regressions vs the old Ghostscript + Inkscape path; track upstream postsvg/emfsvg to know when coverage improves.