spira 2.1.0 → 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 +5 -5
- data/README.md +46 -31
- data/UNLICENSE +1 -1
- data/VERSION +1 -1
- data/lib/spira/base.rb +25 -19
- data/lib/spira/persistence.rb +16 -16
- data/lib/spira/resource.rb +7 -7
- data/lib/spira/type.rb +3 -3
- data/lib/spira/types/any.rb +1 -1
- data/lib/spira/types/anyURI.rb +3 -3
- data/lib/spira/types/boolean.rb +3 -3
- data/lib/spira/types/date.rb +3 -3
- data/lib/spira/types/dateTime.rb +3 -3
- data/lib/spira/types/decimal.rb +2 -2
- data/lib/spira/types/double.rb +2 -2
- data/lib/spira/types/float.rb +2 -2
- data/lib/spira/types/gYear.rb +3 -3
- data/lib/spira/types/int.rb +3 -3
- data/lib/spira/types/integer.rb +2 -2
- data/lib/spira/types/long.rb +3 -3
- data/lib/spira/types/negativeInteger.rb +3 -3
- data/lib/spira/types/nonNegativeInteger.rb +3 -3
- data/lib/spira/types/nonPositiveInteger.rb +3 -3
- data/lib/spira/types/positiveInteger.rb +3 -3
- data/lib/spira/types/string.rb +1 -1
- data/lib/spira/types/time.rb +3 -3
- data/lib/spira/types/uri.rb +1 -1
- data/lib/spira/utils.rb +2 -2
- data/lib/spira/validations/uniqueness.rb +1 -1
- data/lib/spira/validations.rb +3 -3
- data/lib/spira.rb +6 -4
- metadata +46 -35
- data/CHANGES.md +0 -118
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
|