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.
This PR comes to fix some obvious issues with the
#graph
method, in the least intrusive way possible,Issue 1: Graph too small
The graph size too small for wide or tall trees - see #29
This is caused since they decided to set a size of "9,11" as the default for some reason, instead of letting dot do its thing naturally.
Fixed by providing an empty size to the
DotGraphPrinter
Issue 2: Graphr dependency error
Since the
graphr
gem is not in the dependency list, a non friendly error was thrown when it was not found.Fixed by rescuing
LoadError
and printing a friendly error message toSTDERR
Issue 3: ID in node labels
The node labels included the object ID, which was necessary to distinguish between nodes, but not necessary for viewing.
Fixed by providing an alternative
node_labeler
proc to theDotGraphPrinter
Issue 4: Empty quotes in discrete labels
In discrete cases, the label included empty
''
- for example,January ''
. Not sure what it was there for, so I changed it (without changing how it behaves on continuous properties).