activegraph-extensions 0.0.1-java → 0.0.2-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/active_graph_extensions/string_parsers/relation_parser.rb +12 -13
- data/lib/active_graph_extensions/string_parsers/shared_rules.rb +21 -0
- data/lib/active_graph_extensions/version.rb +1 -1
- data/lib/{activegraph-extensions.rb → active_graph_extensions.rb} +1 -4
- metadata +21 -23
- data/lib/active_graph_extensions/node/query.rb +0 -8
- data/lib/active_graph_extensions/node.rb +0 -6
- data/lib/active_graph_extensions/string_parsers.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c32c0f026083ce5175029f15de509da256e64f55456d29ee5c26358a43694ac
|
4
|
+
data.tar.gz: 78ce8b9d21c30b326a4314487ac75d6d0b5e449dcf20fe3c9ef6da29f332ce9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00bdc4fb09667e26efcc0f376c6e54d566dd2f3ab1fc804f6e24b95da84981060ca920163c9b7c550d2da1bc44a50137beb6be7dad0063bdc1d71581df57ad1c
|
7
|
+
data.tar.gz: 61f86edaea0e316af6a97190d16dd25d582e1cd96a0778547101db87c520fdff8973fc5e71a2901169eee0ce63730c810aa95a90281a9b9fb6cf680e36c34f8a
|
data/README.md
CHANGED
@@ -1 +1 @@
|
|
1
|
-
# Extensions to activegraph gem.
|
1
|
+
# Extensions to activegraph gem.
|
@@ -4,20 +4,19 @@ module ActiveGraphExtensions
|
|
4
4
|
module StringParsers
|
5
5
|
# Parsing relationships with length
|
6
6
|
class RelationParser < ::Parslet::Parser
|
7
|
-
|
8
|
-
rule(:digit) { match('[\d]').repeat }
|
9
|
-
rule(:range) { str('..') }
|
10
|
-
rule(:dot) { str('.') }
|
11
|
-
rule(:zero) { str('0') }
|
12
|
-
rule(:length_1) { zero.as(:min) >> range >> digit.maybe.as(:max) }
|
13
|
-
rule(:length_2) { digit.maybe.as(:max) }
|
14
|
-
rule(:length) { asterix >> (length_1 | length_2) }
|
15
|
-
rule(:rel) { match('[a-z,_]').repeat.as(:rel_name) }
|
16
|
-
rule(:limit) { digit.as(:limit_digit) >> asterix }
|
17
|
-
rule(:key) { limit.maybe >> rel >> length.as(:length_part).maybe }
|
18
|
-
rule(:anything) { match('.').repeat }
|
19
|
-
rule(:root) { key >> dot.maybe >> anything.maybe.as(:rest_str) }
|
7
|
+
include SharedRules
|
20
8
|
|
9
|
+
# TODO: It is very bad to build a grammar with none terminals. Please note that none here are necessary to
|
10
|
+
# mimic the previous behavior of `repeat` which is `repeat(0)` which effectively allows empty strings as
|
11
|
+
# identifiers
|
12
|
+
rule(:zero) { str('0') }
|
13
|
+
rule(:length_1) { zero.as(:min) >> range >> number?.maybe.as(:max) }
|
14
|
+
rule(:length_2) { number?.maybe.as(:max) }
|
15
|
+
rule(:length) { asterisk >> (length_1 | length_2) }
|
16
|
+
rule(:limit) { number?.as(:limit_digit) >> asterisk }
|
17
|
+
rule(:key) { limit.maybe >> rel >> length.as(:length_part).maybe }
|
18
|
+
rule(:anything) { match('.').repeat }
|
19
|
+
rule(:root) { key >> dot.maybe >> anything.maybe.as(:rest_str) }
|
21
20
|
rule(:rel_sequence) { infix_expression(key, [dot, 1, :left]) }
|
22
21
|
end
|
23
22
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ActiveGraphExtensions
|
4
|
+
module StringParsers
|
5
|
+
module SharedRules
|
6
|
+
extend ActiveSupport::Concern
|
7
|
+
VAR_CHAR = 'a-z_'
|
8
|
+
included do
|
9
|
+
rule(:asterisk) { str('*') }
|
10
|
+
rule(:number) { match('[\d]').repeat(1) }
|
11
|
+
rule(:none) { str('') }
|
12
|
+
rule(:number?) { number | none }
|
13
|
+
rule(:range) { str('..') }
|
14
|
+
rule(:dot) { str('.') }
|
15
|
+
rule(:identifier) { match("[#{VAR_CHAR}]") >> match("[#{VAR_CHAR}0-9]").repeat(0) }
|
16
|
+
rule(:identifier?) { identifier | none }
|
17
|
+
rule(:rel) { identifier?.as(:rel_name) }
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -4,10 +4,7 @@ require 'parslet'
|
|
4
4
|
module ActiveGraphExtensions
|
5
5
|
end
|
6
6
|
|
7
|
-
|
8
|
-
loader.inflector.inflect 'version' => 'VERSION'
|
9
|
-
loader.ignore(File.expand_path('activegraph-extensions.rb', __dir__))
|
10
|
-
loader.setup
|
7
|
+
Zeitwerk::Loader.for_gem.setup
|
11
8
|
|
12
9
|
ActiveGraph::Node::Query::QueryProxy.include ActiveGraphExtensions::Node::Query::QueryProxyEagerLoading
|
13
10
|
ActiveGraph::Node::Query::QueryProxy.prepend ActiveGraphExtensions::Node::Query::QueryProxy
|
metadata
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activegraph-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Amit Suryavanshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
+
name: parslet
|
14
15
|
requirement: !ruby/object:Gem::Requirement
|
15
16
|
requirements:
|
16
17
|
- - ">="
|
17
18
|
- !ruby/object:Gem::Version
|
18
19
|
version: '0'
|
19
|
-
name: parslet
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -25,12 +25,12 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
+
name: activegraph
|
28
29
|
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
31
|
- - ">="
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '0'
|
33
|
-
name: activegraph
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -39,12 +39,12 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
+
name: guard
|
42
43
|
requirement: !ruby/object:Gem::Requirement
|
43
44
|
requirements:
|
44
45
|
- - ">="
|
45
46
|
- !ruby/object:Gem::Version
|
46
47
|
version: '0'
|
47
|
-
name: guard
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -53,12 +53,12 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
+
name: guard-rspec
|
56
57
|
requirement: !ruby/object:Gem::Requirement
|
57
58
|
requirements:
|
58
59
|
- - ">="
|
59
60
|
- !ruby/object:Gem::Version
|
60
61
|
version: '0'
|
61
|
-
name: guard-rspec
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -67,12 +67,12 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard-rubocop
|
70
71
|
requirement: !ruby/object:Gem::Requirement
|
71
72
|
requirements:
|
72
73
|
- - ">="
|
73
74
|
- !ruby/object:Gem::Version
|
74
75
|
version: '0'
|
75
|
-
name: guard-rubocop
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -81,12 +81,12 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
+
name: neo4j-rake_tasks
|
84
85
|
requirement: !ruby/object:Gem::Requirement
|
85
86
|
requirements:
|
86
87
|
- - ">="
|
87
88
|
- !ruby/object:Gem::Version
|
88
89
|
version: 0.3.0
|
89
|
-
name: neo4j-rake_tasks
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -95,12 +95,12 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.3.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
+
name: os
|
98
99
|
requirement: !ruby/object:Gem::Requirement
|
99
100
|
requirements:
|
100
101
|
- - ">="
|
101
102
|
- !ruby/object:Gem::Version
|
102
103
|
version: '0'
|
103
|
-
name: os
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -109,12 +109,12 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry
|
112
113
|
requirement: !ruby/object:Gem::Requirement
|
113
114
|
requirements:
|
114
115
|
- - ">="
|
115
116
|
- !ruby/object:Gem::Version
|
116
117
|
version: '0'
|
117
|
-
name: pry
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -123,12 +123,12 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
+
name: railties
|
126
127
|
requirement: !ruby/object:Gem::Requirement
|
127
128
|
requirements:
|
128
129
|
- - ">="
|
129
130
|
- !ruby/object:Gem::Version
|
130
131
|
version: '4.0'
|
131
|
-
name: railties
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -137,12 +137,12 @@ dependencies:
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '4.0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
+
name: rake
|
140
141
|
requirement: !ruby/object:Gem::Requirement
|
141
142
|
requirements:
|
142
143
|
- - ">="
|
143
144
|
- !ruby/object:Gem::Version
|
144
145
|
version: '0'
|
145
|
-
name: rake
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -151,12 +151,12 @@ dependencies:
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
+
name: rubocop
|
154
155
|
requirement: !ruby/object:Gem::Requirement
|
155
156
|
requirements:
|
156
157
|
- - ">="
|
157
158
|
- !ruby/object:Gem::Version
|
158
159
|
version: 0.56.0
|
159
|
-
name: rubocop
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -165,12 +165,12 @@ dependencies:
|
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: 0.56.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
|
+
name: yard
|
168
169
|
requirement: !ruby/object:Gem::Requirement
|
169
170
|
requirements:
|
170
171
|
- - ">="
|
171
172
|
- !ruby/object:Gem::Version
|
172
173
|
version: '0'
|
173
|
-
name: yard
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -179,12 +179,12 @@ dependencies:
|
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
|
+
name: dryspec
|
182
183
|
requirement: !ruby/object:Gem::Requirement
|
183
184
|
requirements:
|
184
185
|
- - ">="
|
185
186
|
- !ruby/object:Gem::Version
|
186
187
|
version: '0'
|
187
|
-
name: dryspec
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -193,12 +193,12 @@ dependencies:
|
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
|
+
name: rspec
|
196
197
|
requirement: !ruby/object:Gem::Requirement
|
197
198
|
requirements:
|
198
199
|
- - "<"
|
199
200
|
- !ruby/object:Gem::Version
|
200
201
|
version: '3.10'
|
201
|
-
name: rspec
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -206,8 +206,8 @@ dependencies:
|
|
206
206
|
- - "<"
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '3.10'
|
209
|
-
description: " Additional features to activegraph, like sideload limiting, authorizing
|
210
|
-
|
209
|
+
description: " Additional features to activegraph, like sideload limiting, authorizing
|
210
|
+
sideloads etc.\n"
|
211
211
|
email: amitbsuryavabshi@mail.com
|
212
212
|
executables: []
|
213
213
|
extensions: []
|
@@ -218,8 +218,7 @@ files:
|
|
218
218
|
- Gemfile
|
219
219
|
- README.md
|
220
220
|
- activegraph-extensions.gemspec
|
221
|
-
- lib/active_graph_extensions
|
222
|
-
- lib/active_graph_extensions/node/query.rb
|
221
|
+
- lib/active_graph_extensions.rb
|
223
222
|
- lib/active_graph_extensions/node/query/query_proxy.rb
|
224
223
|
- lib/active_graph_extensions/node/query/query_proxy_eager_loading.rb
|
225
224
|
- lib/active_graph_extensions/node/query/query_proxy_eager_loading/association_eager_load.rb
|
@@ -227,10 +226,9 @@ files:
|
|
227
226
|
- lib/active_graph_extensions/node/query/query_proxy_eager_loading/eager_loading_order.rb
|
228
227
|
- lib/active_graph_extensions/node/query/query_proxy_eager_loading/enhanced_tree.rb
|
229
228
|
- lib/active_graph_extensions/node/query/query_proxy_eager_loading/scope_eager_loading.rb
|
230
|
-
- lib/active_graph_extensions/string_parsers.rb
|
231
229
|
- lib/active_graph_extensions/string_parsers/relation_parser.rb
|
230
|
+
- lib/active_graph_extensions/string_parsers/shared_rules.rb
|
232
231
|
- lib/active_graph_extensions/version.rb
|
233
|
-
- lib/activegraph-extensions.rb
|
234
232
|
homepage: https://github.com/neo4jrb/activegraph-extensions/
|
235
233
|
licenses:
|
236
234
|
- MIT
|
@@ -257,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
257
255
|
- !ruby/object:Gem::Version
|
258
256
|
version: '0'
|
259
257
|
requirements: []
|
260
|
-
rubygems_version: 3.
|
258
|
+
rubygems_version: 3.3.7
|
261
259
|
signing_key:
|
262
260
|
specification_version: 4
|
263
261
|
summary: Additional features to activegraph
|