mordor 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/mordor/resource.rb +5 -1
  2. data/mordor.gemspec +1 -1
  3. metadata +3 -3
@@ -71,7 +71,11 @@ module Mordor
71
71
  timestamp_value = BSON::Timestamp.new(timestamp_value["seconds"], timestamp_value["increment"])
72
72
  end
73
73
  ordered_self_hash = BSON::OrderedHash.new
74
- ordered_self_hash[timestamp_attribute] = (timestamp_value.nil? || timestamp_value.empty?) ? BSON::Timestamp.new(0, 0) : timestamp_value
74
+ if timestamp_value.nil? || (timestamp_value.is_a?(String) && timestamp_value.empty?)
75
+ ordered_self_hash[timestamp_attribute] = BSON::Timestamp.new(0, 0)
76
+ else
77
+ ordered_self_hash[timestamp_attribute] = timestamp_value
78
+ end
75
79
  self_hash.each do |key, value|
76
80
  ordered_self_hash[key] = value
77
81
  end
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
2
2
  s.name = "mordor"
3
3
 
4
4
  # Do not set the version and date field manually, this is done by the release script
5
- s.version = "0.2.8"
5
+ s.version = "0.2.9"
6
6
  s.date = "2012-01-04"
7
7
 
8
8
  s.summary = "mordor"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mordor
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 8
10
- version: 0.2.8
9
+ - 9
10
+ version: 0.2.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jan-Willem Koelewijn