moab-versioning 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjAyMmUwOGNiOGYzN2U4ZGQyMDNkNGE2ZDM5Y2IxMTc0OTdiZDY0Yg==
4
+ NDdjMzY2NmM3MjIyYTIwOGI4YWFkMjQ3MGFhZmJjNDYyOGI5OThiYw==
5
5
  data.tar.gz: !binary |-
6
- NDlmOGZjNmY1ZDZjMjk0ODIyNTYwYjk5Njk5ZTYwMjE2NGY1MGM0ZA==
7
- !binary "U0hBNTEy":
6
+ MGY3ODdmMDJkYzBlZjdiOGYyYmZhZjg5YjdmMGI3YjY1YTE2M2IwMg==
7
+ SHA512:
8
8
  metadata.gz: !binary |-
9
- NTU0MjllMzVmNzk4NGIyNzczN2I5MzU5ODkwNGViZTlmMjAyM2MxZTQwMTI5
10
- OTUxZTg4NTk2MTdiYzM1NjYwOGU3OGE4NmUyODExNjU1YmY3OThkMzU1MGJh
11
- YTIzOWZmOGM0N2ZiZTNjODEwMDY4MjZiZjFhN2MzZTBiNTA4ZGI=
9
+ MjhhNWIxNmVkMGQ0NjM0MzZmMzk0MDE1Y2UwZDJhN2RlMmMzMDIwNzA0YTg2
10
+ Y2NlNjE0YTc0ZDEyNjc2YTA1ZDA1ZDY5MWM0YmNhNDYwMjVmNWEyODI1YmRj
11
+ MzVjMTVlMmY2MWI5MWUzMzNlNGZlZTc3MDViNDEyODExYmIzYmQ=
12
12
  data.tar.gz: !binary |-
13
- ZDE2NDAwOWU0YzJkOTRiNWY4ZGJmZDY4OGE3MjNhZmFjMmUzMTkyY2JkYTkx
14
- NTk3ZmRiOGFmMGJkNmY3NmY2YWFkODBiMWQyOWYwM2JiNDQyMmQ5YTdmYWFl
15
- MTU1MGZjZTBkNmNkM2I3ZjdhN2Y0MDlkMzA2ZGM3ZTdjNWY5ZTQ=
13
+ ZTQ5ZjYwNzNhMDc5N2E4ODU4OWQ4OTkwZDk1MmFkZWIxYzA5ODBiYjdiYmVh
14
+ YTc4YTBhMjcxZjQxYTIyYjUxYmYzMTVhMTQwOWU2ZTdlMDM2MDA0M2U1MmRl
15
+ MTk2N2NmN2E5YWU4ZTg0ZWI1MTM1MjlmNTFkOWMzNjNmNDgwYjA=
@@ -31,14 +31,14 @@ module Moab
31
31
 
32
32
  # @attribute
33
33
  # @return [Time] gsub(/\n/,' ')
34
- attribute :datetime, Time, :on_save => Proc.new {|t| t.to_s}
34
+ attribute :datetime, Time, :on_save => Proc.new {|t| UtcTime.output(t)}
35
35
 
36
36
  def datetime=(event_datetime)
37
- @datetime=Time.input(event_datetime)
37
+ @datetime=UtcTime.input(event_datetime)
38
38
  end
39
39
 
40
40
  def datetime
41
- Time.output(@datetime)
41
+ UtcTime.output(@datetime)
42
42
  end
43
43
 
44
44
 
@@ -61,14 +61,14 @@ module Moab
61
61
 
62
62
  # @attribute
63
63
  # @return [Time] The datetime at which the inventory was created
64
- attribute :inventory_datetime, Time, :tag => 'inventoryDatetime', :on_save => Proc.new {|t| t.to_s}
64
+ attribute :inventory_datetime, Time, :tag => 'inventoryDatetime', :on_save => Proc.new {|t| UtcTime.output(t)}
65
65
 
66
66
  def inventory_datetime=(datetime)
67
- @inventory_datetime=Time.input(datetime)
67
+ @inventory_datetime=UtcTime.input(datetime)
68
68
  end
69
69
 
70
70
  def inventory_datetime
71
- Time.output(@inventory_datetime)
71
+ UtcTime.output(@inventory_datetime)
72
72
  end
73
73
 
74
74
  # @attribute
@@ -52,14 +52,14 @@ module Moab
52
52
 
53
53
  # @attribute
54
54
  # @return [Time] The datetime at which the report was run
55
- attribute :report_datetime, Time, :tag => 'reportDatetime', :on_save => Proc.new {|t| t.to_s}
55
+ attribute :report_datetime, Time, :tag => 'reportDatetime', :on_save => Proc.new {|t| UtcTime.output(t)}
56
56
 
57
57
  def report_datetime=(datetime)
58
- @report_datetime=Time.input(datetime)
58
+ @report_datetime=UtcTime.input(datetime)
59
59
  end
60
60
 
61
61
  def report_datetime
62
- Time.output(@report_datetime)
62
+ UtcTime.output(@report_datetime)
63
63
  end
64
64
 
65
65
  # @attribute
@@ -53,14 +53,14 @@ module Moab
53
53
 
54
54
  # @attribute
55
55
  # @return [Time] The datetime at which the catalog was updated
56
- attribute :catalog_datetime, Time, :tag => 'catalogDatetime', :on_save => Proc.new {|t| t.to_s}
56
+ attribute :catalog_datetime, Time, :tag => 'catalogDatetime', :on_save => Proc.new {|t| UtcTime.output(t)}
57
57
 
58
58
  def catalog_datetime=(datetime)
59
- @catalog_datetime=Time.input(datetime)
59
+ @catalog_datetime=UtcTime.input(datetime)
60
60
  end
61
61
 
62
62
  def catalog_datetime
63
- Time.output(@catalog_datetime)
63
+ UtcTime.output(@catalog_datetime)
64
64
  end
65
65
 
66
66
  # @attribute
@@ -32,14 +32,14 @@ module Moab
32
32
 
33
33
  # @attribute
34
34
  # @return [Time] The date and time of an event
35
- attribute :datetime, Time, :on_save => Proc.new {|t| t.to_s}
35
+ attribute :datetime, Time, :on_save => Proc.new {|t| UtcTime.output(t)}
36
36
 
37
37
  def datetime=(event_datetime)
38
- @datetime=Time.input(event_datetime)
38
+ @datetime=UtcTime.input(event_datetime)
39
39
  end
40
40
 
41
41
  def datetime
42
- Time.output(@datetime)
42
+ UtcTime.output(@datetime)
43
43
  end
44
44
 
45
45
  end
@@ -10,15 +10,11 @@ class Fixnum
10
10
  end
11
11
  end
12
12
 
13
- # Make the default output from a Time variable be formatted in ISO 8601 format
14
- class Time
15
- # @return [String] The datetime in ISO 8601 format
16
- def to_s
17
- self.utc.iso8601
18
- end
13
+ # Timestamp conversion methods.
14
+ class UtcTime
19
15
 
20
16
  # @param datetime [Time,String,Nil] The input datetime
21
- # @return [void] Store the input datetime as a Time object
17
+ # @return [void] Convert input datetime to a Time object, or nil if input is empty.
22
18
  def self.input(datetime)
23
19
  case datetime
24
20
  when nil
@@ -35,7 +31,7 @@ class Time
35
31
  end
36
32
 
37
33
  # @param datetime [Time,String,Nil] The datetime value to output
38
- # @return [String] Format the datetime into a ISO 8601 formatted string
34
+ # @return [String] Convert the datetime into a ISO 8601 formatted string
39
35
  def self.output(datetime)
40
36
  case datetime
41
37
  when nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moab-versioning
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Anderson
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-11-08 00:00:00.000000000 Z
13
+ date: 2013-12-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: confstruct
@@ -243,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
243
  version: 1.3.6
244
244
  requirements: []
245
245
  rubyforge_project:
246
- rubygems_version: 2.0.7
246
+ rubygems_version: 2.1.10
247
247
  signing_key:
248
248
  specification_version: 4
249
249
  summary: Ruby implmentation of digital object versioning toolkit used by the SULAIR