gds-api-adapters 40.0.0 → 40.1.0

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: df001ff7888ac972186ea28ff977f854221a96d3
4
- data.tar.gz: b6c8e1d290e996f937ee5a9f020177e4e054a772
3
+ metadata.gz: 275b6c8cdde4e2c6ef3e29c9c97e71e9964b07c6
4
+ data.tar.gz: 6fa7a308ebd3a1ad9f0943d155774c61474e89be
5
5
  SHA512:
6
- metadata.gz: f7dc6090daf47c209578f786a9154707f9f8053814d596d64f37a1306474c418081914d3f749a13c562c8e0dab4f632bc937ca45460c3f7c372d17d5d0e4c694
7
- data.tar.gz: f31e164bb4935e769c4b25a0d119f742d09cad99d2882a16f8af35749c120b00f900db103f8b93ee0d7c2af0e0a008ca070b6f88701e8f55366f45390e5a47f2
6
+ metadata.gz: cbf049cf1ce737618b48003940ed4227de4adeeb45c7887fb06111a3f9be14aa76c1f81b656a82b97697cc4127d2f25ca26b410babe608ca47628c217295fc70
7
+ data.tar.gz: ebaa6745b6e1b1377e1aef1d1b91550aaa0ddacb232a62693f8c56aafb1b1ce7de79e7d74dac4e8c3b4c30f5967f56a9496a9908e10b55b219d99e8413ede9d4
@@ -129,9 +129,10 @@ class GdsApi::PublishingApiV2 < GdsApi::Base
129
129
  # @param previous_version [Integer] (optional) A lock version number for optimistic locking.
130
130
  # @param locale [String] (optional) The content item locale.
131
131
  # @param unpublished_at [Time] (optional) The time the content was withdrawn. Ignored for types other than withdrawn
132
+ # @param redirects [Array] (optional) Required if no alternative_path is given. An array of redirect values, ie: { path:, type:, destination: }
132
133
  #
133
134
  # @see https://github.com/alphagov/publishing-api/blob/master/doc/api.md#post-v2contentcontent_idunpublish
134
- def unpublish(content_id, type:, explanation: nil, alternative_path: nil, discard_drafts: false, allow_draft: false, previous_version: nil, locale: nil, unpublished_at: nil)
135
+ def unpublish(content_id, type:, explanation: nil, alternative_path: nil, discard_drafts: false, allow_draft: false, previous_version: nil, locale: nil, unpublished_at: nil, redirects: nil)
135
136
  params = {
136
137
  type: type
137
138
  }
@@ -143,6 +144,7 @@ class GdsApi::PublishingApiV2 < GdsApi::Base
143
144
  params[:allow_draft] = allow_draft if allow_draft
144
145
  params[:locale] = locale if locale
145
146
  params[:unpublished_at] = unpublished_at.utc.iso8601 if unpublished_at
147
+ params[:redirects] = redirects if redirects
146
148
 
147
149
  post_json(unpublish_url(content_id), params)
148
150
  end
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '40.0.0'.freeze
2
+ VERSION = '40.1.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gds-api-adapters
3
3
  version: !ruby/object:Gem::Version
4
- version: 40.0.0
4
+ version: 40.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Stewart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-22 00:00:00.000000000 Z
11
+ date: 2017-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek