contentful-management 3.5.0 → 3.7.0

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: 60951b91e0b816f76ce81387b1be4d70673f7365b384161d3882fadbc04d947e
4
- data.tar.gz: ffbde8522e8ffb96dd247f2c14508e48b505ca00f6e4c71047f905472cc30eb0
3
+ metadata.gz: 48205cbf594bc68a7aff1b7017b9a46c4674c49c59af0294dd3ac16fe779deb1
4
+ data.tar.gz: 19138b713d5061b4730545a8952267904015963f5f5a06803bb3ae8ab63320fd
5
5
  SHA512:
6
- metadata.gz: dbda6173a0e1cb13a62f4f9aa8274969a011bca71866aab1be0983f367dfabb6041b2cc132c9fbb5b4d22d235e9d07647c6ec28a6ebe84cfd2ddffb3f1c09271
7
- data.tar.gz: fac67fa15e95c1dbdcf44c9ebe0934d7be17d54825dc24f16b12cea7a1b746f90ba31b301b4023040a815b97574b89eb3ad09c0f476f36eb3170dfeb02166cf7
6
+ metadata.gz: ebb8d595852045a00a7a826584316799d36b58ec2953d5ef136d4e91d06a85e938c474a5c2cc6cde808fc5a59000c47bccaad43909a227b53479a084b2383fd8
7
+ data.tar.gz: d5f33999d52caeb9a63d08dd27c386ddf1e88c01977cda743cec149870fd853d3a9d3e157d52b708aaa25cea916385d4c8d0c24511cb752784a59eb435430189
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # Change Log
2
2
 
3
- ## Master
3
+ ## 3.7.0
4
+ * Replaces deprecated `URI.escape` with `URI.encode_www_form_component` in Contentful::Management::Request#id
5
+ * Configured VCR to redact sensitive data
6
+
7
+ ## 3.6.0
8
+ * Updated readme for Entry References
9
+ * Added examples of fetching entries by field values in readme
10
+ * Added pagination support for environments
4
11
 
5
12
  ## 3.5.0
6
13
  * Added support for Entry References API
data/README.md CHANGED
@@ -331,6 +331,14 @@ Retrieving an entry by ID:
331
331
  entry = environment.entries.find('entry_id')
332
332
  ```
333
333
 
334
+ Retrieving entries by any other field value:
335
+
336
+ ```ruby
337
+ entries = environment.entries.all(content_type: content_type.id, 'fields.fieldName' => 'value')
338
+ ```
339
+
340
+ Note: all [search parameters](https://www.contentful.com/developers/docs/references/content-management-api/#/reference/search-parameters) are supported.
341
+
334
342
  Creating a location:
335
343
 
336
344
  ```ruby
@@ -1096,6 +1104,14 @@ Retrieving a snapshot for a given entry:
1096
1104
  snapshot = entry.snapshots.find('some_snapshot_id')
1097
1105
  ```
1098
1106
 
1107
+ ### Entry references
1108
+
1109
+ Retrieving entry references:
1110
+
1111
+ ```ruby
1112
+ references = entry.references(include: 1)
1113
+ ```
1114
+
1099
1115
  ### Content Type Snapshots
1100
1116
 
1101
1117
  Retrieving all snapshots for a given content type:
@@ -393,7 +393,6 @@ module Contentful
393
393
  logger.info(request: { url: url, query: request.query, header: request_headers(request) }) if logger
394
394
  raw_response = yield(url)
395
395
  logger.debug(response: raw_response) if logger
396
- clear_headers
397
396
  result = Response.new(raw_response, request)
398
397
  fail result.object if result.object.is_a?(Error) && configuration[:raise_errors]
399
398
  rescue Contentful::Management::RateLimitExceeded => rate_limit_error
@@ -406,6 +405,8 @@ module Contentful
406
405
  end
407
406
 
408
407
  raise
408
+ ensure
409
+ clear_headers
409
410
  end
410
411
 
411
412
  result
@@ -17,9 +17,12 @@ module Contentful
17
17
  # Gets a collection of environments.
18
18
  #
19
19
  # @return [Contentful::Management::Array<Contentful::Management::Environment>]
20
- def all
20
+ def all(params = {})
21
21
  @resource_requester.all(
22
- space_id: @space_id
22
+ {
23
+ space_id: @space_id
24
+ },
25
+ params
23
26
  )
24
27
  end
25
28
 
@@ -24,7 +24,7 @@ module Contentful
24
24
 
25
25
  if id
26
26
  @type = :single
27
- @id = URI.escape(id)
27
+ @id = URI.encode_www_form_component(id)
28
28
  else
29
29
  @type = :multi
30
30
  @id = nil
@@ -3,6 +3,6 @@ module Contentful
3
3
  # Management Namespace
4
4
  module Management
5
5
  # Gem Version
6
- VERSION = '3.5.0'.freeze
6
+ VERSION = '3.7.0'.freeze
7
7
  end
8
8
  end
@@ -743,7 +743,7 @@ http_interactions:
743
743
  Content-Type:
744
744
  - application/vnd.contentful.management.v1+json
745
745
  X-Contentful-Version:
746
- - '30'
746
+ - '1'
747
747
  Content-Length:
748
748
  - '0'
749
749
  Host: