contentful-scheduler-custom 1.5.6996 → 1.5.6997

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: 7b1097b7796134e7b3ba4b0bc8fa15f547e27e00
4
- data.tar.gz: d5bda2526a2557b29c05d5c5b199603dc065b01e
3
+ metadata.gz: e48034e1f6d559682ad2008a519184251397ad27
4
+ data.tar.gz: 551e3d60ce080c101d5b0ce6adeb4e159ec14384
5
5
  SHA512:
6
- metadata.gz: a7513a0a2c9062ebf914ac453cfc3ebaeb1f225fca51ce0825e6fa7dcf078561e5c2b2a1e1f1d2291e5ffe8a8f47ba4b1693bd0ce5fae96c0976d4333ef48e70
7
- data.tar.gz: 94e5430efb022ad4b843814b290267ba7d7581daeecb46a45594d521134da3b77f07939cb6f69bb92e0057a04301f501fc2e4662fe8cfd705074df083a0b9378
6
+ metadata.gz: 58ec672d05c651541560b81060d969eed70f8399098a83a82f7b0113a034af7eafd32efa82ebd1849e2a6f082b2c510bc667781e0a2a20429d0f3ebefd10ca1b
7
+ data.tar.gz: 8b3623a594289e6c1361191870af8d01a1369f8371615b3fa30a24984e4e383accf5b61c44340a5eaa7992747864e2257947bd55d0dfb291e33beeaacfb0db1d
@@ -78,7 +78,7 @@ module Contentful
78
78
  return unless unpublishable?(webhook)
79
79
  return unless in_unpublish_queue?(webhook)
80
80
 
81
- removeContentBlocksUnpublish(webhook)
81
+ removeContentBlocks(webhook, 'unpublish')
82
82
 
83
83
  success = Resque.remove_delayed(
84
84
  ::Contentful::Scheduler::Tasks::Unpublish,
@@ -154,7 +154,7 @@ module Contentful
154
154
  if isContentBlockAvailable(webhook)
155
155
  webhook.fields['contentBlocks']['fi-FI'].each do |sys|
156
156
  success = Resque.enqueue_at(
157
- publish_date(webhook),
157
+ getPublishOrUnpublishDate(webhook, type),
158
158
  getScheduleType(type),
159
159
  webhook.space_id,
160
160
  sys['sys']['id'],
@@ -220,6 +220,14 @@ module Contentful
220
220
  end
221
221
  end
222
222
 
223
+ def getPublishOrUnpublishDate(webhook, type)
224
+ if type == 'publish'
225
+ publish_date(webhook)
226
+ else
227
+ unpublish_date(webhook)
228
+ end
229
+ end
230
+
223
231
  def spaces
224
232
  config[:spaces]
225
233
  end
@@ -1,5 +1,5 @@
1
1
  module Contentful
2
2
  module Scheduler
3
- VERSION = "1.5.6996"
3
+ VERSION = "1.5.6997"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentful-scheduler-custom
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.6996
4
+ version: 1.5.6997
5
5
  platform: ruby
6
6
  authors:
7
7
  - Contentful GmbH (David Litvak Bruno0