lib/aws-eventstream/header_value.rb in aws-eventstream-1.0.2 vs lib/aws-eventstream/header_value.rb in aws-eventstream-1.0.3

- old
+ new

@@ -18,22 +18,22 @@ private def format_value(value) case @type - when "timestamp" then format_timestamp(value) - when "uuid" then format_uuid(value) + when 'timestamp' then format_timestamp(value) + when 'uuid' then format_uuid(value) else value end end def format_uuid(value) bytes = value.bytes # For user-friendly uuid representation, # format binary bytes into uuid string format uuid_pattern = [ [ 3, 2, 1, 0 ], [ 5, 4 ], [ 7, 6 ], [ 8, 9 ], 10..15 ] - uuid_pattern.map {|p| p.map {|n| "%02x" % bytes.to_a[n] }.join }.join("-") + uuid_pattern.map {|p| p.map {|n| "%02x" % bytes.to_a[n] }.join }.join('-') end def format_timestamp(value) # millis_since_epoch to sec_since_epoch Time.at(value / 1000.0)