spira 3.1.1 → 3.2.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 +4 -4
- data/README.md +15 -11
- data/UNLICENSE +1 -1
- data/VERSION +1 -1
- data/lib/spira/base.rb +7 -3
- data/lib/spira/persistence.rb +5 -5
- data/lib/spira/type.rb +1 -1
- data/lib/spira/types/any.rb +1 -1
- data/lib/spira/types/anyURI.rb +1 -1
- data/lib/spira/types/boolean.rb +1 -1
- data/lib/spira/types/date.rb +1 -1
- data/lib/spira/types/dateTime.rb +1 -1
- data/lib/spira/types/decimal.rb +1 -1
- data/lib/spira/types/double.rb +1 -1
- data/lib/spira/types/float.rb +1 -1
- data/lib/spira/types/gYear.rb +1 -1
- data/lib/spira/types/int.rb +1 -1
- data/lib/spira/types/integer.rb +1 -1
- data/lib/spira/types/long.rb +1 -1
- data/lib/spira/types/negativeInteger.rb +1 -1
- data/lib/spira/types/nonNegativeInteger.rb +1 -1
- data/lib/spira/types/nonPositiveInteger.rb +1 -1
- data/lib/spira/types/positiveInteger.rb +1 -1
- data/lib/spira/types/string.rb +1 -1
- data/lib/spira/types/time.rb +1 -1
- data/lib/spira/types/uri.rb +1 -1
- data/lib/spira.rb +5 -4
- metadata +42 -29
- data/CHANGES.md +0 -118
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97fddc3a248df0d23723ea8967034dab05e28d23ccced070f1e87b910896adcf
|
4
|
+
data.tar.gz: e0828af26e91756329cbf511785d005dc528d0971683f992547fe2dde76f03cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c146fef9d47e59add48611de4e460c290f60a410efbefeadf9f64e76e5b56be97a3d5ad1257640c657dcbfe805035edd435f697651f037214971faebc41c139
|
7
|
+
data.tar.gz: 5c69eca5680a622992a4bd7ab0647b6308fe2daaf5c9c651cd14207f870c4d79efcc227768cc974dde9e04f859a33cc1240dafba694eed7dc45b241ba67f5f97
|
data/README.md
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
# Spira
|
1
|
+
# Spira
|
2
|
+
|
3
|
+
[](https://badge.fury.io/rb/spira)
|
4
|
+
[](https://github.com/ruby-rdf/spira/actions?query=workflow%3ACI)
|
5
|
+
[](https://coveralls.io/r/ruby-rdf/spira)
|
6
|
+
[](https://codeclimate.com/github/ruby-rdf/spira)
|
2
7
|
|
3
8
|
It's time to breathe life into your linked data.
|
4
9
|
|
@@ -13,10 +18,6 @@ losing access to statement-oriented nature of linked data, if you so choose.
|
|
13
18
|
It can be used either to access existing RDF data in a resource-oriented way,
|
14
19
|
or to create a new store of RDF data based on simple defaults.
|
15
20
|
|
16
|
-
An introductory blog post is at <http://blog.datagraph.org/2010/05/spira>
|
17
|
-
|
18
|
-
A changelog is available in the {file:CHANGES.md} file.
|
19
|
-
|
20
21
|
### Example
|
21
22
|
|
22
23
|
```ruby
|
@@ -103,7 +104,7 @@ The easiest way to work with Spira is to install it via Rubygems:
|
|
103
104
|
|
104
105
|
$ sudo gem install spira
|
105
106
|
|
106
|
-
Downloads will be available on the github project page
|
107
|
+
Downloads will be available on the github project page.
|
107
108
|
|
108
109
|
## Defining Model Classes
|
109
110
|
|
@@ -225,7 +226,7 @@ end
|
|
225
226
|
Spira.repository = RDF::Repository.new
|
226
227
|
|
227
228
|
rolling_stones = Album.for RDF::URI.new('http://example.org/cds/rolling-stones-hits')
|
228
|
-
# See RDF.rb at
|
229
|
+
# See RDF.rb at https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Enumerable.html for more information about #has_predicate?
|
229
230
|
rolling_stones.has_predicate?(RDF.type) #=> true
|
230
231
|
Album.type #=> RDF::URI('http://example.org/types/album')
|
231
232
|
```
|
@@ -391,7 +392,7 @@ are implemented:
|
|
391
392
|
|
392
393
|
The default type for a Spira property is `Spira::Types::Any`, which uses
|
393
394
|
`RDF::Literal`'s automatic boxing/unboxing of XSD types as best it can.
|
394
|
-
See [`RDF::Literal`](
|
395
|
+
See [`RDF::Literal`](https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Literal.html) for more information.
|
395
396
|
|
396
397
|
You can implement your own types as well. Your class' serialize method should
|
397
398
|
turn an RDF::Value into a ruby object, and vice versa.
|
@@ -504,7 +505,10 @@ This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange develo
|
|
504
505
|
list in the the `README`. Alphabetical order applies.
|
505
506
|
* Do note that in order for us to merge any non-trivial changes (as a rule
|
506
507
|
of thumb, additions larger than about 15 lines of code), we need an
|
507
|
-
explicit [public domain dedication][PDD] on record from you
|
508
|
+
explicit [public domain dedication][PDD] on record from you,
|
509
|
+
which you will be asked to agree to on the first commit to a repo within the organization.
|
510
|
+
Note that the agreement applies to all repos in the [Ruby RDF](https://github.com/ruby-rdf/) organization.
|
508
511
|
|
509
|
-
[public-rdf-ruby w3c mailing list]:
|
510
|
-
[RDF.rb]:
|
512
|
+
[public-rdf-ruby w3c mailing list]: https://lists.w3.org/Archives/Public/public-rdf-ruby/
|
513
|
+
[RDF.rb]: https://rubygems.org/gems/rdf
|
514
|
+
[PDD]: https://unlicense.org/#unlicensing-contributions
|
data/UNLICENSE
CHANGED
@@ -21,4 +21,4 @@ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
21
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
22
|
OTHER DEALINGS IN THE SOFTWARE.
|
23
23
|
|
24
|
-
For more information, please refer to <
|
24
|
+
For more information, please refer to <https:///unlicense.org/>
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.2.0
|
data/lib/spira/base.rb
CHANGED
@@ -107,12 +107,16 @@ module Spira
|
|
107
107
|
# Initialize a new Spira::Base instance of this resource class using
|
108
108
|
# a new blank node subject. Accepts a hash of arguments for initial
|
109
109
|
# attributes. To use a URI or existing blank node as a subject, use
|
110
|
-
#
|
110
|
+
# the `.for` method on the subclass instead.
|
111
|
+
#
|
112
|
+
# @example
|
113
|
+
# class Person < Spira::Base; end
|
114
|
+
# bob = Person.for("bob")
|
111
115
|
#
|
112
116
|
# @param [Hash{Symbol => Any}] props Default attributes for this instance
|
113
117
|
# @yield [self] Executes a given block
|
114
118
|
# @yieldparam [self] self The newly created instance
|
115
|
-
# @see Spira
|
119
|
+
# @see Spira::Persistence::ClassMethods#for
|
116
120
|
# @see RDF::URI#as
|
117
121
|
# @see RDF::Node#as
|
118
122
|
def initialize(props = {}, options = {})
|
@@ -188,7 +192,7 @@ module Spira
|
|
188
192
|
# an RDF level, and will work across subclasses as long as the attributes
|
189
193
|
# are the same.
|
190
194
|
#
|
191
|
-
# @see
|
195
|
+
# @see https://rubygems.org/gems/rdf-isomorphic/
|
192
196
|
def ==(other)
|
193
197
|
# TODO: define behavior for equality on subclasses.
|
194
198
|
# TODO: should we compare attributes here?
|
data/lib/spira/persistence.rb
CHANGED
@@ -171,7 +171,7 @@ module Spira
|
|
171
171
|
# @yield [self] Executes a given block and calls `#save!`
|
172
172
|
# @yieldparam [self] self The newly created instance
|
173
173
|
# @return [Spira::Base] The newly created instance
|
174
|
-
# @see
|
174
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/URI.html
|
175
175
|
def for(identifier, attributes = {}, &block)
|
176
176
|
self.project(id_for(identifier), attributes, &block)
|
177
177
|
end
|
@@ -205,7 +205,7 @@ module Spira
|
|
205
205
|
# @param [Any] identifier
|
206
206
|
# @return [RDF::URI, RDF::Node]
|
207
207
|
# @raise [ArgumentError] If this class cannot create an identifier from the given argument
|
208
|
-
# @see
|
208
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/URI.html
|
209
209
|
# @see Spira.base_uri
|
210
210
|
# @see Spira.for
|
211
211
|
def id_for(identifier)
|
@@ -303,10 +303,10 @@ module Spira
|
|
303
303
|
##
|
304
304
|
# Enumerate each RDF statement that makes up this projection. This makes
|
305
305
|
# each instance an `RDF::Enumerable`, with all of the nifty benefits
|
306
|
-
# thereof. See <
|
306
|
+
# thereof. See <https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Enumerable.html> for
|
307
307
|
# information on arguments.
|
308
308
|
#
|
309
|
-
# @see
|
309
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Enumerable.html
|
310
310
|
def each
|
311
311
|
if block_given?
|
312
312
|
self.class.properties.each do |name, property|
|
@@ -333,7 +333,7 @@ module Spira
|
|
333
333
|
##
|
334
334
|
# The number of RDF::Statements this projection has.
|
335
335
|
#
|
336
|
-
# @see
|
336
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Enumerable.html#count
|
337
337
|
def count
|
338
338
|
each.count
|
339
339
|
end
|
data/lib/spira/type.rb
CHANGED
@@ -32,7 +32,7 @@ module Spira
|
|
32
32
|
# `Spira::Type`s include the RDF namespace and thus have all of the base RDF
|
33
33
|
# vocabularies available to them without the `RDF::` prefix.
|
34
34
|
#
|
35
|
-
# @see
|
35
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Value.html
|
36
36
|
# @see Spira::Resource
|
37
37
|
module Type
|
38
38
|
|
data/lib/spira/types/any.rb
CHANGED
@@ -6,7 +6,7 @@ module Spira::Types
|
|
6
6
|
# Its behavior is defined as 'What `RDF::Literal` does' for a given value.
|
7
7
|
#
|
8
8
|
# @see Spira::Type
|
9
|
-
# @see
|
9
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Literal.html
|
10
10
|
class Any
|
11
11
|
|
12
12
|
include Spira::Type
|
data/lib/spira/types/anyURI.rb
CHANGED
@@ -8,7 +8,7 @@ module Spira::Types
|
|
8
8
|
# `Spira::Types::AnyURI`, `AnyURI`, or `XSD.anyURI`.
|
9
9
|
#
|
10
10
|
# @see Spira::Type
|
11
|
-
# @see
|
11
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Literal.html
|
12
12
|
class AnyURI
|
13
13
|
|
14
14
|
include Spira::Type
|
data/lib/spira/types/boolean.rb
CHANGED
@@ -8,7 +8,7 @@ module Spira::Types
|
|
8
8
|
# `Spira::Types::Boolean`, `Boolean`, or `XSD.boolean`.
|
9
9
|
#
|
10
10
|
# @see Spira::Type
|
11
|
-
# @see
|
11
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Literal.html
|
12
12
|
class Boolean
|
13
13
|
|
14
14
|
include Spira::Type
|
data/lib/spira/types/date.rb
CHANGED
data/lib/spira/types/dateTime.rb
CHANGED
@@ -8,7 +8,7 @@ module Spira::Types
|
|
8
8
|
# `Spira::Types::DateTime`, `DateTime`, or `XSD.dateTime`.
|
9
9
|
#
|
10
10
|
# @see Spira::Type
|
11
|
-
# @see
|
11
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Literal.html
|
12
12
|
class DateTime
|
13
13
|
include Spira::Type
|
14
14
|
|
data/lib/spira/types/decimal.rb
CHANGED
@@ -10,7 +10,7 @@ module Spira::Types
|
|
10
10
|
# `Spira::Types::Integer`, `Integer`, or `XSD.integer`.
|
11
11
|
#
|
12
12
|
# @see Spira::Type
|
13
|
-
# @see
|
13
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Literal.html
|
14
14
|
class Decimal
|
15
15
|
include Spira::Type
|
16
16
|
|
data/lib/spira/types/double.rb
CHANGED
@@ -8,7 +8,7 @@ module Spira::Types
|
|
8
8
|
# `Spira::Types::Double`, `Double`, or `XSD.double`.
|
9
9
|
#
|
10
10
|
# @see Spira::Type
|
11
|
-
# @see
|
11
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Literal.html
|
12
12
|
class Double
|
13
13
|
|
14
14
|
include Spira::Type
|
data/lib/spira/types/float.rb
CHANGED
data/lib/spira/types/gYear.rb
CHANGED
data/lib/spira/types/int.rb
CHANGED
data/lib/spira/types/integer.rb
CHANGED
@@ -8,7 +8,7 @@ module Spira::Types
|
|
8
8
|
# `Spira::Types::Integer`, `Integer`, or `XSD.integer`.
|
9
9
|
#
|
10
10
|
# @see Spira::Type
|
11
|
-
# @see
|
11
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Literal.html
|
12
12
|
class Integer
|
13
13
|
|
14
14
|
include Spira::Type
|
data/lib/spira/types/long.rb
CHANGED
@@ -8,7 +8,7 @@ module Spira::Types
|
|
8
8
|
# `Spira::Types::NegativeInteger`, `NegativeInteger`, or `XSD.negativeInteger`.
|
9
9
|
#
|
10
10
|
# @see Spira::Type
|
11
|
-
# @see
|
11
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Literal.html
|
12
12
|
class NegativeInteger
|
13
13
|
|
14
14
|
include Spira::Type
|
@@ -8,7 +8,7 @@ module Spira::Types
|
|
8
8
|
# `Spira::Types::NonNegativeInteger`, `NonNegativeInteger`, or `XSD.nonNegativeInteger`.
|
9
9
|
#
|
10
10
|
# @see Spira::Type
|
11
|
-
# @see
|
11
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Literal.html
|
12
12
|
class NonNegativeInteger
|
13
13
|
|
14
14
|
include Spira::Type
|
@@ -8,7 +8,7 @@ module Spira::Types
|
|
8
8
|
# `Spira::Types::NonPositiveInteger`, `NonPositiveInteger`, or `XSD.nonPositiveInteger`.
|
9
9
|
#
|
10
10
|
# @see Spira::Type
|
11
|
-
# @see
|
11
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Literal.html
|
12
12
|
class NonPositiveInteger
|
13
13
|
|
14
14
|
include Spira::Type
|
@@ -8,7 +8,7 @@ module Spira::Types
|
|
8
8
|
# `Spira::Types::PositiveInteger`, `PositiveInteger`, or `XSD.positiveInteger`.
|
9
9
|
#
|
10
10
|
# @see Spira::Type
|
11
|
-
# @see
|
11
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Literal.html
|
12
12
|
class PositiveInteger
|
13
13
|
|
14
14
|
include Spira::Type
|
data/lib/spira/types/string.rb
CHANGED
@@ -8,7 +8,7 @@ module Spira::Types
|
|
8
8
|
# `Spira::Types::String`, `String`, or `XSD.string`.
|
9
9
|
#
|
10
10
|
# @see Spira::Type
|
11
|
-
# @see
|
11
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Literal.html
|
12
12
|
class String
|
13
13
|
|
14
14
|
include Spira::Type
|
data/lib/spira/types/time.rb
CHANGED
data/lib/spira/types/uri.rb
CHANGED
data/lib/spira.rb
CHANGED
@@ -9,8 +9,8 @@ require "rdf/vocab"
|
|
9
9
|
# Spira is a framework for building projections of RDF data into Ruby classes.
|
10
10
|
# It is built on top of RDF.rb.
|
11
11
|
#
|
12
|
-
# @see
|
13
|
-
# @see
|
12
|
+
# @see https://rubygems.org/gems/rdf
|
13
|
+
# @see https://github.com/bhuga/spira
|
14
14
|
# @see Spira::Resource
|
15
15
|
|
16
16
|
module Spira
|
@@ -63,13 +63,14 @@ module Spira
|
|
63
63
|
|
64
64
|
# Execute a block on a specific repository
|
65
65
|
#
|
66
|
-
# @param [RDF::Repository]
|
67
|
-
# @param [Symbol] name the repository name
|
66
|
+
# @param [RDF::Repository] repo the repository to work on
|
68
67
|
# @yield the block with the instructions while using the repository
|
68
|
+
# @return [RDF::Repository] the given repository
|
69
69
|
def using_repository(repo)
|
70
70
|
old_repository = Spira.repository
|
71
71
|
Spira.repository = repo
|
72
72
|
yield if block_given?
|
73
|
+
repo
|
73
74
|
ensure
|
74
75
|
Spira.repository = old_repository
|
75
76
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spira
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Lavender
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdf
|
@@ -16,126 +16,140 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3.
|
19
|
+
version: '3.2'
|
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.
|
26
|
+
version: '3.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdf-isomorphic
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '3.
|
33
|
+
version: '3.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '3.
|
40
|
+
version: '3.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: promise
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.3
|
47
|
+
version: '0.3'
|
48
48
|
type: :runtime
|
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: 0.3
|
54
|
+
version: '0.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: activemodel
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '6.1'
|
62
62
|
type: :runtime
|
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: '
|
68
|
+
version: '6.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: activesupport
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '6.1'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '6.1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: i18n
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.8'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.8'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: rdf-spec
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3.
|
103
|
+
version: '3.2'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: '3.
|
110
|
+
version: '3.2'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: rdf-turtle
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
115
|
- - "~>"
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version: '3.
|
117
|
+
version: '3.2'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
122
|
- - "~>"
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version: '3.
|
124
|
+
version: '3.2'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: rdf-vocab
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
129
|
- - "~>"
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version: '3.
|
131
|
+
version: '3.2'
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
136
|
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version: '3.
|
138
|
+
version: '3.2'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: rspec
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
143
|
- - "~>"
|
130
144
|
- !ruby/object:Gem::Version
|
131
|
-
version: '3.
|
145
|
+
version: '3.10'
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
150
|
- - "~>"
|
137
151
|
- !ruby/object:Gem::Version
|
138
|
-
version: '3.
|
152
|
+
version: '3.10'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: rspec-its
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,14 +170,14 @@ dependencies:
|
|
156
170
|
requirements:
|
157
171
|
- - "~>"
|
158
172
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0.9
|
173
|
+
version: '0.9'
|
160
174
|
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
178
|
- - "~>"
|
165
179
|
- !ruby/object:Gem::Version
|
166
|
-
version: 0.9
|
180
|
+
version: '0.9'
|
167
181
|
description: Spira is a framework for using the information in RDF.rb repositories
|
168
182
|
as model objects.
|
169
183
|
email: blavender@gmail.com
|
@@ -172,7 +186,6 @@ extensions: []
|
|
172
186
|
extra_rdoc_files: []
|
173
187
|
files:
|
174
188
|
- AUTHORS
|
175
|
-
- CHANGES.md
|
176
189
|
- README.md
|
177
190
|
- UNLICENSE
|
178
191
|
- VERSION
|
@@ -211,11 +224,11 @@ files:
|
|
211
224
|
- lib/spira/validations.rb
|
212
225
|
- lib/spira/validations/uniqueness.rb
|
213
226
|
- lib/spira/version.rb
|
214
|
-
homepage:
|
227
|
+
homepage: https://ruby-rdf.github.io/spira/
|
215
228
|
licenses:
|
216
229
|
- Unlicense
|
217
230
|
metadata: {}
|
218
|
-
post_install_message:
|
231
|
+
post_install_message:
|
219
232
|
rdoc_options: []
|
220
233
|
require_paths:
|
221
234
|
- lib
|
@@ -223,15 +236,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
223
236
|
requirements:
|
224
237
|
- - ">="
|
225
238
|
- !ruby/object:Gem::Version
|
226
|
-
version: '2.
|
239
|
+
version: '2.6'
|
227
240
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
228
241
|
requirements:
|
229
242
|
- - ">="
|
230
243
|
- !ruby/object:Gem::Version
|
231
244
|
version: '0'
|
232
245
|
requirements: []
|
233
|
-
rubygems_version: 3.
|
234
|
-
signing_key:
|
246
|
+
rubygems_version: 3.3.3
|
247
|
+
signing_key:
|
235
248
|
specification_version: 4
|
236
249
|
summary: A framework for using the information in RDF.rb repositories as model objects.
|
237
250
|
test_files: []
|
data/CHANGES.md
DELETED
@@ -1,118 +0,0 @@
|
|
1
|
-
# Changelog for Spira <http://github.com/rdf-ruby/spira>
|
2
|
-
|
3
|
-
## 0.3.0
|
4
|
-
* General updates to bring up to date.
|
5
|
-
|
6
|
-
## 0.0.12
|
7
|
-
* Implemented #validate, #validate! (refactored from #save!)
|
8
|
-
* Force to_a on query results when constructing to force the promise-like
|
9
|
-
semantics of SPARQL::Client
|
10
|
-
|
11
|
-
## 0.0.11
|
12
|
-
* Bumped the version dependency on rdf-isomorphic to 0.3.0
|
13
|
-
* Added support for before_create, after_create, before_save, after_save,
|
14
|
-
after_update, before_destroy and after_destroy hooks.
|
15
|
-
* Switch RDF.rb dependency to >= instead of ~>
|
16
|
-
|
17
|
-
## 0.0.10
|
18
|
-
* Use RDF::URI.intern on URIs generated via base URIs
|
19
|
-
* Added a Spira::Types::Native, which will return the RDF::Value for a given
|
20
|
-
predicate directly without any serialization or dserialization.
|
21
|
-
|
22
|
-
## 0.0.9
|
23
|
-
* Fix a bug with Spira::Types::Any that prevented blank node objects
|
24
|
-
* Added Spira::Resource#copy, #copy!, #copy_resource!, and #rename!
|
25
|
-
* Fix a bug with fragment RDF::URI arguments that prevented correct URI
|
26
|
-
construction
|
27
|
-
* Added Spira::Resource.project(subject, attributes, &block), which creates a
|
28
|
-
new instance without attempting to perform any base_uri logic on the given
|
29
|
-
subject. This provides a supported API entry point for implementors to
|
30
|
-
create their own domain-specific URI construction.
|
31
|
-
* Updating a value to nil will now remove it from the repository on #save!
|
32
|
-
* Tweaks to dirty tracking to correctly catch both changed and updated values.
|
33
|
-
All tests pass for the first time with this change.
|
34
|
-
* Change gemspec name to work with bundler
|
35
|
-
|
36
|
-
## 0.0.8
|
37
|
-
* Remove type checking for repository addition. More power in return for
|
38
|
-
slightly more difficult error messages.
|
39
|
-
* Repositories added via klass, \*arg are now only instantiated on first use
|
40
|
-
instead of immediately.
|
41
|
-
* RDF::URI#as, RDF::Node#as, Resource.for, and Resource#new can now all accept
|
42
|
-
a block, which yields the new instance and saves it after the block.
|
43
|
-
* Clarify error message when default repository is not setup
|
44
|
-
* Added a weak-reference identity map for each instance. Any circular references in
|
45
|
-
relations will now return the original object instead of querying for a new
|
46
|
-
one.
|
47
|
-
* Use a weak-reference identity map when iterating by class.
|
48
|
-
* When serializing/unserializing, duck typing (:serialize, :unserialize) is now
|
49
|
-
permitted.
|
50
|
-
|
51
|
-
## 0.0.7
|
52
|
-
* Added Resource.\[\], an alias for Resource.for
|
53
|
-
* Resource.each now correctly raises an exception when a repository isn't found
|
54
|
-
|
55
|
-
## 0.0.6
|
56
|
-
* Added #exists?, which returns a boolean if an instance exists in
|
57
|
-
the backing store.
|
58
|
-
* Added #data, which returns an enumerator of all RDF data for a subject, not
|
59
|
-
just model data.
|
60
|
-
* #save! and #update! now return self for chaining
|
61
|
-
* Implemented #update and #update!, which allow setting multiple properties
|
62
|
-
at once
|
63
|
-
* Existing values not matching a model's defined type will now be deleted on
|
64
|
-
#save!
|
65
|
-
* Saving resources will now only update dirty fields
|
66
|
-
* Saving resources now removes all existing triples for a given predicate
|
67
|
-
if the field was updated instead of only removing one.
|
68
|
-
* Implemented and documented #destroy!, #destroy!(:subject),
|
69
|
-
#destroy!(:object), and #destroy!(:completely). Removed #destroy_resource!
|
70
|
-
* has_many collections are now Sets and not Arrays, more accurately reflecting
|
71
|
-
RDF semantics.
|
72
|
-
* The Any (default) property type will now work fine with URIs
|
73
|
-
* Added ResourceDeclarationError to replace various errors that occur during
|
74
|
-
invalid class declarations via the DSL.
|
75
|
-
* Raise an error if a non-URI predicate is given in the DSL
|
76
|
-
* Small updates for RDF.rb 0.2.0
|
77
|
-
* Implemented dirty field tracking. Resource#dirty?(:name) will now report if
|
78
|
-
a field has not been saved.
|
79
|
-
|
80
|
-
## 0.0.5
|
81
|
-
* Relations can now find related classes in modules, either by absolute
|
82
|
-
reference, or by class name if they are in the same namespace.
|
83
|
-
* Fix a bug with default_vocabulary in which a '/' was appended to
|
84
|
-
vocabularies ending in '#'
|
85
|
-
* Fix a bug with the Decimal type where round-tripping was incorrect
|
86
|
-
* Fix some error messages that were missing closing parentheses
|
87
|
-
|
88
|
-
## 0.0.4
|
89
|
-
* Added a Decimal type
|
90
|
-
* Small updates for RDF.rb 0.2.0 compatibility
|
91
|
-
* Add a Spira::Base class that can be inherited from for users who prefer to
|
92
|
-
inherit rather than include.
|
93
|
-
* Resource#new returns to the public API as a way to create a resource with a
|
94
|
-
new blank node subject.
|
95
|
-
|
96
|
-
## 0.0.3
|
97
|
-
* Bumped promise dependency to 0.1.1 to fix a Ruby 1.9 warning
|
98
|
-
* Rework error handling when a repository is not configured; this should
|
99
|
-
always now raise a Spira::NoRepositoryError regardless of what operation
|
100
|
-
was attempted, and the error message was improved as well.
|
101
|
-
* A '/' is no longer appended to base URIs ending with a '#'
|
102
|
-
* Resources can now take a BNode as a subject. Implemented #node?, #uri,
|
103
|
-
#to_uri, #to_node, and #to_subject in support of this; see the yardocs for
|
104
|
-
exact semantics. RDF::Node is monkey patched with #as, just like RDF::URI,
|
105
|
-
for instantiation. Old code should not break, but if you want to add
|
106
|
-
BNodes, you may be using #uri where you want to now be using #subject.
|
107
|
-
|
108
|
-
## 0.0.2
|
109
|
-
* Implemented #each on resource classes, allowing classes with a defined RDF
|
110
|
-
type to be enumerated
|
111
|
-
* Fragment URIs are now used as strings, allowing i.e. Integers to be used as
|
112
|
-
the final portion of a URI for classes with a base_uri defined.
|
113
|
-
* Added an RDF::URI property type
|
114
|
-
* Implemented #to_rdf and #to_uri for increased compatibility with the RDF.rb
|
115
|
-
ecosystem
|
116
|
-
|
117
|
-
## 0.0.1
|
118
|
-
* Initial release
|