grumlin 0.14.2 → 0.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d54992de5df5f10f004557bc7a7d86ec5558c104663bf36904838e843d38b4d
4
- data.tar.gz: e2e5cca5ad4cc034b991760db13c9a41d780609895ea38e236ef384bfa9df8f4
3
+ metadata.gz: f1574fb6f69111d6a738cdbb1e19fb085c234ade887483e1b2c45644104cc40b
4
+ data.tar.gz: 2910b648435d662b8e1bebfb6646b838e71912807379aa04205efdcc0a8b8a05
5
5
  SHA512:
6
- metadata.gz: 9a1f23141609f072193fa4a624ae63263200daebb72b4f2c0759e738325409546365f962117d36dbb8baf1c6df5ebd9a60f5c53453f7827cfd8cc90d450afa0e
7
- data.tar.gz: c6bd3b5f1f0b02173931f8189c0dca7fdcb5c11bfc6c4f8fdb34065a8d90a55ecb4118cf50f080c3c490ed1e2afda9035716fafc4679c6f606ad74ccc955d5f3
6
+ metadata.gz: 41cadcd8b01c0ef3af860942eb6d187e5acfafdfd5e7c7cd9a052bb5f261ecd9773912ebe8a6da039188b1a81519fc20a7c7c19706c915f7550787345b936ac8
7
+ data.tar.gz: fcbc59501668d19e08305a08158ed63ac73a6a94d375d71af0975f8a4a556f900a2dadd611da66e5b306679580e586ee1a23bdfea1d058bf9c86e77a4f7ee2fa
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## [0.14.2] - 2021-12-13
2
+
3
+ - Fix `Module` bloating
4
+ - Add `Operator` expressions
5
+ - Add `__.coalesce` and `__.constant`
6
+ - Add steps: `sum`, `sack`
7
+ - Add configuration steps: `withSack`
8
+ - Rename `Grumlin::Expressions::Tool` to `Grumlin::Expressions::Expression`
9
+
10
+
1
11
  ## [0.14.2] - 2021-12-12
2
12
 
3
13
  - Better exceptions
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grumlin (0.14.2)
4
+ grumlin (0.14.3)
5
5
  async-pool (~> 0.3)
6
6
  async-websocket (~> 0.19)
7
7
  oj (~> 3.12)
@@ -68,7 +68,7 @@ GEM
68
68
  racc (~> 1.4)
69
69
  nokogiri (1.11.7-x86_64-linux)
70
70
  racc (~> 1.4)
71
- oj (3.13.9)
71
+ oj (3.13.10)
72
72
  overcommit (0.57.0)
73
73
  childprocess (>= 0.6.3, < 5)
74
74
  iniparse (~> 1.4)
@@ -7,8 +7,8 @@ module Grumlin
7
7
  # TODO: add other steps
8
8
  SUPPORTED_STEPS = %i[E V addE addV and as both bothE by choose coalesce count dedup drop elementMap emit fold from
9
9
  group groupCount has hasId hasLabel hasNot id in inE inV is label limit not or order out outE
10
- path project property range repeat select sideEffect skip tail to unfold union until valueMap
11
- values where with].freeze
10
+ path project property range repeat sack select sideEffect skip sum tail to unfold union until
11
+ valueMap values where with].freeze
12
12
 
13
13
  def initialize(name, *args, configuration_steps: [], previous_step: nil, **params)
14
14
  @name = name
@@ -2,10 +2,10 @@
2
2
 
3
3
  module Grumlin
4
4
  module Expressions
5
- module Tool
5
+ module Expression
6
6
  def define_steps(steps, tool_name)
7
7
  steps.each do |step|
8
- self.class.define_method step do
8
+ define_method step do
9
9
  name = "@#{step}"
10
10
  return instance_variable_get(name) if instance_variable_defined?(name)
11
11
 
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Grumlin
4
+ module Expressions
5
+ module Operator
6
+ SUPPORTED_STEPS = %i[addAll and assign div max min minus mult or sum].freeze
7
+
8
+ class << self
9
+ extend Expression
10
+
11
+ define_steps(SUPPORTED_STEPS, "Operator")
12
+ end
13
+ end
14
+ end
15
+ end
@@ -3,11 +3,13 @@
3
3
  module Grumlin
