contentful 2.7.0 → 2.8.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: b699be0837b0d886fdb6e8c75974ccf01e0bfb71e46d7834bd5e37e9fa90f817
4
- data.tar.gz: 7d1ee221d1eb88674fea126b472bee27f48aaf8ca40fc8067787bf2b2379ddf3
3
+ metadata.gz: fb7f32509e288f94600ecba8ee9758975a92bf7e8fe1ab39e5c6d72e5fad0697
4
+ data.tar.gz: cefa5968867483761224da652f892300268ccc4ea6bd99cc282309a66a049bbd
5
5
  SHA512:
6
- metadata.gz: 47641e0295fae3956a22a770226b02ae31c87c51db666c6a1c27eb46d31b114396f96edb995433211118faadff1367543c9b92b6d428170b70e9fb09a12d68fc
7
- data.tar.gz: 3876c3f1975d8b44c3dac179f666cb5d91614ac0033f807c5a8c6e4b031f7c6c508e454cb42a5def16314c206943209e3c3663a809113d703ef1cc414b7bd672
6
+ metadata.gz: 1ea5c191ba3e20361a2c933dd2b8445fb62c27e6621e90d10bb7400d42bd9c5804f9705875b6b9296619afe2ad0791ded8e631a99820d27cd14de81dc610446e
7
+ data.tar.gz: cc711e933719830331302591d36c2428a5cc6f8358c084f311f7e631f10da61efbba6381364bea4f566817f79c7062d90e2d8878404952405008f5476f3a6afc
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 2.8.0
6
+ ### Added
7
+ * Add support for `sync` on environments other than `master`.
8
+
5
9
  ## 2.7.0
6
10
  ### Added
7
11
  * Added support for `radius` cropping on the Asset `#url`.
@@ -66,7 +66,7 @@ module Contentful
66
66
  def hydrate_sys
67
67
  result = {}
68
68
  raw.fetch('sys', {}).each do |k, v|
69
- if %w(space contentType).include?(k)
69
+ if %w(space contentType environment).include?(k)
70
70
  v = build_link(v)
71
71
  elsif %w(createdAt updatedAt deletedAt).include?(k)
72
72
  v = DateTime.parse(v)
@@ -396,8 +396,6 @@ module Contentful
396
396
  #
397
397
  # @return [Contentful::Sync]
398
398
  def sync(options = { initial: true })
399
- fail ArgumentError, 'Sync is not supported for non master environments' unless configuration[:environment] == 'master'
400
-
401
399
  Sync.new(self, options)
402
400
  end
403
401
 
@@ -71,7 +71,7 @@ module Contentful
71
71
 
72
72
  def fetch_page(options_or_url)
73
73
  return Request.new(@client, options_or_url).get if options_or_url.is_a? String
74
- Request.new(@client, '/sync', options_or_url).get
74
+ Request.new(@client, @client.environment_url('/sync'), options_or_url).get
75
75
  end
76
76
 
77
77
  def link_page_to_sync!(page)
@@ -1,5 +1,5 @@
1
1
  # Contentful Namespace
2
2
  module Contentful
3
3
  # Gem Version
4
- VERSION = '2.7.0'
4
+ VERSION = '2.8.0'
5
5
  end
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/sync?initial=true&type=DeletedAsset
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/sync?initial=true&type=DeletedAsset
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -167,7 +167,7 @@ http_interactions:
167
167
  }
168
168
  }
169
169
  ],
170
- "nextSyncUrl": "https://cdn.contentful.com/spaces/cfexampleapi/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybDscOqw6vDvUcbEzolwqs8UsKNIsOuwozDjFbChi4dLE_DgRYLwpcDw7fCl8KWw4DCgMKDHWZ9IsKSwrd7PCPDnjjCuUNZUMK-wqHCuQkFaTHDtcKBw6ESVMKBB8OY"
170
+ "nextSyncUrl": "https://cdn.contentful.com/spaces/cfexampleapi/environments/master/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybDscOqw6vDvUcbEzolwqs8UsKNIsOuwozDjFbChi4dLE_DgRYLwpcDw7fCl8KWw4DCgMKDHWZ9IsKSwrd7PCPDnjjCuUNZUMK-wqHCuQkFaTHDtcKBw6ESVMKBB8OY"
171
171
  }
172
172
  http_version:
173
173
  recorded_at: Mon, 28 Apr 2014 17:19:54 GMT
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/sync?initial=true&type=DeletedEntry
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/sync?initial=true&type=DeletedEntry
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -82,7 +82,7 @@ http_interactions:
82
82
  }
83
83
  }
84
84
  ],
