Skip to content
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

Fix Ruby 2.7 warning #9

Merged
merged 2 commits into from Jun 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions graphviz.gemspec
Expand Up @@ -18,12 +18,10 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.has_rdoc = 'yard'

spec.add_dependency 'process-pipeline'

spec.add_development_dependency "yard"
spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "bundler"
spec.add_development_dependency "rspec", "~> 3.6"
spec.add_development_dependency "rake"
end
4 changes: 2 additions & 2 deletions lib/graphviz/graph.rb
Expand Up @@ -46,7 +46,7 @@ def initialize(name = 'G', parent = nil, **attributes)
def add_node(name = nil, **attributes)
name ||= "#{@name}N#{@nodes.count}"

Node.new(name, self, attributes)
Node.new(name, self, **attributes)
end

# Add a subgraph with a given name and attributes.
Expand Down Expand Up @@ -131,7 +131,7 @@ def dump_graph(buffer, indent = "", **options)
node.dump_graph(buffer, indent + "\t", options)
end

dump_edges(buffer, indent + "\t", options)
dump_edges(buffer, indent + "\t", **options)

buffer.puts "#{indent}}"
end
Expand Down
4 changes: 2 additions & 2 deletions spec/graphviz/graph_spec.rb
Expand Up @@ -47,7 +47,7 @@
end

it "gets a node" do
foo = subject.add_node('Foo')
subject.add_node('Foo')
bar = subject.add_node('Bar')
bar.add_node('Baz')
expect(subject.get_node('Baz')).to be_an(Array)
Expand All @@ -58,7 +58,7 @@
end

it "checks if a node exists" do
foo = subject.add_node('Foo')
subject.add_node('Foo')
bar = subject.add_node('Bar')
bar.add_node('Baz')
expect(subject.node_exists?('Baz')).to be true
Expand Down