rdf-hamster-repo 3.2.0 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/VERSION +1 -1
  4. data/lib/rdf/hamster_repo.rb +1 -76
  5. metadata +16 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9a06151808cb3e8163fb27a8f378e9b507c99c784761ac3dfc6bcd9efc42306
4
- data.tar.gz: b3353ac4627e79194ed360cf022d51a98f1d0c96062527cee36d653e2eb8dabc
3
+ metadata.gz: 0ca5e2130108572d007d357e8dbe01023ec93ce0e1ac5e2fefaa7490b857383b
4
+ data.tar.gz: 937736ffb0a20d968d7dc2b74ebaacd3e95108bcd1808b6e6f6fa92a34cea04b
5
5
  SHA512:
6
- metadata.gz: fe7606f4c71c852706b6a97a2e8632ca32921768280dda101e946c44c010d04cc438bc8436865f22dc698f6608f9369cff98b8fa4f38ed6569ee0a85ac9f9d15
7
- data.tar.gz: e27972369c6fb37e6d616329266dd09c69740d8bc5bfe508c5b3b7dca04df6723d73c40f9191d78a3839970afa57372d191387badcad7fe1a6819ca823c423db
6
+ metadata.gz: fabcb01f0331de9898302f8861d857e865ba386d676beb48eac94b124c60e755aac1b6698b7e13a676780c023368d8c011703506f4699ec3ea9a5e519bf8d90d
7
+ data.tar.gz: 0d2c6adae6fc73b93702dcd10a77a592bc6a284ceae027b2e71ed037d44bc50f9820c2aaed68167460f2c2377b6ab72dc8e1f1f7e5435caec9789739e1331244
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # RDF::HamsterRepo
2
2
  An RDF repository implementation using an in-memory Hamster Hash.
3
3
 
4
- [![Gem Version](https://badge.fury.io/rb/rdf-hamster-repo.png)](https://badge.fury.io/rb/rdf-hamster-repo)
4
+ [![Gem Version](https://badge.fury.io/rb/rdf-hamster-repo.svg)](https://badge.fury.io/rb/rdf-hamster-repo)
5
5
  [![Build Status](https://github.com/ruby-rdf/rdf-hamster-repo/workflows/CI/badge.svg?branch=develop)](https://github.com/ruby-rdf/rdf-hamster-repo/actions?query=workflow%3ACI)
6
6
  [![Coverage Status](https://coveralls.io/repos/ruby-rdf/rdf-hamster-repo/badge.svg?branch=develop)](https://coveralls.io/github/ruby-rdf/rdf-hamster-repo?branch=develop)
7
7
  [![Gitter chat](https://badges.gitter.im/ruby-rdf/rdf.png)](https://gitter.im/ruby-rdf/rdf)
@@ -14,12 +14,12 @@ An in-memory implementation of RDF::Repository using an efficient, immutable, an
14
14
 
15
15
  require 'rdf/hamster_repo'
16
16
  require 'rdf/nquads'
17
- repo = RDF::HamsterRepo.load("https://ruby-rdf.github.com/rdf/etc/doap.nq")
17
+ repo = RDF::HamsterRepo.load("https://ruby-rdf.github.io/rdf/etc/doap.nq")
18
18
 
19
19
  ## Dependencies
20
20
 
21
- * [Ruby](https://ruby-lang.org/) (>= 2.6)
22
- * [RDF.rb][] (~> 3.2)
21
+ * [Ruby](https://ruby-lang.org/) (>= 3.0)
22
+ * [RDF.rb][] (~> 3.3)
23
23
  * [Hamster][] (~> 3.0)
24
24
 
25
25
  ## Mailing List
@@ -55,7 +55,7 @@ This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange develo
55
55
  This is free and unencumbered public domain software. For more information,
56
56
  see <https://unlicense.org/> or the accompanying {file:UNLICENSE} file.
57
57
 
58
- [RDF.rb]: https://ruby-rdf.github.com/
58
+ [RDF.rb]: https://ruby-rdf.github.io/
59
59
  [YARD]: https://yardoc.org/
60
60
  [YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
61
61
  [PDD]: https://unlicense.org/#unlicensing-contributions
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.0
1
+ 3.3.0
@@ -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.3.0
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: 2023-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdf
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.2'
19
+ version: '3.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.2'
26
+ version: '3.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: hamster
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.2'
47
+ version: '3.3'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.2'
54
+ version: '3.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '3.10'
61
+ version: '3.12'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '3.10'
68
+ version: '3.12'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: yard
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -96,7 +96,12 @@ files:
96
96
  homepage: https://github.com/ruby-rdf/rdf-hamster-repo
97
97
  licenses:
98
98
  - Unlicense
99
- metadata: {}
99
+ metadata:
100
+ documentation_uri: https://ruby-rdf.github.io/rdf-hamster-repo
101
+ bug_tracker_uri: https://github.com/ruby-rdf/rdf-hamster-repo/issues
102
+ homepage_uri: https://github.com/ruby-rdf/rdf-hamster-repo
103
+ mailing_list_uri: https://lists.w3.org/Archives/Public/public-rdf-ruby/
104
+ source_code_uri: https://github.com/ruby-rdf/rdf-hamster-repo
100
105
  post_install_message:
101
106
  rdoc_options: []
102
107
  require_paths:
@@ -105,14 +110,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
110
  requirements:
106
111
  - - ">="
107
112
  - !ruby/object:Gem::Version
108
- version: '2.6'
113
+ version: '3.0'
109
114
  required_rubygems_version: !ruby/object:Gem::Requirement
110
115
  requirements:
111
116
  - - ">="
112
117
  - !ruby/object:Gem::Version
113
118
  version: '0'
114
119
  requirements: []
115
- rubygems_version: 3.3.3
120
+ rubygems_version: 3.2.33
116
121
  signing_key:
117
122
  specification_version: 4
118
123
  summary: An RDF repository implementation using an in-memory Hamster Hash.