vanilla 1.9.14 → 1.9.14.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -25,7 +25,7 @@ if Object.const_defined?(:Gem)
25
25
 
26
26
  # Change these as appropriate
27
27
  s.name = "vanilla"
28
- s.version = "1.9.14"
28
+ s.version = "1.9.14.1"
29
29
  s.summary = "A bliki-type web content thing."
30
30
  s.author = "James Adam"
31
31
  s.email = "james@lazyatom.com.com"
@@ -9,6 +9,7 @@ module Vanilla
9
9
 
10
10
  def <<(attributes)
11
11
  attributes[:created_at] ||= Time.now
12
+ attributes[:created_at] = Time.parse(attributes[:created_at]) if attributes[:created_at].is_a?(String)
12
13
  attributes[:updated_at] = Time.now
13
14
  super
14
15
  end
@@ -1,5 +1,5 @@
1
1
  CurrentSnip--- # Soup attributes
2
- :updated_at: 2009-11-23 22:14:50.820298 +00:00
2
+ :updated_at: 2009-11-23 22:39:21.358609 +00:00
3
3
  :name: current_snip
4
4
  :render_as: Ruby
5
5
  :usage: |-
@@ -12,4 +12,4 @@ CurrentSnip--- # Soup attributes
12
12
  &#123;current_snip name&#125;
13
13
 
14
14
  will output the name of the current snip, or the name of the snip currently being edited.
15
- :created_at: 2009-11-23 22:14:50.820288 +00:00
15
+ :created_at: 2009-11-23 22:39:21.358607 +00:00
@@ -1,5 +1,5 @@
1
1
  --- # Soup attributes
2
- :updated_at: 2009-11-23 22:14:50.821038 +00:00
2
+ :updated_at: 2009-11-23 22:39:21.359623 +00:00
3
3
  :name: system
4
4
  :main_template: "{current_snip}"
5
- :created_at: 2009-11-23 22:14:50.821036 +00:00
5
+ :created_at: 2009-11-23 22:39:21.359619 +00:00
@@ -0,0 +1,8 @@
1
+ require File.join(File.dirname(__FILE__), *%w[test_helper])
2
+
3
+ class VanillaSoupTest < Vanilla::TestCase
4
+ should "convert timestamps to times" do
5
+ snip = create_snip(:name => "temp", :created_at => Time.now.to_s)
6
+ assert_kind_of Time, @app.soup["temp"].created_at
7
+ end
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanilla
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.14
4
+ version: 1.9.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Adam
@@ -129,6 +129,7 @@ files:
129
129
  - test/vanilla_app_test.rb
130
130
  - test/vanilla_presenting_test.rb
131
131
  - test/vanilla_request_test.rb
132
+ - test/vanilla_soup_test.rb
132
133
  - lib/defensio.rb
133
134
  - lib/tasks/vanilla.rake
134
135
  - lib/vanilla/app.rb