graph 2.5.3 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,9 @@
1
+ === 2.6.0 / 2013-09-18
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Added deletion of nodes. (thagomizer)
6
+
1
7
  === 2.5.3 / 2013-05-10
2
8
 
3
9
  * 2 minor enhancements:
@@ -7,7 +7,7 @@ require "enumerator"
7
7
  # dot format.
8
8
 
9
9
  class Graph
10
- VERSION = "2.5.3" # :nodoc:
10
+ VERSION = "2.6.0" # :nodoc:
11
11
 
12
12
  # :stopdoc:
13
13
 
@@ -370,6 +370,13 @@ class Graph
370
370
  subgraph "cluster_#{name}", &block
371
371
  end
372
372
 
373
+ ##
374
+ # Deletes a node from the graph
375
+ def delete_node node_name
376
+ nodes.delete node_name
377
+ nodes_order.delete node_name
378
+ end
379
+
373
380
  ##
374
381
  # Outputs a graphviz graph.
375
382
 
@@ -9,7 +9,7 @@ class String
9
9
  end
10
10
  end
11
11
 
12
- class TestGraph < MiniTest::Unit::TestCase
12
+ class TestGraph < Minitest::Test
13
13
  attr_accessor :graph
14
14
 
15
15
  def assert_attribute k, v, a
@@ -109,6 +109,24 @@ class TestGraph < MiniTest::Unit::TestCase
109
109
  assert_graph graph, 'label = "blah"', '"a" -> "b"'
110
110
  end
111
111
 
112
+ def test_delete_node
113
+ g = digraph do
114
+ node "a"
115
+ node "b"
116
+ end
117
+
118
+ assert_equal 2, g.nodes.length
119
+ assert_equal 2, g.nodes_order.length
120
+ assert_equal %w[a b], g.nodes.keys.sort
121
+
122
+ g.delete_node "a"
123
+
124
+ assert_equal 1, g.nodes.length
125
+ assert_equal 1, g.nodes_order.length
126
+ assert_equal %w[b], g.nodes.keys.sort
127
+ end
128
+
129
+
112
130
  def test_label_html
113
131
  graph.label "<<B>blah</B>>"
114
132
 
@@ -270,7 +288,7 @@ g_s = "subgraph \"subgraph\"
270
288
  end
271
289
  end
272
290
 
273
- class TestAttribute < MiniTest::Unit::TestCase
291
+ class TestAttribute < Minitest::Test
274
292
  attr_accessor :a
275
293
 
276
294
  def setup
@@ -312,7 +330,7 @@ class TestCompoundAttribute < TestAttribute
312
330
  end
313
331
  end
314
332
 
315
- class TestNode < MiniTest::Unit::TestCase
333
+ class TestNode < Minitest::Test
316
334
  attr_accessor :n
317
335
 
318
336
  def setup
@@ -404,7 +422,7 @@ class TestNode < MiniTest::Unit::TestCase
404
422
  end
405
423
  end
406
424
 
407
- class TestEdge < MiniTest::Unit::TestCase
425
+ class TestEdge < Minitest::Test
408
426
  attr_accessor :e
409
427
 
410
428
  def setup
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graph
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
- - 5
9
- - 3
10
- version: 2.5.3
8
+ - 6
9
+ - 0
10
+ version: 2.6.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Davis
@@ -16,9 +16,9 @@ bindir: bin
16
16
  cert_chain:
17
17
  - |
18
18
  -----BEGIN CERTIFICATE-----
19
- MIIDPjCCAiagAwIBAgIBADANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
19
+ MIIDPjCCAiagAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
20
20
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
21
- GRYDY29tMB4XDTA5MDMwNjE4NTMxNVoXDTEwMDMwNjE4NTMxNVowRTETMBEGA1UE
21
+ GRYDY29tMB4XDTEzMDkxNjIzMDQxMloXDTE0MDkxNjIzMDQxMlowRTETMBEGA1UE
22
22
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
23
23
  JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvc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y
37
37
  -----END CERTIFICATE-----
38
38
 
39
- date: 2013-05-10 00:00:00 Z
39
+ date: 2013-09-19 00:00:00 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
@@ -76,11 +76,11 @@ dependencies:
76
76
  requirements:
77
77
  - - ~>
78
78
  - !ruby/object:Gem::Version
79
- hash: 11
79
+ hash: 9
80
80
  segments:
81
81
  - 3
82
- - 6
83
- version: "3.6"
82
+ - 7
83
+ version: "3.7"
84
84
  type: :development
85
85
  version_requirements: *id003
86
86
  description: |-
@@ -135,8 +135,8 @@ files:
135
135
  - test/test_graph.rb
136
136
  - .gemtest
137
137
  homepage: https://github.com/seattlerb/graph
138
- licenses: []
139
-
138
+ licenses:
139
+ - MIT
140
140
  post_install_message:
141
141
  rdoc_options:
142
142
  - --main
metadata.gz.sig CHANGED
Binary file