Skip to content

Commit

Permalink
Finish 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Jul 25, 2017
2 parents 8185bd4 + f8175ac commit 06a97e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0
2.2.0
15 changes: 5 additions & 10 deletions lib/rdf/rdfxml/writer/haml_templates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ class Writer
- if expanded_type.start_with?('_:')
- haml_tag(get_qname(RDF.type), "rdf:nodeID" => expanded_type[2..-1])
-else
- # FIXME: closing tag forces close tag, as :/ is not honored in 5.0.1
- haml_tag(get_qname(RDF.type), "", "rdf:resource" => expanded_type)
- haml_tag(get_qname(RDF.type), "rdf:resource" => expanded_type)
- predicates.each do |p|
= yield(p)
),
Expand All @@ -60,11 +59,9 @@ class Writer
- haml_tag(property, :"<", "xml:lang" => object.language, "rdf:datatype" => (object.datatype unless object.plain?)) do
= object.value.to_s.encode(xml: :text)
- elsif object.node?
- # FIXME: closing tag forces close tag, as :/ is not honored in 5.0.1
- haml_tag(property, "", "rdf:nodeID" => object.id)
- haml_tag(property, :"/", "rdf:nodeID" => object.id)
- else
- # FIXME: closing tag forces close tag, as :/ is not honored in 5.0.1
- haml_tag(property, "", "rdf:resource" => relativize(object))
- haml_tag(property, :"/", "rdf:resource" => relativize(object))
),

# Outpust for a list
Expand All @@ -78,11 +75,9 @@ class Writer
- if recurse && res = yield(object)
= res
- elsif object.node?
- # FIXME: closing tag forces close tag, as :/ is not honored in 5.0.1
- haml_tag(get_qname(RDF.Description), "", "rdf:nodeID" => (object.id if ref_count(object) > 1))
- haml_tag(get_qname(RDF.Description), :"/", "rdf:nodeID" => (object.id if ref_count(object) > 1))
- else
- # FIXME: closing tag forces close tag, as :/ is not honored in 5.0.1
- haml_tag(get_qname(RDF.Description), "", "rdf:about" => relativize(object))
- haml_tag(get_qname(RDF.Description), :"/", "rdf:about" => relativize(object))
),
}
HAML_TEMPLATES = {base: BASE_HAML}
Expand Down
3 changes: 0 additions & 3 deletions spec/writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -690,10 +690,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
describe m.comment do
m.entries.each do |t|
next unless t.positive_test? && t.evaluate?
# Literal serialization adds namespace definitions

specify "#{t.name}" do
pending if t.name == 'xml-canon-test001'
unless defined?(::Nokogiri)
pending("XML-C14XL") if t.name == "xml-canon-test001"
end
Expand Down

0 comments on commit 06a97e7

Please sign in to comment.