contentful-scheduler-custom-build-john 1.16 → 1.17
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/lib/contentful/scheduler/queue.rb +10 -2
- data/lib/contentful/scheduler/version.rb +1 -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: 9b5179de79dd632fbd4793e5acf19842a236de54
|
4
|
+
data.tar.gz: 6cac5dca1f5cd4b73388fe3d0faa2cadd0faa3bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96106c3ff9cde761df25b62b576540f9041467df833ef9f9e4ea9ae0564a405ae2e10c97d7ccc39c7dccac595493204b76a375be8a8f61699de1f0e99463a05e
|
7
|
+
data.tar.gz: 29c2817c13acb813695b7eb984695c4fbdf048e4a300c1ded1855a90fdc032a27d02bff9e5240ce4bbd4f69365521d958f1ff497424b889c3275bb541ad75611
|
@@ -65,8 +65,8 @@ module Contentful
|
|
65
65
|
|
66
66
|
def already_published?(webhook)
|
67
67
|
return true if publish_date(webhook) < Time.now.utc
|
68
|
-
puts !webhook
|
69
|
-
if !webhook
|
68
|
+
puts !webhook_is_publish_in_future(webhook)
|
69
|
+
if !webhook_is_publish_in_future(webhook)
|
70
70
|
puts "Inside this 1st"
|
71
71
|
return false unless webhook.sys.key?('publishedAt')
|
72
72
|
if !webhook.sys['publishedAt'].nil?
|
@@ -106,6 +106,14 @@ module Contentful
|
|
106
106
|
webhook.fields[spaces[webhook.space_id][:publish_field]]
|
107
107
|
end
|
108
108
|
|
109
|
+
def webhook_is_publish_in_future(webhook)
|
110
|
+
if webhook.fields.key?(spaces.fetch(webhook.space_id, {})[:is_publish_in_future])
|
111
|
+
return webhook.fields[spaces[webhook.space_id][:is_publish_in_future]]
|
112
|
+
else
|
113
|
+
return true
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
109
117
|
private
|
110
118
|
|
111
119
|
def initialize(logger)
|