blog-generator 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/blog-generator/post.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd69adf8a5bac92678f54a4deb3f5ce782072e6d
|
4
|
+
data.tar.gz: 0b41a6c428acb27b37d78269d505410f3ba9ba5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 258e376eeda8f4fd2fc624992553ef6c19f3174b9a14820fa2204917df66cd0fe7963a845efa9a7eb08f58dbc13694c9e52334cdbd31ee1080f872e42e7d7c45
|
7
|
+
data.tar.gz: e8dcb5729b3036cef81c9a98520574155d2ce9b3d3fafeca9ae799a27bc4dc81e378eaa7d4b71985f9f17f963195eea76ddfda7f5882d859f4abf80e7a68bb87
|
data/lib/blog-generator/post.rb
CHANGED
@@ -85,7 +85,10 @@ module BlogGenerator
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def as_json
|
88
|
-
@metadata.merge(body: body)
|
88
|
+
@metadata.merge(body: body).tap do |metadata|
|
89
|
+
metadata[:published_at] && metadata[:published_at] = DateTime.parse(metadata[:published_at])
|
90
|
+
metadata[:updated_at] && metadata[:updated_at] = DateTime.parse(metadata[:updated_at])
|
91
|
+
end
|
89
92
|
end
|
90
93
|
|
91
94
|
def to_json(*args)
|