4
4
  module Expressions
5
5
  module Order
6
- extend Tool
7
-
8
6
  SUPPORTED_STEPS = %i[asc desc].freeze
9
7
 
10
- define_steps(SUPPORTED_STEPS, "Order")
8
+ class << self
9
+ extend Expression
10
+
11
+ define_steps(SUPPORTED_STEPS, "Order")
12
+ end
11
13
  end
12
14
  end
13
15
  end
@@ -3,11 +3,13 @@
3
3
  module Grumlin
4
4
  module Expressions
5
5
  module Pop
6
- extend Tool
7
-
8
6
  SUPPORTED_STEPS = %i[all first last mixed].freeze
9
7
 
10
- define_steps(SUPPORTED_STEPS, "Pop")
8
+ class << self
9
+ extend Expression
10
+
11
+ define_steps(SUPPORTED_STEPS, "Pop")
12
+ end
11
13
  end
12
14
  end
13
15
  end
@@ -3,11 +3,13 @@
3
3
  module Grumlin
4
4
  module Expressions
5
5
  module Scope
6
- extend Tool
7
-
8
6
  SUPPORTED_STEPS = %i[local].freeze
9
7
 
10
- define_steps(SUPPORTED_STEPS, "Scope")
8
+ class << self
9
+ extend Expression
10
+
11
+ define_steps(SUPPORTED_STEPS, "Scope")
12
+ end
11
13
  end
12
14
  end
13
15
  end
@@ -3,11 +3,13 @@
3
3
  module Grumlin
4
4
  module Expressions
5
5
  module T
6
- extend Tool
7
-
8
6
  SUPPORTED_STEPS = %i[id label].freeze
9
7
 
10
- define_steps(SUPPORTED_STEPS, "T")
8
+ class << self
9
+ extend Expression
10
+
11
+ define_steps(SUPPORTED_STEPS, "T")
12
+ end
11
13
  end
12
14
  end
13
15
  end
@@ -4,8 +4,8 @@ module Grumlin
4
4
  module Expressions
5
5
  module U
6
6
  # TODO: add other start steps
7
- SUPPORTED_STEPS = %i[V addV count drop fold has hasLabel hasNot id in inE inV is label out outE outV project
8
- repeat select timeLimit unfold valueMap values].freeze
7
+ SUPPORTED_STEPS = %i[V addV coalesce constant count drop fold has hasLabel hasNot id in inE inV is label out outE
8
+ outV project repeat select timeLimit unfold valueMap values].freeze
9
9
 
10
10
  class << self
11
11
  SUPPORTED_STEPS.each do |step|
@@ -5,7 +5,7 @@ module Grumlin
5
5
  # TODO: add other start steps
6
6
  SUPPORTED_STEPS = %i[E V addE addV].freeze
7
7
 
8
- CONFIGURATION_STEPS = %i[withSideEffect].freeze
8
+ CONFIGURATION_STEPS = %i[withSack withSideEffect].freeze
9
9
 
10
10
  attr_reader :configuration_steps
11
11
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Grumlin
4
- VERSION = "0.14.2"
4
+ VERSION = "0.14.3"
5
5
  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: 0.14.2
4
+ version: 0.14.3
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-12-11 00:00:00.000000000 Z
11
+ date: 2021-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-pool
@@ -101,12 +101,13 @@ files:
101
101
  - lib/grumlin/bytecode.rb
102
102
  - lib/grumlin/client.rb
103
103
  - lib/grumlin/edge.rb
104
+ - lib/grumlin/expressions/expression.rb
105
+ - lib/grumlin/expressions/operator.rb
104
106
  - lib/grumlin/expressions/order.rb
105
107
  - lib/grumlin/expressions/p.rb
106
108
  - lib/grumlin/expressions/pop.rb
107
109
  - lib/grumlin/expressions/scope.rb
108
110
  - lib/grumlin/expressions/t.rb
109
- - lib/grumlin/expressions/tool.rb
110
111
  - lib/grumlin/expressions/u.rb
111
112
  - lib/grumlin/expressions/with_options.rb
112
113
  - lib/grumlin/path.rb