mementus 0.2.5 → 0.2.6

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: 4513413f72d998079932e3f00c021ed47b11df04
4
- data.tar.gz: c2ffeff4b00e94c2753b198e039298f4be9ec22a
3
+ metadata.gz: a03cb6779f6872174442d561581c14c8048597c7
4
+ data.tar.gz: e0b0e81f172b9b699a94a2da9ca65da1899823ee
5
5
  SHA512:
6
- metadata.gz: bea03fed5e0f750561ea11d1dac5788f14f5e0223db893ad4df88d617554e9814ffff0146f1161c23580de3bbe16b46218049a073faa389b98bb1a89710dbfb1
7
- data.tar.gz: 83e39ec2a2981bced0d5f928e48d0e8cc231430a76efc394f56b4399e84135395f68fec57dc92202e82ec092e340763b180ee5dfac4a2fecff7cd6d3d36b5d6f
6
+ metadata.gz: 5c45ef7529f95d104b97a4e92dd7ee0b922250f689e63f713f2b05c3794811cac69abb5b2d6b78c41cb058cf943a508c99d7af30eac6f65e84f82abe7b1c4992
7
+ data.tar.gz: 8e62108ba5e92626ffea76a45d1222e7fe4c6cd3769e3af6ebf66b182d37d73d49ea67ef0d6bd4c9b9c22f98bd5ddade73e836bbd062a0d79fef072e96cbb481
@@ -6,6 +6,10 @@ module Mementus
6
6
  @structure = Structure.new(is_directed)
7
7
  end
8
8
 
9
+ def query
10
+ Query::Source.new(self)
11
+ end
12
+
9
13
  def nodes_count
10
14
  @structure.nodes_count
11
15
  end
@@ -1,3 +1,3 @@
1
1
  module Mementus
2
- VERSION = '0.2.5'.freeze
2
+ VERSION = '0.2.6'.freeze
3
3
  end
data/spec/query_spec.rb CHANGED
@@ -1,17 +1,17 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Mementus::Query do
4
- let(:query) do
4
+ let(:graph) do
5
5
  graph = Mementus::Graph.new
6
6
  graph.add_edge(Mementus::Edge.new(Mementus::Node.new(1, :node), Mementus::Node.new(2, :node)))
7
- Mementus::Query::Source.new(graph)
7
+ graph
8
8
  end
9
9
 
10
10
  specify '#node' do
11
- expect(query.node(1).id).to eq(1)
11
+ expect(graph.query.node(1).id).to eq(1)
12
12
  end
13
13
 
14
14
  specify '#node#adjacent' do
15
- expect(query.node(1).adjacent.first.id).to eq(2)
15
+ expect(graph.query.node(1).adjacent.first.id).to eq(2)
16
16
  end
17
17
  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.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - maetl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-24 00:00:00.000000000 Z
11
+ date: 2016-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler