grumlin 0.19.4 → 0.19.5

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: b15930a9bee5daea1b1c30e3967aa80e7894ff864594dd2c773e6f505211ff6f
4
- data.tar.gz: 9a9f11ebb808adc6443e3bc9be2c57b04027890a364bcdbb74e1e84e877f29f5
3
+ metadata.gz: 80bbea20c7a9e194618b59cc128ae8e783af4d342ddd9ca56039f08013218a81
4
+ data.tar.gz: baf7565f084501e8b4488bf5d7d8e09a5c786b91181dda46919b0668662ecfd0
5
5
  SHA512:
6
- metadata.gz: 174b21af80bf277e521fe255fc72fc4c2b238caffc2677abb0dc5f3fb2c848e6905dee572d3a4f986813e68a894ca0820a4570a8e642aefb96dd6bf02235e851
7
- data.tar.gz: 810a0e36f59f762c92a0a55239654580d307056c077f42171541988aa37a90bb6728342598c7df2b97fcc024192b1ac7c7940dd1ebccec683e7470866e185c1a
6
+ metadata.gz: 3c2760d46e3bada592f71da13bbbec31a970cde6c112a57d06f435eb673ba213573d98e82e65080c5453f521c27c27f6037472cd1db65046dfa31432f879d3e1
7
+ data.tar.gz: e6a073136f3ebeaaf1cac78a6c6886a2e7a91beeaf18a61d340e18ab968018859861de64fc01a04f7ba708fea9ab8859706b6edb5f27c9432a2116717d323c55
data/.rubocop.yml CHANGED
@@ -24,7 +24,7 @@ Metrics/ParameterLists:
24
24
  Max: 6
25
25
 
26
26
  Naming/MethodName:
27
- IgnoredPatterns:
27
+ AllowedPatterns:
28
28
  - toList
29
29
  - inVLabel
30
30
  - outVLabel
data/Gemfile CHANGED
@@ -5,19 +5,23 @@ source "https://rubygems.org"
5
5
  gemspec
6
6
 
7
7
  gem "nokogiri"
8
- gem "rubocop"
9
- gem "rubocop-performance"
10
- gem "rubocop-rspec"
8
+ gem "parallel"
11
9
 
12
10
  gem "solargraph"
13
11
 
14
- gem "async-rspec"
15
- gem "factory_bot"
16
12
  gem "overcommit"
17
13
  gem "rake"
14
+
15
+ gem "async-rspec"
16
+ gem "factory_bot"
18
17
  gem "rspec"
18
+
19
19
  gem "simplecov"
20
20
 
21
21
  gem "benchmark-ips"
22
22
  gem "memory_profiler"
23
23
  gem "ruby-prof"
24
+
25
+ gem "rubocop"
26
+ gem "rubocop-performance"
27
+ gem "rubocop-rspec"
data/Gemfile.lock CHANGED
@@ -1,22 +1,21 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grumlin (0.19.4)
4
+ grumlin (0.19.5)
5
5
  async-pool (~> 0.3)
6
6
  async-websocket (~> 0.19)
7
- oj (~> 3.12)
7
+ oj (~> 3.13)
8
8
  retryable (~> 3.0)
9
- zeitwerk (~> 2.4)
9
+ zeitwerk (~> 2.6)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activesupport (6.1.3.2)
14
+ activesupport (7.0.3)
15
15
  concurrent-ruby (~> 1.0, >= 1.0.2)
16
16
  i18n (>= 1.6, < 2)
17
17
  minitest (>= 5.1)
18
18
  tzinfo (~> 2.0)
19
- zeitwerk (~> 2.3)
20
19
  ast (2.4.2)
21
20
  async (1.30.2)
22
21
  console (~> 1.10)
@@ -34,7 +33,7 @@ GEM
34
33
  async
35
34
  async-pool (0.3.10)
36
35
  async (>= 1.25)
37
- async-rspec (1.16.0)
36
+ async-rspec (1.16.1)
38
37
  rspec (~> 3.0)
39
38
  rspec-files (~> 1.0)
40
39
  rspec-memory (~> 1.0)
