grumlin 0.12.5 → 0.14.1

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: 3fa9540000384bf515945dcb4ca15731e8b71d0d0d162bdde304c9c653e36de1
4
- data.tar.gz: 7078ea9b27f96f6384b9b9918a0b49fe325075790b98b4367b153312670bd7be
3
+ metadata.gz: 4889d5002539dc86922c58967a95a9d65da0e93b0b953626f17b59e1296f24bc
4
+ data.tar.gz: d2f9cf32f1d2d41ba65ac610c08167333e13eb26a98da6569b4b05c41c78aa6a
5
5
  SHA512:
6
- metadata.gz: b32ac2a9ac09843ec5aa0ac8da79e9712bb98002df20689ea53c19f23b9209a58bd2850c203c67b7ed40c8b18059fa589243d5330cd5052f9637428043d0949b
7
- data.tar.gz: ffdda90d2a81d59f4c8baa8d9cc0413d5caa2dbc418bbce3c64958202a22089122889ab41e67962d6de6e1bc5afff7824361a3c6265cd79328e4912fcada92cc
6
+ metadata.gz: 72503ca022ceb7f38a9b8444cd711ef5aed9a0c3b37121c93009b9cbf2e1000d318e9e720c8d6ce4c1882a09d0ce24a823df7e06b15e359c0d46388baf06fc8d
7
+ data.tar.gz: 073aaa56b7a15a0cb6cc149629f744c82892a902f68cc7e7c2df052cd4d0c053942cdb9a2625310bc7d6afc24433a97ba753bc4ea8bd54f8ddb681cba3075dbc
@@ -22,7 +22,7 @@ jobs:
22
22
  runs-on: ubuntu-latest
23
23
  strategy:
24
24
  matrix:
25
- ruby: [2.6, 2.7, 3.0]
25
+ ruby: [2.7, 3.0]
26
26
  steps:
27
27
  - uses: actions/checkout@v2
28
28
 
data/.rspec CHANGED
@@ -1,3 +1,2 @@
1
- --format documentation
2
1
  --color
3
2
  --require spec_helper
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.6
2
+ TargetRubyVersion: 2.7
3
3
  NewCops: enable
4
4
  SuggestExtensions: false
5
5
 
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 2.6.6
1
+ ruby 2.7.5
data/CHANGELOG.md CHANGED
@@ -1,4 +1,15 @@
1
- ## [Unreleased]
1
+ ## [0.14.0] - 2021-12-07
2
+
3
+ - Add initial support for [configuration steps](https://tinkerpop.apache.org/docs/current/reference/#configuration-steps)
4
+ - Add the `withSideEffect` configuration step
5
+ - Fix passing keyword arguments to regular steps
6
+ - *Drop support for ruby 2.6*
7
+
8
+ ## [0.13.0] - 2021-12-03
9
+
10
+ - Add `Shortcuts` and `Repository`
11
+ - Allow executing any gremlin steps by name using `Grumlin::AnonymousStep#step`
12
+ - Rename `Grumlin::Tools` to `Grumlin::Expressions`
2
13
 
3
14
  ## [0.1.0] - 2021-05-25
4
15
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grumlin (0.12.5)
4
+ grumlin (0.14.1)
5
5
  async-pool (~> 0.3)
6
6
  async-websocket (~> 0.19)
7
7
  oj (~> 3.12)
@@ -60,8 +60,12 @@ GEM
60
60
  rexml
61
61
  kramdown-parser-gfm (1.1.0)
62
62
  kramdown (~> 2.0)
63
+ mini_portile2 (2.5.3)
63
64
  minitest (5.14.4)
64
65
  nio4r (2.5.8)
66
+ nokogiri (1.11.7)
67
+ mini_portile2 (~> 2.5.0)
68
+ racc (~> 1.4)
65
69
  nokogiri (1.11.7-x86_64-linux)
66
70
  racc (~> 1.4)
67
71
  oj (3.13.9)
@@ -154,6 +158,7 @@ GEM
154
158
  zeitwerk (2.4.2)
155
159
 
156
160
  PLATFORMS
161
+ ruby
157
162
  x86_64-linux
158
163
 
159
164
  DEPENDENCIES
data/README.md CHANGED
@@ -14,7 +14,7 @@ and gremlin-server.
14
14
  [async-websocket](https://github.com/socketry/async-websocket). Code using grumlin must be executed in an async
15
15
  event loop.
16
16
 
17
- **Warning:** Grumlin is in development, but ready for simple use cases
17
+ **Warning**: Grumlin is in development, but ready for simple use cases
18
18
 
19
19
  ## Table of contents
20
20
  - [Install](#install)
@@ -51,12 +51,12 @@ end
51
51
 
52
52
  ### Traversing graphs
53
53
 
54
- **Warning:** Not all steps and tools described in the standard are supported
54
+ **Warning**: Not all steps and tools described in the standard are supported
55
55
 
56
56
  #### Sugar
57
57
 
58
58
  Grumlin provides an easy to use module called `Grumlin::Sugar`. Once included in your class it injects some useful
59
- constants and methods turning your class into an entrypoint for traversals.
59
+ constants and methods turning your class into an entrypoint for traversals with pure gremlin experience.
60
60
 
61
61
  ```ruby
62
62
  class MyRepository
@@ -73,6 +73,109 @@ class MyRepository
73
73
  end
74
74
  ```
75
75
 
76
+ #### Shortcuts
77
+
78
+ **Shortcuts** is a way to share and organize gremlin code. They let developers define their own steps consisting of
79
+ sequences of standard gremlin steps, other shortcuts and even add new initially unsupported by Grumlin steps.
80
+ Remember ActiveRecord scopes? Shortcuts are very similar. `Grumlin::Shortcuts#with_shortcuts` wraps a given object into
81
+ a proxy object that simply proxies all methods existing in the wrapped object to it and handles shortcuts.
82
+
83
+ **Important**: if a shortcut's name matches a name of a method defined on the wrapped object, this shortcut will be
84
+ be ignored because methods have higher priority. You cannot override supported by Grumlin steps with shortcuts,
85
+ `Grumlin::Shortcuts.shortcut` will raise an `ArgumentError`. Please carefully choose names for your shortcuts.
86
+
87
+ Shortcuts are designed to be used with `Grumlin::Repository` but still can be used separately, with `Grumlin::Sugar`
88
+ for example.
89
+
90
+ **Defining**:
91
+ ```ruby
92
+
93
+ # Defining shortcuts
94
+ class ColorShortcut
95
+ extend Grumlin::Shortcuts
96
+
97
+ # Custom step
98
+ shortcut :hasColor do |color|
99
+ has(:color, color)
100
+ end
101
+ end
102
+
103
+ class ChooseShortcut
104
+ extend Grumlin::Shortcuts
105
+
106
+ # Standard Gremlin step
107
+ shortcut :choose do |*args|
108
+ step(:choose, *args)
109
+ end
110
+ end
111
+
112
+ class AllShortcuts
113
+ extend Grumlin::Shortcuts
114
+
115
+ # Adding shortcuts from other modules
116
+ shortcuts_from ColorShortcut
117
+ shortcuts_from ChooseShortcut
118
+ end
119
+ ```
120
+
121
+ **Using with Grumlin::Sugar**:
122
+ ```ruby
123
+ class MyRepository
124
+ include Grumlin::Sugar
125
+ extend Grumlin::Shortcuts
126
+
127
+ shortcuts_from AllShortcuts
128
+
129
+ # Wrapping a traversal
130
+ def red_triangles
131
+ with_shortcuts(g).V.hasLabel(:triangle)
132
+ .hasColor("red")
133
+ .toList
134
+ end
135
+
136
+ # Wrapping _
137
+ def something_else
138
+ with_shortcuts(g).V.hasColor("red")
139
+ .repeat(with_shortcuts(__)
140
+ .out(:has)
141
+ .hasColor("blue")).toList
142
+ end
143
+ end
144
+ ```
145
+
146
+ #### Grumlin::Repository
147
+ `Grumlin::Repository` combines functionality of `Grumlin::Sugar` and `Grumlin::Shortcuts` as well as adds a few useful
148
+ shortcuts to make gremlin code more rubyish. Can be used as a drop in replacement for `Grumlin::Sugar`. Remember that
149
+ `Grumlin::Sugar` needs to be included, but `Grumlin::Repository` - extended. **Classes extending `Grumlin::Repository`
150
+ or `Grumlin::Shortcuts` can be inherited**, successors don't need to extend them again and have access to shortcuts
151
+ defined in the ancestor.
152
+
153
+ **Using**:
154
+
155
+ ```ruby
156
+ class MyRepository
157
+ extend Grumlin::Repository
158
+
159
+ # Repository supports all Grumlin::Shortcut and Grumlin::Sugar features.
160
+ # It can add shortcuts from another repository or a shortcuts module
161
+ shortcuts_from ChooseShortcut
162
+
163
+ shortcut :red_triangles do |color|
164
+ # hasAll unwraps a hash of properties into a chain of `has` steps:
165
+ # hasAll(name1: :value, name2: :value) == has(:name1, :value).has(:name2, :value)
166
+ # the `props` shortcut does exactly the same but with `property` steps.
167
+ hasAll(T.label => :triangle, color: color)
168
+ end
169
+
170
+ # g and __ are already aware of shortcuts
171
+ def red_triangles
172
+ g.V.hasLabel(:triangle)
173
+ .hasColor("red")
174
+ .toList
175
+ end
176
+ end
177
+ ```
178
+
76
179
  #### IRB
77
180
 
78
181
  An example of how to start an IRB session with support for executing gremlin queries:
data/grumlin.gemspec CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  spec.homepage = "https://github.com/zhulik/grumlin"
18
18
  spec.license = "MIT"
19
- spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
19
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
20
20
 
21
21
  spec.metadata["homepage_uri"] = spec.homepage
22
22
  spec.metadata["source_code_uri"] = "https://github.com/zhulik/grumlin"
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Grumlin
4
4
  class AnonymousStep
5
- attr_reader :name, :args, :previous_step
5
+ attr_reader :name, :previous_step, :configuration_steps
6
6
 
7
7
  # TODO: add other steps
8
8
  SUPPORTED_STEPS = %i[E V addE addV and as both bothE by coalesce count dedup drop elementMap emit fold from group
@@ -10,18 +10,24 @@ module Grumlin
10
10
  project property range repeat select sideEffect skip tail to unfold union until valueMap
11
11
  values where with].freeze
12
12
 
13
- def initialize(name, *args, previous_step: nil)
13
+ def initialize(name, *args, configuration_steps: [], previous_step: nil, **params)
14
14
  @name = name
15
15
  @previous_step = previous_step
16
16
  @args = args
17
+ @params = params
18
+ @configuration_steps = configuration_steps
17
19
  end
18
20
 
19
21
  SUPPORTED_STEPS.each do |step|
20
- define_method(step) do |*args|
21
- add_step(step, args)
22
+ define_method(step) do |*args, **params|
23
+ step(step, *args, **params)
22
24
  end
23
25
  end
24
26
 
27
+ def step(name, *args, **params)
28
+ self.class.new(name, *args, previous_step: self, configuration_steps: configuration_steps, **params)
29
+ end
30
+
25
31
  def inspect
26
32
  bytecode.inspect
27
33
  end
@@ -32,10 +38,8 @@ module Grumlin
32
38
  @bytecode ||= Bytecode.new(self, no_return: no_return)
33
39
  end
34
40
 
35
- private
36
-
37
- def add_step(step_name, args)
38
- self.class.new(step_name, *args, previous_step: self)
41
+ def args
42
+ [*@args, @params.any? ? arg.params : nil].compact
39
43
  end
40
44
  end
41
45
  end
@@ -20,7 +20,10 @@ module Grumlin
20
20
  end
21
21
 
22
22
  def inspect
23
- to_readable_bytecode.to_s
23
+ configuration_steps = @step.configuration_steps.map do |s|
24
+ serialize_arg(s, serialization_method: :to_readable_bytecode)
25
+ end
26
+ "#{configuration_steps.any? ? configuration_steps : nil}#{to_readable_bytecode}"
24
27
  end
25
28
  alias to_s inspect
26
29
 
@@ -29,21 +32,23 @@ module Grumlin
29
32
  end
30
33
 
31
34
  def value
32
- { step: (steps + (@no_return ? [NONE_STEP] : [])).map { |s| serialize_arg(s) } }
35
+ @value ||= { step: (steps + (@no_return ? [NONE_STEP] : [])).map { |s| serialize_arg(s) } }.tap do |v|
36
+ v.merge!(source: @step.configuration_steps.map { |s| serialize_arg(s) }) if @step.configuration_steps.any?
37
+ end
33
38
  end
34
39
 
35
40
  private
36
41
 
37
42
  # Serializes step or a step argument to either an executable query or a human readable string representation
38
- # depending on the `serialization_method` parameter. I should be either `:to_readable_bytecode` for human readable
43
+ # depending on the `serialization_method` parameter. It should be either `:to_readable_bytecode` for human readable
39
44
  # representation or `:to_bytecode` for query.
40
45
  def serialize_arg(arg, serialization_method: :to_bytecode)
41
- return arg.send(serialization_method) if arg.respond_to?(serialization_method)
46
+ return arg.public_send(serialization_method) if arg.respond_to?(serialization_method)
42
47
  return arg unless arg.is_a?(AnonymousStep)
43
48
 
44
49
  arg.args.flatten.each.with_object([arg.name.to_s]) do |a, res|
45
- res << if a.instance_of?(AnonymousStep)
46
- a.bytecode.send(serialization_method)
50
+ res << if a.respond_to?(:bytecode)
51
+ a.bytecode.public_send(serialization_method)
47
52
  else
48
53
  serialize_arg(a, serialization_method: serialization_method)
49
54
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Grumlin
4
- module Tools
4
+ module Expressions
5
5
  module Order
6
6
  extend Tool
7
7
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Grumlin
4
- module Tools
4
+ module Expressions
5
5
  module P
6
6
  class << self
7
7
  class Predicate < TypedValue
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Grumlin
4
- module Tools
4
+ module Expressions
5
5
  module Pop
6
6
  extend Tool
7
7
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Grumlin
4
- module Tools
4
+ module Expressions
5
5
  module Scope
6
6
  extend Tool
7
7
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Grumlin
4
- module Tools
4
+ module Expressions
5
5
  module T
6
6
  extend Tool
7
7
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Grumlin
4
- module Tools
4
+ module Expressions
5
5
  module Tool
6
6
  def define_steps(steps, tool_name)
7
7
  steps.each do |step|
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Grumlin
4
- module Tools
4
+ module Expressions
5
5
  module U
6
6
  # TODO: add other start steps
7
7
  SUPPORTED_STEPS = %i[V addV count drop fold has hasLabel id in inE inV label out outE outV project repeat
@@ -9,8 +9,8 @@ module Grumlin
9
9
 
10
10
  class << self
11
11
  SUPPORTED_STEPS.each do |step|
12
- define_method step do |*args|
13
- AnonymousStep.new(step, *args)
12
+ define_method step do |*args, **params|
13
+ AnonymousStep.new(step, *args, **params)
14
14
  end
15
15
  end
16
16
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Grumlin
4
- module Tools
4
+ module Expressions
5
5
  module WithOptions
6
6
  WITH_OPTIONS = {
7
7
  tokens: "~tinkerpop.valueMap.tokens",
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Grumlin
4
+ module Repository
5
+ module InstanceMethods
6
+ def __
7
+ with_shortcuts(Grumlin::Expressions::U)
8
+ end
9
+
10
+ def g
11
+ with_shortcuts(Grumlin::Traversal.new)
12
+ end
13
+ end
14
+
15
+ def self.extended(base)
16
+ base.extend(Grumlin::Shortcuts)
17
+ base.include(Grumlin::Expressions)
18
+ base.include(InstanceMethods)
19
+
20
+ base.shortcuts_from(Grumlin::Shortcuts::Properties)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Grumlin
4
+ class ShortcutProxy
5
+ extend Forwardable
6
+
7
+ attr_reader :object, :shortcuts
8
+
9
+ # shortcuts: {"name": ->(arg) {}}
10
+ def initialize(object, shortcuts, parent: nil)
11
+ @object = object
12
+ @shortcuts = shortcuts
13
+ @parent = parent
14
+ end
15
+
16
+ def method_missing(name, *args, **params)
17
+ return @parent.public_send(name, *args, **params) if %i[__ g].include?(name) && !@parent.nil?
18
+
19
+ return wrap_result(@object.public_send(name, *args, **params)) if @object.respond_to?(name)
20
+
21
+ return wrap_result(instance_exec(*args, **params, &@shortcuts[name])) if @shortcuts.key?(name)
22
+
23
+ super
24
+ end
25
+
26
+ # For some reason the interpreter thinks it's private
27
+ public def respond_to_missing?(name, include_private = false) # rubocop:disable Style/AccessModifierDeclarations
28
+ name = name.to_sym
29
+
30
+ (%i[__ g].include?(name) &&
31
+ @parent.respond_to?(name)) ||
32
+ @object.respond_to?(name) ||
33
+ @shortcuts.key?(name) ||
34
+ super
35
+ end
36
+
37
+ def_delegator :@object, :to_s
38
+
39
+ def inspect
40
+ @object.inspect
41
+ end
42
+
43
+ private
44
+
45
+ def wrap_result(result)
46
+ if result.is_a?(AnonymousStep) || result.is_a?(Traversal)
47
+ return self.class.new(result, @shortcuts, parent: @parent)
48
+ end
49
+
50
+ result
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Grumlin
4
+ module Shortcuts
5
+ module Properties
6
+ extend Grumlin::Shortcuts
7
+
8
+ shortcut :props do |*_args, **props|
9
+ props.reduce(self) do |tt, (prop, value)|
10
+ tt.property(prop, value)
11
+ end
12
+ end
13
+
14
+ shortcut :hasAll do |*, **props|
15
+ props.reduce(self) do |tt, (prop, value)|
16
+ tt.has(prop, value)
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Grumlin
4
+ module Shortcuts
5
+ module InstanceMethods
6
+ def with_shortcuts(obj)
7
+ ShortcutProxy.new(obj, self.class.shortcuts, parent: self)
8
+ end
9
+ end
10
+
11
+ def self.extended(base)
12
+ base.include(InstanceMethods)
13
+ base.include(Grumlin::Expressions)
14
+ end
15
+
16
+ def inherited(subclass)
17
+ super
18
+ subclass.shortcuts_from(self)
19
+ end
20
+
21
+ def shortcut(name, &block)
22
+ name = name.to_sym
23
+ # TODO: blocklist of names to avoid conflicts with standard methods?
24
+ raise ArgumentError, "cannot use names of standard gremlin steps" if Grumlin.supported_steps.include?(name)
25
+
26
+ raise ArgumentError, "shortcut '#{name}' already exists" if shortcuts.key?(name)
27
+
28
+ shortcuts[name] = block
29
+ end
30
+
31
+ def shortcuts_from(other_shortcuts)
32
+ other_shortcuts.shortcuts.each do |name, block|
33
+ shortcut(name, &block)
34
+ end
35
+ end
36
+
37
+ def shortcuts
38
+ @shortcuts ||= {}
39
+ end
40
+ end
41
+ end
data/lib/grumlin/step.rb CHANGED
@@ -4,8 +4,8 @@ module Grumlin
4
4
  class Step < AnonymousStep
5
5
  attr_reader :client
6
6
 
7
- def initialize(pool, name, *args, previous_step: nil)
8
- super(name, *args, previous_step: previous_step)
7
+ def initialize(pool, name, *args, configuration_steps: [], previous_step: nil, **params)
8
+ super(name, *args, previous_step: previous_step, configuration_steps: configuration_steps, **params)
9
9
  @pool = pool
10
10
  end
11
11
 
@@ -36,10 +36,8 @@ module Grumlin
36
36
  end
37
37
  end
38
38
 
39
- private
40
-
41
- def add_step(step_name, args)
42
- self.class.new(@pool, step_name, *args, previous_step: self)
39
+ def step(step_name, *args, **params)
40
+ self.class.new(@pool, step_name, *args, previous_step: self, configuration_steps: @configuration_steps, **params)
43
41
  end
44
42
  end
45
43
  end
data/lib/grumlin/sugar.rb CHANGED
@@ -3,11 +3,11 @@
3
3
  module Grumlin
4
4
  module Sugar
5
5
  def self.included(base)
6
- base.include Grumlin::Tools
6
+ base.include(Grumlin::Expressions)
7
7
  end
8
8
 
9
9
  def __
10
- Grumlin::Tools::U
10
+ Grumlin::Expressions::U
11
11
  end
12
12
 
13
13
  def g
@@ -11,8 +11,8 @@ module Grumlin
11
11
  include Grumlin::Sugar
12
12
 
13
13
  before do
14
- Grumlin::Tools.constants.each do |tool|
15
- stub_const(tool.to_s, Grumlin::Tools.const_get(tool))
14
+ Grumlin::Expressions.constants.each do |tool|
15
+ stub_const(tool.to_s, Grumlin::Expressions.const_get(tool))
16
16
  end
17
17
  end
18
18
 
@@ -5,13 +5,26 @@ module Grumlin
5
5
  # TODO: add other start steps
6
6
  SUPPORTED_STEPS = %i[E V addE addV].freeze
7
7
 
8
- def initialize(pool = Grumlin.default_pool)
8
+ CONFIGURATION_STEPS = %i[withSideEffect].freeze
9
+
10
+ attr_reader :configuration_steps
11
+
12
+ def initialize(pool = Grumlin.default_pool, configuration_steps: [])
9
13
  @pool = pool
14
+ @configuration_steps = configuration_steps
15
+ end
16
+
17
+ alias inspect to_s
18
+
19
+ CONFIGURATION_STEPS.each do |step|
20
+ define_method step do |*args, **params|
21
+ self.class.new(@pool, configuration_steps: @configuration_steps + [AnonymousStep.new(step, *args, **params)])
22
+ end
10
23
  end
11
24
 
12
25
  SUPPORTED_STEPS.each do |step|
13
- define_method step do |*args|
14
- Step.new(@pool, step, *args)
26
+ define_method step do |*args, **params|
27
+ Step.new(@pool, step, *args, configuration_steps: @configuration_steps, **params)
15
28
  end
16
29
  end
17
30
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Grumlin
4
- VERSION = "0.12.5"
4
+ VERSION = "0.14.1"
5
5
  end
data/lib/grumlin.rb CHANGED
@@ -106,6 +106,10 @@ module Grumlin
106
106
  end
107
107
  end
108
108
 
109
+ def self.supported_steps
110
+ @supported_steps ||= (Grumlin::AnonymousStep::SUPPORTED_STEPS + Grumlin::Expressions::U::SUPPORTED_STEPS).sort.uniq
111
+ end
112
+
109
113
  @pool_mutex = Mutex.new
110
114
 
111
115
  class << self
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: 0.12.5
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Sinyavskiy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-23 00:00:00.000000000 Z
11
+ date: 2021-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-pool
@@ -101,21 +101,25 @@ files:
101
101
  - lib/grumlin/bytecode.rb
102
102
  - lib/grumlin/client.rb
103
103
  - lib/grumlin/edge.rb
104
+ - lib/grumlin/expressions/order.rb
105
+ - lib/grumlin/expressions/p.rb
106
+ - lib/grumlin/expressions/pop.rb
107
+ - lib/grumlin/expressions/scope.rb
108
+ - lib/grumlin/expressions/t.rb
109
+ - lib/grumlin/expressions/tool.rb
110
+ - lib/grumlin/expressions/u.rb
111
+ - lib/grumlin/expressions/with_options.rb
104
112
  - lib/grumlin/path.rb
113
+ - lib/grumlin/repository.rb
105
114
  - lib/grumlin/request_dispatcher.rb
115
+ - lib/grumlin/shortcut_proxy.rb
116
+ - lib/grumlin/shortcuts.rb
117
+ - lib/grumlin/shortcuts/properties.rb
106
118
  - lib/grumlin/step.rb
107
119
  - lib/grumlin/sugar.rb
108
120
  - lib/grumlin/test/rspec.rb
109
121
  - lib/grumlin/test/rspec/db_cleaner_context.rb
110
122
  - lib/grumlin/test/rspec/gremlin_context.rb
111
- - lib/grumlin/tools/order.rb
112
- - lib/grumlin/tools/p.rb
113
- - lib/grumlin/tools/pop.rb
114
- - lib/grumlin/tools/scope.rb
115
- - lib/grumlin/tools/t.rb
116
- - lib/grumlin/tools/tool.rb
117
- - lib/grumlin/tools/u.rb
118
- - lib/grumlin/tools/with_options.rb
119
123
  - lib/grumlin/transport.rb
120
124
  - lib/grumlin/traversal.rb
121
125
  - lib/grumlin/typed_value.rb
@@ -137,14 +141,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
141
  requirements:
138
142
  - - ">="
139
143
  - !ruby/object:Gem::Version
140
- version: 2.6.0
144
+ version: 2.7.0
141
145
  required_rubygems_version: !ruby/object:Gem::Requirement
142
146
  requirements:
143
147
  - - ">="
144
148
  - !ruby/object:Gem::Version
145
149
  version: '0'
146
150
  requirements: []
147
- rubygems_version: 3.2.22
151
+ rubygems_version: 3.2.32
148
152
  signing_key:
149
153
  specification_version: 4
150
154
  summary: Gremlin graph traversal language DSL and client for Ruby.