mementus 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f193ed0050a256b3b529dd997fafe002fbe7697e
4
- data.tar.gz: e928862b3e4e55e1ce0ac1050eec7457238a7ce2
3
+ metadata.gz: 5e42c083e1ae9ae809d54f14f7b591e2bc284f3d
4
+ data.tar.gz: fae1ead8b3ad28db5f8577dede5f050009cc0006
5
5
  SHA512:
6
- metadata.gz: c9f0a1203c8cc72cbcaeb26383f8f38181f50863267f71fe64c3f429cb007fcc311cf8a380cc06690df3b9e1a3340c65c269c19775723b580cac78c782e33ecd
7
- data.tar.gz: c0495f33c80d74d81212df81f9314eb198f8c40e5e18bf5cc10697934f72ec9279f0e1e4be2488a46c63f5f90160f00652afbe0533c2fb812b3483d99ebcb7ac
6
+ metadata.gz: bbb064bc33f02815ecbb090150fa9a312ab96e4f4b42fea44f5fecd1c58cdfa7ee7d103f90e0b9bae6b93dac09d7aef46e68bf0c83a90535401fba7e5f3dd4b3
7
+ data.tar.gz: 27bbf6b5a7962eef54d519207d710123cafc7a4b247cafec5beefeba23c0c3669cd01823662464c8aef497141bfadf1dd7e153ab72fc46dc99cf4c478309c1be
@@ -1,11 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1
4
- - 2.2
5
- - 2.3.1
6
- - 2.4.0-preview1
3
+ - 2.3
4
+ - 2.4
7
5
  - ruby-head
8
- - jruby-9
6
+ - jruby-9.1.13.0
9
7
  - jruby-head
10
- before_install: gem install bundler -v 1.10.6
8
+ - rbx-3
9
+ before_install: gem install bundler
11
10
  script: bundle exec rspec
@@ -33,5 +33,13 @@ module Mementus
33
33
  builder.id = @edge_ids.next_id unless builder.id
34
34
  set_edge(builder.to_edge)
35
35
  end
36
+
37
+ def remove_node(node)
38
+ @structure.remove_node(node)
39
+ end
40
+
41
+ def remove_edge(edge)
42
+ @structure.remove_edge(edge)
43
+ end
36
44
  end
37
45
  end
@@ -1,3 +1,3 @@
1
1
  module Mementus
2
- VERSION = '0.7.0'.freeze
2
+ VERSION = '0.7.1'.freeze
3
3
  end
@@ -113,4 +113,22 @@ describe Mementus::MutableGraph do
113
113
  expect(edge[:name]).to eq('Relationship')
114
114
  end
115
115
  end
116
+
117
+ specify '#remove_node' do
118
+ graph = Mementus::MutableGraph.new
119
+ graph.add_edge(from: 1, to: 2)
120
+
121
+ graph.remove_node(2)
122
+ expect(graph.nodes_count).to eq(1)
123
+ expect(graph.edges_count).to eq(0)
124
+ end
125
+
126
+ specify '#remove_edge' do
127
+ graph = Mementus::MutableGraph.new
128
+ graph.add_edge(from: 1, to: 2)
129
+
130
+ graph.remove_edge(1)
131
+ expect(graph.nodes_count).to eq(2)
132
+ expect(graph.edges_count).to eq(0)
133
+ end
116
134
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mementus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - maetl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-12 00:00:00.000000000 Z
11
+ date: 2017-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler