Closed Simaris closed 7 years ago
The branch needs to be rebased.
This feature currently fails with:
n-triple:
<http://example.org/knows>
Liquid Exception: undefined method `f' for #<RDF::Query::Solution:0x2b053aafa4b4({})> in Sebastian/index.html
jekyll 3.3.0 | Error: undefined method `f' for #<RDF::Query::Solution:0x2b053aafa4b4({})>
with this graph:
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<http://example.org/Sebastian>
a <http://xmlns.com/foaf/0.1/Agent>, <http://xmlns.com/foaf/0.1/Person> ;
<http://xmlns.com/foaf/0.1/firstName> "Sebastian" .
_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "somebody" .
_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "Ruby" .
_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid4 .
_:genid6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "Jekyll-RDF" .
_:genid6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid5 .
_:genid7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "Informatik" .
_:genid7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid6 .
<http://example.org/knows> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "something" .
<http://example.org/knows> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid7 .
<http://example.org/Sebastian> <http://xmlns.com/foaf/0.1/knows> <http://example.org/knows> .
and this default_layout
:
---
---
<h1 class="page-heading">{{ page.rdf | rdf_property: '<http://xmlns.com/foaf/0.1/name>' }}</h1>
<dl>
{% assign firstname = page.rdf | rdf_property: '<http://xmlns.com/foaf/0.1/firstName>' %}
{% assign lastname = page.rdf | rdf_property: '<http://xmlns.com/foaf/0.1/lastName>' %}
{% assign gender = page.rdf | rdf_property: '<http://xmlns.com/foaf/0.1/gender>' %}
{% if firstname %}
<dt>Vorname:</dt>
<dd>{{ firstname }}</dd>
{% endif %}
{% if lastname %}
<dt>Nachname:</dt>
<dd>{{ lastname }}</dd>
{% endif %}
{% if lastname %}
<dt>Geschlecht:</dt>
<dd>{{ gender }}</dd>
{% endif %}
</dl>
<ul>
{% assign coll = page.rdf | rdf_property: '<http://xmlns.com/foaf/0.1/knows>' %}
{% if coll %}
<span>{{ coll }}</span>
{% assign array = coll | rdf_collection %}
{% for know in array %}
<li>{{ know }}</li>
{% endfor %}
{% endif %}
</ul>
Ok, the issue with undefined method
f' for #<RDF::Query::Solution:0x2b053aafa4b4({})>` is solved with sparql lib 2.2.1
@Simaris looks good, will you also remove the dependency to the git repository and set sparql to 2.2.1 in the gemspec?
Already done that, just pushed prematurely
@Simaris I've done some history rewriting to make the changes more compact. Further I've also made the sparql version constraint less restrictive (cf. https://ruby-doc.org/stdlib-2.0.0/libdoc/rubygems/rdoc/Gem/Version.html#class-Gem::Version-label-Preventing+Version+Catastrophe-3A). Is this ok?
It seems correct to me
Fix #66, fix #10