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
Added #get_node, #node_exists? methods on Graph and relevant tests. #8
Added #get_node, #node_exists? methods on Graph and relevant tests. #8
Conversation
…lso changed identation to match Ruby standard.
spec/graphviz/graph_spec.rb
Outdated
@@ -20,13 +20,13 @@ | |||
|
|||
require 'graphviz' | |||
|
|||
SAMPLE_GRAPH_DOT = <<~EOF | |||
digraph "G" { | |||
SAMPLE_GRAPH_DOT = <<-EOF |
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.
Is this an improvement?
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.
This was necessary for the gem to run on versions earlier than 2.3. The squiggly <<~
HEREDOC syntax was introduced in Ruby 2.3 and previous versions will raise error when <<~ is used.
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.
Fair enough. I'm not actually too concerned about that since Ruby < 2.3 is EOL.
Please don't reformat the entire code base. Especially don't do it with functional code changes :) |
Okay, this looks good. I will review in more detail after merging. |
Okay I released it as v1.1.0 |
Added method to return Node based on node name. Added method to check if Node exists in the graph. Also changed indentation to match Ruby standard. Fixed minor bug in demo.rb.