contentful-scheduler-custom-build-john 1.16 → 1.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 968f8e5c217691f8fe27ba44dc428517e5c6ac89
4
- data.tar.gz: dc88930911a1395da8e265aab26e2f7be8824087
3
+ metadata.gz: 9b5179de79dd632fbd4793e5acf19842a236de54
4
+ data.tar.gz: 6cac5dca1f5cd4b73388fe3d0faa2cadd0faa3bc
5
5
  SHA512:
6
- metadata.gz: 2393c5e2881b8f00e5967a47a23ac25472390fbc15f867081a7974bc9b33a27d0d3adc8794f26889a17046a47462c4eaf0b1f3eaeeeed0311c9ea2272ca46b6a
7
- data.tar.gz: a9da515f18f52379ca90007b12c96089063d072d86fbde44d893929c33711d109579a3f9b37083e8a059c0c203198eba5cc477ac761d2d079d863ddf7492e16f
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.fields[spaces[webhook.space_id][:is_publish_in_future]]
69
- if !webhook.fields[spaces[webhook.space_id][:is_publish_in_future]]
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)
@@ -1,5 +1,5 @@
1
1
  module Contentful
2
2
  module Scheduler
3
- VERSION = "1.16"
3
+ VERSION = "1.17"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentful-scheduler-custom-build-john
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.16'
4
+ version: '1.17'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Contentful GmbH (David Litvak Bruno0