rdf-hamster-repo 3.2.0 → 3.2.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/rdf/hamster_repo.rb +1 -76
  4. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9a06151808cb3e8163fb27a8f378e9b507c99c784761ac3dfc6bcd9efc42306
4
- data.tar.gz: b3353ac4627e79194ed360cf022d51a98f1d0c96062527cee36d653e2eb8dabc
3
+ metadata.gz: e859a7a599e031e0db59de21c723ca5ce5586e12252d434f1d961151e68a6ff4
4
+ data.tar.gz: 63ecf7b3bbf6848763b9fdb86aa3e720be23e3c45f8500d38e9849bbf1f93dc4
5
5
  SHA512:
6
- metadata.gz: fe7606f4c71c852706b6a97a2e8632ca32921768280dda101e946c44c010d04cc438bc8436865f22dc698f6608f9369cff98b8fa4f38ed6569ee0a85ac9f9d15
7
- data.tar.gz: e27972369c6fb37e6d616329266dd09c69740d8bc5bfe508c5b3b7dca04df6723d73c40f9191d78a3839970afa57372d191387badcad7fe1a6819ca823c423db
6
+ metadata.gz: 21b72effd29a276c275d176b3dc7bc419610289403b002327ba7469f28ae91d4eefa87a18f241c87cfc3c2688fc8381ff46f35dab3d70bdbef83ca602df28c6f
7
+ data.tar.gz: 4b221b335455af3737d01723b15af032cc38a7108a13dfbae80b30a889f9ce95a76993d7e266feeaa8d24bfe68f7c53c7fa12672f7a456b0c2eec95f15d73596
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.0
1
+ 3.2.1
@@ -14,7 +14,7 @@ module RDF
14
14
  Hamster::Hash.new)
15
15
  obj.instance_variable_set(:@tx_class,
16
16
  obj.options.delete(:transaction_class) ||
17
- SerializedTransaction)
17
+ RDF::Transaction::SerializedTransaction)
18
18
  super
19
19
  end
20
20
 
@@ -340,81 +340,6 @@ module RDF
340
340
  data
341
341
  end
342
342
 
343
- ##
344
- # A transaction for the Hamster-based `RDF::Repository::Implementation`
345
- # with full serializability.
346
- #
347
- # @todo refactor me!
348
- # @see RDF::Transaction
349
- class SerializedTransaction < Transaction
350
- ##
351
- # @see Transaction#initialize
352
- def initialize(*args, **options, &block)
353
- super(*args, **options, &block)
354
- @base_snapshot = @snapshot
355
- end
356
-
357
- ##
358
- # Inserts the statement to the transaction's working snapshot.
359
- #
360
- # @see Transaction#insert_statement
361
- def insert_statement(statement)
362
- @snapshot = @snapshot.class
363
- .new(data: @snapshot.send(:insert_to,
364
- @snapshot.send(:data),
365
- process_statement(statement)))
366
- end
367
-
368
- ##
369
- # Deletes the statement from the transaction's working snapshot.
370
- #
371
- # @see Transaction#insert_statement
372
- def delete_statement(statement)
373
- @snapshot = @snapshot.class
374
- .new(data: @snapshot.send(:delete_from,
375
- @snapshot.send(:data),
376
- process_statement(statement)))
377
- end
378
-
379
- ##
380
- # @see RDF::Dataset#isolation_level
381
- def isolation_level
382
- :serializable
383
- end
384
-
385
- ##
386
- # @note this is a simple object equality check.
387
- #
388
- # @see RDF::Transaction#mutated?
389
- def mutated?
390
- !@snapshot.send(:data).equal?(repository.send(:data))
391
- end
392
-
393
- ##
394
- # Replaces repository data with the transaction's snapshot in a safely
395
- # serializable fashion.
396
- #
397
- # @note this transaction uses a pessimistic merge strategy which
398
- # fails the transaction if any data has changed in the repository
399
- # since transaction start time. However, the specific guarantee is
400
- # softer: multiple concurrent conflicting transactions will not
401
- # succeed. We may choose to implement a less pessimistic merge
402
- # strategy as a non-breaking change.
403
- #
404
- # @raise [TransactionError] when the transaction can't be merged.
405
- # @see Transaction#execute
406
- def execute
407
- raise TransactionError, 'Cannot execute a rolled back transaction. ' \
408
- 'Open a new one instead.' if instance_variable_defined?(:@rolledback) && @rolledback
409
-
410
- raise TransactionError, 'Error merging transaction. Repository' \
411
- 'has changed during transaction time.' unless
412
- repository.send(:data).equal? @base_snapshot.send(:data)
413
-
414
- repository.send(:data=, @snapshot.send(:data))
415
- end
416
- end
417
-
418
343
  module VERSION
419
344
  VERSION_FILE = File.expand_path("../../../VERSION", __FILE__)
420
345
  MAJOR, MINOR, TINY, EXTRA = File.read(VERSION_FILE).chop.split(".")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-hamster-repo
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg Kellogg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-28 00:00:00.000000000 Z
11
+ date: 2021-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdf
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.2'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 3.2.1
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
29
  version: '3.2'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 3.2.1
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: hamster
29
35
  requirement: !ruby/object:Gem::Requirement