contentful-scheduler-custom 1.7.3 → 1.7.4
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91a2aba41007268866e72a5e5c05182e7ef225b6904c130a9f2a51fa629d53b5
|
4
|
+
data.tar.gz: 59c3ec16a6fd41ef3cc52da30eb628ae737a637a4b96b5ea950c2de72dadb47b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a39273ad51b594ea7a8e2edff11ed05f342cc09fcc608e2813a284f0b33a68941176d4f53f29cf88723e6c35b155c6f36ac22820e09d5880c0975037aeb2f34
|
7
|
+
data.tar.gz: ed8b8afba51c30951cc35bf810fc6b504064f04fdefc24f7365c4c2b13f29495d04aee9567e0c65b6ba0e303adeb872a4d115dc2d80406d5af161495e61ee2cb
|
data/lib/contentful/scheduler.rb
CHANGED
@@ -19,6 +19,7 @@ module Contentful
|
|
19
19
|
fail ':spaces configuration missing' unless config.key?(:spaces)
|
20
20
|
config[:spaces].each do |space, data|
|
21
21
|
fail ":management_token missing for space: #{space}" unless data.key?(:management_token)
|
22
|
+
fail ":delivery_token missing for space: #{space}" unless data.key?(:delivery_token)
|
22
23
|
end
|
23
24
|
|
24
25
|
config[:port] = (ENV.key?('PORT') ? ENV['PORT'].to_i : DEFAULT_PORT) unless config.key?(:port)
|
@@ -12,10 +12,11 @@ module Contentful
|
|
12
12
|
def self.perform(space_id, entry_id, token)
|
13
13
|
|
14
14
|
logger = ::Contentful::Scheduler.config[:logger]
|
15
|
+
access_token = ::Contentful::Scheduler.config[:spaces][space_id][:delivery_token]
|
15
16
|
|
16
17
|
client = Contentful::Client.new(
|
17
18
|
space: space_id,
|
18
|
-
access_token:
|
19
|
+
access_token: access_token
|
19
20
|
)
|
20
21
|
|
21
22
|
clientManagement = ::Contentful::Management::Client.new(
|