contentful-scheduler-custom 1.6.7.5324 → 1.6.7.5325
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/contentful/scheduler/tasks/publish.rb +3 -3
- data/lib/contentful/scheduler/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 242c1acdac7c8a31c8e1fe8c1be31dd16ca851179e495934ec05fa8565912ff8
|
4
|
+
data.tar.gz: 216c0f21ea67bd0a11809f37d868ad86219b6424ab2a638167990b885a602d9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eeacb91dba07e471c9d98c41cee79e7dfe505c7fa6a61f0aa721b5fd15b619909a596e80ae75cd930a99d39acb3a257404e99a8a27f4d72145f0eff5f3d3a385
|
7
|
+
data.tar.gz: ed024c6eba21f424838247eaf4b63bee690f0afcde776b63fc24f3ee826cc4f68d20c541d3849d5a3f16d3830df66ec6e989b7527f773fbcb995f9861e76c037
|
@@ -27,7 +27,6 @@ module Contentful
|
|
27
27
|
linked_enteries = client1.entries(links_to_entry: entry_id)
|
28
28
|
|
29
29
|
if !linked_enteries.raw["includes"].nil? && !linked_enteries.raw["includes"]["Entry"].nil?
|
30
|
-
logger.info "CHuby raw element is ==> #{linked_enteries.raw["includes"]["Entry"]}"
|
31
30
|
linkedEnteriesId = self.extract_element_ids(linked_enteries.raw["includes"]["Entry"])
|
32
31
|
logger.info("Linked enteries are #{linkedEnteriesId}")
|
33
32
|
linkedEnteriesId.each do |id|
|
@@ -40,6 +39,7 @@ module Contentful
|
|
40
39
|
end
|
41
40
|
|
42
41
|
def self.extract_element_ids input_array
|
42
|
+
logger.info "CHuby raw element is ==> #{input_array}"
|
43
43
|
ids = []
|
44
44
|
input_array.each {|item| (ids << (self.get_each_field item )).flatten!}
|
45
45
|
return ids.uniq
|
@@ -54,9 +54,9 @@ module Contentful
|
|
54
54
|
|
55
55
|
def self.get_each_element key, item
|
56
56
|
ids = []
|
57
|
-
if item[key].
|
57
|
+
if item[key].is_a?(Array)
|
58
58
|
item[key].each {|i| (!(i["sys"]["linkType"].nil?) && i["sys"]["linkType"] == "Entry") ? ids.push(i["sys"]["id"]) : nil}
|
59
|
-
elsif item[key].
|
59
|
+
elsif item[key].is_a?(Hash)
|
60
60
|
(!( item[key]["sys"]["linkType"].nil? ) && item[key]["sys"]["linkType"] == "Entry") ? ids.push(item[key]["sys"]["id"]) : nil
|
61
61
|
end
|
62
62
|
return ids
|