spira 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/spira/types/time.rb +26 -0
  4. metadata +13 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dbed11be22b47543853764d62b1930a8b113c67f
4
- data.tar.gz: 2090996379c9642b5d52b5ec820ea380e87a5641
3
+ metadata.gz: 997f02e79badd950c5a209f6fe0414d3f0812d6c
4
+ data.tar.gz: 70e671da7ff94182a360823ac48e24a2dd90a43c
5
5
  SHA512:
6
- metadata.gz: b8c274d445a9d0c7ab289521653e2906b7e7ed390ea981e93114bcb8f0324841627b6f5f670c92fff9d077d1a53776082b5d3c04d2e8c32fb539a5c9bb47eb69
7
- data.tar.gz: 8aa1a2b9e3b452f2dfa17e9238839b2ba6a6e7be497ba8aae000244bc735edc42a092cb4539ffcd00d5d5a87cdcf68d6f29f8441a3ecffbe0d7d83bd2e4ac8f7
6
+ metadata.gz: 6d5150a575408c0a8076a3ac58ef8e6013f996b46edddd5d8d2cf24464c62349f752cec26592f7be1afa0c9153759c5ac72fbe7c49a694b7771211e20ce9f6db
7
+ data.tar.gz: 20835b0aae7083d5b39d3652f2081b99547becd8f332fc5060612d47eec565155b0f90465bb3b8b959f1ee06b9f6502484489bdcda09367e7ab5174248346703
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.0.1
@@ -0,0 +1,26 @@
1
+ module Spira::Types
2
+
3
+ ##
4
+ # A {Spira::Type} for times. Values will be associated with the
5
+ # `XSD.time` type.
6
+ #
7
+ # A {Spira::Resource} property can reference this type as
8
+ # `Spira::Types::Time`, `Time`, or `XSD.time`.
9
+ #
10
+ # @see Spira::Type
11
+ # @see http://rdf.rubyforge.org/RDF/Literal.html
12
+ class Time
13
+ include Spira::Type
14
+
15
+ def self.unserialize(value)
16
+ object = value.object.to_time
17
+ end
18
+
19
+ def self.serialize(value)
20
+ RDF::Literal.new(value, :datatype => XSD.time)
21
+ end
22
+
23
+ register_alias XSD.time
24
+
25
+ end
26
+ 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.0
4
+ version: 2.0.1
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: 2016-04-11 00:00:00.000000000 Z
12
+ date: 2016-12-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdf
@@ -57,30 +57,30 @@ dependencies:
57
57
  name: activemodel
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ">"
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '4'
62
+ version: '5.0'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ">"
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '4'
69
+ version: '5.0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: activesupport
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ">"
74
+ - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: '4'
76
+ version: '5.0'
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ">"
81
+ - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: '4'
83
+ version: '5.0'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: rdf-spec
86
86
  requirement: !ruby/object:Gem::Requirement
@@ -204,6 +204,7 @@ files:
204
204
  - lib/spira/types/nonPositiveInteger.rb
205
205
  - lib/spira/types/positiveInteger.rb
206
206
  - lib/spira/types/string.rb
207
+ - lib/spira/types/time.rb
207
208
  - lib/spira/types/uri.rb
208
209
  - lib/spira/utils.rb
209
210
  - lib/spira/validations.rb
@@ -221,7 +222,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
221
222
  requirements:
222
223
  - - ">="
223
224
  - !ruby/object:Gem::Version
224
- version: '2.0'
225
+ version: 2.2.2
225
226
  required_rubygems_version: !ruby/object:Gem::Requirement
226
227
  requirements:
227
228
  - - ">="
@@ -229,9 +230,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
230
  version: '0'
230
231
  requirements: []
231
232
  rubyforge_project: spira
232
- rubygems_version: 2.4.8
233
+ rubygems_version: 2.4.5.1
233
234
  signing_key:
234
235
  specification_version: 4
235
236
  summary: A framework for using the information in RDF.rb repositories as model objects.
236
237
  test_files: []
237
- has_rdoc: yard