Skip to content

Commit e0b67d7

Browse files
committed
Finish 3.3.2
2 parents 2b31abd + 2586399 commit e0b67d7

33 files changed

Lines changed: 335 additions & 165 deletions

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
ruby: ['3.0', 3.1, 3.2, ruby-head, jruby]
28+
ruby: ['3.0', 3.1, 3.2, 3.3, ruby-head, jruby]
2929
steps:
3030
- name: Clone repository
3131
uses: actions/checkout@v3
@@ -39,7 +39,7 @@ jobs:
3939
run: ruby --version; bundle exec rspec spec || $ALLOW_FAILURES
4040
- name: Coveralls GitHub Action
4141
uses: coverallsapp/github-action@v2
42-
if: "matrix.ruby == '3.0'"
42+
if: "matrix.ruby == '3.3'"
4343
with:
4444
github-token: ${{ secrets.GITHUB_TOKEN }}
4545
wintests:
@@ -48,12 +48,12 @@ jobs:
4848
runs-on: windows-latest
4949
env:
5050
CI: true
51-
ALLOW_FAILURES: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'jruby' || matrix.ruby == '3.1' }}
51+
ALLOW_FAILURES: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'jruby' }}
5252
strategy:
5353
fail-fast: false
5454
matrix:
5555
ruby:
56-
- 3.1
56+
- 3.2
5757
steps:
5858
- name: Clone repository
5959
uses: actions/checkout@v3

CHANGES.md

Lines changed: 0 additions & 92 deletions
This file was deleted.

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,15 @@ A separate [SPARQL][SPARQL doc] gem builds on basic BGP support to provide full
265265
foaf[:name] #=> RDF::URI("http://xmlns.com/foaf/0.1/name")
266266
foaf['mbox'] #=> RDF::URI("http://xmlns.com/foaf/0.1/mbox")
267267

268+
## RDF-star CG
269+
270+
[RDF.rb][] includes provisional support for [RDF-star][] with an N-Triples/N-Quads syntax for quoted triples in the _subject_ or _object_ position.
271+
272+
Support for RDF-star quoted triples is now deprecated, use RDF 1.2 triple terms instead.
273+
268274
## RDF 1.2
269275

270-
[RDF.rb][] includes provisional support for [RDF 1.2][] with an N-Triples/N-Quads syntax for quoted triples in the _subject_ or _object_ position.
276+
[RDF.rb][] includes provisional support for [RDF 1.2][] with an N-Triples/N-Quads syntax for triple terms in the _object_ position.
271277
[RDF.rb][] includes provisional support for [RDF 1.2][] directional language-tagged strings, which are literals of type `rdf:dirLangString` having both a `language` and `direction`.
272278

273279
Internally, an `RDF::Statement` is treated as another resource, along with `RDF::URI` and `RDF::Node`, which allows an `RDF::Statement` to have a `#subject` or `#object` which is also an `RDF::Statement`.
@@ -394,6 +400,9 @@ from BNode identity (i.e., they each entail the other)
394400
* {RDF::RDFV} - RDF Vocabulary (RDFV)
395401
* {RDF::XSD} - XML Schema (XSD)
396402