85
- "nextSyncUrl": "https://cdn.contentful.com/spaces/cfexampleapi/sync?sync_token=wonDrcKnRgcSOF4-wrDCgcKefWzCgsOxwpIjw6fCr8OKUUphKXnCrE1xw7EXSgzDhcKIXMKfw4XDnAZGw5E7wqAkw6sIwpg"
85
+ "nextSyncUrl": "https://cdn.contentful.com/spaces/cfexampleapi/environments/master/sync?sync_token=wonDrcKnRgcSOF4-wrDCgcKefWzCgsOxwpIjw6fCr8OKUUphKXnCrE1xw7EXSgzDhcKIXMKfw4XDnAZGw5E7wqAkw6sIwpg"
86
86
  }
87
87
  http_version:
88
88
  recorded_at: Mon, 28 Apr 2014 20:05:35 GMT
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/sync?initial=true&type=Deletion
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/sync?initial=true&type=Deletion
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -184,7 +184,7 @@ http_interactions:
184
184
  }
185
185
  }
186
186
  ],
187
- "nextSyncUrl": "https://cdn.contentful.com/spaces/cfexampleapi/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybDscOqw6vDvUcbEzolwqs8UsKNIsOuwow-w7IXwrfDncOgWsKOwpDDg8Kjw6zDvxDDusKqccOMwrV_wp9ywoRlfsKVAsOnHcOAwpLCocO0wrHClzpqwrUAw5_DiyHCoznCmRVHw6A"
187
+ "nextSyncUrl": "https://cdn.contentful.com/spaces/cfexampleapi/environments/master/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybDscOqw6vDvUcbEzolwqs8UsKNIsOuwow-w7IXwrfDncOgWsKOwpDDg8Kjw6zDvxDDusKqccOMwrV_wp9ywoRlfsKVAsOnHcOAwpLCocO0wrHClzpqwrUAw5_DiyHCoznCmRVHw6A"
188
188
  }
189
189
  http_version:
190
190
  recorded_at: Mon, 21 Apr 2014 20:31:40 GMT
@@ -0,0 +1,81 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://cdn.contentful.com/spaces/a22o2qgm356c/environments/staging/sync?initial=true
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Contentful-User-Agent:
11
+ - sdk contentful.rb/2.7.0; platform ruby/2.5.1; os macOS/16;
12
+ Authorization:
13
+ - Bearer bfbc63cf745a037125dbcc64f716a9a0e9d091df1a79e84920b890f87a6e7ab9
14
+ Content-Type:
15
+ - application/vnd.contentful.delivery.v1+json
16
+ Accept-Encoding:
17
+ - gzip
18
+ Connection:
19
+ - close
20
+ Host:
21
+ - cdn.contentful.com
22
+ User-Agent:
23
+ - http.rb/2.2.2
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Access-Control-Allow-Headers:
30
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature
31
+ Access-Control-Allow-Methods:
32
+ - GET,HEAD,OPTIONS
33
+ Access-Control-Allow-Origin:
34
+ - "*"
35
+ Access-Control-Expose-Headers:
36
+ - Etag
37
+ Access-Control-Max-Age:
38
+ - '86400'
39
+ Cache-Control:
40
+ - max-age=0
41
+ Content-Encoding:
42
+ - gzip
43
+ Content-Type:
44
+ - application/vnd.contentful.delivery.v1+json
45
+ Etag:
46
+ - W/"92eb9c4a934fbd7ea0ddb14043495da1"
47
+ Server:
48
+ - Contentful
49
+ X-Content-Type-Options:
50
+ - nosniff
51
+ X-Contentful-Request-Id:
52
+ - eda304d48d1aec96a9e4171451210a92
53
+ Content-Length:
54
+ - '1540'
55
+ Accept-Ranges:
56
+ - bytes
57
+ Date:
58
+ - Fri, 27 Apr 2018 11:58:05 GMT
59
+ Via:
60
+ - 1.1 varnish
61
+ Age:
62
+ - '0'
63
+ Connection:
64
+ - close
65
+ X-Served-By:
66
+ - cache-fra19132-FRA
67
+ X-Cache:
68
+ - MISS
69
+ X-Cache-Hits:
70
+ - '0'
71
+ X-Timer:
72
+ - S1524830285.762625,VS0,VE409
73
+ Vary:
74
+ - Accept-Encoding
75
+ body:
76
+ encoding: ASCII-8BIT
77
+ string: !binary |-
78
+ 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
79
+ http_version:
80
+ recorded_at: Fri, 27 Apr 2018 11:58:03 GMT
81
+ recorded_with: VCR 3.0.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/sync?initial=true
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/sync?initial=true
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -630,7 +630,7 @@ http_interactions:
630
630
  }
631
631
  }
632
632
  ],
