effective_posts 2.0.2 → 2.0.3
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.
- checksums.yaml +4 -4
- data/app/helpers/effective_posts_helper.rb +3 -3
- data/lib/effective_posts/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 007be2e2a5fb606693f2e10afe0c735cbdd441c0f5d186361e7f64f144a8b503
|
|
4
|
+
data.tar.gz: 78f5fc983964c4ada845f37d4d248bb5bae08843ddc13772cb75351c12753297
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2039fb90e755306075db5f39fa225bbb2960acc1a0d50881cec51b49a5a27709ccd948188f90e78ce38696eda48417327a01690e577f357eb31294f48b89d9f1
|
|
7
|
+
data.tar.gz: f4ed4132951108343e9961abe2f40057f21b8edeb5aa513661b636ca8c0bc6798aaf052db80156738393f7f138df05f98747b7135d9bbaf461e64f2a47d2b2f8
|
|
@@ -3,14 +3,14 @@ require 'cgi'
|
|
|
3
3
|
module EffectivePostsHelper
|
|
4
4
|
|
|
5
5
|
def effective_posts_header_tags
|
|
6
|
-
return unless @post && @post.kind_of?(Effective::Post) && @post.persisted?
|
|
6
|
+
return unless @post && @post.kind_of?(Effective::Post) && @post.persisted? && @post.published?
|
|
7
7
|
|
|
8
8
|
@effective_pages_og_type = 'article'
|
|
9
9
|
|
|
10
10
|
tags = [
|
|
11
11
|
tag(:meta, itemprop: 'author', content: @post.user.to_s),
|
|
12
12
|
tag(:meta, itemprop: 'publisher', content: @post.user.to_s),
|
|
13
|
-
tag(:meta, itemprop: '
|
|
13
|
+
tag(:meta, itemprop: 'datePublished', content: (@post.published_at || Time.zone.now).strftime('%FT%T%:z')),
|
|
14
14
|
tag(:meta, itemprop: 'headline', content: @post.title)
|
|
15
15
|
].join("\n").html_safe
|
|
16
16
|
end
|
|
@@ -74,7 +74,7 @@ module EffectivePostsHelper
|
|
|
74
74
|
if post.draft?
|
|
75
75
|
content_tag(:span, 'DRAFT', class: 'badge badge-info')
|
|
76
76
|
elsif post.published? == false
|
|
77
|
-
content_tag(:span, "TO BE PUBLISHED AT #{post.published_at
|
|
77
|
+
content_tag(:span, "TO BE PUBLISHED AT #{post.published_at&.strftime('%F %H:%M') || 'LATER'}", class: 'badge badge-info')
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: effective_posts
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Code and Effect
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-03-
|
|
11
|
+
date: 2021-03-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|