red_grape 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/bin/redgrape CHANGED
@@ -2,9 +2,9 @@
2
2
  $: << File.expand_path('../../lib', __FILE__)
3
3
 
4
4
  require 'optparse'
5
+ require 'red_grape'
5
6
  require 'red_grape/tools/graph_store'
6
7
  require 'red_grape/tools/irg'
7
- require 'red_grape/version'
8
8
 
9
9
  # interprete options
10
10
  ::Version = RedGrape::VERSION
data/bin/trellis CHANGED
@@ -2,8 +2,8 @@
2
2
  $: << File.expand_path('../../lib', __FILE__)
3
3
 
4
4
  require 'optparse'
5
+ require 'red_grape'
5
6
  require 'red_grape/tools/graph_store'
6
- require 'red_grape/version'
7
7
 
8
8
  # interprete options
9
9
  ::Version = RedGrape::VERSION
data/lib/red_grape.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module RedGrape
2
- VERSION = '0.0.10'
2
+ VERSION = '0.0.11'
3
3
  end
4
4
 
5
5
  require 'ext/nil_class_ext'
@@ -65,7 +65,7 @@ class OnTheNatureOfPipesTest < Test::Unit::TestCase
65
65
  def test_if_then_else
66
66
  #assert_equal ['vadas', ['ripple', 'lop']],
67
67
  assert_equal ['vadas', 'ripple', 'lop'],
68
- @graph.v(1).out('knows').if_then_else(proc{it.age < 30}, proc{it.name}, proc{it.out('created').name}).take.to_a
68
+ @graph.v(1).out('knows').if_then_else(_{it.age < 30}, _{it.name}, _{it.out('created').name}).take.to_a
69
69
  end
70
70
 
71
71
  def test_back
@@ -53,7 +53,7 @@ class TraversalPatternsTest < Test::Unit::TestCase
53
53
 
54
54
  assert_equal(
55
55
  [["marko", 0.5, "vadas"], ["marko", 1.0, "josh"], ["marko", 0.4, "lop"]].to_s,
56
- v1.outE.inV.path(proc{it.name}, proc{it.weight}, proc{it.name}).take.to_s
56
+ v1.outE.inV.path(_{it.name}, _{it.weight}, _{it.name}).take.to_s
57
57
  )
58
58
  end
59
59
 
@@ -88,22 +88,22 @@ class TraversalPatternsTest < Test::Unit::TestCase
88
88
 
89
89
  #assert_equal(
90
90
  # 70307,
91
- # v89.out.loop(1, proc{it.loops < 4}).take.size
91
+ # v89.out.loop(1, _{it.loops < 4}).take.size
92
92
  #) #=> OK
93
93
 
94
94
  #assert_equal(
95
95
  # 71972,
96
- # v89.out.loop(1, proc{it.loops < 4}, proc{true}).take.size
96
+ # v89.out.loop(1, _{it.loops < 4}, _{true}).take.size
97
97
  #) #=> 70307
98
98
 
99
99
  #assert_equal(
100
100
  # 582,
101
- # v89.out.loop(1, proc{it.loops < 4}, proc{it.object.id == '89'}).take.size
101
+ # v89.out.loop(1, _{it.loops < 4}, _{it.object.id == '89'}).take.size
102
102
  #) #=> 564
103
103
  end
104
104
 
105
105
  # https://github.com/tinkerpop/gremlin/wiki/Split-Merge-Pattern
106
- def test_split_marge_pattern
106
+ def test_split_merge_pattern
107
107
  v1 = @g1.vertex 1
108
108
 
109
109
  #assert_equal(
@@ -122,10 +122,10 @@ class TraversalPatternsTest < Test::Unit::TestCase
122
122
  @g2 ||= RedGrape.load_graph 'data/graph-example-2.xml'
123
123
  assert_equal(
124
124
  {'cover'=>313, 'original'=>184},
125
- @g2.V.has_not('song_type', nil).group_count(proc{it.song_type}).cap.take
125
+ @g2.V.has_not('song_type', nil).group_count(_{it.song_type}).cap.take
126
126
  )
127
127
 
128
- ret = @g2.V.has_not('song_type', nil).group_by(proc{it.song_type}, proc{it}).cap.take
128
+ ret = @g2.V.has_not('song_type', nil).group_by(_{it.song_type}, _{it}).cap.take
129
129
  assert_equal 2, ret.keys.size
130
130
  assert_equal 313, ret.values[0].size
131
131
  assert ret.values[0].all?{|e| e.is_a? RedGrape::Vertex}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: red_grape
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-06-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
16
- requirement: &70324009053140 !ruby/object:Gem::Requirement
16
+ requirement: &70365490452460 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70324009053140
24
+ version_requirements: *70365490452460
25
25
  description: RedGrape is an in-memory graph database written in ruby. I made this
26
26
  in order to learn how graph databases work so that please do not use this for any
27
27
  serious purpose.