grumlin 1.0.0 → 1.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
  SHA256:
3
- metadata.gz: 3d77c67f0dc99de145a48c9699f83c02c7f1689011c20a4fce35003ee0c3eb1a
4
- data.tar.gz: beb9f37e27a057dad388ec74b5c0280ba1f560ddbf6d23251e5c8de997050692
3
+ metadata.gz: f8c299747c9fc7040421c33f472fdc8fa8801a85f5dbe563ca7cc0a9e648ca8a
4
+ data.tar.gz: da5f78c574be95f4a2bb22da2f7f9544545dfb6c852a973b7d3ea2ef9e9c3722
5
5
  SHA512:
6
- metadata.gz: 3143048e1834d41ee788f5782aa17f5c7f577de15c71ee82889b02401066632145fa96789a36f1937dcb590a06cbbac6e009fc1034c2d03abf6e93fcb730c685
7
- data.tar.gz: 07add684f8f072c807c2b0db71ea9292655cabd40400fb4c2ee36089ea9626fcb7b041b2da44866e811e49b4b2495201c810dbaf067727687b0a5ea41e726171
6
+ metadata.gz: fae7bdcb40a085d8f3ae56f0fa2e20afc6b7e4acf0d24729ce8ca9ccefca8a0236adc3f7d1aa1edbf9c1ddfb2b25c043f5a199dd5221dab21653a6de1e9c58db
7
+ data.tar.gz: 77ac591dd3fd5563639ecaea63ef16802d5212fb16681a8f6de26808722f9f67789147aab3cf0cd9606ac1c2663a5fc6109ec2d70d30585d165bd5a10ca00e89
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grumlin (1.0.0)
4
+ grumlin (1.0.2)
5
5
  async-pool (~> 0.3.0)
6
6
  async-websocket (~> 0.22.0)
7
7
  ibsciss-middleware (~> 0.4.0)
@@ -74,8 +74,6 @@ GEM
74
74
  nokogiri (1.13.9)
75
75
  mini_portile2 (~> 2.8.0)
76
76
  racc (~> 1.4)
77
- nokogiri (1.13.9-x86_64-linux)
78
- racc (~> 1.4)
79
77
  oj (3.13.23)
80
78
  overcommit (0.59.1)
81
79
  childprocess (>= 0.6.3, < 5)
data/lib/definitions.yml CHANGED
@@ -21,6 +21,7 @@ steps:
21
21
  - drop
22
22
  - elementMap
23
23
  - emit
24
+ - fail
24
25
  - filter
25
26
  - fold
26
27
  - from
@@ -4,6 +4,7 @@ class Grumlin::RequestErrorFactory
4
4
  ERRORS = {
5
5
  499 => Grumlin::InvalidRequestArgumentsError,
6
6
  500 => Grumlin::ServerError,
7
+ 595 => Grumlin::FailStepError,
7
8
  597 => Grumlin::ScriptEvaluationError,
8
9
  599 => Grumlin::ServerSerializationError,
9
10
  598 => Grumlin::ServerTimeoutError,
@@ -17,7 +17,8 @@ module Grumlin::Typing
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]) },
20
- "g:T" => ->(value) { Grumlin::Expressions::T.public_send(value) }
20
+ "g:T" => ->(value) { Grumlin::Expressions::T.public_send(value) },
21
+ "g:UUID" => ->(value) { value }
21
22
  }.freeze
22
23
 
23
24
  CASTABLE_TYPES = [Hash, String, Integer, TrueClass, FalseClass, NilClass, Array].freeze
@@ -45,7 +46,7 @@ module Grumlin::Typing
45
46
 
46
47
  def verify_castable_hash!(value, type)
47
48
  raise TypeError, "#{value} cannot be casted, @type is missing" if value[:@type].nil?
48
- raise(UnknownTypeError, value[:@type]) if type.nil?
49
+ raise(Grumlin::UnknownTypeError, value[:@type]) if type.nil?
49
50
  raise TypeError, "#{value} cannot be casted, @value is missing" if value[:@value].nil?
50
51
  end
51
52
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Grumlin
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.2"
5
5
  end
data/lib/grumlin.rb CHANGED
@@ -96,6 +96,9 @@ module Grumlin
96
96
  # NOTE: Neptune does not return id.
97
97
  end
98
98
 
99
+ class FailStepError < ServerError
100
+ end
101
+
99
102
  class VertexAlreadyExistsError < AlreadyExistsError; end
100
103
 
101
104
  class EdgeAlreadyExistsError < AlreadyExistsError; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grumlin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Sinyavskiy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-23 00:00:00.000000000 Z
11
+ date: 2022-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-pool