contentful-scheduler-custom 1.6.7.991 → 1.6.7.992

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f6868a065a43926235cbeabd1d9a38b488e839ad89d69526b2358e15ba95d7f3
4
- data.tar.gz: b5fa3064ba89a251e74264582be9f10e652d042761270ff0c03cef0e4cfc10a5
3
+ metadata.gz: eccc932471fd4d5b33cea11752cb87406a5ad50b95ad925c95a2d158b9926573
4
+ data.tar.gz: b458c590d9b623bfceed63976ced4c5bb88b6a693bd6493c8deb07e5eb378f45
5
5
  SHA512:
6
- metadata.gz: 8ee5f902e6e18a58eb0de3832675db4f6eca9c1925e5caf04663fbcad78ff5bf20bbf11da0d85119d212021d21864dc07bbb89028508098aa6ea97192eabf331
7
- data.tar.gz: 8c39c716b4f0334c0721316b2f7630dbd16b150e68138854871ccb5531e8fe474432d899797ab2e67b5ed0ab3b8eb16b5678174b11eceede8ed35a374cbc522e
6
+ metadata.gz: b0015abffeb71deb1852ea1a570351926454fc6392fc26ba3b50bfaf59d818643631a3500e6fa4b014602bb91bbe566fcf944c6e5ec21a0386778dc4868317b1
7
+ data.tar.gz: fdebe542d739509c2bc4a05b5869b4e16a0bd838ea0c746f4a4932a528f167888c16d2f0fd5492363ecc38bff3e5e9e0fb6e82d6910b25a2076d709c54ff3469
data/3.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "sys": {
3
+ "type": "Array"
4
+ },
5
+ "total": 1,
6
+ "skip": 0,
7
+ "limit": 100,
8
+ "items": [
9
+ {
10
+ "sys": {
11
+ "id": "5KsDBWseXY6QegucYAoacS",
12
+ "type": "Entry",
13
+ "version": 1,
14
+ "space": {
15
+ "sys": {
16
+ "type": "Link",
17
+ "linkType": "Space",
18
+ "id": "yadj1kx9rmg0"
19
+ }
20
+ },
21
+ "contentType": {
22
+ "sys": {
23
+ "type": "Link",
24
+ "linkType": "ContentType",
25
+ "id": "hfM9RCJIk0wIm06WkEOQY"
26
+ }
27
+ },
28
+ "createdAt": "2016-12-20T10:43:35.772Z",
29
+ "updatedAt": "2016-12-20T10:43:35.772Z",
30
+ "revision": 1
31
+ },
32
+ "fields": {
33
+ "author": {
34
+ "en-US": {
35
+ "sys": {
36
+ "type": "Link",
37
+ "linkType": "Entry",
38
+ "id": "4LgMotpNF6W20YKmuemW0a"
39
+ }
40
+ }
41
+ },
42
+ "title": {
43
+ "en-US": "Hello, World!"
44
+ }
45
+ }
46
+ }
47
+ ]
48
+ }
@@ -15,19 +15,24 @@ module Contentful
15
15
  access_token: ::Contentful::Scheduler.config[:spaces][webhook.space_id][:delivery_token]
16
16
  )
17
17
 
18
+ client = ::Contentful::Management::Client.new(
19
+ token,
20
+ raise_errors: true,
21
+ application_name: 'contentful.scheduler',
22
+ application_version: Contentful::Scheduler::VERSION
23
+ )
24
+
18
25
  logger.info"logger works !"
19
26
 
20
- entry_with_specific_relationship = client1.entries(links_to_entry: entry_id)
27
+ linked_enteries = client1.entries(links_to_entry: entry_id)
21
28
 
22
- logger.info"Enteries fetched"
29
+ linked_enteries.items.each do |sys|
30
+ client.entries.find(space_id, sys['sys']['id']).publish
31
+ logger.info"Published Linked Enteries"
32
+ end
23
33
 
24
34
  logger.info"Got enteries #{entry_with_specific_relationship.total}"
25
- client = ::Contentful::Management::Client.new(
26
- token,
27
- raise_errors: true,
28
- application_name: 'contentful.scheduler',
29
- application_version: Contentful::Scheduler::VERSION
30
- )
35
+
31
36
  client.entries.find(space_id, entry_id).publish
32
37
  end
33
38
 
@@ -1,5 +1,5 @@
1
1
  module Contentful
2
2
  module Scheduler
3
- VERSION = "1.6.7.991"
3
+ VERSION = "1.6.7.992"
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.991
4
+ version: 1.6.7.992
5
5
  platform: ruby
6
6
  authors:
7
7
  - Contentful GmbH (David Litvak Bruno0
@@ -202,6 +202,7 @@ files:
202
202
  - ".gitignore"
203
203
  - ".rspec"
204
204
  - ".travis.yml"
205
+ - 3.json
205
206
  - CHANGELOG.md
206
207
  - CODE_OF_CONDUCT.md
207
208
  - Gemfile