contentful-scheduler-custom 1.5.6997 → 1.5.6998

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e48034e1f6d559682ad2008a519184251397ad27
4
- data.tar.gz: 551e3d60ce080c101d5b0ce6adeb4e159ec14384
3
+ metadata.gz: 86c6a2d1c0f6c25b97ca779ca86b6fc9100fc396
4
+ data.tar.gz: 0ee139fb3cca9d88b024025bcd119cf32e2a7b12
5
5
  SHA512:
6
- metadata.gz: 58ec672d05c651541560b81060d969eed70f8399098a83a82f7b0113a034af7eafd32efa82ebd1849e2a6f082b2c510bc667781e0a2a20429d0f3ebefd10ca1b
7
- data.tar.gz: 8b3623a594289e6c1361191870af8d01a1369f8371615b3fa30a24984e4e383accf5b61c44340a5eaa7992747864e2257947bd55d0dfb291e33beeaacfb0db1d
6
+ metadata.gz: 5963277b18d55f8845329987f34328769206fa6212b0205162be60935962c6ed075a77f602c09f308718be9ea545fea224dcf9722307f4ac7d97606c956205ab
7
+ data.tar.gz: 9853317f5b5cce0f88735535d7fac5bb001ad9d833ad754ce8ebc0378f3a7b755f0fd000ee913b0abdffdcd0eed0335423fe33c8d7c2a72f0c247eba4f547912
@@ -62,8 +62,6 @@ module Contentful
62
62
  return unless publishable?(webhook)
63
63
  return unless in_publish_queue?(webhook)
64
64
 
65
- removeContentBlocks(webhook, 'publish')
66
-
67
65
  success = Resque.remove_delayed(
68
66
  ::Contentful::Scheduler::Tasks::Publish,
69
67
  webhook.space_id,
@@ -71,6 +69,8 @@ module Contentful
71
69
  ::Contentful::Scheduler.config[:management_token]
72
70
  )
73
71
 
72
+ removeContentBlocks(webhook, 'publish')
73
+
74
74
  log_event_success(webhook, success, 'publish', 'removed from')
75
75
  end
76
76
 
@@ -78,8 +78,6 @@ module Contentful
78
78
  return unless unpublishable?(webhook)
79
79
  return unless in_unpublish_queue?(webhook)
80
80
 
81
- removeContentBlocks(webhook, 'unpublish')
82
-
83
81
  success = Resque.remove_delayed(
84
82
  ::Contentful::Scheduler::Tasks::Unpublish,
85
83
  webhook.space_id,
@@ -87,6 +85,8 @@ module Contentful
87
85
  ::Contentful::Scheduler.config[:management_token]
88
86
  )
89
87
 
88
+ removeContentBlocks(webhook, 'unpublish')
89
+
90
90
  log_event_success(webhook, success, 'unpublish', 'removed from')
91
91
  end
92
92
 
@@ -187,27 +187,6 @@ module Contentful
187
187
  end
188
188
  end
189
189
 
190
- def removeContentBlocksUnpublish(webhook)
191
- logger.info "Inside remove CB Unpublish"
192
- if isContentBlockAvailable(webhook)
193
- logger.info "Inside remove CB Unpublish if block"
194
- webhook.fields['contentBlocks']['fi-FI'].each do |sys|
195
- logger.info "Inside remove CB Unpublish if block foreach loop"
196
- success = Resque.remove_delayed(
197
- ::Contentful::Scheduler::Tasks::Unpublish,
198
- webhook.space_id,
199
- sys['sys']['id'],
200
- ::Contentful::Scheduler.config[:management_token]
201
- )
202
- if success
203
- logger.info "Webhook Content Block {id: #{sys['sys']['id']}, space_id: #{webhook.space_id}} successfully removed from unpublish queue"
204
- else
205
- logger.warn "Webhook Content Block {id: #{sys['sys']['id']}, space_id: #{webhook.space_id}} couldn't be removed from unpublish queue"
206
- end
207
- end
208
- end
209
- end
210
-
211
190
  def isContentBlockAvailable(webhook)
212
191
  return !webhook.fields['contentBlocks'].nil?
213
192
  end
@@ -1,5 +1,5 @@
1
1
  module Contentful
2
2
  module Scheduler
3
- VERSION = "1.5.6997"
3
+ VERSION = "1.5.6998"
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.6997
4
+ version: 1.5.6998
5
5
  platform: ruby
6
6
  authors:
7
7
  - Contentful GmbH (David Litvak Bruno0