boltless 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,36 +8,36 @@ RSpec.describe Boltless::ResultRow do
8
8
 
9
9
  describe '#[]' do
10
10
  it 'allows direct key access to the row data (string key)' do
11
- expect(instance['active']).to be_eql(true)
11
+ expect(instance['active']).to be(true)
12
12
  end
13
13
 
14
14
  it 'allows direct key access to the row data (symbol key)' do
15
- expect(instance[:active]).to be_eql(true)
15
+ expect(instance[:active]).to be(true)
16
16
  end
17
17
 
18
18
  it 'returns the expected value (name)' do
19
- expect(instance[:name]).to be_eql('Bernd')
19
+ expect(instance[:name]).to eql('Bernd')
20
20
  end
21
21
 
22
22
  it 'returns the expected value (birthday)' do
23
- expect(instance[:birthday]).to be_eql(Date.parse('1971-07-28'))
23
+ expect(instance[:birthday]).to eql(Date.parse('1971-07-28'))
24
24
  end
25
25
 
26
26
  it 'returns the expected value (written_books)' do
27
- expect(instance[:written_books]).to be_eql(2)
27
+ expect(instance[:written_books]).to be(2)
28
28
  end
29
29
  end
30
30
 
31
31
  describe '#value' do
32
32
  it 'returns the first value of the row' do
33
- expect(instance.value).to be_eql(instance.values.first)
33
+ expect(instance.value).to eql(instance.values.first)
34
34
  end
35
35
  end
36
36
 
37
37
  describe '#values' do
38
38
  it 'returns all row values' do
39
39
  expect(instance.values).to \
40
- match_array(['Bernd', Date.parse('1971-07-28'), 2, true])
40
+ contain_exactly('Bernd', Date.parse('1971-07-28'), 2, true)
41
41
  end
42
42
  end
43
43
 
@@ -19,11 +19,11 @@ RSpec.describe Boltless::Result do
19
19
  end
20
20
 
21
21
  it 'returns the correct count of rows (via reader)' do
22
- expect(action.rows.count).to be_eql(2)
22
+ expect(action.rows.count).to be(2)
23
23
  end
24
24
 
25
25
  it 'returns the correct count of rows (directly)' do
26
- expect(action.count).to be_eql(2)
26
+ expect(action.count).to be(2)
27
27
  end
28
28
 
29
29
  context 'with statistics' do
@@ -55,7 +55,7 @@ RSpec.describe Boltless::Result do
55
55
 
56
56
  describe '#value' do
57
57
  it 'returns the correct value' do
58
- expect(instance.value).to be_eql('Bernd')
58
+ expect(instance.value).to eql('Bernd')
59
59
  end
60
60
  end
61
61
 
@@ -7,7 +7,7 @@ RSpec.describe Boltless::StatementCollector do
7
7
 
8
8
  describe 'delegations' do
9
9
  it 'allows to access the #build_cypher utility' do
10
- expect(instance.respond_to?(:build_cypher)).to be_eql(true)
10
+ expect(instance.respond_to?(:build_cypher)).to be(true)
11
11
  end
12
12
  end
13
13
 
@@ -21,7 +21,7 @@ RSpec.describe Boltless::StatementCollector do
21
21
  it 'collects the given statements' do
22
22
  action.call
23
23
  action.call
24
- expect(instance.statements.count).to be_eql(2)
24
+ expect(instance.statements.count).to be(2)
25
25
  end
26
26
 
27
27
  it 'calls Request.statement_payload to prepare the statement' do
@@ -41,7 +41,7 @@ RSpec.describe Boltless::Transaction do
41
41
 
42
42
  it 'rolls back the transaction on errors' do
43
43
  failed_action
44
- expect(check_action.count).to be_eql(0)
44
+ expect(check_action.count).to be(0)
45
45
  end
46
46
 
47
47
  it 'returns a mapped result' do
@@ -69,7 +69,7 @@ RSpec.describe Boltless::Transaction do
69
69
 
70
70
  describe 'delegations' do
71
71
  it 'allows to access the #build_cypher utility' do
72
- expect(instance.respond_to?(:build_cypher)).to be_eql(true)
72
+ expect(instance.respond_to?(:build_cypher)).to be(true)
73
73
  end
74
74
  end
75
75
 
@@ -114,7 +114,7 @@ RSpec.describe Boltless::Transaction do
114
114
 
115
115
  context 'when not explictly configured' do
116
116
  it 'returns write' do
117
- expect(action).to be_eql(:write)
117
+ expect(action).to be(:write)
118
118
  end
119
119
  end
120
120
 
@@ -122,7 +122,7 @@ RSpec.describe Boltless::Transaction do
122
122
  let(:instance) { new_instance[access_mode: :read] }
123
123
 
124
124
  it 'returns read' do
125
- expect(action).to be_eql(:read)
125
+ expect(action).to be(:read)
126
126
  end
127
127
  end
128
128
 
@@ -130,7 +130,7 @@ RSpec.describe Boltless::Transaction do
130
130
  let(:instance) { new_instance[access_mode: :write] }
131
131
 
132
132
  it 'returns write' do
133
- expect(action).to be_eql(:write)
133
+ expect(action).to be(:write)
134
134
  end
135
135
  end
136
136
  end
@@ -162,7 +162,7 @@ RSpec.describe Boltless::Transaction do
162
162
 
163
163
  describe 'after initialization' do
164
164
  it 'returns not_yet_started' do
165
- expect(action).to be_eql(:not_yet_started)
165
+ expect(action).to be(:not_yet_started)
166
166
  end
167
167
  end
168
168
  end
@@ -176,7 +176,7 @@ RSpec.describe Boltless::Transaction do
176
176
 
177
177
  describe 'after initialization' do
178
178
  it 'returns not_yet_started' do
179
- expect(action).to be_eql('not_yet_started')
179
+ expect(action).to eql('not_yet_started')
180
180
  end
181
181
  end
182
182
  end
@@ -203,7 +203,7 @@ RSpec.describe Boltless::Transaction do
203
203
  end
204
204
 
205
205
  it 'returns true' do
206
- expect(action).to be_eql(true)
206
+ expect(action).to be(true)
207
207
  end
208
208
 
209
209
  it 'switches the state to open' do
@@ -219,7 +219,7 @@ RSpec.describe Boltless::Transaction do
219
219
  let(:raw_state) { :closed }
220
220
 
221
221
  it 'returns false' do
222
- expect(action).to be_eql(false)
222
+ expect(action).to be(false)
223
223
  end
224
224
  end
225
225
 
@@ -232,7 +232,7 @@ RSpec.describe Boltless::Transaction do
232
232
  before { allow(instance).to receive(:begin!, &res_err) }
233
233
 
234
234
  it 'returns false' do
235
- expect(action).to be_eql(false)
235
+ expect(action).to be(false)
236
236
  end
237
237
  end
238
238
 
@@ -240,7 +240,7 @@ RSpec.describe Boltless::Transaction do
240
240
  before { allow(request).to receive(:begin_transaction) }
241
241
 
242
242
  it 'returns true' do
243
- expect(action).to be_eql(true)
243
+ expect(action).to be(true)
244
244
  end
245
245
 
246
246
  it 'switches the state to open' do
@@ -274,7 +274,7 @@ RSpec.describe Boltless::Transaction do
274
274
 
275
275
  it 'returns the result' do
276
276
  res = instance.run!('RETURN date() AS date')
277
- expect(res.value).to be_eql(Date.today.to_s)
277
+ expect(res.value).to eql(Date.today.to_s)
278
278
  end
279
279
  end
280
280
  end
@@ -287,7 +287,7 @@ RSpec.describe Boltless::Transaction do
287
287
  let(:raw_state) { :closed }
288
288
 
289
289
  it 'returns nil' do
290
- expect(action).to be_eql(nil)
290
+ expect(action).to be_nil
291
291
  end
292
292
  end
293
293
 
@@ -300,7 +300,7 @@ RSpec.describe Boltless::Transaction do
300
300
  before { allow(instance).to receive(:run!, &res_err) }
301
301
 
302
302
  it 'returns nil' do
303
- expect(action).to be_eql(nil)
303
+ expect(action).to be_nil
304
304
  end
305
305
  end
306
306
 
@@ -308,7 +308,7 @@ RSpec.describe Boltless::Transaction do
308
308
  before { allow(request).to receive(:run_query).and_return([123]) }
309
309
 
310
310
  it 'returns an the first result' do
311
- expect(action).to be_eql(123)
311
+ expect(action).to be(123)
312
312
  end
313
313
  end
314
314
  end
@@ -348,15 +348,15 @@ RSpec.describe Boltless::Transaction do
348
348
  end
349
349
 
350
350
  it 'returns two results (one for each statement)' do
351
- expect(action.count).to be_eql(2)
351
+ expect(action.count).to be(2)
352
352
  end
353
353
 
354
354
  it 'returns the correct result (first statement)' do
355
- expect(action.first.value).to be_eql(1)
355
+ expect(action.first.value).to be(1)
356
356
  end
357
357
 
358
358
  it 'returns the correct result (second statement)' do
359
- expect(action.last.value).to be_eql(Date.today.to_s)
359
+ expect(action.last.value).to eql(Date.today.to_s)
360
360
  end
361
361
  end
362
362
  end
@@ -369,7 +369,7 @@ RSpec.describe Boltless::Transaction do
369
369
  let(:raw_state) { :closed }
370
370
 
371
371
  it 'returns nil' do
372
- expect(action).to be_eql(nil)
372
+ expect(action).to be_nil
373
373
  end
374
374
  end
375
375
 
@@ -382,7 +382,7 @@ RSpec.describe Boltless::Transaction do
382
382
  before { allow(instance).to receive(:run_in_batch!, &res_err) }
383
383
 
384
384
  it 'returns nil' do
385
- expect(action).to be_eql(nil)
385
+ expect(action).to be_nil
386
386
  end
387
387
  end
388
388
 
@@ -390,7 +390,7 @@ RSpec.describe Boltless::Transaction do
390
390
  before { allow(request).to receive(:run_query).and_return([]) }
391
391
 
392
392
  it 'returns an empty array' do
393
- expect(action).to match_array([])
393
+ expect(action).to be_empty
394
394
  end
395
395
  end
396
396
  end
@@ -419,7 +419,7 @@ RSpec.describe Boltless::Transaction do
419
419
 
420
420
  it 'allows to send finalizing statements' do
421
421
  res = instance.commit!(['RETURN date() AS date'])
422
- expect(res.first.value).to be_eql(Date.today.to_s)
422
+ expect(res.first.value).to eql(Date.today.to_s)
423
423
  end
424
424
 
425
425
  it 'switches the state to closed' do
@@ -437,7 +437,7 @@ RSpec.describe Boltless::Transaction do
437
437
  let(:raw_state) { :closed }
438
438
 
439
439
  it 'returns nil' do
440
- expect(action).to be_eql(nil)
440
+ expect(action).to be_nil
441
441
  end
442
442
  end
443
443
 
@@ -450,7 +450,7 @@ RSpec.describe Boltless::Transaction do
450
450
  before { allow(instance).to receive(:commit!, &res_err) }
451
451
 
452
452
  it 'returns nil' do
453
- expect(action).to be_eql(nil)
453
+ expect(action).to be_nil
454
454
  end
455
455
  end
456
456
 
@@ -458,7 +458,7 @@ RSpec.describe Boltless::Transaction do
458
458
  before { allow(request).to receive(:commit_transaction).and_return([]) }
459
459
 
460
460
  it 'returns an empty array' do
461
- expect(action).to match_array([])
461
+ expect(action).to be_empty
462
462
  end
463
463
 
464
464
  it 'switches the state to closed' do
@@ -491,7 +491,7 @@ RSpec.describe Boltless::Transaction do
491
491
  end
492
492
 
493
493
  it 'returns true' do
494
- expect(action).to be_eql(true)
494
+ expect(action).to be(true)
495
495
  end
496
496
 
497
497
  it 'switches the state to closed' do
@@ -509,7 +509,7 @@ RSpec.describe Boltless::Transaction do
509
509
  let(:raw_state) { :closed }
510
510
 
511
511
  it 'returns false' do
512
- expect(action).to be_eql(false)
512
+ expect(action).to be(false)
513
513
  end
514
514
  end
515
515
 
@@ -522,7 +522,7 @@ RSpec.describe Boltless::Transaction do
522
522
  before { allow(instance).to receive(:rollback!, &res_err) }
523
523
 
524
524
  it 'returns false' do
525
- expect(action).to be_eql(false)
525
+ expect(action).to be(false)
526
526
  end
527
527
  end
528
528
 
@@ -530,7 +530,7 @@ RSpec.describe Boltless::Transaction do
530
530
  before { allow(request).to receive(:rollback_transaction) }
531
531
 
532
532
  it 'returns true' do
533
- expect(action).to be_eql(true)
533
+ expect(action).to be(true)
534
534
  end
535
535
 
536
536
  it 'switches the state to closed' do
@@ -561,16 +561,16 @@ RSpec.describe Boltless::Transaction do
561
561
  end
562
562
 
563
563
  it 'returns the given error result in case of errors (non-proc)' do
564
- expect(action.call(true, &res_err)).to be_eql(true)
564
+ expect(action.call(true, &res_err)).to be(true)
565
565
  end
566
566
 
567
567
  it 'returns the given error result in case of errors (proc)' do
568
568
  err_res = ->(e) { "Err: #{e.message}" }
569
- expect(action.call(err_res, &res_err)).to be_eql('Err: test')
569
+ expect(action.call(err_res, &res_err)).to eql('Err: test')
570
570
  end
571
571
 
572
572
  it 'returns the result of the user given block when no errors occur' do
573
- expect(action.call { 123 }).to be_eql(123)
573
+ expect(action.call { 123 }).to be(123)
574
574
  end
575
575
 
576
576
  it 'switches the state to closed on errors' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boltless
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hermann Mayer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-24 00:00:00.000000000 Z
11
+ date: 2024-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -122,188 +122,6 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '2.6'
125
- - !ruby/object:Gem::Dependency
126
- name: appraisal
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '2.4'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '2.4'
139
- - !ruby/object:Gem::Dependency
140
- name: benchmark-ips
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '2.10'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '2.10'
153
- - !ruby/object:Gem::Dependency
154
- name: bundler
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: '2.3'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
165
- - !ruby/object:Gem::Version
166
- version: '2.3'
167
- - !ruby/object:Gem::Dependency
168
- name: countless
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - "~>"
172
- - !ruby/object:Gem::Version
173
- version: '1.1'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - "~>"
179
- - !ruby/object:Gem::Version
180
- version: '1.1'
181
- - !ruby/object:Gem::Dependency
182
- name: guard-rspec
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - "~>"
186
- - !ruby/object:Gem::Version
187
- version: '4.7'
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - "~>"
193
- - !ruby/object:Gem::Version
194
- version: '4.7'
195
- - !ruby/object:Gem::Dependency
196
- name: irb
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - "~>"
200
- - !ruby/object:Gem::Version
201
- version: '1.2'
202
- type: :development
203
- prerelease: false
204
- version_requirements: !ruby/object:Gem::Requirement
205
- requirements:
206
- - - "~>"
207
- - !ruby/object:Gem::Version
208
- version: '1.2'
209
- - !ruby/object:Gem::Dependency
210
- name: rspec
211
- requirement: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - "~>"
214
- - !ruby/object:Gem::Version
215
- version: '3.12'
216
- type: :development
217
- prerelease: false
218
- version_requirements: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - "~>"
221
- - !ruby/object:Gem::Version
222
- version: '3.12'
223
- - !ruby/object:Gem::Dependency
224
- name: rubocop
225
- requirement: !ruby/object:Gem::Requirement
226
- requirements:
227
- - - "~>"
228
- - !ruby/object:Gem::Version
229
- version: '1.28'
230
- type: :development
231
- prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- requirements:
234
- - - "~>"
235
- - !ruby/object:Gem::Version
236
- version: '1.28'
237
- - !ruby/object:Gem::Dependency
238
- name: rubocop-rails
239
- requirement: !ruby/object:Gem::Requirement
240
- requirements:
241
- - - "~>"
242
- - !ruby/object:Gem::Version
243
- version: '2.14'
244
- type: :development
245
- prerelease: false
246
- version_requirements: !ruby/object:Gem::Requirement
247
- requirements:
248
- - - "~>"
249
- - !ruby/object:Gem::Version
250
- version: '2.14'
251
- - !ruby/object:Gem::Dependency
252
- name: rubocop-rspec
253
- requirement: !ruby/object:Gem::Requirement
254
- requirements:
255
- - - "~>"
256
- - !ruby/object:Gem::Version
257
- version: '2.10'
258
- type: :development
259
- prerelease: false
260
- version_requirements: !ruby/object:Gem::Requirement
261
- requirements:
262
- - - "~>"
263
- - !ruby/object:Gem::Version
264
- version: '2.10'
265
- - !ruby/object:Gem::Dependency
266
- name: simplecov
267
- requirement: !ruby/object:Gem::Requirement
268
- requirements:
269
- - - ">="
270
- - !ruby/object:Gem::Version
271
- version: '0.22'
272
- type: :development
273
- prerelease: false
274
- version_requirements: !ruby/object:Gem::Requirement
275
- requirements:
276
- - - ">="
277
- - !ruby/object:Gem::Version
278
- version: '0.22'
279
- - !ruby/object:Gem::Dependency
280
- name: yard
281
- requirement: !ruby/object:Gem::Requirement
282
- requirements:
283
- - - ">="
284
- - !ruby/object:Gem::Version
285
- version: 0.9.28
286
- type: :development
287
- prerelease: false
288
- version_requirements: !ruby/object:Gem::Requirement
289
- requirements:
290
- - - ">="
291
- - !ruby/object:Gem::Version
292
- version: 0.9.28
293
- - !ruby/object:Gem::Dependency
294
- name: yard-activesupport-concern
295
- requirement: !ruby/object:Gem::Requirement
296
- requirements:
297
- - - ">="
298
- - !ruby/object:Gem::Version
299
- version: 0.0.1
300
- type: :development
301
- prerelease: false
302
- version_requirements: !ruby/object:Gem::Requirement
303
- requirements:
304
- - - ">="
305
- - !ruby/object:Gem::Version
306
- version: 0.0.1
307
125
  description: neo4j driver, via the HTTP API
308
126
  email:
309
127
  - hermann.mayer92@gmail.com
@@ -374,7 +192,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
374
192
  requirements:
375
193
  - - ">="
376
194
  - !ruby/object:Gem::Version
377
- version: '2.5'
195
+ version: '2.7'
378
196
  required_rubygems_version: !ruby/object:Gem::Requirement
379
197
  requirements:
380
198
  - - ">="