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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4bd2e957e7166aee619869e5ab4f700cecfb3d11f9d79a912b8c65a81b2cdb5f
4
- data.tar.gz: 72933d25b4e054d47424ea50fde747c8243e9392683ce658474aec9ca1f7800c
3
+ metadata.gz: e5cbe1d51501e962972ce71be1beaf059b12b51e5ef79370e9ff0dbebb1a3bf9
4
+ data.tar.gz: 04a943381280adeba4a258b4e0189cffef8079aa694b8404cb7947c759e4edec
5
5
  SHA512:
6
- metadata.gz: 2a124ea0e14997f1da4fc994d53954467085474fb0cb680b903fe8edb64e452d4a0655524620ad953fea8cde3ae2a86336682478723fc57b6745428f1a1bc4ce
7
- data.tar.gz: 621f589f970f475411a7f92135fb8a573a460533b291429e68b132897899a3b3a4e59c5a60ba7b592575c15210b2d350d0c48fb659e866dc9b5e9e2b98ba365b
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
- entry_with_specific_relationship = client1.entries('fields.305TcOWowok6cYgoCIm8Ya.sys.id' => entry_id)
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
- def initialize(logger)
33
- @config = ::Contentful::Scheduler.config
34
- @logger = logger
35
- end
29
+
36
30
  end
37
31
  end
38
32
  end
@@ -1,5 +1,5 @@
1
1
  module Contentful
2
2
  module Scheduler
3
- VERSION = "1.6.7.9"
3
+ VERSION = "1.6.7.90"
4
4
  end
5
5
  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.9
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 00:00:00.000000000 Z
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