tinycms 0.1.10 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tinycms/author.rb +5 -2
- data/lib/tinycms/authors/mapper.rb +2 -1
- data/lib/tinycms/post.rb +5 -2
- data/lib/tinycms/posts/mapper.rb +1 -0
- data/lib/tinycms/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7205debe9bab58e45f89f2f847251b99ebcb0b1398825c7aaeeb9783e9e15c29
|
4
|
+
data.tar.gz: 70e81b9f3077dc7773229fc9c677092456e2111b704d4ee85d30dc78f4d07755
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6379a0794dc9b41a2e798bc4707e55e1504ab2055abcd5a146778e99f08bf68b80d440237efbaf38d5e6cea408913345eb3c6134a82bb57f5654201e6436b30
|
7
|
+
data.tar.gz: a38b187d6d1b66544297b6eb37755f59dbcbcb09d0f9b09883520d33f17f5c6a1cd8f60ad1eacdadb9e3366c268ad58adaae09b41447af9f176a1083c93981c7
|
data/lib/tinycms/author.rb
CHANGED
@@ -2,18 +2,21 @@
|
|
2
2
|
|
3
3
|
module Tinycms
|
4
4
|
class Author
|
5
|
-
def initialize(id:, email:, first_name:, last_name:, full_name:, title:,
|
5
|
+
def initialize(id:, email:, first_name:, last_name:, full_name:, title:,
|
6
|
+
slug:, avatar_url:, created_at:, updated_at:)
|
6
7
|
@id = id
|
7
8
|
@email = email
|
8
9
|
@first_name = first_name
|
9
10
|
@last_name = last_name
|
10
11
|
@full_name = full_name
|
11
12
|
@title = title
|
13
|
+
@slug = slug
|
12
14
|
@avatar_url = avatar_url
|
13
15
|
@created_at = created_at
|
14
16
|
@updated_at = updated_at
|
15
17
|
end
|
16
18
|
|
17
|
-
attr_reader :id, :email, :first_name, :last_name, :full_name, :title, :
|
19
|
+
attr_reader :id, :email, :first_name, :last_name, :full_name, :title, :slug,
|
20
|
+
:avatar_url, :created_at, :updated_at
|
18
21
|
end
|
19
22
|
end
|
@@ -10,7 +10,8 @@ module Tinycms
|
|
10
10
|
first_name: response_body["first_name"],
|
11
11
|
last_name: response_body["last_name"],
|
12
12
|
full_name: response_body["full_name"],
|
13
|
-
title:
|
13
|
+
title: response_body["title"],
|
14
|
+
slug: response_body["slug"],
|
14
15
|
avatar_url: response_body["avatar_url"],
|
15
16
|
created_at: Time.zone.parse(response_body["created_at"]),
|
16
17
|
updated_at: Time.zone.parse(response_body["updated_at"])
|
data/lib/tinycms/post.rb
CHANGED
@@ -2,16 +2,19 @@
|
|
2
2
|
|
3
3
|
module Tinycms
|
4
4
|
class Post
|
5
|
-
def initialize(id:, title:, author:, content:, content_plain_text:,
|
5
|
+
def initialize(id:, title:, author:, content:, content_plain_text:, slug:,
|
6
|
+
created_at:, updated_at:)
|
6
7
|
@id = id
|
7
8
|
@title = title
|
8
9
|
@author = author
|
9
10
|
@content = content
|
10
11
|
@content_plain_text = content_plain_text
|
12
|
+
@slug = slug
|
11
13
|
@created_at = created_at
|
12
14
|
@updated_at = updated_at
|
13
15
|
end
|
14
16
|
|
15
|
-
attr_reader :id, :title, :author, :content, :content_plain_text, :
|
17
|
+
attr_reader :id, :title, :author, :content, :content_plain_text, :slug,
|
18
|
+
:created_at, :updated_at
|
16
19
|
end
|
17
20
|
end
|
data/lib/tinycms/posts/mapper.rb
CHANGED
@@ -10,6 +10,7 @@ module Tinycms
|
|
10
10
|
author: ::Tinycms::Authors::Mapper.map(response_body["author"]),
|
11
11
|
content: response_body["content"],
|
12
12
|
content_plain_text: response_body["content_plain_text"],
|
13
|
+
slug: response_body["slug"],
|
13
14
|
created_at: Time.zone.parse(response_body["created_at"]),
|
14
15
|
updated_at: Time.zone.parse(response_body["updated_at"])
|
15
16
|
)
|
data/lib/tinycms/version.rb
CHANGED