contentful-scheduler-custom 1.6.7.9 → 1.6.7.90
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 +7 -13
- data/lib/contentful/scheduler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5cbe1d51501e962972ce71be1beaf059b12b51e5ef79370e9ff0dbebb1a3bf9
|
4
|
+
data.tar.gz: 04a943381280adeba4a258b4e0189cffef8079aa694b8404cb7947c759e4edec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1fc495ea38c2267e626c0646537cc2aefc199ae3cf5967b4fb46306c9b807751c97420a29f9f84fc19c1dfc76dab540c2717c4789e57a57eafcb1ba4e4153f0
|
7
|
+
data.tar.gz: a7b98463f24b6e0f1c3ed9032503f164f3d4675a615b5128bd8a74237e9c799c44ad3db872f0cfad4715e4f9774c405a9996eb94987bd306d721f04a5e66aa99
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'contentful/management'
|
2
2
|
require 'contentful'
|
3
|
+
require 'logger'
|
3
4
|
|
4
5
|
module Contentful
|
5
6
|
module Scheduler
|
@@ -7,32 +8,25 @@ module Contentful
|
|
7
8
|
class Publish
|
8
9
|
@queue = :publish
|
9
10
|
|
10
|
-
attr_reader :config, :logger
|
11
|
-
|
12
|
-
def self.instance(logger = ::Contentful::Webhook::Listener::Support::NullLogger.new)
|
13
|
-
@@instance ||= new(logger)
|
14
|
-
end
|
15
|
-
|
16
11
|
def self.perform(space_id, entry_id, token)
|
12
|
+
logger = ::Contentful::Webhook::Listener::Support::NullLogger.new
|
17
13
|
client1 = Contentful::Client.new(
|
18
14
|
space: space_id,
|
19
15
|
access_token: token
|
20
16
|
)
|
21
|
-
|
17
|
+
|
18
|
+
logger.info"logger works !"
|
19
|
+
|
20
|
+
entry_with_specific_relationship = client1.entries(links_to_entry: entry_id)
|
22
21
|
client = ::Contentful::Management::Client.new(
|
23
22
|
token,
|
24
23
|
raise_errors: true,
|
25
24
|
application_name: 'contentful.scheduler',
|
26
25
|
application_version: Contentful::Scheduler::VERSION
|
27
26
|
)
|
28
|
-
allContentType = client.content_types.all.items
|
29
|
-
logger.info "All content types available: #{allContentType} contenttype specific to entery are #{entry_with_specific_relationship.items}"
|
30
27
|
client.entries.find(space_id, entry_id).publish
|
31
28
|
end
|
32
|
-
|
33
|
-
@config = ::Contentful::Scheduler.config
|
34
|
-
@logger = logger
|
35
|
-
end
|
29
|
+
|
36
30
|
end
|
37
31
|
end
|
38
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contentful-scheduler-custom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.7.
|
4
|
+
version: 1.6.7.90
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Contentful GmbH (David Litvak Bruno0
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: contentful-webhook-listener
|