contentful-scheduler-custom 1.6.7.5320 → 1.6.7.5321

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: c803ad4b677d8c4e4ca847e865aac58ab6acb51bfd6ace0cc0de62da27b4a576
4
- data.tar.gz: 199b99f059965377282071f1bc2350397ff92b7a7e966142601dd874a55b0b94
3
+ metadata.gz: 81a550baf2d9512bb2e6ba2d83b0579b95ed34561502b4eeeec273995b34feb6
4
+ data.tar.gz: 8c1995b9d3095f43a80f75ad7a4824580d869c4a4c47e5a7cf4b4b2a006dae20
5
5
  SHA512:
6
- metadata.gz: 80a14a54a0308083c2b40943666d767573b32d44b3d0416f29298463f4c52936c96b75a2e8c2ed758f784e83836342c87c24a4de77775b4653291f563b0991bd
7
- data.tar.gz: b0e9eebbb6d905a72fc22efa556b5a824d90aa99d2d3d015d9eb0d616a302e32d63b60726a7a3f849adc9f7f49504092dd118a803b0a43c7cae82bbfe7c65fa9
6
+ metadata.gz: 57fb9d9337402150a8d9094f2373035d6e5d724510292b3b86a770be641bdb2358cb12513b3095bd86c28b6f5894fc52e1ed6233cbbd91cfde1f6602d3ba5242
7
+ data.tar.gz: 2bd67c1925cd56fceae36366699105ba1e327cbb08d432714683c3dafcaca710e314f783f9196039f545de34282448783ec99f660a5c73220a2f7ac2acd776f9
@@ -27,7 +27,7 @@ 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"]}"
30
+ logger.info "CHuby raw element is ==> #{linked_enteries.raw["includes"]["Entry"]}"
31
31
  linkedEnteriesId = extract_element_ids(linked_enteries.raw["includes"]["Entry"])
32
32
  logger.info("Linked enteries are #{linkedEnteriesId}")
33
33
  linkedEnteriesId.each do |id|
@@ -39,20 +39,20 @@ module Contentful
39
39
  client.entries.find(space_id, entry_id).publish
40
40
  end
41
41
 
42
- def self.extract_element_ids(input_array)
42
+ def self.extract_element_ids input_array
43
43
  ids = []
44
- input_array.each {|item| (ids << (get_each_field item)).flatten!}
45
- return ids.uniq
44
+ input_array.each {|item| (ids << (get_each_field item )).flatten!}
45
+ puts ids.uniq
46
46
  end
47
47
 
48
- def self.get_each_field(item)
48
+ def self.get_each_field item
49
49
  ids = []
50
50
  keys = item["fields"].keys
51
51
  keys.each {|key| (ids << (get_each_element key, item["fields"])).flatten!}
52
52
  return ids
53
53
  end
54
54
 
55
- def self.get_each_element(key, item)
55
+ def self.get_each_element key, item
56
56
  ids = []
57
57
  if item[key].kind_of?(Array)
58
58
  item[key].each {|i| (!(i["sys"]["linkType"].nil?) && i["sys"]["linkType"] == "Entry") ? ids.push(i["sys"]["id"]) : nil}
@@ -61,6 +61,7 @@ module Contentful
61
61
  end
62
62
  return ids
63
63
  end
64
+
64
65
  end
65
66
  end
66
67
  end
@@ -1,5 +1,5 @@
1
1
  module Contentful
2
2
  module Scheduler
3
- VERSION = "1.6.7.5320"
3
+ VERSION = "1.6.7.5321"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentful-scheduler-custom
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.7.5320
4
+ version: 1.6.7.5321
5
5
  platform: ruby
6
6
  authors:
7
7
  - Contentful GmbH (David Litvak Bruno0