grumlin 1.0.0.rc2 → 1.0.0.rc4

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
  SHA256:
3
- metadata.gz: 1321ed876a7cc42db4e40d16fe7a7c7baa4cd0d955ad58901ecfd07051700e7b
4
- data.tar.gz: 1b66499966537dff77767ddc5936222a7129b29004f05a60d4f578ede6c08a9f
3
+ metadata.gz: eec359b83d21de51c464a0cce4f4cf9eea1812da59eb329622954e8a89ad1432
4
+ data.tar.gz: 0df3dd7c3bb9768746a54dc2fdf8302eea323de89598828ff7be54e15387a596
5
5
  SHA512:
6
- metadata.gz: d6158025426480ae13930848e370014e2fc77325d650d5540c11a516b4ed982ee5b3526049d7f8e1b669d9b2ddffe2370e4dc5e8ce4cda55755e69f3b72750d3
7
- data.tar.gz: 33c02aca842d77dbe1284504b9c00195a72301bbcf23ba69cbeeffa5ca75d4d95aa71791e3d7228e863c62d1048739c70f3df90515f0339698741c1938e49484
6
+ metadata.gz: 2d80eb7df5ace498bc56c82f3e2f2fd9fd76cb7604a7bea250594349de0160cbed633f6df1706a842f2e5d52e6255be460172dd5924fb122fe416b18b86dec94
7
+ data.tar.gz: bc1b3621420e05c761edacbede51016ccada3e086f7f46b6985158c6e40a117e46f29dd6ba3ddf56952768d6b12a892dcfe69339f8fbeb24c2b122ccc105f3cf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grumlin (1.0.0.rc2)
4
+ grumlin (1.0.0.rc4)
5
5
  async-pool (~> 0.3)
6
6
  async-websocket (>= 0.19, < 0.20)
7
7
  ibsciss-middleware (~> 0.4.0)
@@ -5,8 +5,9 @@ class Grumlin::DummyTransaction < Grumlin::Transaction
5
5
 
6
6
  include Console
7
7
 
8
- def initialize(traversal_start_class, middlewares:, pool: nil) # rubocop:disable Lint/MissingSuper, Lint/UnusedMethodArgument
9
- @traversal_start_class = traversal_start_class
8
+ def initialize(traversal_start_class, middlewares:, pool:)
9
+ super
10
+ @session_id = nil
10
11
 
11
12
  logger.info(self) do
12
13
  "#{Grumlin.config.provider} does not support transactions. commit and rollback are ignored, data will be saved"
@@ -14,7 +14,6 @@ class Grumlin::Steppable
14
14
  def initialize(pool: nil, session_id: nil, middlewares: Grumlin.default_middlewares)
15
15
  @pool = pool
16
16
  @session_id = session_id
17
-
18
17
  @middlewares = middlewares
19
18
 
20
19
  return if respond_to?(:shortcuts)
@@ -16,7 +16,7 @@ class Grumlin::Transaction
16
16
  end
17
17
 
18
18
  def begin
19
- @traversal_start_class.new(session_id: @session_id)
19
+ @traversal_start_class.new(session_id: @session_id, pool: @pool)
20
20
  end
21
21
 
22
22
  def commit
@@ -12,15 +12,19 @@ class Grumlin::TraversalStart < Grumlin::Steppable
12
12
  transaction = tx_class.new(self.class, pool: @pool, middlewares: @middlewares)
13
13
  return transaction unless block_given?
14
14
 
15
+ result = nil
16
+
15
17
  begin
16
- yield transaction.begin
18
+ result = yield transaction.begin
17
19
  rescue Grumlin::Rollback
18
20
  transaction.rollback
21
+ result
19
22
  rescue StandardError
20
23
  transaction.rollback
21
24
  raise
22
25
  else
23
26
  transaction.commit
27
+ result
24
28
  end
25
29
  end
26
30
 
@@ -13,7 +13,7 @@ module Grumlin::Typing
13
13
  "g:Int64" => ->(value) { cast_int(value) },
14
14
  "g:Int32" => ->(value) { cast_int(value) },
15
15
  "g:Double" => ->(value) { cast_double(value) },
16
- "g:Direction" => ->(value) { value },
16
+ "g:Direction" => ->(value) { value.to_sym },
17
17
  "g:VertexProperty" => ->(value) { cast_entity(Grumlin::VertexProperty, value) },
18
18
  "g:TraversalMetrics" => ->(value) { cast_map(value[:@value]) },
19
19
  "g:Metrics" => ->(value) { cast_map(value[:@value]) },
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Grumlin
4
- VERSION = "1.0.0.rc2"
4
+ VERSION = "1.0.0.rc4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grumlin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc2
4
+ version: 1.0.0.rc4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Sinyavskiy