red_grape 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## Description:
6
6
 
7
- redGrape is an in-memory graph database written in ruby. I made this application in order to learn how a graph database works so that please do not use this for any serious purpose.
7
+ RedGrape is an in-memory graph database written in ruby. I made this application in order to learn how a graph database works so that please do not use this for any serious purpose.
8
8
 
9
9
  ## Features/Problems:
10
10
 
@@ -12,6 +12,8 @@ redGrape is an in-memory graph database written in ruby. I made this application
12
12
  * load GraphML
13
13
  * construct a graph programmatically
14
14
  * traverse nodes and edges using a gremlin-like DSL
15
+ * REST API
16
+ * Graph viewer (in progress)
15
17
 
16
18
  ## Synopsis:
17
19
 
@@ -98,7 +100,7 @@ Changes on a graph are not committed until the put_graph method is called.
98
100
 
99
101
  ## REST API:
100
102
 
101
- Start the server:
103
+ ### Server:
102
104
 
103
105
  $ ./bin/juicer
104
106
  [2012-06-30 02:03:01] INFO WEBrick 1.3.1
@@ -106,7 +108,32 @@ Start the server:
106
108
  == Sinatra/1.3.2 has taken the stage on 4567 for development with backup from WEBrick
107
109
  [2012-06-30 02:03:01] INFO WEBrick::HTTPServer#start: pid=12098 port=4567
108
110
 
109
- Access:
111
+ ### Use from Console:
112
+
113
+ $ curl http://localhost:4567/
114
+ {
115
+ "version": "0.1.0",
116
+ "supportedPaths": {
117
+ "GET": [
118
+ "/graphs",
119
+ "/graphs/[graph]",
120
+ "/graphs/[graph]/vertices",
121
+ "/graphs/[graph]/vertices?key=[key]&value=[value]",
122
+ "/graphs/[graph]/vertices/[vertex]",
123
+ "/graphs/[graph]/vertices/[vertex]/out",
124
+ ...
125
+ ],
126
+ "POST": [
127
+ ...
128
+ ],
129
+ "PUT": [
130
+ ...
131
+ ],
132
+ "DELETE": [
133
+ ...
134
+ ]
135
+ }
136
+ }
110
137
 
111
138
  $ curl http://localhost:4567/graphs
112
139
  {
@@ -116,6 +143,7 @@ Access:
116
143
  "tinkergraph"
117
144
  ]
118
145
  }
146
+
119
147
  $ curl http://localhost:4567/graphs/tinkergraph/vertices/1
120
148
  {
121
149
  "version": "0.1.0",
@@ -127,10 +155,12 @@ Access:
127
155
  }
128
156
  }
129
157
 
130
- ### Graph Viewer:
158
+ ### Use from Browser:
131
159
 
132
160
  http://localhost:4567/cellar/index.html
133
161
 
162
+ ![Screenshot](https://raw.github.com/technohippy/red-grape/master/public/image/cellar.png)
163
+
134
164
  ## Requirements:
135
165
 
136
166
  * Nokogiri (http://nokogiri.org/)
@@ -147,8 +177,9 @@ and generate the RDoc.
147
177
 
148
178
  ## References:
149
179
 
150
- * [Gremlin](https://github.com/tinkerpop/gremlin/wiki)
180
+ * [Gremlin](https://github.com/tinkerpop/gremlin/wiki/)
151
181
  * [Pipes](https://github.com/tinkerpop/pipes/wiki/)
182
+ * [Rexter](https://github.com/tinkerpop/rexster/wiki/)
152
183
 
153
184
  ## License:
154
185
 
@@ -1,5 +1,5 @@
1
1
  module RedGrape
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
4
4
 
5
5
  require 'ext/nil_class_ext'
@@ -148,7 +148,7 @@ $(function() {
148
148
  params[kv[0]] = kv[1];
149
149
  }
150
150
  $.post(
151
- '/graphs/' + 'tinkergraph' + '/vertices/' + id,
151
+ '/graphs/' + graphId + '/vertices/' + id,
152
152
  params,
153
153
  function(data) {
154
154
  window.location.reload(); // TODO
@@ -175,7 +175,7 @@ $(function() {
175
175
  params[kv[0]] = kv[1];
176
176
  }
177
177
  $.post(
178
- '/graphs/' + 'tinkergraph' + '/edges/' + id,
178
+ '/graphs/' + graphId + '/edges/' + id,
179
179
  params,
180
180
  function(data) {
181
181
  window.location.reload(); // TODO
Binary file
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.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-29 00:00:00.000000000 Z
12
+ date: 2012-06-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
16
- requirement: &70331117724260 !ruby/object:Gem::Requirement
16
+ requirement: &70103421214360 !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: *70331117724260
24
+ version_requirements: *70103421214360
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.
@@ -97,6 +97,7 @@ files:
97
97
  - public/cellar/graph.html
98
98
  - public/cellar/index.html
99
99
  - public/cellar/vertex.html
100
+ - public/image/cellar.png
100
101
  - public/js/d3.v2.js
101
102
  - public/js/jquery-1.7.2.min.js
102
103
  - red_grape.gemspec