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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3dbf9e3a426e804d0739eabbbff555e2d67d3133
4
- data.tar.gz: 0ef0b3bf1ac51f5498c1a842470db75fd6a2d785
3
+ metadata.gz: 857945f3d59afb919ada2c03def3d2548a845753
4
+ data.tar.gz: da8005b5c6e714b039bc78d8c21ffaa26f87c039
5
5
  SHA512:
6
- metadata.gz: 19bf979b94589ada22230851e1e62e0f3cf4e8b6b6a6b704d63a8b20ff2c8175f218a13130092b7a91dc6842c27cd2e8a0cb3a2aca730ca52ed88a46410bc04f
7
- data.tar.gz: 5b6978748cf94e3b32d49c36d0a2e250adfa9f9cf1a0200bc0d8ef1ce697d7182fcb82e0110e1101d0666a9335565de441dd01403f5878594056797623fe66f7
6
+ metadata.gz: 317e77f858d50bc94de9e91b6e8f70b228b05f0654cba152f1dfa67b8c35de3c043837b6f41366525cd41538aa135d5a75d5cf5afacb9ec20ef19c933480e7f0
7
+ data.tar.gz: 0ee9aee6bc11cbcb5844bfb98fd0ce8c7c5d9cb5328000e6079297a6f230c49d30d4e507067c23f6c3fd4f33957ed87dd3d448494b11d62d1bceee676d58b2dd
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gremlin_client (0.0.1)
4
+ gremlin_client (0.0.2)
5
5
  websocket-client-simple (~> 0.3)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,14 +1,17 @@
1
- # ruby-gremlin
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( host: 'ws://localhost:123')
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
@@ -4,7 +4,7 @@ require 'pp'
4
4
  require 'gremlin_client'
5
5
 
6
6
 
7
- conn = GremlinClient::Connection.new(groovy_script_path: 'bin/scripts')
7
+ conn = GremlinClient::Connection.new(groovy_script_path: 'example/scripts')
8
8
 
9
9
  pp conn.send('1+what', {what: 10})
10
10
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module GremliClient
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
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.1
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
- - examples/scripts/test.groovy
127
- - examples/test.rb
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