403+
## Change Log
404+
405+
See [Release Notes on GitHub](https://github.com/ruby-rdf/rdf/releases)
397406

398407
## Dependencies
399408

@@ -498,6 +507,7 @@ see <https://unlicense.org/> or the accompanying {file:UNLICENSE} file.
498507
[SPARQL doc]: https://ruby-rdf.github.io/sparql
499508
[RDF 1.0]: https://www.w3.org/TR/2004/REC-rdf-concepts-20040210/
500509
[RDF 1.1]: https://www.w3.org/TR/rdf11-concepts/
510+
[RDF-star]: https://www.w3.org/2021/12/rdf-star.html
501511
[RDF 1.2]: https://www.w3.org/TR/rdf12-concepts/
502512
[SPARQL 1.1]: https://www.w3.org/TR/sparql11-query/
503513
[RDF.rb]: https://ruby-rdf.github.io/

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.3.1
1+
3.3.2

etc/n-triples.ebnf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ ntriplesDoc ::= triple? (EOL triple)* EOL?
22
triple ::= subject predicate object '.'
33
subject ::= IRIREF | BLANK_NODE_LABEL | quotedTriple
44
predicate ::= IRIREF
5-
object ::= IRIREF | BLANK_NODE_LABEL | literal | quotedTriple
5+
object ::= IRIREF | BLANK_NODE_LABEL | literal | tripleTerm | quotedTriple
66
literal ::= STRING_LITERAL_QUOTE ('^^' IRIREF | LANG_DIR )?
7+
tripleTerm ::= '<<' subject predicate object '>>'
78
quotedTriple ::= '<<' subject predicate object '>>'
89

910
@terminals

lib/rdf/mixin/enumerable.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ def to_a
8383
# * `:literal_equality' preserves [term-equality](https://www.w3.org/TR/rdf11-concepts/#dfn-literal-term-equality) for literals. Literals are equal only if their lexical values and datatypes are equal, character by character. Literals may be "inlined" to value-space for efficiency only if `:literal_equality` is `false`.
8484
# * `:validity` allows a concrete Enumerable implementation to indicate that it does or does not support valididty checking. By default implementations are assumed to support validity checking.
8585
# * `:skolemize` supports [Skolemization](https://www.w3.org/wiki/BnodeSkolemization) of an `Enumerable`. Implementations supporting this feature must implement a `#skolemize` method, taking a base URI used for minting URIs for BNodes as stable identifiers and a `#deskolemize` method, also taking a base URI used for turning URIs having that prefix back into the same BNodes which were originally skolemized.
86-
# * `:quoted_triples` supports RDF 1.2 quoted triples.
86+
# * `:rdf_full` supports RDF 1.2 Full profile, including support for embedded Triple Terms.
87+
# * `:quoted_triples` supports RDF-star quoted triples.
8788
# * `:base_direction` supports RDF 1.2 directional language-tagged strings.
8889
#
8990
# @param [Symbol, #to_sym] feature

lib/rdf/mixin/queryable.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ def query_execute(query, **options, &block)
146146
#
147147
# Patterns may also have embedded patterns as either a subject or object, recursively.
148148
#
149+
# Patterns with a variable `graph_name` do not match the default graph.
150+
#
149151
# When matching, match an embedded pattern against embedded statements, recursively. (see {RDF::Query::Pattern#eql?})
150152
#
151153
# @param [RDF::Query::Pattern] pattern

lib/rdf/mixin/writable.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,11 @@ def insert_graph(graph)
127127
def insert_statements(statements)
128128
each = statements.respond_to?(:each_statement) ? :each_statement : :each
129129
statements.__send__(each) do |statement|
130-
if statement.embedded? && respond_to?(:supports?) && !supports?(:quoted_triples)
130+
# FIXME: quoted triples are now deprecated
131+
if statement.embedded? && respond_to?(:supports?) && !(supports?(:quoted_triples) || supports?(:rdf_full))
131132
raise ArgumentError, "Writable does not support quoted triples"
132133
end
133-
if statement.object && statement.object.literal? && statement.object.direction? && !supports?(:base_direction)
134+
if statement.object && statement.object.literal? && statement.object.direction? && respond_to?(:supports?) && !supports?(:base_direction)
134135
raise ArgumentError, "Writable does not support directional languaged-tagged strings"
135136
end
136137
insert_statement(statement)

lib/rdf/model/dataset.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ def isolation_level
104104
# @private
105105
# @see RDF::Enumerable#supports?
106106
def supports?(feature)
107-
return true if %i(graph_name quoted_triples).include?(feature)
107+
# FIXME: quoted triples are now deprecated
108+
return true if %i(graph_name quoted_triples rdf_full).include?(feature)
108109
super
109110
end
110111

lib/rdf/model/graph.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,9 @@ def query_pattern(pattern, **options, &block)
305305
# @private
306306
# @see RDF::Mutable#insert
307307
def insert_statement(statement)
308-
if statement.embedded? && !@data.supports?(:quoted_triples)
309-
raise ArgumentError, "Graph does not support quoted triples"
308+
# FIXME: quoted triples are now deprecated
309+
if statement.embedded? && !(@data.supports?(:quoted_triples) || @data.supports?(:rdf_full))
310+
raise ArgumentError, "Graph does not support the RDF Full profile"
310311
end
311312
if statement.object && statement.object.literal? && statement.object.direction? && !@data.supports?(:base_direction)
312313
raise ArgumentError, "Graph does not support directional languaged-tagged strings"

0 commit comments

Comments
 (0)