633
- "nextPageUrl": "https://cdn.contentful.com/spaces/cfexampleapi/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybCr8Okw6AYwqbDksO3ehvDpUPCgcKsKXbCiAwPC8K2w4LDvsOkw6nCjhPDpcOQADElWsOoU8KGR3HCtsOAwqd6wp_Dulp8w6LDsF_CtsK7Kk05wrMvwrLClMOgG2_Dn2sGPg"
633
+ "nextPageUrl": "https://cdn.contentful.com/spaces/cfexampleapi/environments/master/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybCr8Okw6AYwqbDksO3ehvDpUPCgcKsKXbCiAwPC8K2w4LDvsOkw6nCjhPDpcOQADElWsOoU8KGR3HCtsOAwqd6wp_Dulp8w6LDsF_CtsK7Kk05wrMvwrLClMOgG2_Dn2sGPg"
634
634
  }
635
635
  http_version:
636
636
  recorded_at: Mon, 21 Apr 2014 19:52:28 GMT
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybCr8Okw6AYwqbDksO3ehvDpUPCgcKsKXbCiAwPC8K2w4LDvsOkw6nCjhPDpcOQADElWsOoU8KGR3HCtsOAwqd6wp_Dulp8w6LDsF_CtsK7Kk05wrMvwrLClMOgG2_Dn2sGPg
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybCr8Okw6AYwqbDksO3ehvDpUPCgcKsKXbCiAwPC8K2w4LDvsOkw6nCjhPDpcOQADElWsOoU8KGR3HCtsOAwqd6wp_Dulp8w6LDsF_CtsK7Kk05wrMvwrLClMOgG2_Dn2sGPg
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -64,7 +64,7 @@ http_interactions:
64
64
  "type": "Array"
65
65
  },
66
66
  "items": [],
67
- "nextSyncUrl": "https://cdn.contentful.com/spaces/cfexampleapi/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybCr8Okw6AYwqbDksO3ehvDpUPCgcKsKXbCiAwPC8K2w4LDvsOkw6nCjhPDpcOQADElWsOoU8KGR3HCtsOAwqd6wp_Dulp8w6LDsF_CtsK7Kk05wrMvwrLClMOgG2_Dn2sGPg"
67
+ "nextSyncUrl": "https://cdn.contentful.com/spaces/cfexampleapi/environments/master/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybCr8Okw6AYwqbDksO3ehvDpUPCgcKsKXbCiAwPC8K2w4LDvsOkw6nCjhPDpcOQADElWsOoU8KGR3HCtsOAwqd6wp_Dulp8w6LDsF_CtsK7Kk05wrMvwrLClMOgG2_Dn2sGPg"
68
68
  }
69
69
  http_version:
70
70
  recorded_at: Fri, 25 Apr 2014 13:31:18 GMT
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/sync?initial=true
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/sync?initial=true
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -99,7 +99,7 @@ http_interactions:
99
99
  }
100
100
  }
101
101
  ],
102
- "nextSyncUrl": "https://cdn.contentful.com/spaces/cfexampleapi/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybCr8Okw6AYwqbDksO3ehvDpUPCgcKsKXbCiAwPC8K2w4LDvsOkw6nCjhPDpcOQADElWsOoU8KGR3HCtsOAwqd6wp_Dulp8w6LDsF_CtsK7Kk05wrMvwrLClMOgG2_Dn2sGPg"
102
+ "nextSyncUrl": "https://cdn.contentful.com/spaces/cfexampleapi/environments/master/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybCr8Okw6AYwqbDksO3ehvDpUPCgcKsKXbCiAwPC8K2w4LDvsOkw6nCjhPDpcOQADElWsOoU8KGR3HCtsOAwqd6wp_Dulp8w6LDsF_CtsK7Kk05wrMvwrLClMOgG2_Dn2sGPg"
103
103
  }
104
104
  http_version:
105
105
  recorded_at: Fri, 25 Apr 2014 13:31:18 GMT
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe Contentful::SyncPage do
4
4
  let(:page_with_more) { vcr('sync_page') { create_client.sync(initial: true).first_page } }
5
- let(:page) { vcr('sync_page_2') { create_client.sync.get('https://cdn.contentful.com/spaces/cfexampleapi/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybCr8Okw6AYwqbDksO3ehvDpUPCgcKsKXbCiAwPC8K2w4LDvsOkw6nCjhPDpcOQADElWsOoU8KGR3HCtsOAwqd6wp_Dulp8w6LDsF_CtsK7Kk05wrMvwrLClMOgG2_Dn2sGPg') } }
5
+ let(:page) { vcr('sync_page_2') { create_client.sync.get('https://cdn.contentful.com/spaces/cfexampleapi/environments/master/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybCr8Okw6AYwqbDksO3ehvDpUPCgcKsKXbCiAwPC8K2w4LDvsOkw6nCjhPDpcOQADElWsOoU8KGR3HCtsOAwqd6wp_Dulp8w6LDsF_CtsK7Kk05wrMvwrLClMOgG2_Dn2sGPg') } }
6
6
 
