contentful-scheduler-custom 1.5.1 → 1.5.2

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
  SHA1:
3
- metadata.gz: 49fddb5ee594b11ba2836067385333ccebcc3a40
4
- data.tar.gz: fe613f217dc45e15737ee695185f86695089c21e
3
+ metadata.gz: f49b54660734e1d99de423774a5704df42900639
4
+ data.tar.gz: dbefa3a1295ef8255342ae9de0a3b06f74c1f8d2
5
5
  SHA512:
6
- metadata.gz: 3edbf0b6e7c3d3bd8bef51b2c1743b785e0839bf2406ea7ceb63e5005141de36e17bcc2e9cb67b4a04e105a9a48b7fd2765657b27c48decdcd8de70754156a73
7
- data.tar.gz: 76b3e4c09aa91474c224de0b826c6793c560c21aa0aa0de0038b980f576a40f13f425f69190c3a4ff5f2b2f7abc64fe55c94ab5135b5b197d74f83669464a156
6
+ metadata.gz: 6ef18cffb5aa64b4e11884bba9f95f9bfc32e67c09038941fc0d624ba4f6e7acf166552ece511a1cb208ea41913e47b3686e6ee80bda233cf4f8331d5e63883f
7
+ data.tar.gz: 4c56e55d8e087c7c8fb1f0615f07d3cc90fcbf089a0e5a23161d36c9f0d4e63ded599f69e49884202e0e029b12214cee6d906be569df7afe8726eec2c2203261
data/example/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'contentful-scheduler-custom', '~>1.'
3
+ gem 'contentful-scheduler-custom', '~>1.4'
4
4
  gem 'contentful-management', '~> 1.0'
5
5
  gem 'resque', '~> 1.0'
6
6
  gem 'resque-scheduler', '4.2.1'
@@ -0,0 +1,21 @@
1
+ require 'contentful/management'
2
+
3
+ module Contentful
4
+ module Scheduler
5
+ module Tasks
6
+ class Unpublish
7
+ @queue = :unpublish
8
+
9
+ def self.perform(space_id, entry_id, token)
10
+ client = ::Contentful::Management::Client.new(
11
+ token,
12
+ raise_errors: true,
13
+ application_name: 'contentful-scheduler',
14
+ application_version: Contentful::Scheduler::VERSION
15
+ )
16
+ client.entries.find(space_id, entry_id).unpublish
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -1,5 +1,5 @@
1
1
  module Contentful
2
2
  module Scheduler
3
- VERSION = "1.5.1"
3
+ VERSION = "1.5.2"
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.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Contentful GmbH (David Litvak Bruno0
@@ -206,6 +206,7 @@ files:
206
206
  - lib/contentful/scheduler/queue.rb
207
207
  - lib/contentful/scheduler/tasks.rb
208
208
  - lib/contentful/scheduler/tasks/publish.rb
209
+ - lib/contentful/scheduler/tasks/unpublish.rb
209
210
  - lib/contentful/scheduler/version.rb
210
211
  - spec/contentful/scheduler/controller_spec.rb
211
212
  - spec/contentful/scheduler/queue_spec.rb