Releases: ruby-rdf/rdf
Release 2.0.2
-
Adding this documentation might help clarify pattern matching within
RDF::Query::Pattern, too. -
do not fail with Encoding::CompatibilityError when normalizing unicode IRIs.
-
Fix
RDF::List#==comparisons toRDF::ValuesRuby 2.3.0 changed the behavior of
Comparable#==to avoid hiding errors. This led toNoMethodErrors for comparisons that returnfalsefor previous Rubies.This introduces a custom
RDF::List#==implementation for explicitly
supported comparisons betweenRDF::Valueclasses. We returnfalse
immediately forRDF::Values which are not#list?; falling back on
Comparablefor other types.Further,
RDF::Lists with three elements that happen to coincide with
the terms of an RDF::Statement would previously returntrue. E.g.:
RDF::List[:s, :p, :o] == RDF::Statement(:s, :p, :o). This unusual edge
case is patched by way of the changes described above. -
Adjust
List#<=>to avoid error casesUsing
Array(other)instead ofother.to_aavoids throwing errors when
comparing. This minor tweak slightly improves the solution to #304 given
in #305.
RDF.rb 2.0.1
- Remove code duplication.
- Remove deprecated
Vocabulary.load - Improve grammar for Literal::Double and improve general validation testing of literals.
- Improve heuristics for generating term statements based on value inspection.
- CLI improvements.
- Work around odd Rubinius problem involing variable arguments and super. Fixes #298.
Release 2.0.0
Ruby RDF 2.0
This is the 2.0 release of RDF.rb and related gems. This announces the general availability of RDF.rb 2.0.0 along with other gems collected in the linkeddata meta-gem. Note that this release introduces breaking changes from the 1.* version; in most cases, these are highlighted using deprecation messages if using 1.99.
New Features
-
Readers and Writers now using
RDF::Util::Loggerfor managing error, warning, information, and debug messages, which allow them to be managed more flexibly and consistently. -
Substantially revised
RDF::Transaction, which now serves as a scope for ACID transactions. Transactions are now read-only by default; for read/write transactions, useTransaction.new(mutable: true)orRepository#transaction(mutable: true). Transactions can be applied to anRDF::Transactable(in the core:RepositoryorGraph). -
Introduced
RDF::Changesetas a set of deletes & inserts which can be applied to aMutable. The defaultRDF::Transactionfor customRepositoryimplementations uses aChangeset, which is applied to theRepository. -
Introduced
RDF::Datasetas a read-only super-class ofRepository, which can be provided by usingRepository#snapshot, among other methods. -
The in-memory
Repositoryimplementation now uses Hamster::Hash to implement a fully functional interface for updating repositories, saving a number of explicitdupoperations in queries and allowing fully isolated snapshots and serializable transactions at minimal cost. As a side-effect, there is no guarantee that insert order of statements in aGraphorRepositorywill be maintained. -
The
rdfcommand line executable is now pluggable, and can be extended by other gems implementingRDF::Format,RDF::ReaderorRDF::Writer. Readers and Writers can define format-specific options, and individual commands can define their own options as well. Commands now have their own help messages. -
List#initializenow uses keyword arguments instead of positional arguments. -
Graph#initializenow uses keyword arguments instead of positional arguments. -
A new class
RDF::Changesethas been added. This is meant to replace any
previous use ofRDF::Transaction, which in fact used to in RDF.rb 1.x
represent more of a buffered changeset than a genuine transaction scope.- Instead of
RDF::Transaction.execute, useRDF::Changeset.apply. - Instead of
RDF::Transaction#execute, useRDF::Changeset#apply.
- Instead of
-
The
RDF::Transactionclass has been substantially revamped, including
some minor backwards-incompatible changes. These changes will mostly
affect repository implementors, not so much general RDF.rb users.The changes reflect the expanded purpose of the class: instead of being a
mere buffered changeset (for which, seeRDF::Changeset), transactions
are now intended to provide a proper ACID scope for repository queries and
mutations.We always now also carefully distinguish between read-only and read/write
transactions, in order to enable repository implementations to take out the
appropriate locks for concurrency control. Note as well that transactions
are now read-only by default; mutability must be explicitly requested on
construction in order to obtain a read/write transaction.In case repository implementations should be unable to provide actual ACID
guarantees for transactions, that must be clearly indicated in their
documentation. Similarly, implementations should throw an exception when
appropriate in case they don't provide write transaction support.-
RDF::Transaction#initializenow takes the target repository as its
first argument. Transactions are now always tied to a specific
repository instance, instead of being free-floating objects as they used
to be (for that, seeRDF::Changeset). -
RDF::Transactionnow mixes inRDF::QueryableandRDF::Enumerable,
enabling quad-pattern matches and BGP queries to execute in a proper
transaction scope. -
The
RDF::Transaction#contextaccessor, and its aliases, have been
removed. Transactions aren't necessarily scoped to a single graph only. -
There is a new
RDF::Transaction#repositoryaccessor for retrieving the
target repository object that the transaction operates upon. -
There is a new
RDF::Transaction#buffered?predicate for testing
whether the changeset that constitutes a transaction is available for
introspection. Particular repository implementations may support both
options and permit the user the choice on transaction construction. -
The
RDF::Transaction#insertsand#deletesmethods are deprecated.
Instead, there is a newRDF::Transaction#changesaccessor to retrieve
anRDF::Changesetinstance, which contains corresponding methods.
For unbuffered transactions,#changesreturnsnil.
-
-
Enumerables vs. Enumerators
RDF::Queryable#queryandRDF::Query#executedid not return an enumerable, which may be an enumerator. Most internal uses return an Array now, which aides performance for small result sets, but potentially causes problems for large result sets. Implementations may still return an Enumerator, and Enumerators may be passed as arguments.RDF::Enumerable#statements,#quads,#triples,#subjects,#predicates,#objects, and#contextsnow return an array rather than an Enumerator.
Removed Interfaces from 1.*
These changes result in a DEPRECATION warning in 1.99, and errors in 2.*:
- Minimum Ruby version no MRI 2.0 or equivalent 2.3 or greater preferred.
- Numerous vocabularies have been moved to the rdf-vocab gem, for example
RDF::Vocab::FOAFinstead ofRDF::FOAF. - Many interfaces would take a
:contextoption, this has been replaced with:graph_nameto more properly correspond to RDF 1.1 concepts. This also includes#contextand#context=,#has_context?, and#each_contextmethods in various modules and classes. Vocabulary.label_foris replaced withVocabulary::Term#label*Vocabulary.comment_foris replaced withVocabulary::Term#comment#write_graphand#write_statementsare replaced withRDF::Writable#insertWriter#format_valueis deprecated in favor ofWriter#format_termNTriples::Readerno longer supports Surrogate Pairs.- Many interfaces now use [keyword arguments][https://robots.thoughtbot.com/ruby-2-keyword-arguments] instead of positional arguments.
List#initializeno longer uses positional arguments. This is a breaking change which cannot support backwards compatibility, but shouldn't affect most normal use.Graph#initializeno longer uses positional arguments.Transactionis completely changed, and existing use from 1.x is unlikely to work without modification in 2.x. Users of the 1.xTransactionwho are not interested in ACID transactions should look atRDF::Changeset, which is more similar to the old interface.Vocabulary.loadis deprecated, useVocabulary.from_graph.
The following vocabularies are deprecated and have been moved to the rdf-vocab gem.
RDF::CC- Creative Commons (CC)RDF::CERT- W3 Authentication Certificate (CERT)RDF::DC- Dublin Core (DC)RDF::DC11- Dublin Core 1.1 (DC11) deprecatedRDF::DOAP- Description of a Project (DOAP)RDF::EXIF- Exchangeable Image File Format (EXIF)RDF::FOAF- Friend of a Friend (FOAF)RDF::GEO- WGS84 Geo Positioning (GEO)RDF::GR- GoodRelations (GR)RDF::HT- Hypertext Transfer Protocol (HT)RDF::ICAL- RDF Calendar Workspace (ICAL)RDF::MA- Media Resources (MA)RDF::MO- Music Ontology (MO)RDF::OG- Open Graph protocol (OG)RDF::PROV- Provenance on the web (PROV)RDF::RSA- W3 RSA Keys (RSA)RDF::RSS- RDF Site Summary (RSS)RDF::SCHEMA- Schema.org (SCHEMA)RDF::SIOC- Semantically-Interlinked Online Communities (SIOC)RDF::SKOS- Simple Knowledge Organization System (SKOS)RDF::SKOSXL- SKOS eXtension for Labels (SKOSXL)RDF::V- RDF data vocabulary (V)RDF::VCARD- Ontology for vCards (VCARD)RDF::VMD- Data-Vocabulary.org (VMD)RDF::VOID- Vocabulary of Interlinked Datasets (VOID)RDF::VS- SemWeb Vocab Status ontology (VS)RDF::WDRS- Protocol for Web Description Resources (WDRS)RDF::WOT- Web of Trust (WOT)RDF::XHTML- Extensible HyperText Markup Language (XHTML)RDF::XHV- XHTML Vocabulary (XHV)
Ruby gems will not automatically load beta gems via gem update. To get these gems you must explicitly include them using gem install --pre linkeddata.
2.0.0.beta2
respond_to_missing in RDF::Query::Solution
Freeze Literal, Node and URI values on instantiation.
Freeze Term#to_base result.
Use symbol, rather than string, to index intern cache.
Change "rdf" executable to take a pipeline of commands, so that multiple commands can be stacked.
Remove vocab-fetch
Deprecate Vocabulary.load in favor of Vocabulary.from_graph.
Change vocabulary generation in Rakefile to use rdf cli.
Ruby RDF 2.0 Beta1
Ruby RDF 2.0
We are preparing for the 2.0 release of RDF.rb and related gems. This announces the general availability of RDF.rb 2.0.0.beta1 along with other gems collected in the linkeddata meta-gem. Note that this release introduces breaking changes from the 1.* version; in most cases, these are highlighted using deprecation messages if using 1.99.
New Features
- Readers and Writers now using
RDF::Util::Loggerfor managing error, warning, information, and debug messages, which allow them to be managed more flexibly and consistently. - Substantially revised
RDF::Transaction, which now serves as a scope for ACID transactions. Transactions are now read-only by default; for read/write transactions, useTransaction.new(mutable: true)orRepository#transaction(mutable: true). Transactions can be applied to anRDF::Transactable(in the core:RepositoryorGraph). - Introduced
RDF::Changesetas a set of deletes & inserts which can be applied to aMutable. The defaultRDF::Transactionfor customRepositoryimplementations uses aChangeset, which is applied to theRepository. - Introduced
RDF::Datasetas a read-only super-class ofRepository, which can be provided by usingRepository#snapshot, among other methods. - The in-memory
Repositoryimplementation now uses [Hamster::Hash][] to implement a fully functional interface for updating repositories, saving a number of explicitdupoperations in queries and allowing fully isolated snapshots and serializable transactions at minimal cost. As a side-effect, there is no guarantee that insert order of statements in aGraphorRepositorywill be maintained.
Deprecated Interfaces in 1.99
These changes result in a DEPRECATION warning in 1.99, and errors in 2.*:
- Minimum Ruby version no MRI 2.0 or equivalent 2.3 or greater preferred.
- Numerous vocabularies have been moved to the rdf-vocab gem, for example
RDF::Vocab::FOAFinstead ofRDF::FOAF. - Many interfaces would take a
:contextoption, this has been replaced with:graph_nameto more properly correspond to RDF 1.1 concepts. This also includes#contextand#context=,#has_context?, and#each_contextmethods in various modules and classes. Vocabulary.label_foris replaced withVocabulary::Term#label*Vocabulary.comment_foris replaced withVocabulary::Term#comment#write_graphand#write_statementsare replaced withRDF::Writable#insertWriter#format_valueis deprecated in favor ofWriter#format_termNTriples::Readerno longer supports Surrogate Pairs.- Many interfaces now use [keyword arguments][https://robots.thoughtbot.com/ruby-2-keyword-arguments] instead of positional arguments.
Deprecated interfaces in 2.0
List#initializenow uses keyword arguments instead of positional arguments. This is a breaking change which cannot support backwards compatibility, but shouldn't affect most normal use.Graph#initializenow uses keyword arguments instead of positional arguments. Positional arguments are accepted with a deprecation message until 2.0.0 is released.Transactionis completely changed, and existing use from 1.x is unlikely to work without modification in 2.x. Users of the 1.xTransactionwho are not interested in ACID transactions should look atRDF::Changeset, which is more similar to the old interface.
Ruby gems will not automatically load beta gems via gem update. To get these gems you must explicitly include them using gem install --pre linkeddata.