scrolls 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ module Scrolls
13
13
  elsif v.nil?
14
14
  "#{k}=nil"
15
15
  elsif v.is_a?(Time)
16
- "#{k}=#{Time.at(v).strftime("%FT%H:%M:%S%z")}"
16
+ "#{k}=#{v.strftime("%FT%H:%M:%S%z")}"
17
17
  else
18
18
  v = v.to_s
19
19
  has_single_quote = v.index("'")
@@ -1,3 +1,3 @@
1
1
  module Scrolls
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
data/test/test_parser.rb CHANGED
@@ -52,12 +52,18 @@ class TestScrollsParser < Test::Unit::TestCase
52
52
  assert_equal "s1=symbol s2=Scrolls", unparse(data)
53
53
  end
54
54
 
55
- def test_parse_time
55
+ def test_parse_epoch_time
56
56
  v = 1340118155
57
57
  data = { t: Time.at(v) }
58
58
  assert_equal "t=#{Time.at(v).strftime("%FT%H:%M:%S%z")}", unparse(data)
59
59
  end
60
60
 
61
+ def test_parse_time_object
62
+ now = Time.now
63
+ data = { t: now }
64
+ assert_equal "t=#{now.strftime("%FT%H:%M:%S%z")}", unparse(data)
65
+ end
66
+
61
67
  def test_parse_nil
62
68
  data = { n: nil }
63
69
  assert_equal "n=nil", unparse(data)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrolls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-20 00:00:00.000000000 Z
12
+ date: 2013-08-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Logging, easier, more consistent.
15
15
  email: