contentful-scheduler-custom 1.7.1.4 → 1.7.2
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: 69c81da1e575bca23d6bf4cdbd9b33da92a45cdeaa42c91cef84ef8f0f5511ef
|
4
|
+
data.tar.gz: 13037ee18f8880ea9f600676da889049a63f5432f8f1b09bc5c73a657ee3e950
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebf002ef1c07da251cd9567a1cf3a30ae35f3623c1916c4fdb9cacb921e008aa9b1d9cfa209795a4c7e4edba1a4eae2f5351c002dc3c515274bfdf08ccef3903
|
7
|
+
data.tar.gz: a6d8bab6b24ce730a9c5cc768ce06379fd71410210d019f15b6c97e1448a1e75b238fd680e441ef3f9c1c153da5f532551f950f1d3c1f7149be0e1d4189dfd7a
|
data/lib/contentful/scheduler.rb
CHANGED
@@ -19,7 +19,6 @@ 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)
|
23
22
|
end
|
24
23
|
|
25
24
|
config[:port] = (ENV.key?('PORT') ? ENV['PORT'].to_i : DEFAULT_PORT) unless config.key?(:port)
|
@@ -11,12 +11,11 @@ module Contentful
|
|
11
11
|
|
12
12
|
def self.perform(space_id, entry_id, token)
|
13
13
|
|
14
|
-
logger =
|
15
|
-
access_token = ::Contentful::Scheduler.config[:spaces][space_id][:delivery_token]
|
14
|
+
logger = Logger.new(STDOUT)
|
16
15
|
|
17
16
|
client = Contentful::Client.new(
|
18
17
|
space: space_id,
|
19
|
-
access_token:
|
18
|
+
access_token: ::Contentful::Scheduler.config[:spaces][space_id][:delivery_token]
|
20
19
|
)
|
21
20
|
|
22
21
|
clientManagement = ::Contentful::Management::Client.new(
|
@@ -34,7 +33,6 @@ module Contentful
|
|
34
33
|
linked_entries_ids.each do |id|
|
35
34
|
logger.info"Publishing linked entry with id #{id}"
|
36
35
|
clientManagement.entries.find(space_id, id).publish
|
37
|
-
sleep(1)
|
38
36
|
end
|
39
37
|
end
|
40
38
|
|
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.
|
4
|
+
version: 1.7.2
|
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-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: contentful
|