contentful-scheduler-custom 1.6.7.5326 → 1.6.7.5327
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 +5 -0
- 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: 0f78ebe3263864033469b2929c5938e8e80a5c73055c7fb475274e9738574f09
|
4
|
+
data.tar.gz: 07a685d3d2bd8c0242e02ce6a2c61ee26531191e155a60ee0232eed30a18ea76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccaec5726188c6caef738c30dff2eaa8e90ff741ad8054bf311b380194077038956137b96f581768b6d9e227fc6b167f62c2cb3a940b622e3e3d439a48b6c677
|
7
|
+
data.tar.gz: be79ae635cca51651cbc9e02fd2110e54b8c078ab55c77ed77050ecaacf8eb03e082806af67f8c1b2f13adaf8986ae15e6cb5a80a99ecae3796b3e79c22ff70c
|
@@ -39,6 +39,7 @@ module Contentful
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def self.extract_element_ids input_array
|
42
|
+
logger = Logger.new(STDOUT)
|
42
43
|
logger.info "CHuby raw element is ==> #{input_array}"
|
43
44
|
ids = []
|
44
45
|
input_array.each {|item| (ids << (self.get_each_field item )).flatten!}
|
@@ -46,13 +47,17 @@ module Contentful
|
|
46
47
|
end
|
47
48
|
|
48
49
|
def self.get_each_field item
|
50
|
+
logger = Logger.new(STDOUT)
|
49
51
|
ids = []
|
50
52
|
keys = item["fields"].keys
|
51
53
|
keys.each {|key| (ids << (self.get_each_element key, item["fields"])).flatten!}
|
54
|
+
logger.info "get_each_field ==> #{ids}"
|
52
55
|
return ids
|
53
56
|
end
|
54
57
|
|
55
58
|
def self.get_each_element key, item
|
59
|
+
logger = Logger.new(STDOUT)
|
60
|
+
logger.info "get_each_element ==> #{key} and #{item}"
|
56
61
|
ids = []
|
57
62
|
if item[key].is_a?(Array)
|
58
63
|
item[key].each {|i| (!(i["sys"]["linkType"].nil?) && i["sys"]["linkType"] == "Entry") ? ids.push(i["sys"]["id"]) : nil}
|