contentful-scheduler-custom 1.6.7.5328 → 1.6.7.5329
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 +9 -9
- 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: ad791d0a1cc2d68afd294a8b7740fe3bc7b52d9a673ab393ec2a8cfbfde02729
|
4
|
+
data.tar.gz: 4ddd86dc6e8dea2b59de07246b72d4d9fdb2d3c3242a67c2267efdb7b14d9814
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9da008235f9e2c93c7d72b2f407a005bd5010952dafd895e550c9e690c8bd30097874e12007f4467ab5d2cbad5d2523e61e01aa9a1a2ca6c9bb9eb96ad3a6a8
|
7
|
+
data.tar.gz: 095445e0521ae5d83275b95d95a36b0fa53d00ee4e3c32c7191e4e6e131ac06e1fcd7737dafdfd7e5be32be95c6ee58e5b1bde8394005ab22e933847dc860759
|
@@ -46,23 +46,23 @@ module Contentful
|
|
46
46
|
|
47
47
|
def self.get_each_field item
|
48
48
|
logger = Logger.new(STDOUT)
|
49
|
-
|
49
|
+
ids1 = []
|
50
50
|
keys = item["fields"].keys
|
51
|
-
keys.each {|key| (
|
52
|
-
logger.info "get_each_field ==> #{
|
53
|
-
return
|
51
|
+
keys.each {|key| (ids1 << (self.get_each_element key, item["fields"])).flatten!}
|
52
|
+
logger.info "get_each_field ==> #{ids1}"
|
53
|
+
return ids1
|
54
54
|
end
|
55
55
|
|
56
56
|
def self.get_each_element key, item
|
57
57
|
logger = Logger.new(STDOUT)
|
58
|
-
|
58
|
+
ids2 = []
|
59
59
|
if item[key].is_a?(Array)
|
60
|
-
item[key].each {|i| (!(i["sys"]["linkType"].nil?) && i["sys"]["linkType"] == "Entry") ?
|
60
|
+
item[key].each {|i| (!(i["sys"]["linkType"].nil?) && i["sys"]["linkType"] == "Entry") ? ids2.push(i["sys"]["id"]) : nil}
|
61
61
|
elsif item[key].is_a?(Hash)
|
62
|
-
(!( item[key]["sys"]["linkType"].nil? ) && item[key]["sys"]["linkType"] == "Entry") ?
|
62
|
+
(!( item[key]["sys"]["linkType"].nil? ) && item[key]["sys"]["linkType"] == "Entry") ? ids2.push(item[key]["sys"]["id"]) : nil
|
63
63
|
end
|
64
|
-
logger.info "get_each_element ids are ==> #{
|
65
|
-
return
|
64
|
+
logger.info "get_each_element ids are ==> #{ids2}"
|
65
|
+
return ids2
|
66
66
|
end
|
67
67
|
|
68
68
|
end
|