ruby-kuzu 0.0.1
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 +7 -0
- checksums.yaml.gz.sig +0 -0
- data/History.md +6 -0
- data/LICENSE.txt +20 -0
- data/README.md +95 -0
- data/ext/kuzu_ext/config.c +318 -0
- data/ext/kuzu_ext/connection.c +310 -0
- data/ext/kuzu_ext/database.c +196 -0
- data/ext/kuzu_ext/extconf.rb +20 -0
- data/ext/kuzu_ext/kuzu_ext.c +158 -0
- data/ext/kuzu_ext/kuzu_ext.h +130 -0
- data/ext/kuzu_ext/node.c +24 -0
- data/ext/kuzu_ext/prepared_statement.c +392 -0
- data/ext/kuzu_ext/query_summary.c +140 -0
- data/ext/kuzu_ext/recursive_rel.c +24 -0
- data/ext/kuzu_ext/rel.c +24 -0
- data/ext/kuzu_ext/result.c +514 -0
- data/ext/kuzu_ext/types.c +612 -0
- data/lib/kuzu/config.rb +70 -0
- data/lib/kuzu/connection.rb +51 -0
- data/lib/kuzu/database.rb +53 -0
- data/lib/kuzu/node.rb +46 -0
- data/lib/kuzu/prepared_statement.rb +42 -0
- data/lib/kuzu/query_summary.rb +28 -0
- data/lib/kuzu/recursive_rel.rb +37 -0
- data/lib/kuzu/rel.rb +51 -0
- data/lib/kuzu/result.rb +139 -0
- data/lib/kuzu.rb +79 -0
- data/spec/kuzu/config_spec.rb +98 -0
- data/spec/kuzu/database_spec.rb +51 -0
- data/spec/kuzu/prepared_statement_spec.rb +93 -0
- data/spec/kuzu/query_summary_spec.rb +30 -0
- data/spec/kuzu/result_spec.rb +190 -0
- data/spec/kuzu/types_spec.rb +254 -0
- data/spec/kuzu_spec.rb +55 -0
- data/spec/spec_helper.rb +101 -0
- data.tar.gz.sig +0 -0
- metadata +163 -0
- metadata.gz.sig +0 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
require 'pathname'
|
4
|
+
require 'simplecov' if ENV['COVERAGE'] || ENV['CI']
|
5
|
+
|
6
|
+
require 'tmpdir'
|
7
|
+
require 'rspec'
|
8
|
+
require 'loggability/spechelpers'
|
9
|
+
|
10
|
+
require 'kuzu'
|
11
|
+
|
12
|
+
begin
|
13
|
+
require 'observability'
|
14
|
+
$have_observability = true
|
15
|
+
|
16
|
+
Observability::Sender.configure( type: :testing )
|
17
|
+
rescue LoadError => err
|
18
|
+
$have_observability = false
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
module Kuzu::SpecHelpers
|
23
|
+
|
24
|
+
# The directory to look in for fixture data
|
25
|
+
TEST_DATA_DIR = Pathname( 'spec/data' ).expand_path
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
### Inclusion callback -- install some hooks
|
30
|
+
def self::included( context )
|
31
|
+
|
32
|
+
context.after( :all ) do
|
33
|
+
Kuzu::SpecHelpers.cleanup_tmpfiles
|
34
|
+
end
|
35
|
+
|
36
|
+
context.before( :each ) do
|
37
|
+
GC.start
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
### Clean any files generated during a spec run.
|
44
|
+
def self::cleanup_tmpfiles
|
45
|
+
Pathname( Dir::Tmpname.tmpdir ).children.
|
46
|
+
select{|f| f.basename.to_s.start_with?(/kuzu.*\-test\-/) }.
|
47
|
+
each( &:rmtree )
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
###############
|
52
|
+
module_function
|
53
|
+
###############
|
54
|
+
|
55
|
+
### Return a Pathname pointing to a temporary file.
|
56
|
+
def tmpfile_pathname( filetype='spec' )
|
57
|
+
Pathname(Dir::Tmpname.create(['kuzu-', '-test-' + filetype]) {})
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
### Return a Pathname containing the path to the test data with the given +name+.
|
62
|
+
def test_data_pathname( name )
|
63
|
+
return TEST_DATA_DIR / name
|
64
|
+
end
|
65
|
+
|
66
|
+
|
67
|
+
### Load and return the contents of the test data with the given +name+.
|
68
|
+
def load_test_data( name )
|
69
|
+
file = test_data_pathname( name )
|
70
|
+
return file.read
|
71
|
+
end
|
72
|
+
|
73
|
+
end # module Kuzu::SpecHelpers
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
RSpec.configure do |config|
|
78
|
+
config.expect_with :rspec do |expectations|
|
79
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
80
|
+
expectations.syntax = :expect
|
81
|
+
end
|
82
|
+
|
83
|
+
config.mock_with( :rspec ) do |mock|
|
84
|
+
mock.syntax = :expect
|
85
|
+
mock.verify_partial_doubles = true
|
86
|
+
end
|
87
|
+
|
88
|
+
config.disable_monkey_patching!
|
89
|
+
config.example_status_persistence_file_path = "spec/.status"
|
90
|
+
config.filter_run :focus
|
91
|
+
config.filter_run_excluding :observability unless $have_observability
|
92
|
+
config.filter_run_when_matching :focus
|
93
|
+
config.order = :random
|
94
|
+
config.profile_examples = 5
|
95
|
+
config.run_all_when_everything_filtered = true
|
96
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
97
|
+
config.warnings = true
|
98
|
+
|
99
|
+
config.include( Kuzu::SpecHelpers )
|
100
|
+
config.include( Loggability::SpecHelpers )
|
101
|
+
end
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,163 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ruby-kuzu
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michael Granger
|
8
|
+
bindir: bin
|
9
|
+
cert_chain:
|
10
|
+
- |
|
11
|
+
-----BEGIN CERTIFICATE-----
|
12
|
+
MIIEbDCCAtSgAwIBAgIBATANBgkqhkiG9w0BAQsFADA+MQwwCgYDVQQDDANnZWQx
|
13
|
+
GTAXBgoJkiaJk/IsZAEZFglGYWVyaWVNVUQxEzARBgoJkiaJk/I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KCL+PTzQBD9yePGF7H/xsww3awRauP+D1VUjCFbiiC3Qb0Ww0Qd
|
29
|
+
OVA0s10T9KpZ8nb2XyKocSK7TfgDhcyr0V4H2MPxwK9SWYjGGh8z9z9HmT0i3PyX
|
30
|
+
fXOSzzEoG6u26HIOg0nxSpitEjiAHBekQxy9ka5NuQbxoxMg+eIHU4rU9IUhu0Rf
|
31
|
+
wl4wuvPVE3UQK0v0uqT6rJukEKQ1iNgK5R8klgEIv79XhQPgTkMt31FGfrwOp6HB
|
32
|
+
OE0HMwOwY9B0w3aOxxdMQyyRxaZVv3eWE5RimQI7T0TUaxPngtS33ByMZjTeidxi
|
33
|
+
ESIUEPVXoBCkFgLW1EVlBb+rG7WLYod4eVll4tKA42Bi2Ju90tqiJ1YQiyuRfCnp
|
34
|
+
8qAqdfV+4u6Huu1KzAuDQCheyEyISsLST37sU/irV3czV6BiFipWag1XiJciRT3A
|
35
|
+
wZqCfTNVHTdtsCbfdA1DsA3RdG2iEH3TOHzv1Rqzqh4=
|
36
|
+
-----END CERTIFICATE-----
|
37
|
+
date: 2025-05-13 00:00:00.000000000 Z
|
38
|
+
dependencies:
|
39
|
+
- !ruby/object:Gem::Dependency
|
40
|
+
name: rake-compiler
|
41
|
+
requirement: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- - "~>"
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '1.2'
|
46
|
+
type: :runtime
|
47
|
+
prerelease: false
|
48
|
+
version_requirements: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - "~>"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '1.2'
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: rake-deveiate
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0.25'
|
60
|
+
type: :development
|
61
|
+
prerelease: false
|
62
|
+
version_requirements: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - "~>"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0.25'
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: rdoc-generator-sixfish
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - "~>"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0.3'
|
74
|
+
type: :development
|
75
|
+
prerelease: false
|
76
|
+
version_requirements: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - "~>"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0.3'
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: ruby-lsp
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - "~>"
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0.23'
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - "~>"
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0.23'
|
95
|
+
description: A Ruby binding for the Kùzu embedded graph database.
|
96
|
+
email:
|
97
|
+
- ged@FaerieMUD.org
|
98
|
+
executables: []
|
99
|
+
extensions:
|
100
|
+
- ext/kuzu_ext/extconf.rb
|
101
|
+
extra_rdoc_files: []
|
102
|
+
files:
|
103
|
+
- History.md
|
104
|
+
- LICENSE.txt
|
105
|
+
- README.md
|
106
|
+
- ext/kuzu_ext/config.c
|
107
|
+
- ext/kuzu_ext/connection.c
|
108
|
+
- ext/kuzu_ext/database.c
|
109
|
+
- ext/kuzu_ext/extconf.rb
|
110
|
+
- ext/kuzu_ext/kuzu_ext.c
|
111
|
+
- ext/kuzu_ext/kuzu_ext.h
|
112
|
+
- ext/kuzu_ext/node.c
|
113
|
+
- ext/kuzu_ext/prepared_statement.c
|
114
|
+
- ext/kuzu_ext/query_summary.c
|
115
|
+
- ext/kuzu_ext/recursive_rel.c
|
116
|
+
- ext/kuzu_ext/rel.c
|
117
|
+
- ext/kuzu_ext/result.c
|
118
|
+
- ext/kuzu_ext/types.c
|
119
|
+
- lib/kuzu.rb
|
120
|
+
- lib/kuzu/config.rb
|
121
|
+
- lib/kuzu/connection.rb
|
122
|
+
- lib/kuzu/database.rb
|
123
|
+
- lib/kuzu/node.rb
|
124
|
+
- lib/kuzu/prepared_statement.rb
|
125
|
+
- lib/kuzu/query_summary.rb
|
126
|
+
- lib/kuzu/recursive_rel.rb
|
127
|
+
- lib/kuzu/rel.rb
|
128
|
+
- lib/kuzu/result.rb
|
129
|
+
- spec/kuzu/config_spec.rb
|
130
|
+
- spec/kuzu/database_spec.rb
|
131
|
+
- spec/kuzu/prepared_statement_spec.rb
|
132
|
+
- spec/kuzu/query_summary_spec.rb
|
133
|
+
- spec/kuzu/result_spec.rb
|
134
|
+
- spec/kuzu/types_spec.rb
|
135
|
+
- spec/kuzu_spec.rb
|
136
|
+
- spec/spec_helper.rb
|
137
|
+
homepage: https://sr.ht/~ged/Ruby-Kuzu
|
138
|
+
licenses:
|
139
|
+
- BSD-3-Clause
|
140
|
+
metadata:
|
141
|
+
homepage_uri: https://sr.ht/~ged/Ruby-Kuzu
|
142
|
+
documentation_uri: https://deveiate.org/code/ruby-kuzu
|
143
|
+
changelog_uri: https://deveiate.org/code/ruby-kuzu/History_md.html
|
144
|
+
source_uri: https://hg.sr.ht/~ged/Ruby-Kuzu
|
145
|
+
bug_tracker_uri: https://todo.sr.ht/~ged/Ruby-Kuzu
|
146
|
+
rdoc_options: []
|
147
|
+
require_paths:
|
148
|
+
- lib
|
149
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
154
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
requirements: []
|
160
|
+
rubygems_version: 3.6.2
|
161
|
+
specification_version: 4
|
162
|
+
summary: A Ruby binding for the Kùzu embedded graph database.
|
163
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|