spira 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/spira/base.rb +1 -1
- data/lib/spira/types/anyURI.rb +27 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d1bbcb90911e3e4a33ef723d1f4d617541a7b49
|
4
|
+
data.tar.gz: beab46e2b3baee71de96c5a0a3d44726b1a49f59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2cc68b3c7a3d2bbb256cf21811345dd7968a617665e7a96bb8e41f20a25043dd8115e89d88891ce171caabc32d75428a9253320fb66484db619a113b6e76cf6
|
7
|
+
data.tar.gz: cfa2f2999c35bfcd18ed73c3444e00c4990cb3e686aa3e4c4c2193f9fc1d1d9f30a64d5a1c5d6acbfb1a30d818e2468a8469ab60b18b71e1f85758368f36c259
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.2
|
data/lib/spira/base.rb
CHANGED
@@ -329,7 +329,7 @@ module Spira
|
|
329
329
|
def merge_localized_property(name, arg)
|
330
330
|
values = read_attribute("#{name}_native")
|
331
331
|
values.delete_if { |s| s.language == I18n.locale }
|
332
|
-
values << serialize_localized_property(arg, I18n.locale)
|
332
|
+
values << serialize_localized_property(arg, I18n.locale) if arg
|
333
333
|
values
|
334
334
|
end
|
335
335
|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Spira::Types
|
2
|
+
|
3
|
+
##
|
4
|
+
# A {Spira::Type} for URI values. Values will be associated with the
|
5
|
+
# `XSD.anyURI` type with no language code.
|
6
|
+
#
|
7
|
+
# A {Spira::Resource} property can reference this type as
|
8
|
+
# `Spira::Types::AnyURI`, `AnyURI`, or `XSD.anyURI`.
|
9
|
+
#
|
10
|
+
# @see Spira::Type
|
11
|
+
# @see http://rdf.rubyforge.org/RDF/Literal.html
|
12
|
+
class AnyURI
|
13
|
+
|
14
|
+
include Spira::Type
|
15
|
+
|
16
|
+
def self.unserialize(value)
|
17
|
+
value.object
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.serialize(value)
|
21
|
+
RDF::Literal.new(value, :datatype => XSD.anyURI)
|
22
|
+
end
|
23
|
+
|
24
|
+
register_alias XSD.anyURI
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spira
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Lavender
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir:
|
10
10
|
- bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-02-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdf
|
@@ -189,6 +189,7 @@ files:
|
|
189
189
|
- lib/spira/type.rb
|
190
190
|
- lib/spira/types.rb
|
191
191
|
- lib/spira/types/any.rb
|
192
|
+
- lib/spira/types/anyURI.rb
|
192
193
|
- lib/spira/types/boolean.rb
|
193
194
|
- lib/spira/types/date.rb
|
194
195
|
- lib/spira/types/dateTime.rb
|