7
7
  describe 'SystemProperties' do
8
8
  it 'has a #sys getter returning a hash with symbol keys' do
@@ -20,8 +20,20 @@ describe Contentful::Sync do
20
20
  end
21
21
 
22
22
  describe 'environments' do
23
- it 'raises an error on non master environments' do
24
- expect { create_client(environment: 'foo').sync }.to raise_exception
23
+ it 'works for environments' do
24
+ vcr('sync_environment') {
25
+ page = nil
26
+ expect {
27
+ page = create_client(
28
+ space: 'a22o2qgm356c',
29
+ access_token: 'bfbc63cf745a037125dbcc64f716a9a0e9d091df1a79e84920b890f87a6e7ab9',
30
+ environment: 'staging'
31
+ ).sync(initial: true).first_page
32
+ }.not_to raise_exception
33
+
34
+ expect(page.items.first).to be_a ::Contentful::Entry
35
+ expect(page.items.first.environment.id).to eq 'staging'
36
+ }
25
37
  end
26
38
  end
27
39
 
@@ -34,7 +46,7 @@ describe Contentful::Sync do
34
46
 
35
47
  it 'takes a next_sync_url on initialization' do
36
48
  expect do
37
- vcr('sync_page_2') { create_client.sync('https://cdn.contentful.com/spaces/cfexampleapi/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybCr8Okw6AYwqbDksO3ehvDpUPCgcKsKXbCiAwPC8K2w4LDvsOkw6nCjhPDpcOQADElWsOoU8KGR3HCtsOAwqd6wp_Dulp8w6LDsF_CtsK7Kk05wrMvwrLClMOgG2_Dn2sGPg').first_page }
49
+ vcr('sync_page_2') { create_client.sync('https://cdn.contentful.com/spaces/cfexampleapi/environments/master/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybCr8Okw6AYwqbDksO3ehvDpUPCgcKsKXbCiAwPC8K2w4LDvsOkw6nCjhPDpcOQADElWsOoU8KGR3HCtsOAwqd6wp_Dulp8w6LDsF_CtsK7Kk05wrMvwrLClMOgG2_Dn2sGPg').first_page }
38
50
  end.not_to raise_exception
39
51
  end
40
52
  end
@@ -158,7 +170,7 @@ describe Contentful::Sync do
158
170
  }
159
171
  }
160
172
  ],
161
- "nextSyncUrl" => "https://cdn.contentful.com/spaces/cfexampleapi/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybCr8Okw6AYwqbDksO3ehvDpUPCgcKsKXbCiAwPC8K2w4LDvsOkw6nCjhPDpcOQADElWsOoU8KGR3HCtsOAwqd6wp_Dulp8w6LDsF_CtsK7Kk05wrMvwrLClMOgG2_Dn2sGPg"
173
+ "nextSyncUrl" => "https://cdn.contentful.com/spaces/cfexampleapi/environments/master/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdybCr8Okw6AYwqbDksO3ehvDpUPCgcKsKXbCiAwPC8K2w4LDvsOkw6nCjhPDpcOQADElWsOoU8KGR3HCtsOAwqd6wp_Dulp8w6LDsF_CtsK7Kk05wrMvwrLClMOgG2_Dn2sGPg"
162
174
  }
163
175
  vcr('sync_page_short') {
164
176
  expect(@sync.first_page.object).to eql expected
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentful
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 2.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Contentful GmbH (Jan Lelis)
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-04-26 00:00:00.000000000 Z
13
+ date: 2018-04-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: http
@@ -489,6 +489,7 @@ files:
489
489
  - spec/fixtures/vcr_cassettes/sync_deleted_asset.yml
490
490
  - spec/fixtures/vcr_cassettes/sync_deleted_entry.yml
491
491
  - spec/fixtures/vcr_cassettes/sync_deletion.yml
492
+ - spec/fixtures/vcr_cassettes/sync_environment.yml
492
493
  - spec/fixtures/vcr_cassettes/sync_page.yml
493
494
  - spec/fixtures/vcr_cassettes/sync_page_2.yml
494
495
  - spec/fixtures/vcr_cassettes/sync_page_short.yml
@@ -628,6 +629,7 @@ test_files:
628
629
  - spec/fixtures/vcr_cassettes/sync_deleted_asset.yml
629
630
  - spec/fixtures/vcr_cassettes/sync_deleted_entry.yml
630
631
  - spec/fixtures/vcr_cassettes/sync_deletion.yml
632
+ - spec/fixtures/vcr_cassettes/sync_environment.yml
631
633
  - spec/fixtures/vcr_cassettes/sync_page.yml
632
634
  - spec/fixtures/vcr_cassettes/sync_page_2.yml
633
635
  - spec/fixtures/vcr_cassettes/sync_page_short.yml