dbd 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.txt +5 -0
- data/README.md +49 -40
- data/dbd.gemspec +1 -1
- data/docs/test.rb +48 -39
- data/lib/dbd/fact.rb +19 -4
- data/lib/dbd/graph.rb +1 -1
- data/lib/dbd/time_stamp.rb +13 -2
- data/lib/dbd/version.rb +1 -1
- data/spec/lib/dbd/graph/from_csv_spec.rb +32 -12
- data/spec/lib/dbd/time_stamp/methods_spec.rb +5 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34e70c3c3d08093acee3610c0e3d93ac5bace6b6
|
4
|
+
data.tar.gz: 64f2171e686baaa681c3dccef02ef7feb543b71b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 202ce2b19b1c53a04aa84c0089935baf715f76ed0836d0aaf2259ea930f528592e71ad45f6580679dd1fb5d3174755cbe943092f6c2ac275016294b5908e1920
|
7
|
+
data.tar.gz: 64dd10c180cb960f408d3de9be9227c392a2dddc93a6db8c4e0e1baa11345b6591df0a3a227fe3ca79d57366c6cfd584378cddabb1b5a327e0c1baf22955b90a
|
data/HISTORY.txt
CHANGED
data/README.md
CHANGED
@@ -48,65 +48,74 @@ Open Source [MIT]
|
|
48
48
|
|
49
49
|
## Examples
|
50
50
|
|
51
|
-
Also see the file `docs/test.rb
|
51
|
+
Also see the file `docs/test.rb` to execute the script below.
|
52
52
|
|
53
53
|
```
|
54
54
|
require 'dbd'
|
55
55
|
|
56
56
|
provenance = Dbd::ProvenanceResource.new
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
provenance << fact_context_public
|
64
|
-
provenance << fact_source_dbd
|
65
|
-
provenance << fact_creator_peter_v
|
66
|
-
provenance << fact_created_now
|
67
|
-
provenance << fact_license_MIT
|
58
|
+
provenance << Dbd::ProvenanceFact.new(predicate: "prov:context", object: "public")
|
59
|
+
provenance << Dbd::ProvenanceFact.new(predicate: "prov:source", object: "http://github.com/petervandenabeele/dbd")
|
60
|
+
provenance << Dbd::ProvenanceFact.new(predicate: "dcterms:creator", object: "@peter_v")
|
61
|
+
provenance << Dbd::ProvenanceFact.new(predicate: "dcterms:created", object: Time.now.utc)
|
62
|
+
provenance << Dbd::ProvenanceFact.new(predicate: "prov:license", object: "MIT")
|
68
63
|
|
69
64
|
nobel_peace_2012 = Dbd::Resource.new(provenance_subject: provenance.subject)
|
70
65
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
nobel_peace_2012 << fact_nobel_peace_2012
|
76
|
-
nobel_peace_2012 << fact_EU_label
|
77
|
-
nobel_peace_2012 << fact_EU_comment
|
78
|
-
nobel_peace_2012 << fact_EU_story
|
66
|
+
nobel_peace_2012 << Dbd::Fact.new(predicate: "todo:nobelPeacePriceWinner", object: "2012")
|
67
|
+
nobel_peace_2012 << Dbd::Fact.new(predicate: "rdfs:label", object: "EU") # this will use some RDF predicates in future
|
68
|
+
nobel_peace_2012 << Dbd::Fact.new(predicate: "rdfs:comment", object: "European Union")
|
69
|
+
nobel_peace_2012 << Dbd::Fact.new(predicate: "todo:story", object: "A long period of peace,\n that is a \"bliss\".")
|
79
70
|
|
80
71
|
graph = Dbd::Graph.new
|
81
72
|
|
82
|
-
graph <<
|
73
|
+
graph << provenance << nobel_peace_2012
|
83
74
|
|
84
75
|
puts "facts in short representation:"
|
85
76
|
puts graph.map(&:short)
|
77
|
+
|
86
78
|
# facts in short representation:
|
87
|
-
# [ prov ] :
|
88
|
-
# [ prov ] :
|
89
|
-
# [ prov ] :
|
90
|
-
# [ prov ] :
|
91
|
-
# [ prov ] :
|
92
|
-
#
|
93
|
-
#
|
94
|
-
#
|
95
|
-
#
|
79
|
+
# [ prov ] : 5eb1ea27 : prov:context : public
|
80
|
+
# [ prov ] : 5eb1ea27 : prov:source : http://github.com/petervandenabeele/dbd
|
81
|
+
# [ prov ] : 5eb1ea27 : dcterms:creator : @peter_v
|
82
|
+
# [ prov ] : 5eb1ea27 : dcterms:created : 2013-06-19 22:02:20 UTC
|
83
|
+
# [ prov ] : 5eb1ea27 : prov:license : MIT
|
84
|
+
# 5eb1ea27 : 3767c493 : todo:nobelPeacePriceWinn : 2012
|
85
|
+
# 5eb1ea27 : 3767c493 : rdfs:label : EU
|
86
|
+
# 5eb1ea27 : 3767c493 : rdfs:comment : European Union
|
87
|
+
# 5eb1ea27 : 3767c493 : todo:story : A long period of peace,_ that is a "bliss".
|
88
|
+
|
89
|
+
csv = graph.to_CSV
|
96
90
|
|
97
91
|
puts "facts in full detail in CSV:"
|
98
|
-
puts
|
92
|
+
puts csv
|
93
|
+
|
99
94
|
# facts in full detail in CSV:
|
100
|
-
# "
|
101
|
-
# "
|
102
|
-
# "
|
103
|
-
# "
|
104
|
-
# "
|
105
|
-
# "
|
106
|
-
# "
|
107
|
-
# "
|
108
|
-
# "
|
109
|
-
#
|
95
|
+
# "4720034a-01ea-4b6b-b9aa-45cb8c7c5e64","2013-06-19 22:02:20.489834224 UTC","","5eb1ea27-6691-4a57-ab13-8a59021968e1","prov:context","public"
|
96
|
+
# "d05a0a6c-a003-4320-b52b-a6e49e854437","2013-06-19 22:02:20.489889896 UTC","","5eb1ea27-6691-4a57-ab13-8a59021968e1","prov:source","http://github.com/petervandenabeele/dbd"
|
97
|
+
# "fc47abbd-da2d-4562-bb6b-ed8b84005734","2013-06-19 22:02:20.489913758 UTC","","5eb1ea27-6691-4a57-ab13-8a59021968e1","dcterms:creator","@peter_v"
|
98
|
+
# "f240e975-5d39-41eb-bb5a-cc59ede4c1a6","2013-06-19 22:02:20.489932320 UTC","","5eb1ea27-6691-4a57-ab13-8a59021968e1","dcterms:created","2013-06-19 22:02:20 UTC"
|
99
|
+
# "d592b1e8-2910-4329-b502-7d960cebb399","2013-06-19 22:02:20.489950713 UTC","","5eb1ea27-6691-4a57-ab13-8a59021968e1","prov:license","MIT"
|
100
|
+
# "a2d55e46-03f2-470e-8347-c36b31e7facc","2013-06-19 22:02:20.489973271 UTC","5eb1ea27-6691-4a57-ab13-8a59021968e1","3767c493-79d3-4a97-a832-79e6361ddc4c","todo:nobelPeacePriceWinner","2012"
|
101
|
+
# "0766dd24-70e5-487d-a018-d58da75dcdad","2013-06-19 22:02:20.489996422 UTC","5eb1ea27-6691-4a57-ab13-8a59021968e1","3767c493-79d3-4a97-a832-79e6361ddc4c","rdfs:label","EU"
|
102
|
+
# "eda61baa-b331-462e-b7b5-5d6eb2e9a053","2013-06-19 22:02:20.490014676 UTC","5eb1ea27-6691-4a57-ab13-8a59021968e1","3767c493-79d3-4a97-a832-79e6361ddc4c","rdfs:comment","European Union"
|
103
|
+
# "a3da9295-b43a-4c3a-8e8c-97c3f04c1fa3","2013-06-19 22:02:20.490036790 UTC","5eb1ea27-6691-4a57-ab13-8a59021968e1","3767c493-79d3-4a97-a832-79e6361ddc4c","todo:story","A long period of peace,
|
104
|
+
# that is a ""bliss""."
|
105
|
+
|
106
|
+
imported_graph = Dbd::Graph.from_CSV(csv)
|
107
|
+
|
108
|
+
puts imported_graph.map(&:short)
|
109
|
+
|
110
|
+
# [ prov ] : 5eb1ea27 : prov:context : public
|
111
|
+
# [ prov ] : 5eb1ea27 : prov:source : http://github.com/petervandenabeele/dbd
|
112
|
+
# [ prov ] : 5eb1ea27 : dcterms:creator : @peter_v
|
113
|
+
# [ prov ] : 5eb1ea27 : dcterms:created : 2013-06-19 22:02:20 UTC
|
114
|
+
# [ prov ] : 5eb1ea27 : prov:license : MIT
|
115
|
+
# 5eb1ea27 : 3767c493 : todo:nobelPeacePriceWinn : 2012
|
116
|
+
# 5eb1ea27 : 3767c493 : rdfs:label : EU
|
117
|
+
# 5eb1ea27 : 3767c493 : rdfs:comment : European Union
|
118
|
+
# 5eb1ea27 : 3767c493 : todo:story : A long period of peace,_ that is a "bliss".
|
110
119
|
```
|
111
120
|
|
112
121
|
[RDF]: http://www.w3.org/RDF/
|
data/dbd.gemspec
CHANGED
@@ -26,5 +26,5 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_development_dependency 'yard'
|
27
27
|
spec.add_runtime_dependency 'neography'
|
28
28
|
spec.add_runtime_dependency 'rdf', '~> 1.0.6'
|
29
|
-
spec.add_runtime_dependency 'ruby_peter_v', '>= 0.0.
|
29
|
+
spec.add_runtime_dependency 'ruby_peter_v', '>= 0.0.8'
|
30
30
|
end
|
data/docs/test.rb
CHANGED
@@ -2,55 +2,64 @@ require 'dbd'
|
|
2
2
|
|
3
3
|
provenance = Dbd::ProvenanceResource.new
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
provenance << fact_context_public
|
11
|
-
provenance << fact_source_dbd
|
12
|
-
provenance << fact_creator_peter_v
|
13
|
-
provenance << fact_created_now
|
14
|
-
provenance << fact_license_MIT
|
5
|
+
provenance << Dbd::ProvenanceFact.new(predicate: "prov:context", object: "public")
|
6
|
+
provenance << Dbd::ProvenanceFact.new(predicate: "prov:source", object: "http://github.com/petervandenabeele/dbd")
|
7
|
+
provenance << Dbd::ProvenanceFact.new(predicate: "dcterms:creator", object: "@peter_v")
|
8
|
+
provenance << Dbd::ProvenanceFact.new(predicate: "dcterms:created", object: Time.now.utc)
|
9
|
+
provenance << Dbd::ProvenanceFact.new(predicate: "prov:license", object: "MIT")
|
15
10
|
|
16
11
|
nobel_peace_2012 = Dbd::Resource.new(provenance_subject: provenance.subject)
|
17
12
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
nobel_peace_2012 << fact_nobel_peace_2012
|
23
|
-
nobel_peace_2012 << fact_EU_label
|
24
|
-
nobel_peace_2012 << fact_EU_comment
|
25
|
-
nobel_peace_2012 << fact_EU_story
|
13
|
+
nobel_peace_2012 << Dbd::Fact.new(predicate: "todo:nobelPeacePriceWinner", object: "2012")
|
14
|
+
nobel_peace_2012 << Dbd::Fact.new(predicate: "rdfs:label", object: "EU") # this will use some RDF predicates in future
|
15
|
+
nobel_peace_2012 << Dbd::Fact.new(predicate: "rdfs:comment", object: "European Union")
|
16
|
+
nobel_peace_2012 << Dbd::Fact.new(predicate: "todo:story", object: "A long period of peace,\n that is a \"bliss\".")
|
26
17
|
|
27
18
|
graph = Dbd::Graph.new
|
28
19
|
|
29
|
-
graph <<
|
20
|
+
graph << provenance << nobel_peace_2012
|
30
21
|
|
31
22
|
puts "facts in short representation:"
|
32
23
|
puts graph.map(&:short)
|
24
|
+
|
33
25
|
# facts in short representation:
|
34
|
-
# [ prov ] :
|
35
|
-
# [ prov ] :
|
36
|
-
# [ prov ] :
|
37
|
-
# [ prov ] :
|
38
|
-
# [ prov ] :
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
26
|
+
# [ prov ] : 5eb1ea27 : prov:context : public
|
27
|
+
# [ prov ] : 5eb1ea27 : prov:source : http://github.com/petervandenabeele/dbd
|
28
|
+
# [ prov ] : 5eb1ea27 : dcterms:creator : @peter_v
|
29
|
+
# [ prov ] : 5eb1ea27 : dcterms:created : 2013-06-19 22:02:20 UTC
|
30
|
+
# [ prov ] : 5eb1ea27 : prov:license : MIT
|
31
|
+
# 5eb1ea27 : 3767c493 : todo:nobelPeacePriceWinn : 2012
|
32
|
+
# 5eb1ea27 : 3767c493 : rdfs:label : EU
|
33
|
+
# 5eb1ea27 : 3767c493 : rdfs:comment : European Union
|
34
|
+
# 5eb1ea27 : 3767c493 : todo:story : A long period of peace,_ that is a "bliss".
|
35
|
+
|
36
|
+
csv = graph.to_CSV
|
43
37
|
|
44
38
|
puts "facts in full detail in CSV:"
|
45
|
-
puts
|
39
|
+
puts csv
|
40
|
+
|
46
41
|
# facts in full detail in CSV:
|
47
|
-
# "
|
48
|
-
# "
|
49
|
-
# "
|
50
|
-
# "
|
51
|
-
# "
|
52
|
-
# "
|
53
|
-
# "
|
54
|
-
# "
|
55
|
-
# "
|
56
|
-
#
|
42
|
+
# "4720034a-01ea-4b6b-b9aa-45cb8c7c5e64","2013-06-19 22:02:20.489834224 UTC","","5eb1ea27-6691-4a57-ab13-8a59021968e1","prov:context","public"
|
43
|
+
# "d05a0a6c-a003-4320-b52b-a6e49e854437","2013-06-19 22:02:20.489889896 UTC","","5eb1ea27-6691-4a57-ab13-8a59021968e1","prov:source","http://github.com/petervandenabeele/dbd"
|
44
|
+
# "fc47abbd-da2d-4562-bb6b-ed8b84005734","2013-06-19 22:02:20.489913758 UTC","","5eb1ea27-6691-4a57-ab13-8a59021968e1","dcterms:creator","@peter_v"
|
45
|
+
# "f240e975-5d39-41eb-bb5a-cc59ede4c1a6","2013-06-19 22:02:20.489932320 UTC","","5eb1ea27-6691-4a57-ab13-8a59021968e1","dcterms:created","2013-06-19 22:02:20 UTC"
|
46
|
+
# "d592b1e8-2910-4329-b502-7d960cebb399","2013-06-19 22:02:20.489950713 UTC","","5eb1ea27-6691-4a57-ab13-8a59021968e1","prov:license","MIT"
|
47
|
+
# "a2d55e46-03f2-470e-8347-c36b31e7facc","2013-06-19 22:02:20.489973271 UTC","5eb1ea27-6691-4a57-ab13-8a59021968e1","3767c493-79d3-4a97-a832-79e6361ddc4c","todo:nobelPeacePriceWinner","2012"
|
48
|
+
# "0766dd24-70e5-487d-a018-d58da75dcdad","2013-06-19 22:02:20.489996422 UTC","5eb1ea27-6691-4a57-ab13-8a59021968e1","3767c493-79d3-4a97-a832-79e6361ddc4c","rdfs:label","EU"
|
49
|
+
# "eda61baa-b331-462e-b7b5-5d6eb2e9a053","2013-06-19 22:02:20.490014676 UTC","5eb1ea27-6691-4a57-ab13-8a59021968e1","3767c493-79d3-4a97-a832-79e6361ddc4c","rdfs:comment","European Union"
|
50
|
+
# "a3da9295-b43a-4c3a-8e8c-97c3f04c1fa3","2013-06-19 22:02:20.490036790 UTC","5eb1ea27-6691-4a57-ab13-8a59021968e1","3767c493-79d3-4a97-a832-79e6361ddc4c","todo:story","A long period of peace,
|
51
|
+
# that is a ""bliss""."
|
52
|
+
|
53
|
+
imported_graph = Dbd::Graph.from_CSV(csv)
|
54
|
+
|
55
|
+
puts imported_graph.map(&:short)
|
56
|
+
|
57
|
+
# [ prov ] : 5eb1ea27 : prov:context : public
|
58
|
+
# [ prov ] : 5eb1ea27 : prov:source : http://github.com/petervandenabeele/dbd
|
59
|
+
# [ prov ] : 5eb1ea27 : dcterms:creator : @peter_v
|
60
|
+
# [ prov ] : 5eb1ea27 : dcterms:created : 2013-06-19 22:02:20 UTC
|
61
|
+
# [ prov ] : 5eb1ea27 : prov:license : MIT
|
62
|
+
# 5eb1ea27 : 3767c493 : todo:nobelPeacePriceWinn : 2012
|
63
|
+
# 5eb1ea27 : 3767c493 : rdfs:label : EU
|
64
|
+
# 5eb1ea27 : 3767c493 : rdfs:comment : European Union
|
65
|
+
# 5eb1ea27 : 3767c493 : todo:story : A long period of peace,_ that is a "bliss".
|
data/lib/dbd/fact.rb
CHANGED
@@ -143,13 +143,14 @@ module Dbd
|
|
143
143
|
end
|
144
144
|
|
145
145
|
##
|
146
|
-
# Constructs a Fact from a values array
|
146
|
+
# Constructs a Fact or ProvenanceFact from a values array
|
147
147
|
# (e.g. pulled from a CSV row).
|
148
148
|
#
|
149
149
|
# @param [Array] values Required : the array with values, organized as in attributes
|
150
|
-
# @return [Fact] the constructed fact
|
150
|
+
# @return [Fact, ProvenanceFact] the constructed fact
|
151
151
|
def self.from_values(values)
|
152
|
-
|
152
|
+
hash = hash_from_values(values)
|
153
|
+
fact_from_hash(hash)
|
153
154
|
end
|
154
155
|
|
155
156
|
##
|
@@ -204,7 +205,7 @@ module Dbd
|
|
204
205
|
end
|
205
206
|
|
206
207
|
##
|
207
|
-
# Confirms this is not a ProvenanceFact
|
208
|
+
# Confirms this is not a ProvenanceFact.
|
208
209
|
#
|
209
210
|
# Needed for validations that depend on different behavior for
|
210
211
|
# a provenance_fact (mainly, no provenance_subject).
|
@@ -218,5 +219,19 @@ module Dbd
|
|
218
219
|
"#{provenance_subject.to_s[0...8]}"
|
219
220
|
end
|
220
221
|
|
222
|
+
def self.hash_from_values(values)
|
223
|
+
# Do not keep "empty" values (e.g. the provenance_subject for a ProvenanceFact).
|
224
|
+
attributes_values_array = [attributes, values].transpose.select{|a,v| v != ''}
|
225
|
+
Hash[attributes_values_array]
|
226
|
+
end
|
227
|
+
|
228
|
+
def self.fact_from_hash(hash)
|
229
|
+
if hash[:provenance_subject]
|
230
|
+
new(hash)
|
231
|
+
else
|
232
|
+
ProvenanceFact.new(hash)
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
221
236
|
end
|
222
237
|
end
|
data/lib/dbd/graph.rb
CHANGED
@@ -45,7 +45,7 @@ module Dbd
|
|
45
45
|
# @param [String] csv a string that contains the CSV serialization
|
46
46
|
# @return [Graph] the imported graph
|
47
47
|
def self.from_CSV(csv)
|
48
|
-
|
48
|
+
new.tap do |graph|
|
49
49
|
CSV.new(csv).each do |row|
|
50
50
|
# TODO validate the input formats (e.g. invalid uuid codes)
|
51
51
|
graph << Fact.from_values(row)
|
data/lib/dbd/time_stamp.rb
CHANGED
@@ -81,8 +81,19 @@ module Dbd
|
|
81
81
|
##
|
82
82
|
# with a nanosecond granularity and in UTC
|
83
83
|
def self.from_s(time_string)
|
84
|
-
|
85
|
-
|
84
|
+
# For ns precision in JRuby this extended process is required
|
85
|
+
time_hash = DateTime._strptime(time_string, time_format)
|
86
|
+
raise(
|
87
|
+
ArgumentError,
|
88
|
+
"Time zone must be UTC, was #{time_hash[:zone]}") unless time_hash[:zone] == "UTC"
|
89
|
+
time = Time.utc(time_hash[:year],
|
90
|
+
time_hash[:mon],
|
91
|
+
time_hash[:mday],
|
92
|
+
time_hash[:hour],
|
93
|
+
time_hash[:min],
|
94
|
+
time_hash[:sec],
|
95
|
+
time_hash[:sec_fraction] * 1_000_000)
|
96
|
+
TimeStamp.new(time: time)
|
86
97
|
end
|
87
98
|
|
88
99
|
def >(other)
|
data/lib/dbd/version.rb
CHANGED
@@ -3,26 +3,46 @@ require 'spec_helper'
|
|
3
3
|
module Dbd
|
4
4
|
describe Graph do
|
5
5
|
|
6
|
-
def
|
7
|
-
|
6
|
+
def round_tripped_graph(graph)
|
7
|
+
Graph.from_CSV(StringIO.new(graph.to_CSV))
|
8
8
|
end
|
9
9
|
|
10
10
|
def validate_round_trip(graph)
|
11
|
-
|
12
|
-
|
13
|
-
#
|
14
|
-
|
11
|
+
graph_from_CSV = round_tripped_graph(graph)
|
12
|
+
# temporarily use to_csv as the "identity function" for Graph
|
13
|
+
# TODO define a proper Equality for Graph and Fact
|
14
|
+
graph_from_CSV.to_CSV.should == graph.to_CSV
|
15
15
|
end
|
16
16
|
|
17
17
|
describe "#from_CSV reads back a csv exported graph correctly" do
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
|
19
|
+
describe "for a graph with only provenance_facts" do
|
20
|
+
|
21
|
+
let(:graph) { Factories::Graph.only_provenance }
|
22
|
+
|
23
|
+
it "round_trip validates" do
|
24
|
+
validate_round_trip(graph)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "for a provenance_fact, the provenance_subject must be equal (nil)" do
|
28
|
+
graph_from_CSV = round_tripped_graph(graph)
|
29
|
+
provenance_fact = graph_from_CSV.first
|
30
|
+
provenance_fact.provenance_subject.should be_nil
|
31
|
+
end
|
21
32
|
end
|
22
33
|
|
23
|
-
|
24
|
-
|
25
|
-
|
34
|
+
describe "for a graph with facts and provenance_facts" do
|
35
|
+
|
36
|
+
let(:graph) { Factories::Graph.full }
|
37
|
+
|
38
|
+
it "round_trip validates" do
|
39
|
+
validate_round_trip(graph)
|
40
|
+
end
|
41
|
+
|
42
|
+
it "the short export of a graph is correct after a round trip" do
|
43
|
+
imported_graph = Dbd::Graph.from_CSV(graph.to_CSV)
|
44
|
+
imported_graph.map(&:short).should == (graph.map(&:short))
|
45
|
+
end
|
26
46
|
end
|
27
47
|
end
|
28
48
|
end
|
@@ -32,6 +32,11 @@ module Dbd
|
|
32
32
|
time_stamp = described_class.from_s(a_time_stamp)
|
33
33
|
time_stamp.to_s.should == a_time_stamp
|
34
34
|
end
|
35
|
+
|
36
|
+
it "raises ArgumentError is time_zone is not UTC" do
|
37
|
+
time_CET = a_time_stamp.sub(/UTC/, 'CET')
|
38
|
+
lambda{ described_class.from_s(time_CET) }.should raise_error ArgumentError
|
39
|
+
end
|
35
40
|
end
|
36
41
|
end
|
37
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dbd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Vandenabeele
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - '>='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.0.
|
131
|
+
version: 0.0.8
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - '>='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.0.
|
138
|
+
version: 0.0.8
|
139
139
|
description: A data store that (almost) never forgets
|
140
140
|
email:
|
141
141
|
- peter@vandenabeele.com
|