spira 3.1.1 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -12
- 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 +48 -30
- 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: 69eaabc1d3987f239c8d6e0a1b7f5ce341135cb980d6ef904c5fd283c4cbc9a6
|
4
|
+
data.tar.gz: 84d1c1b5e08b5711e0f8d6966477bda4e49a386fdb5ca35210e77116bbebbfa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cecb27f0e923138e35b00d2ca03178310a8d46431381a0c88597872bafbc8ed69aec2d0c320fcb1b9e9c270d938e293cb310ade86a4be79e0a5a502335fa8c70
|
7
|
+
data.tar.gz: e88cdbda4eb0256311d575ec1075905ce7739d9512dbf9be7be922342f8d4e74922dab0f7720c0fe838655284ef339259fb20ec190072b7d95387687ee9f1faa
|
data/README.md
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
# Spira
|
1
|
+
# Spira
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/spira.svg)](https://badge.fury.io/rb/spira)
|
4
|
+
[![Build Status](https://github.com/ruby-rdf/spira/workflows/CI/badge.svg?branch=develop)](https://github.com/ruby-rdf/spira/actions?query=workflow%3ACI)
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/ruby-rdf/spira/badge.png?branch=develop)](https://coveralls.io/r/ruby-rdf/spira)
|
6
|
+
[![Code Climate](https://codeclimate.com/github/ruby-rdf/spira.png)](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://ruby-rdf.github.io/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://ruby-rdf.github.io/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.
|
@@ -476,7 +477,7 @@ level. You can also access attributes that are not defined as properties.
|
|
476
477
|
|
477
478
|
## Documentation
|
478
479
|
|
479
|
-
<https://
|
480
|
+
<https://ruby-rdf.github.io/spira>
|
480
481
|
|
481
482
|
## Support
|
482
483
|
|
@@ -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.3.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://ruby-rdf.github.io/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://ruby-rdf.github.io/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://ruby-rdf.github.io/rdf/RDF/Enumerable.html> for
|
307
307
|
# information on arguments.
|
308
308
|
#
|
309
|
-
# @see
|
309
|
+
# @see https://ruby-rdf.github.io/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://ruby-rdf.github.io/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://ruby-rdf.github.io/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://ruby-rdf.github.io/rdf/RDF/Literal.html
|
10
10
|
class Any
|
11
11
|
|
12
12
|
include Spira::Type
|
data/lib/spira/types/anyURI.rb
CHANGED
data/lib/spira/types/boolean.rb
CHANGED
data/lib/spira/types/date.rb
CHANGED
data/lib/spira/types/dateTime.rb
CHANGED
data/lib/spira/types/decimal.rb
CHANGED
data/lib/spira/types/double.rb
CHANGED
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
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://ruby-rdf.github.io/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://ruby-rdf.github.io/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://ruby-rdf.github.io/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://ruby-rdf.github.io/rdf/RDF/Literal.html
|
12
12
|
class PositiveInteger
|
13
13
|
|
14
14
|
include Spira::Type
|
data/lib/spira/types/string.rb
CHANGED
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.3.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: 2023-09-01 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.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.
|
26
|
+
version: '3.3'
|
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.3'
|
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.3'
|
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: '7.0'
|
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: '7.0'
|
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: '7.0'
|
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: '7.0'
|
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.14'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.14'
|
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.3'
|
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.3'
|
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.3'
|
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.3'
|
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.3'
|
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.3'
|
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.12'
|
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.12'
|
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,16 @@ 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://github.com/ruby-rdf/spira
|
215
228
|
licenses:
|
216
229
|
- Unlicense
|
217
|
-
metadata:
|
218
|
-
|
230
|
+
metadata:
|
231
|
+
documentation_uri: https://ruby-rdf.github.io/spira
|
232
|
+
bug_tracker_uri: https://github.com/ruby-rdf/spira/issues
|
233
|
+
homepage_uri: https://github.com/ruby-rdf/spira
|
234
|
+
mailing_list_uri: https://lists.w3.org/Archives/Public/public-rdf-ruby/
|
235
|
+
source_code_uri: https://github.com/ruby-rdf/spira
|
236
|
+
post_install_message:
|
219
237
|
rdoc_options: []
|
220
238
|
require_paths:
|
221
239
|
- lib
|
@@ -223,15 +241,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
223
241
|
requirements:
|
224
242
|
- - ">="
|
225
243
|
- !ruby/object:Gem::Version
|
226
|
-
version: '
|
244
|
+
version: '3.0'
|
227
245
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
228
246
|
requirements:
|
229
247
|
- - ">="
|
230
248
|
- !ruby/object:Gem::Version
|
231
249
|
version: '0'
|
232
250
|
requirements: []
|
233
|
-
rubygems_version: 3.
|
234
|
-
signing_key:
|
251
|
+
rubygems_version: 3.2.33
|
252
|
+
signing_key:
|
235
253
|
specification_version: 4
|
236
254
|
summary: A framework for using the information in RDF.rb repositories as model objects.
|
237
255
|
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
|