@@ -43,41 +42,42 @@ GEM
43
42
  async-io (~> 1.23)
44
43
  protocol-websocket (~> 0.7.0)
45
44
  backport (1.2.0)
46
- benchmark (0.1.1)
45
+ benchmark (0.2.0)
47
46
  benchmark-ips (2.10.0)
48
- childprocess (4.0.0)
49
- concurrent-ruby (1.1.8)
47
+ childprocess (4.1.0)
48
+ concurrent-ruby (1.1.10)
50
49
  console (1.15.3)
51
50
  fiber-local
52
- diff-lcs (1.4.4)
51
+ diff-lcs (1.5.0)
53
52
  docile (1.4.0)
54
53
  e2mmap (0.1.0)
55
- factory_bot (6.2.0)
54
+ factory_bot (6.2.1)
56
55
  activesupport (>= 5.0.0)
57
56
  fiber-local (1.0.0)
58
- i18n (1.8.10)
57
+ i18n (1.10.0)
59
58
  concurrent-ruby (~> 1.0)
60
59
  iniparse (1.5.0)
61
60
  jaro_winkler (1.5.4)
62
- kramdown (2.3.1)
61
+ kramdown (2.4.0)
63
62
  rexml
64
63
  kramdown-parser-gfm (1.1.0)
65
64
  kramdown (~> 2.0)
66
65
  memory_profiler (1.0.0)
67
- mini_portile2 (2.7.1)
68
- minitest (5.14.4)
66
+ mini_portile2 (2.8.0)
67
+ minitest (5.15.0)
69
68
  nio4r (2.5.8)
70
- nokogiri (1.13.1)
71
- mini_portile2 (~> 2.7.0)
69
+ nokogiri (1.13.6)
70
+ mini_portile2 (~> 2.8.0)
72
71
  racc (~> 1.4)
73
- nokogiri (1.13.1-x86_64-linux)
72
+ nokogiri (1.13.6-x86_64-linux)
74
73
  racc (~> 1.4)
75
- oj (3.13.13)
76
- overcommit (0.57.0)
74
+ oj (3.13.14)
75
+ overcommit (0.59.1)
77
76
  childprocess (>= 0.6.3, < 5)
78
77
  iniparse (~> 1.4)
79
- parallel (1.21.0)
80
- parser (3.0.3.2)
78
+ rexml (~> 3.2)
79
+ parallel (1.22.1)
80
+ parser (3.1.2.0)
81
81
  ast (~> 2.4.1)
82
82
  protocol-hpack (1.4.2)
83
83
  protocol-http (0.22.6)
@@ -90,45 +90,45 @@ GEM
90
90
  protocol-http (~> 0.2)
91
91
  protocol-http1 (~> 0.2)
92
92
  racc (1.6.0)
93
- rainbow (3.0.0)
94
- rake (13.0.3)
95
- regexp_parser (2.2.0)
93
+ rainbow (3.1.1)
94
+ rake (13.0.6)
95
+ regexp_parser (2.5.0)
96
96
  retryable (3.0.5)
97
- reverse_markdown (2.0.0)
97
+ reverse_markdown (2.1.1)
98
98
  nokogiri
99
99
  rexml (3.2.5)
100
- rspec (3.10.0)
101
- rspec-core (~> 3.10.0)
102
- rspec-expectations (~> 3.10.0)
103
- rspec-mocks (~> 3.10.0)
104
- rspec-core (3.10.1)
105
- rspec-support (~> 3.10.0)
106
- rspec-expectations (3.10.1)
100
+ rspec (3.11.0)
101
+ rspec-core (~> 3.11.0)
102
+ rspec-expectations (~> 3.11.0)
103
+ rspec-mocks (~> 3.11.0)
104
+ rspec-core (3.11.0)
105
+ rspec-support (~> 3.11.0)
106
+ rspec-expectations (3.11.0)
107
107
  diff-lcs (>= 1.2.0, < 2.0)
108
- rspec-support (~> 3.10.0)
109
- rspec-files (1.1.1)
108
+ rspec-support (~> 3.11.0)
109
+ rspec-files (1.1.2)
110
110
  rspec (~> 3.0)
111
- rspec-memory (1.0.2)
111
+ rspec-memory (1.0.3)
112
112
  rspec (~> 3.0)
113
- rspec-mocks (3.10.2)
113
+ rspec-mocks (3.11.1)
114
114
  diff-lcs (>= 1.2.0, < 2.0)
115
- rspec-support (~> 3.10.0)
116
- rspec-support (3.10.2)
117
- rubocop (1.23.0)
115
+ rspec-support (~> 3.11.0)
116
+ rspec-support (3.11.0)
117
+ rubocop (1.30.1)
118
118
  parallel (~> 1.10)
119
- parser (>= 3.0.0.0)
119
+ parser (>= 3.1.0.0)
120
120
  rainbow (>= 2.2.2, < 4.0)
121
121
  regexp_parser (>= 1.8, < 3.0)
122
- rexml
123
- rubocop-ast (>= 1.12.0, < 2.0)
122
+ rexml (>= 3.2.5, < 4.0)
123
+ rubocop-ast (>= 1.18.0, < 2.0)
124
124
  ruby-progressbar (~> 1.7)
125
125
  unicode-display_width (>= 1.4.0, < 3.0)
126
- rubocop-ast (1.14.0)
127
- parser (>= 3.0.1.1)
128
- rubocop-performance (1.12.0)
126
+ rubocop-ast (1.18.0)
127
+ parser (>= 3.1.1.0)
128
+ rubocop-performance (1.14.2)
129
129
  rubocop (>= 1.7.0, < 2.0)
130
130
  rubocop-ast (>= 0.4.0)
131
- rubocop-rspec (2.6.0)
131
+ rubocop-rspec (2.11.1)
132
132
  rubocop (~> 1.19)
133
133
  ruby-prof (1.4.3)
134
134
  ruby-progressbar (1.11.0)
@@ -137,8 +137,8 @@ GEM
137
137
  simplecov-html (~> 0.11)
138
138
  simplecov_json_formatter (~> 0.1)
139
139
  simplecov-html (0.12.3)
140
- simplecov_json_formatter (0.1.3)
141
- solargraph (0.43.0)
140
+ simplecov_json_formatter (0.1.4)
141
+ solargraph (0.45.0)
142
142
  backport (~> 1.2)
143
143
  benchmark
144
144
  bundler (>= 1.17.2)
@@ -153,15 +153,17 @@ GEM
153
153
  thor (~> 1.0)
154
154
  tilt (~> 2.0)
155
155
  yard (~> 0.9, >= 0.9.24)
156
- thor (1.1.0)
156
+ thor (1.2.1)
157
157
  tilt (2.0.10)
158
158
  timers (4.3.3)
159
159
  traces (0.4.1)
160
160
  tzinfo (2.0.4)
161
161
  concurrent-ruby (~> 1.0)
162
162
  unicode-display_width (2.1.0)
163
- yard (0.9.26)
164
- zeitwerk (2.4.2)
163
+ webrick (1.7.0)
164
+ yard (0.9.28)
165
+ webrick (~> 1.7.0)
166
+ zeitwerk (2.6.0)
165
167
 
166
168
  PLATFORMS
167
169
  ruby
@@ -175,6 +177,7 @@ DEPENDENCIES
175
177
  memory_profiler
176
178
  nokogiri
177
179
  overcommit
180
+ parallel
178
181
  rake
179
182
  rspec
180
183
  rubocop
data/Rakefile CHANGED
@@ -28,3 +28,5 @@ namespace :definitions do
28
28
  File.write(path, YAML.dump(definitions))
29
29
  end
30
30
  end
31
+
32
+ Dir.glob(File.join("lib/tasks/**/*.rake")).each { |file| load file }
data/bin/console CHANGED
@@ -8,7 +8,7 @@ require "irb"
8
8
  require "irb/completion"
9
9
 
10
10
  Grumlin.configure do |config|
11
- config.url = ENV["GREMLIN_URL"] || "ws://localhost:8182/gremlin"
11
+ config.url = ENV.fetch("GREMLIN_URL", "ws://localhost:8182/gremlin")
12
12
  end
13
13
 
14
14
  Async do
data/grumlin.gemspec CHANGED
@@ -29,9 +29,9 @@ Gem::Specification.new do |spec|
29
29
 
30
30
  spec.add_dependency "async-pool", "~> 0.3"
31
31
  spec.add_dependency "async-websocket", "~> 0.19"
32
- spec.add_dependency "oj", "~> 3.12"
32
+ spec.add_dependency "oj", "~> 3.13"
33
33
  spec.add_dependency "retryable", "~> 3.0"
34
- spec.add_dependency "zeitwerk", "~> 2.4"
34
+ spec.add_dependency "zeitwerk", "~> 2.6"
35
35
  spec.metadata = {
36
36
  "rubygems_mfa_required" => "true"
37
37
  }
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Grumlin
4
+ module Benchmark
5
+ class Repository
6
+ extend Grumlin::Repository
7
+
8
+ shortcut :simple_test do
9
+ self.V
10
+ end
11
+
12
+ def simple_test
13
+ g.V.bytecode.serialize
14
+ end
15
+
16
+ def simple_test_with_shortcut
17
+ g.simple_test.bytecode.serialize
18
+ end
19
+ end
20
+ end
21
+ end
@@ -10,7 +10,8 @@ module Grumlin
10
10
  include DBCleanerContext
11
11
 
12
12
  before do
13
- g.V().drop.iterate
13
+ g.E.drop.iterate
14
+ g.V.drop.iterate
14
15
  end
15
16
  end
16
17
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Grumlin
4
- VERSION = "0.19.4"
4
+ VERSION = "0.19.5"
5
5
  end
data/lib/grumlin.rb CHANGED
@@ -21,14 +21,14 @@ require "retryable"
21
21
 
22
22
  require "zeitwerk"
23
23
 
24
- loader = Zeitwerk::Loader.for_gem
24
+ loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false)
25
25
  loader.inflector.inflect(
26
26
  "rspec" => "RSpec",
27
27
  "db_cleaner_context" => "DBCleanerContext"
28
28
  )
29
29
 
30
- db_adapters = "#{__dir__}/grumlin/test"
31
- loader.do_not_eager_load(db_adapters)
30
+ test_helpers = "#{__dir__}/grumlin/test"
31
+ loader.do_not_eager_load(test_helpers)
32
32
 
33
33
  module Grumlin
34
34
  class Error < StandardError; end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "grumlin"
4
+ require "benchmark/ips"
5
+
6
+ namespace :benchmark do
7
+ desc "Run serialization benchmarks"
8
+ task :serialization do
9
+ repo = Grumlin::Benchmark::Repository.new
10
+
11
+ Benchmark.ips do |x|
12
+ x.time = 3
13
+ x.report("Simple") { repo.simple_test }
14
+ x.report("Simple shortcut") { repo.simple_test_with_shortcut }
15
+ end
16
+ end
17
+ 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.19.4
4
+ version: 0.19.5
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-05-24 00:00:00.000000000 Z
11
+ date: 2022-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-pool
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.12'
47
+ version: '3.13'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.12'
54
+ version: '3.13'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: retryable
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '2.4'
75
+ version: '2.6'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '2.4'
82
+ version: '2.6'
83
83
  description: 'Gremlin graph traversal language DSL and client for Ruby. Suitable and
84
84
  tested with gremlin-server and AWS Neptune.
85
85
 
@@ -113,6 +113,7 @@ files:
113
113
  - lib/definitions.yml
114
114
  - lib/grumlin.rb
115
115
  - lib/grumlin/action.rb
116
+ - lib/grumlin/benchmark/repository.rb
116
117
  - lib/grumlin/client.rb
117
118
  - lib/grumlin/edge.rb
118
119
  - lib/grumlin/expressions/column.rb
@@ -153,6 +154,7 @@ files:
153
154
  - lib/grumlin/typing.rb
154
155
  - lib/grumlin/version.rb
155
156
  - lib/grumlin/vertex.rb
157
+ - lib/tasks/benchmark.rake
156
158
  homepage: https://github.com/zhulik/grumlin
157
159
  licenses:
158
160
  - MIT