rdf-rdfxml 0.3.3 → 0.3.3.1

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.
data/History.rdoc CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.3.3.1
2
+ * JRuby/FFI compatibility updates.
3
+ * Simplify property value ordering in writer; this was causing unnecessary prefixes to be generated.
4
+
1
5
  === 0.3.3
2
6
  * Change licensing to UNLICENSE.
3
7
  * Only generate prefix definitions for prefixes actually used within a serialization.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 0.3.3.1
@@ -13,4 +13,19 @@ class Nokogiri::XML::Node
13
13
  when Nokogiri::XML::Attr then "#{parent.display_path}@#{name}"
14
14
  end
15
15
  end
16
+
17
+ alias_method :attribute_with_ns_without_ffi_null, :attribute_with_ns
18
+ ##
19
+ # Monkey patch attribute_with_ns, to insure nil is returned for #null?
20
+ #
21
+ # Get the attribute node with name and namespace
22
+ #
23
+ # @param [String] name
24
+ # @param [String] namespace
25
+ # @return [Nokogiri::XML::Attr]
26
+ def attribute_with_ns(name, namespace)
27
+ a = attribute_with_ns_without_ffi_null(name, namespace)
28
+
29
+ (a.respond_to?(:null?) && a.null?) ? nil : a # to ensure FFI Pointer compatibility
30
+ end
16
31
  end
@@ -500,12 +500,7 @@ module RDF::RDFXML
500
500
  # @return [Array<String>}] Ordered list of properties. Uses predicate_order.
501
501
  def order_properties(properties)
502
502
  properties.keys.each do |k|
503
- properties[k] = properties[k].sort do |a, b|
504
- a_li = a.is_a?(RDF::URI) && get_qname(a) && get_qname(a).to_s =~ /:_\d+$/ ? a.to_i : a.to_s
505
- b_li = b.is_a?(RDF::URI) && get_qname(b) && get_qname(b).to_s =~ /:_\d+$/ ? b.to_i : b.to_s
506
-
507
- a_li <=> b_li
508
- end
503
+ properties[k] = properties[k].sort_by(&:to_s)
509
504
  end
510
505
 
511
506
  # Make sorted list of properties
data/rdf-rdfxml.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rdf-rdfxml}
8
- s.version = "0.3.3"
8
+ s.version = "0.3.3.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Gregg Kellogg"]
12
- s.date = %q{2011-04-25}
12
+ s.date = %q{2011-05-06}
13
13
  s.description = %q{RDF::RDFXML is an RDF/XML reader and writer for the RDF.rb library suite.}
14
14
  s.email = %q{gregg@kellogg-assoc.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rdf-rdfxml
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.3
5
+ version: 0.3.3.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Gregg Kellogg
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-25 00:00:00 -07:00
13
+ date: 2011-05-06 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency