contentful-scheduler-custom 1.7.1.3 → 1.7.1.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: 6bcbc003f3af461a76f3d806629163309121c9cb20bf6aee0cea44d0cb63b0eb
|
4
|
+
data.tar.gz: 7c502a1a5e46b939bc9db92503867faabb665673ff6f400a2f8a4314b7d7fec4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59e64b4456f102179eb606dc143aa5003e980da8ab4c2bc13973e46f3bfc4161ad2f8990868320e67db24bf7c530b5f0311e62a08b365f3623de22b8370ef4fd
|
7
|
+
data.tar.gz: 5c80cad938e81a74a1a6f9428aa5713e3365711c1657af8206b030b9613ed539ad084983d8efdd087029c9fe4509f96bbc1f100f4692f672ecbb67a12b5e8f16
|
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(
|
@@ -33,6 +34,7 @@ module Contentful
|
|
33
34
|
linked_entries_ids.each do |id|
|
34
35
|
logger.info"Publishing linked entry with id #{id}"
|
35
36
|
clientManagement.entries.find(space_id, id).publish
|
37
|
+
sleep(1)
|
36
38
|
end
|
37
39
|
end
|
38
40
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contentful-scheduler-custom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.1.
|
4
|
+
version: 1.7.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Contentful GmbH (David Litvak Bruno0
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: contentful
|