gremlin_client 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +24 -4
- data/{examples → example}/scripts/test.groovy +0 -0
- data/{examples → example}/test.rb +1 -1
- data/lib/gremlin_client/connection.rb +6 -0
- data/lib/gremlin_client/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 857945f3d59afb919ada2c03def3d2548a845753
|
4
|
+
data.tar.gz: da8005b5c6e714b039bc78d8c21ffaa26f87c039
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 317e77f858d50bc94de9e91b6e8f70b228b05f0654cba152f1dfa67b8c35de3c043837b6f41366525cd41538aa135d5a75d5cf5afacb9ec20ef19c933480e7f0
|
7
|
+
data.tar.gz: 0ee9aee6bc11cbcb5844bfb98fd0ce8c7c5d9cb5328000e6079297a6f230c49d30d4e507067c23f6c3fd4f33957ed87dd3d448494b11d62d1bceee676d58b2dd
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,14 +1,17 @@
|
|
1
|
-
#
|
2
|
-
Gremlin client for the WebSocketChannelizer.
|
1
|
+
# Ruby Gremlin Client
|
2
|
+
Gremlin client in ruby for the WebSocketChannelizer.
|
3
3
|
|
4
4
|
This client is not thread safe by itself! If you want to make it safer for your app, please make sure
|
5
5
|
to use something like [ConnectionPool gem](https://github.com/mperham/connection_pool).
|
6
6
|
|
7
|
-
|
8
7
|
## Usage:
|
9
8
|
|
9
|
+
```bash
|
10
|
+
gem instal gremlin_client
|
11
|
+
```
|
12
|
+
|
10
13
|
```ruby
|
11
|
-
conn = GremlinClient.Connection.new(
|
14
|
+
conn = GremlinClient.Connection.new(host: 'localhost', port:123)
|
12
15
|
resp = conn.send("g.V().has('myVar', myValue)", {myValue: 'this_is_processed_by_gremlin_server'})
|
13
16
|
```
|
14
17
|
|
@@ -27,3 +30,20 @@ You can even specify the folder where to load those files in the constructor:
|
|
27
30
|
```ruby
|
28
31
|
conn = GremlinClient.Connection.new(groovy_script_path: 'scripts/groovy')
|
29
32
|
```
|
33
|
+
|
34
|
+
|
35
|
+
## TODO:
|
36
|
+
|
37
|
+
The following things are priority in our list of things to do, but we haven't had time to implement
|
38
|
+
yet:
|
39
|
+
|
40
|
+
* rspec
|
41
|
+
* SSL support
|
42
|
+
* authentication
|
43
|
+
|
44
|
+
The following is very nice to have, but since we are testing against Titan 1.0.0, which has a pretty
|
45
|
+
old version of Gremlin, we still rely on groovy to do more complex parsing. But as soon as JanusGraph
|
46
|
+
is release it would be nice to start working on:
|
47
|
+
|
48
|
+
* ruby-side syntax like `g.V.hasLabel("omg")..`
|
49
|
+
* compiled Gremlin query generation
|
File without changes
|
@@ -5,6 +5,12 @@ module GremlinClient
|
|
5
5
|
|
6
6
|
attr_reader :timeout, :groovy_script_path
|
7
7
|
|
8
|
+
class << self
|
9
|
+
# a centralized place for you to store a connection pool of those objects
|
10
|
+
# recommendeded one is: https://github.com/mperham/connection_pool
|
11
|
+
attr_accessor :pool
|
12
|
+
end
|
13
|
+
|
8
14
|
# initialize a new connection using:
|
9
15
|
# host => hostname/ip where to connect
|
10
16
|
# port => listen port of the server
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gremlin_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcelo Coraça de Freitas
|
@@ -123,8 +123,8 @@ files:
|
|
123
123
|
- LICENSE
|
124
124
|
- README.md
|
125
125
|
- Rakefile
|
126
|
-
-
|
127
|
-
-
|
126
|
+
- example/scripts/test.groovy
|
127
|
+
- example/test.rb
|
128
128
|
- gremlin_client.gemspec
|
129
129
|
- lib/gremlin_client.rb
|
130
130
|
- lib/gremlin_client/connection.rb
|