ruby-ladybug 0.1.0
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 +9 -0
- data/LICENSE.txt +20 -0
- data/README.md +250 -0
- data/ext/ladybug_ext/config.c +318 -0
- data/ext/ladybug_ext/connection.c +331 -0
- data/ext/ladybug_ext/database.c +197 -0
- data/ext/ladybug_ext/extconf.rb +20 -0
- data/ext/ladybug_ext/ladybug_ext.c +158 -0
- data/ext/ladybug_ext/ladybug_ext.h +132 -0
- data/ext/ladybug_ext/node.c +24 -0
- data/ext/ladybug_ext/prepared_statement.c +396 -0
- data/ext/ladybug_ext/query_summary.c +140 -0
- data/ext/ladybug_ext/recursive_rel.c +24 -0
- data/ext/ladybug_ext/rel.c +24 -0
- data/ext/ladybug_ext/result.c +514 -0
- data/ext/ladybug_ext/types.c +619 -0
- data/lib/ladybug/config.rb +70 -0
- data/lib/ladybug/connection.rb +51 -0
- data/lib/ladybug/database.rb +53 -0
- data/lib/ladybug/node.rb +46 -0
- data/lib/ladybug/prepared_statement.rb +44 -0
- data/lib/ladybug/query_summary.rb +28 -0
- data/lib/ladybug/recursive_rel.rb +37 -0
- data/lib/ladybug/rel.rb +57 -0
- data/lib/ladybug/result.rb +196 -0
- data/lib/ladybug.rb +89 -0
- data/spec/ladybug/config_spec.rb +98 -0
- data/spec/ladybug/connection_spec.rb +36 -0
- data/spec/ladybug/database_spec.rb +57 -0
- data/spec/ladybug/prepared_statement_spec.rb +91 -0
- data/spec/ladybug/query_summary_spec.rb +30 -0
- data/spec/ladybug/result_spec.rb +225 -0
- data/spec/ladybug/types_spec.rb +285 -0
- data/spec/ladybug_spec.rb +83 -0
- data/spec/spec_helper.rb +101 -0
- data.tar.gz.sig +0 -0
- metadata +177 -0
- metadata.gz.sig +0 -0
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
# -*- ruby -*-
|
|
2
|
+
|
|
3
|
+
require_relative '../spec_helper'
|
|
4
|
+
|
|
5
|
+
require 'ladybug'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
RSpec.describe( "data types" ) do
|
|
9
|
+
|
|
10
|
+
let( :db ) { Ladybug.database }
|
|
11
|
+
let( :connection ) { db.connect }
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
#
|
|
15
|
+
# Specs
|
|
16
|
+
#
|
|
17
|
+
|
|
18
|
+
it "converts TIMESTAMP values to Time objects" do
|
|
19
|
+
result = connection.query( %{RETURN timestamp("1970-01-01 00:00:00.004666-10") as x;} )
|
|
20
|
+
|
|
21
|
+
expect( result ).to be_a( Ladybug::Result )
|
|
22
|
+
expect( result ).to be_success
|
|
23
|
+
|
|
24
|
+
value = result.first
|
|
25
|
+
expect( value ).to include( 'x' )
|
|
26
|
+
|
|
27
|
+
x = value['x']
|
|
28
|
+
expect( x ).to be_a( Time )
|
|
29
|
+
expect( x.year ).to eq( 1970 )
|
|
30
|
+
expect( x.month ).to eq( 1 )
|
|
31
|
+
expect( x.day ).to eq( 1 )
|
|
32
|
+
|
|
33
|
+
result.finish
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
it "coverts DATE values to Date objects" do
|
|
38
|
+
result = connection.query( %{RETURN CAST('2025-07-14', 'DATE') as x;} )
|
|
39
|
+
|
|
40
|
+
expect( result ).to be_a( Ladybug::Result )
|
|
41
|
+
expect( result ).to be_success
|
|
42
|
+
|
|
43
|
+
value = result.first
|
|
44
|
+
expect( value ).to include( 'x' )
|
|
45
|
+
|
|
46
|
+
x = value['x']
|
|
47
|
+
expect( x ).to be_a( Date )
|
|
48
|
+
expect( x.year ).to eq( 2025 )
|
|
49
|
+
expect( x.month ).to eq( 7 )
|
|
50
|
+
expect( x.day ).to eq( 14 )
|
|
51
|
+
|
|
52
|
+
result.finish
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
it "converts STRUCT values to OpenStructs" do
|
|
57
|
+
result = connection.query( "RETURN {first: 'Adam', last: 'Smith'} AS record;" )
|
|
58
|
+
|
|
59
|
+
expect( result ).to be_a( Ladybug::Result )
|
|
60
|
+
expect( result ).to be_success
|
|
61
|
+
Ladybug.logger.debug "Result is: %p" % [ result ]
|
|
62
|
+
|
|
63
|
+
value = result.first
|
|
64
|
+
expect( value ).to include( 'record' )
|
|
65
|
+
|
|
66
|
+
record = value['record']
|
|
67
|
+
expect( record ).to be_a( OpenStruct )
|
|
68
|
+
expect( record.first ).to eq( "Adam" )
|
|
69
|
+
expect( record.first.encoding ).to eq( Encoding::UTF_8 )
|
|
70
|
+
expect( record.last ).to eq( "Smith" )
|
|
71
|
+
expect( record.last.encoding ).to eq( Encoding::UTF_8 )
|
|
72
|
+
|
|
73
|
+
result.finish
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
it "converts MAP values to Hashes" do
|
|
78
|
+
result = connection.query( "RETURN map([1, 2], ['a', 'b']) AS m;" )
|
|
79
|
+
|
|
80
|
+
expect( result ).to be_a( Ladybug::Result )
|
|
81
|
+
expect( result ).to be_success
|
|
82
|
+
Ladybug.logger.debug "Result is: %p" % [ result ]
|
|
83
|
+
|
|
84
|
+
value = result.first
|
|
85
|
+
expect( value ).to include( 'm' )
|
|
86
|
+
|
|
87
|
+
record = value['m']
|
|
88
|
+
expect( record ).to be_a( Hash )
|
|
89
|
+
expect( record ).to eq({ 1 => 'a', 2 => 'b' })
|
|
90
|
+
|
|
91
|
+
result.finish
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
it "converts LIST values to Arrays" do
|
|
96
|
+
result = connection.query( 'RETURN ["Alice", "Bob"] AS l;' )
|
|
97
|
+
|
|
98
|
+
expect( result ).to be_a( Ladybug::Result )
|
|
99
|
+
expect( result ).to be_success
|
|
100
|
+
Ladybug.logger.debug "Result is: %p" % [ result ]
|
|
101
|
+
|
|
102
|
+
value = result.first
|
|
103
|
+
expect( value ).to include( 'l' )
|
|
104
|
+
|
|
105
|
+
record = value['l']
|
|
106
|
+
expect( record ).to be_an( Array )
|
|
107
|
+
expect( record ).to eq( ['Alice', 'Bob'] )
|
|
108
|
+
|
|
109
|
+
result.finish
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
it "converts ARRAY values to Arrays" do
|
|
114
|
+
result = connection.query( "RETURN CAST([3,4,12,11], 'INT64[4]') as a;" )
|
|
115
|
+
|
|
116
|
+
expect( result ).to be_a( Ladybug::Result )
|
|
117
|
+
expect( result ).to be_success
|
|
118
|
+
Ladybug.logger.debug "Result is: %p" % [ result ]
|
|
119
|
+
|
|
120
|
+
value = result.first
|
|
121
|
+
expect( value ).to include( 'a' )
|
|
122
|
+
|
|
123
|
+
record = value['a']
|
|
124
|
+
expect( record ).to be_an( Array )
|
|
125
|
+
expect( record ).to eq( [3, 4, 12, 11] )
|
|
126
|
+
|
|
127
|
+
result.finish
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
it "converts ARRAYs of LIST values correctly" do
|
|
132
|
+
result = connection.query( "RETURN CAST([[5,2,1],[2,3],[15,64,74]], 'INT64[][3]') as a;" )
|
|
133
|
+
|
|
134
|
+
expect( result ).to be_a( Ladybug::Result )
|
|
135
|
+
expect( result ).to be_success
|
|
136
|
+
Ladybug.logger.debug "Result is: %p" % [ result ]
|
|
137
|
+
|
|
138
|
+
value = result.first
|
|
139
|
+
expect( value ).to include( 'a' )
|
|
140
|
+
|
|
141
|
+
record = value['a']
|
|
142
|
+
expect( record ).to be_an( Array )
|
|
143
|
+
expect( record ).to eq( [ [5, 2, 1], [2, 3], [15, 64, 74] ] )
|
|
144
|
+
|
|
145
|
+
result.finish
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
it "converts NODE values to Ladybug::Node objects" do
|
|
150
|
+
connection.run( <<~END_OF_SCHEMA )
|
|
151
|
+
CREATE NODE TABLE Person(id INT64, name STRING, age INT64, PRIMARY KEY(id));
|
|
152
|
+
COPY Person FROM 'spec/data/test/Person.csv';
|
|
153
|
+
END_OF_SCHEMA
|
|
154
|
+
result = connection.query( "MATCH (a:Person) RETURN a;" )
|
|
155
|
+
|
|
156
|
+
expect( result ).to be_a( Ladybug::Result )
|
|
157
|
+
expect( result ).to be_success
|
|
158
|
+
expect( result.num_tuples ).to eq( 120 )
|
|
159
|
+
|
|
160
|
+
result.each do |value|
|
|
161
|
+
expect( value ).to include( 'a' )
|
|
162
|
+
|
|
163
|
+
node = value['a']
|
|
164
|
+
expect( node ).to be_a( Ladybug::Node )
|
|
165
|
+
|
|
166
|
+
expect( node.properties.keys ).to contain_exactly( :id, :name, :age )
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
result.finish
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
it "converts REL values to Ladybug::Rel objects" do
|
|
174
|
+
connection.run( <<~END_OF_SCHEMA )
|
|
175
|
+
CREATE NODE TABLE Person(id INT64, name STRING, age INT64, PRIMARY KEY(id));
|
|
176
|
+
CREATE REL TABLE Follows (from Person to Person, since INT64);
|
|
177
|
+
COPY Person FROM 'spec/data/test/Person.csv';
|
|
178
|
+
COPY Follows FROM 'spec/data/test/Follows.csv';
|
|
179
|
+
END_OF_SCHEMA
|
|
180
|
+
result = connection.query( "MATCH (a:Person)-[r:Follows]->(b:Person) RETURN r;" )
|
|
181
|
+
|
|
182
|
+
expect( result ).to be_a( Ladybug::Result )
|
|
183
|
+
expect( result ).to be_success
|
|
184
|
+
expect( result.num_tuples ).to eq( 5 )
|
|
185
|
+
|
|
186
|
+
result.each do |value|
|
|
187
|
+
expect( value ).to include( 'r' )
|
|
188
|
+
|
|
189
|
+
rel = value['r']
|
|
190
|
+
expect( rel ).to be_a( Ladybug::Rel )
|
|
191
|
+
|
|
192
|
+
expect( rel.id ).to_not be_nil
|
|
193
|
+
expect( rel.src_id ).to_not be_nil
|
|
194
|
+
expect( rel.dst_id ).to_not be_nil
|
|
195
|
+
|
|
196
|
+
expect( rel.properties.keys ).to contain_exactly( :since )
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
result.finish
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
it "converts RECURSIVE_REL values to Ladybug::RecursiveRel objects" do
|
|
204
|
+
connection.run( <<~END_OF_SCHEMA )
|
|
205
|
+
CREATE NODE TABLE Person(id INT64, name STRING, age INT64, PRIMARY KEY(id));
|
|
206
|
+
CREATE REL TABLE Follows (from Person to Person, since INT64);
|
|
207
|
+
COPY Person FROM 'spec/data/test/Person.csv';
|
|
208
|
+
COPY Follows FROM 'spec/data/test/Follows.csv';
|
|
209
|
+
END_OF_SCHEMA
|
|
210
|
+
result = connection.query( <<~END_OF_QUERY )
|
|
211
|
+
MATCH p = (a:Person)-[:Follows]->(b:Person)
|
|
212
|
+
WHERE a.name = 'Jake Kling' AND b.name = 'Joaquin Schamberger'
|
|
213
|
+
RETURN p;
|
|
214
|
+
END_OF_QUERY
|
|
215
|
+
|
|
216
|
+
expect( result ).to be_a( Ladybug::Result )
|
|
217
|
+
expect( result ).to be_success
|
|
218
|
+
|
|
219
|
+
result.each do |value|
|
|
220
|
+
expect( value ).to include( 'p' )
|
|
221
|
+
|
|
222
|
+
rel = value['p']
|
|
223
|
+
expect( rel ).to be_a( Ladybug::RecursiveRel )
|
|
224
|
+
|
|
225
|
+
expect( rel.nodes ).to be_an( Array ).and have_attributes( length: 2 )
|
|
226
|
+
expect( rel.nodes[0] ).to be_a( Ladybug::Node )
|
|
227
|
+
expect( rel.nodes[0][:name] ).to eq( 'Jake Kling' )
|
|
228
|
+
expect( rel.nodes[1] ).to be_a( Ladybug::Node )
|
|
229
|
+
expect( rel.nodes[1][:name] ).to eq( 'Joaquin Schamberger' )
|
|
230
|
+
|
|
231
|
+
expect( rel.rels ).to be_an( Array ).and have_attributes( length: 1 )
|
|
232
|
+
expect( rel.rels[0][:since] ).to eq( 2012 )
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
result.finish
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
it "converts UNIONs to something"
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
it "converts between nil and NULL" do
|
|
243
|
+
stmt = connection.prepare( "RETURN $the_value AS value;" )
|
|
244
|
+
result = stmt.execute( the_value: nil )
|
|
245
|
+
|
|
246
|
+
expect( result.first ).to eq( {'value' => nil} )
|
|
247
|
+
|
|
248
|
+
result.finish
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
it "converts UUIDs to Strings" do
|
|
253
|
+
result = connection.query( "RETURN UUID('A0EEBC99-9C0B-4EF8-BB6D-6BB9BD380A11') as u;" )
|
|
254
|
+
uuid = result.first['u']
|
|
255
|
+
|
|
256
|
+
expect( uuid ).to be_a( String )
|
|
257
|
+
expect( uuid ).to eq( 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11' )
|
|
258
|
+
|
|
259
|
+
result.finish
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
it "converts DECIMAL types to Float objects" do
|
|
264
|
+
result = connection.query( %{RETURN CAST(127.3, "DECIMAL(5, 2)") AS d;} )
|
|
265
|
+
rval = result.first['d']
|
|
266
|
+
|
|
267
|
+
expect( rval ).to be_a( Float )
|
|
268
|
+
expect( rval ).to eq( 127.3 )
|
|
269
|
+
|
|
270
|
+
result.finish
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
it "converts SERIAL types to Integer objects" do
|
|
275
|
+
result = connection.query( %{RETURN CAST(133, "SERIAL") AS s;} )
|
|
276
|
+
rval = result.first['s']
|
|
277
|
+
|
|
278
|
+
expect( rval ).to be_an( Integer )
|
|
279
|
+
expect( rval ).to eq( 133 )
|
|
280
|
+
|
|
281
|
+
result.finish
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/usr/bin/env ruby -S rspec
|
|
2
|
+
|
|
3
|
+
require_relative 'spec_helper'
|
|
4
|
+
require 'ladybug'
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
RSpec.describe( Ladybug ) do
|
|
8
|
+
|
|
9
|
+
let( :spec_tmpdir ) do
|
|
10
|
+
path = tmpfile_pathname()
|
|
11
|
+
path.mkpath
|
|
12
|
+
return path
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
it "should have a VERSION constant" do
|
|
17
|
+
expect( subject.const_get('VERSION') ).to_not be_empty
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
it "knows what version of Ladybug it's linked with" do
|
|
22
|
+
expect( described_class.ladybug_version ).to match( /\A\d+\.\d+\.\d+/ )
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
it "knows what version of the storage scheme it's using" do
|
|
27
|
+
result = described_class.storage_version
|
|
28
|
+
|
|
29
|
+
expect( result ).to be_an( Integer )
|
|
30
|
+
expect( result ).to be > 0
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
it "can construct an in-memory database with reasonable defaults" do
|
|
35
|
+
expect( described_class.database ).to be_a( Ladybug::Database )
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
it "can construct an in-memory database with a nil path" do
|
|
40
|
+
expect( described_class.database(nil) ).to be_a( Ladybug::Database )
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
it "can construct an in-memory database explicitly" do
|
|
45
|
+
expect( described_class.database(:memory) ).to be_a( Ladybug::Database )
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
it "can construct a on-disk database with reasonable defaults" do
|
|
50
|
+
filename = spec_tmpdir + 'spec_db'
|
|
51
|
+
result = described_class.database( filename )
|
|
52
|
+
|
|
53
|
+
expect( result ).to be_a( Ladybug::Database )
|
|
54
|
+
if Ladybug.storage_version <= 38
|
|
55
|
+
expect( filename ).to be_a_directory
|
|
56
|
+
else
|
|
57
|
+
expect( filename ).to be_a_file
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
it "can tell whether a string looks like a path to a Ladybug database" do
|
|
63
|
+
path = spec_tmpdir + 'spec_db'
|
|
64
|
+
|
|
65
|
+
expect {
|
|
66
|
+
described_class.database( path )
|
|
67
|
+
}.to change {
|
|
68
|
+
described_class.is_database?( path.to_s )
|
|
69
|
+
}.from( false ).to( true )
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
it "can tell whether a Pathname looks like a path to a Ladybug database" do
|
|
74
|
+
path = spec_tmpdir + 'spec_db'
|
|
75
|
+
|
|
76
|
+
expect {
|
|
77
|
+
described_class.database( path )
|
|
78
|
+
}.to change {
|
|
79
|
+
described_class.is_database?( path )
|
|
80
|
+
}.from( false ).to( true )
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
end
|
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 'ladybug'
|
|
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 Ladybug::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
|
+
Ladybug::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?(/lbug.*\-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
|
+
return Pathname( Dir::Tmpname.create(['lbug-', '-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 Ladybug::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( Ladybug::SpecHelpers )
|
|
100
|
+
config.include( Loggability::SpecHelpers )
|
|
101
|
+
end
|
data.tar.gz.sig
ADDED
|
Binary file
|
metadata
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: ruby-ladybug
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Michael Granger
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain:
|
|
10
|
+
- |
|
|
11
|
+
-----BEGIN CERTIFICATE-----
|
|
12
|
+
MIIEMDCCApigAwIBAgIBAjANBgkqhkiG9w0BAQsFADA+MQwwCgYDVQQDDANnZWQx
|
|
13
|
+
GTAXBgoJkiaJk/IsZAEZFglGYWVyaWVNVUQxEzARBgoJkiaJk/IsZAEZFgNvcmcw
|
|
14
|
+
HhcNMjYwMjAyMjExMjQ0WhcNMjcwMjAyMjExMjQ0WjA+MQwwCgYDVQQDDANnZWQx
|
|
15
|
+
GTAXBgoJkiaJk/IsZAEZFglGYWVyaWVNVUQxEzARBgoJkiaJk/IsZAEZFgNvcmcw
|
|
16
|
+
ggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC/JWGRHO+USzR97vXjkFgt
|
|
17
|
+
83qeNf2KHkcvrRTSnR64i6um/ziin0I0oX23H7VYrDJC9A/uoUa5nGRJS5Zw/+wW
|
|
18
|
+
ENcvWVZS4iUzi4dsYJGY6yEOsXh2CcF46+QevV8iE+UmbkU75V7Dy1JCaUOyizEt
|
|
19
|
+
TH5UHsOtUU7k9TYARt/TgYZKuaoAMZZd5qyVqhF1vV+7/Qzmp89NGflXf2xYP26a
|
|
20
|
+
4MAX2qqKX/FKXqmFO+AGsbwYTEds1mksBF3fGsFgsQWxftG8GfZQ9+Cyu2+l1eOw
|
|
21
|
+
cZ+lPcg834G9DrqW2zhqUoLr1MTly4pqxYGb7XoDhoR7dd1kFE2a067+DzWC/ADt
|
|
22
|
+
+QkcqWUm5oh1fN0eqr7NsZlVJDulFgdiiYPQiIN7UNsii4Wc9aZqBoGcYfBeQNPZ
|
|
23
|
+
soo/6za/bWajOKUmDhpqvaiRv9EDpVLzuj53uDoukMMwxCMfgb04+ckQ0t2G7wqc
|
|
24
|
+
/D+K9JW9DDs3Yjgv9k4h7YMhW5gftosd+NkNC/+Y2CkCAwEAAaM5MDcwCQYDVR0T
|
|
25
|
+
BAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFHKN/nkRusdqCJEuq3lgB3fJvyTg
|
|
26
|
+
MA0GCSqGSIb3DQEBCwUAA4IBgQAQwvsRIJ8FV1bYadOnOg2jcSzZXjt0FVPbOQG9
|
|
27
|
+
eQ9UM7+bTPU0eRCGZuOPrEp8ROc1s5zwZNFv7qHWv/zWWC6sIj4gEnCZkUugK03k
|
|
28
|
+
bYDsSlkyjiQ4ApVV00+h/Vhxcw+RLIZuqy2QFl8YAfMJm+JS8G7SuoqpFjbv3UUF
|
|
29
|
+
vrObIiO7LbhJxpYzTGkGzMFigcnm6vIGMex4AgtArc2RpWOvtAXQrU7CZHUkcdQM
|
|
30
|
+
4n5eVK+m3IZlD7dd4HoPT2jF2cOGmk8XFclT0GcPVYmEWFFmotN2aiMj4sqVm/Ob
|
|
31
|
+
V+FmyTUy4gVtcNOFO/sBnFRiQW0fxV9/97Dog9ciYesfiAhm4EpcuTmatdAuMrZR
|
|
32
|
+
WBmf+jXIub5S7RBw+m0mk2xhmcSkg1vY5w6IEIhSo2e2gE9rA0rIkZO5wP4sCouE
|
|
33
|
+
XdaRMEnt/AVHUzroBR3CWAz/6ZnDF8GS7EK1bOfM+YWqJL30g7PoxpT+UJTqWJtM
|
|
34
|
+
CCC1LSoBD7OEUiaIMWUo4h7xWIs=
|
|
35
|
+
-----END CERTIFICATE-----
|
|
36
|
+
date: 2026-03-11 00:00:00.000000000 Z
|
|
37
|
+
dependencies:
|
|
38
|
+
- !ruby/object:Gem::Dependency
|
|
39
|
+
name: rake-compiler
|
|
40
|
+
requirement: !ruby/object:Gem::Requirement
|
|
41
|
+
requirements:
|
|
42
|
+
- - "~>"
|
|
43
|
+
- !ruby/object:Gem::Version
|
|
44
|
+
version: '1.2'
|
|
45
|
+
type: :runtime
|
|
46
|
+
prerelease: false
|
|
47
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
48
|
+
requirements:
|
|
49
|
+
- - "~>"
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: '1.2'
|
|
52
|
+
- !ruby/object:Gem::Dependency
|
|
53
|
+
name: ostruct
|
|
54
|
+
requirement: !ruby/object:Gem::Requirement
|
|
55
|
+
requirements:
|
|
56
|
+
- - "~>"
|
|
57
|
+
- !ruby/object:Gem::Version
|
|
58
|
+
version: '0.6'
|
|
59
|
+
type: :runtime
|
|
60
|
+
prerelease: false
|
|
61
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
62
|
+
requirements:
|
|
63
|
+
- - "~>"
|
|
64
|
+
- !ruby/object:Gem::Version
|
|
65
|
+
version: '0.6'
|
|
66
|
+
- !ruby/object:Gem::Dependency
|
|
67
|
+
name: rake-deveiate
|
|
68
|
+
requirement: !ruby/object:Gem::Requirement
|
|
69
|
+
requirements:
|
|
70
|
+
- - "~>"
|
|
71
|
+
- !ruby/object:Gem::Version
|
|
72
|
+
version: '0.25'
|
|
73
|
+
type: :development
|
|
74
|
+
prerelease: false
|
|
75
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
76
|
+
requirements:
|
|
77
|
+
- - "~>"
|
|
78
|
+
- !ruby/object:Gem::Version
|
|
79
|
+
version: '0.25'
|
|
80
|
+
- !ruby/object:Gem::Dependency
|
|
81
|
+
name: rdoc-generator-sixfish
|
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
|
83
|
+
requirements:
|
|
84
|
+
- - "~>"
|
|
85
|
+
- !ruby/object:Gem::Version
|
|
86
|
+
version: '0.3'
|
|
87
|
+
type: :development
|
|
88
|
+
prerelease: false
|
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
90
|
+
requirements:
|
|
91
|
+
- - "~>"
|
|
92
|
+
- !ruby/object:Gem::Version
|
|
93
|
+
version: '0.3'
|
|
94
|
+
- !ruby/object:Gem::Dependency
|
|
95
|
+
name: ruby-lsp
|
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
|
97
|
+
requirements:
|
|
98
|
+
- - "~>"
|
|
99
|
+
- !ruby/object:Gem::Version
|
|
100
|
+
version: '0.23'
|
|
101
|
+
type: :development
|
|
102
|
+
prerelease: false
|
|
103
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
104
|
+
requirements:
|
|
105
|
+
- - "~>"
|
|
106
|
+
- !ruby/object:Gem::Version
|
|
107
|
+
version: '0.23'
|
|
108
|
+
description: A Ruby binding for the LadybugDB embedded graph database.
|
|
109
|
+
email:
|
|
110
|
+
- ged@FaerieMUD.org
|
|
111
|
+
executables: []
|
|
112
|
+
extensions:
|
|
113
|
+
- ext/ladybug_ext/extconf.rb
|
|
114
|
+
extra_rdoc_files: []
|
|
115
|
+
files:
|
|
116
|
+
- History.md
|
|
117
|
+
- LICENSE.txt
|
|
118
|
+
- README.md
|
|
119
|
+
- ext/ladybug_ext/config.c
|
|
120
|
+
- ext/ladybug_ext/connection.c
|
|
121
|
+
- ext/ladybug_ext/database.c
|
|
122
|
+
- ext/ladybug_ext/extconf.rb
|
|
123
|
+
- ext/ladybug_ext/ladybug_ext.c
|
|
124
|
+
- ext/ladybug_ext/ladybug_ext.h
|
|
125
|
+
- ext/ladybug_ext/node.c
|
|
126
|
+
- ext/ladybug_ext/prepared_statement.c
|
|
127
|
+
- ext/ladybug_ext/query_summary.c
|
|
128
|
+
- ext/ladybug_ext/recursive_rel.c
|
|
129
|
+
- ext/ladybug_ext/rel.c
|
|
130
|
+
- ext/ladybug_ext/result.c
|
|
131
|
+
- ext/ladybug_ext/types.c
|
|
132
|
+
- lib/ladybug.rb
|
|
133
|
+
- lib/ladybug/config.rb
|
|
134
|
+
- lib/ladybug/connection.rb
|
|
135
|
+
- lib/ladybug/database.rb
|
|
136
|
+
- lib/ladybug/node.rb
|
|
137
|
+
- lib/ladybug/prepared_statement.rb
|
|
138
|
+
- lib/ladybug/query_summary.rb
|
|
139
|
+
- lib/ladybug/recursive_rel.rb
|
|
140
|
+
- lib/ladybug/rel.rb
|
|
141
|
+
- lib/ladybug/result.rb
|
|
142
|
+
- spec/ladybug/config_spec.rb
|
|
143
|
+
- spec/ladybug/connection_spec.rb
|
|
144
|
+
- spec/ladybug/database_spec.rb
|
|
145
|
+
- spec/ladybug/prepared_statement_spec.rb
|
|
146
|
+
- spec/ladybug/query_summary_spec.rb
|
|
147
|
+
- spec/ladybug/result_spec.rb
|
|
148
|
+
- spec/ladybug/types_spec.rb
|
|
149
|
+
- spec/ladybug_spec.rb
|
|
150
|
+
- spec/spec_helper.rb
|
|
151
|
+
homepage: https://sr.ht/~ged/Ruby-Ladybug
|
|
152
|
+
licenses:
|
|
153
|
+
- BSD-3-Clause
|
|
154
|
+
metadata:
|
|
155
|
+
homepage_uri: https://sr.ht/~ged/Ruby-Ladybug
|
|
156
|
+
documentation_uri: https://deveiate.org/code/ruby-ladybug
|
|
157
|
+
changelog_uri: https://deveiate.org/code/ruby-ladybug/History_md.html
|
|
158
|
+
source_uri: https://hg.sr.ht/~ged/Ruby-Ladybug
|
|
159
|
+
bug_tracker_uri: https://todo.sr.ht/~ged/Ruby-Ladybug
|
|
160
|
+
rdoc_options: []
|
|
161
|
+
require_paths:
|
|
162
|
+
- lib
|
|
163
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
164
|
+
requirements:
|
|
165
|
+
- - ">="
|
|
166
|
+
- !ruby/object:Gem::Version
|
|
167
|
+
version: '0'
|
|
168
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
|
+
requirements:
|
|
170
|
+
- - ">="
|
|
171
|
+
- !ruby/object:Gem::Version
|
|
172
|
+
version: '0'
|
|
173
|
+
requirements: []
|
|
174
|
+
rubygems_version: 4.0.3
|
|
175
|
+
specification_version: 4
|
|
176
|
+
summary: A Ruby binding for the LadybugDB embedded graph database.
|
|
177
|
+
test_files: []
|
metadata.gz.sig
ADDED
|
Binary file
|