contentful 2.1.3 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +24 -26
- data/README.md +5 -0
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +2399 -460
- data/coverage/assets/{0.10.1 → 0.10.2}/application.css +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/application.js +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/colorbox/border.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/colorbox/controls.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/colorbox/loading.gif +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/colorbox/loading_background.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/favicon_green.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/favicon_red.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/favicon_yellow.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/loading.gif +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/magnify.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/{0.10.1 → 0.10.2}/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/index.html +17490 -3213
- data/doc/Contentful.html +3 -3
- data/doc/Contentful/AccessDenied.html +1 -1
- data/doc/Contentful/Array.html +1 -1
- data/doc/Contentful/ArrayCoercion.html +7 -7
- data/doc/Contentful/ArrayLike.html +1 -1
- data/doc/Contentful/Asset.html +1 -1
- data/doc/Contentful/BadGateway.html +159 -0
- data/doc/Contentful/BadRequest.html +1 -1
- data/doc/Contentful/BaseCoercion.html +1 -1
- data/doc/Contentful/BaseResource.html +2 -2
- data/doc/Contentful/BooleanCoercion.html +1 -1
- data/doc/Contentful/Client.html +20 -26
- data/doc/Contentful/ContentType.html +7 -1
- data/doc/Contentful/ContentTypeCache.html +1 -1
- data/doc/Contentful/DateCoercion.html +1 -1
- data/doc/Contentful/DeletedAsset.html +1 -1
- data/doc/Contentful/DeletedEntry.html +1 -1
- data/doc/Contentful/Entry.html +1 -1
- data/doc/Contentful/Error.html +16 -28
- data/doc/Contentful/Field.html +1 -1
- data/doc/Contentful/FieldsResource.html +1 -1
- data/doc/Contentful/File.html +8 -308
- data/doc/Contentful/FloatCoercion.html +1 -1
- data/doc/Contentful/IntegerCoercion.html +1 -1
- data/doc/Contentful/Link.html +1 -1
- data/doc/Contentful/LinkCoercion.html +1 -1
- data/doc/Contentful/Locale.html +1 -1
- data/doc/Contentful/Location.html +1 -1
- data/doc/Contentful/LocationCoercion.html +1 -1
- data/doc/Contentful/NotFound.html +1 -1
- data/doc/Contentful/ObjectCoercion.html +2 -2
- data/doc/Contentful/RateLimitExceeded.html +183 -2
- data/doc/Contentful/Request.html +1 -1
- data/doc/Contentful/ResourceBuilder.html +1 -1
- data/doc/Contentful/Response.html +72 -1
- data/doc/Contentful/ServerError.html +1 -1
- data/doc/Contentful/ServiceUnavailable.html +1 -1
- data/doc/Contentful/Space.html +1 -1
- data/doc/Contentful/StringCoercion.html +1 -1
- data/doc/Contentful/Support.html +49 -27
- data/doc/Contentful/SymbolCoercion.html +1 -1
- data/doc/Contentful/Sync.html +1 -1
- data/doc/Contentful/SyncPage.html +1 -1
- data/doc/Contentful/TextCoercion.html +1 -1
- data/doc/Contentful/Unauthorized.html +1 -1
- data/doc/Contentful/UnparsableJson.html +1 -1
- data/doc/Contentful/UnparsableResource.html +1 -1
- data/doc/_index.html +8 -1
- data/doc/class_list.html +1 -1
- data/doc/file.CHANGELOG.html +15 -1
- data/doc/file.LICENSE.html +1 -1
- data/doc/file.README.html +8 -1
- data/doc/index.html +8 -1
- data/doc/method_list.html +147 -155
- data/doc/top-level-namespace.html +1 -1
- data/lib/contentful/asset.rb +2 -2
- data/lib/contentful/base_resource.rb +3 -3
- data/lib/contentful/client.rb +3 -3
- data/lib/contentful/coercions.rb +1 -20
- data/lib/contentful/content_type.rb +2 -0
- data/lib/contentful/entry.rb +4 -2
- data/lib/contentful/error.rb +168 -29
- data/lib/contentful/fields_resource.rb +8 -5
- data/lib/contentful/file.rb +14 -6
- data/lib/contentful/response.rb +5 -4
- data/lib/contentful/support.rb +4 -1
- data/lib/contentful/version.rb +1 -1
- data/spec/asset_spec.rb +9 -0
- data/spec/content_type_spec.rb +10 -0
- data/spec/deleted_asset_spec.rb +10 -0
- data/spec/deleted_entry_spec.rb +10 -0
- data/spec/entry_spec.rb +11 -0
- data/spec/error_class_spec.rb +244 -3
- data/spec/field_spec.rb +21 -0
- data/spec/file_spec.rb +10 -0
- data/spec/fixtures/json_responses/400_details_errors_object.json +14 -0
- data/spec/fixtures/json_responses/400_details_errors_string.json +12 -0
- data/spec/fixtures/json_responses/400_details_string.json +8 -0
- data/spec/fixtures/json_responses/403_reasons.json +13 -0
- data/spec/fixtures/json_responses/404_id.json +11 -0
- data/spec/fixtures/json_responses/404_type.json +10 -0
- data/spec/fixtures/json_responses/default_400.json +7 -0
- data/spec/fixtures/json_responses/default_401.json +7 -0
- data/spec/fixtures/json_responses/default_403.json +7 -0
- data/spec/fixtures/json_responses/default_404.json +7 -0
- data/spec/fixtures/json_responses/default_429.json +7 -0
- data/spec/fixtures/json_responses/default_500.json +7 -0
- data/spec/fixtures/json_responses/default_502.json +7 -0
- data/spec/fixtures/json_responses/default_503.json +7 -0
- data/spec/fixtures/json_responses/other_error.json +9 -0
- data/spec/fixtures/json_responses/other_error_no_details.json +8 -0
- data/spec/fixtures/json_responses/other_error_no_message.json +8 -0
- data/spec/fixtures/json_responses/other_error_no_request_id.json +8 -0
- data/spec/fixtures/json_responses/other_error_nothing.json +6 -0
- data/spec/link_spec.rb +9 -0
- data/spec/support/json_responses.rb +4 -2
- metadata +66 -27
data/spec/link_spec.rb
CHANGED
@@ -38,4 +38,13 @@ describe Contentful::Link do
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
41
|
+
|
42
|
+
describe 'camel case' do
|
43
|
+
it 'supports camel case' do
|
44
|
+
vcr('entry') {
|
45
|
+
space_link = create_client(use_camel_case: true).entry('nyancat').space
|
46
|
+
expect(space_link.linkType).to eq 'Space'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
end
|
41
50
|
end
|
@@ -1,10 +1,12 @@
|
|
1
1
|
require 'multi_json'
|
2
2
|
|
3
|
-
def raw_fixture(which, status = 200, _as_json = false)
|
3
|
+
def raw_fixture(which, status = 200, _as_json = false, headers = {})
|
4
4
|
object = Object.new
|
5
5
|
allow(object).to receive(:status) { status }
|
6
|
-
allow(object).to receive(:headers) {
|
6
|
+
allow(object).to receive(:headers) { headers }
|
7
7
|
allow(object).to receive(:to_s) { File.read File.dirname(__FILE__) + "/../fixtures/json_responses/#{which}.json" }
|
8
|
+
allow(object).to receive(:body) { object.to_s }
|
9
|
+
allow(object).to receive(:[]) { |key| object.headers[key] }
|
8
10
|
|
9
11
|
object
|
10
12
|
end
|
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.
|
4
|
+
version: 2.2.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: 2017-
|
13
|
+
date: 2017-10-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: http
|
@@ -272,30 +272,30 @@ files:
|
|
272
272
|
- coverage/.last_run.json
|
273
273
|
- coverage/.resultset.json
|
274
274
|
- coverage/.resultset.json.lock
|
275
|
-
- coverage/assets/0.10.
|
276
|
-
- coverage/assets/0.10.
|
277
|
-
- coverage/assets/0.10.
|
278
|
-
- coverage/assets/0.10.
|
279
|
-
- coverage/assets/0.10.
|
280
|
-
- coverage/assets/0.10.
|
281
|
-
- coverage/assets/0.10.
|
282
|
-
- coverage/assets/0.10.
|
283
|
-
- coverage/assets/0.10.
|
284
|
-
- coverage/assets/0.10.
|
285
|
-
- coverage/assets/0.10.
|
286
|
-
- coverage/assets/0.10.
|
287
|
-
- coverage/assets/0.10.
|
288
|
-
- coverage/assets/0.10.
|
289
|
-
- coverage/assets/0.10.
|
290
|
-
- coverage/assets/0.10.
|
291
|
-
- coverage/assets/0.10.
|
292
|
-
- coverage/assets/0.10.
|
293
|
-
- coverage/assets/0.10.
|
294
|
-
- coverage/assets/0.10.
|
295
|
-
- coverage/assets/0.10.
|
296
|
-
- coverage/assets/0.10.
|
297
|
-
- coverage/assets/0.10.
|
298
|
-
- coverage/assets/0.10.
|
275
|
+
- coverage/assets/0.10.2/application.css
|
276
|
+
- coverage/assets/0.10.2/application.js
|
277
|
+
- coverage/assets/0.10.2/colorbox/border.png
|
278
|
+
- coverage/assets/0.10.2/colorbox/controls.png
|
279
|
+
- coverage/assets/0.10.2/colorbox/loading.gif
|
280
|
+
- coverage/assets/0.10.2/colorbox/loading_background.png
|
281
|
+
- coverage/assets/0.10.2/favicon_green.png
|
282
|
+
- coverage/assets/0.10.2/favicon_red.png
|
283
|
+
- coverage/assets/0.10.2/favicon_yellow.png
|
284
|
+
- coverage/assets/0.10.2/loading.gif
|
285
|
+
- coverage/assets/0.10.2/magnify.png
|
286
|
+
- coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
|
287
|
+
- coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
|
288
|
+
- coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
|
289
|
+
- coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
|
290
|
+
- coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png
|
291
|
+
- coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
|
292
|
+
- coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
|
293
|
+
- coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
|
294
|
+
- coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png
|
295
|
+
- coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png
|
296
|
+
- coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png
|
297
|
+
- coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png
|
298
|
+
- coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png
|
299
299
|
- coverage/index.html
|
300
300
|
- doc/Contentful.html
|
301
301
|
- doc/Contentful/AccessDenied.html
|
@@ -303,6 +303,7 @@ files:
|
|
303
303
|
- doc/Contentful/ArrayCoercion.html
|
304
304
|
- doc/Contentful/ArrayLike.html
|
305
305
|
- doc/Contentful/Asset.html
|
306
|
+
- doc/Contentful/BadGateway.html
|
306
307
|
- doc/Contentful/BadRequest.html
|
307
308
|
- doc/Contentful/BaseCoercion.html
|
308
309
|
- doc/Contentful/BaseResource.html
|
@@ -403,11 +404,30 @@ files:
|
|
403
404
|
- spec/error_requests_spec.rb
|
404
405
|
- spec/field_spec.rb
|
405
406
|
- spec/file_spec.rb
|
407
|
+
- spec/fixtures/json_responses/400_details_errors_object.json
|
408
|
+
- spec/fixtures/json_responses/400_details_errors_string.json
|
409
|
+
- spec/fixtures/json_responses/400_details_string.json
|
410
|
+
- spec/fixtures/json_responses/403_reasons.json
|
411
|
+
- spec/fixtures/json_responses/404_id.json
|
412
|
+
- spec/fixtures/json_responses/404_type.json
|
406
413
|
- spec/fixtures/json_responses/content_type.json
|
414
|
+
- spec/fixtures/json_responses/default_400.json
|
415
|
+
- spec/fixtures/json_responses/default_401.json
|
416
|
+
- spec/fixtures/json_responses/default_403.json
|
417
|
+
- spec/fixtures/json_responses/default_404.json
|
418
|
+
- spec/fixtures/json_responses/default_429.json
|
419
|
+
- spec/fixtures/json_responses/default_500.json
|
420
|
+
- spec/fixtures/json_responses/default_502.json
|
421
|
+
- spec/fixtures/json_responses/default_503.json
|
407
422
|
- spec/fixtures/json_responses/includes.json
|
408
423
|
- spec/fixtures/json_responses/link_array.json
|
409
424
|
- spec/fixtures/json_responses/not_found.json
|
410
425
|
- spec/fixtures/json_responses/nyancat.json
|
426
|
+
- spec/fixtures/json_responses/other_error.json
|
427
|
+
- spec/fixtures/json_responses/other_error_no_details.json
|
428
|
+
- spec/fixtures/json_responses/other_error_no_message.json
|
429
|
+
- spec/fixtures/json_responses/other_error_no_request_id.json
|
430
|
+
- spec/fixtures/json_responses/other_error_nothing.json
|
411
431
|
- spec/fixtures/json_responses/self_link.json
|
412
432
|
- spec/fixtures/json_responses/unparsable.json
|
413
433
|
- spec/fixtures/vcr_cassettes/array.yml
|
@@ -497,7 +517,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
497
517
|
version: '0'
|
498
518
|
requirements: []
|
499
519
|
rubyforge_project:
|
500
|
-
rubygems_version: 2.6.
|
520
|
+
rubygems_version: 2.6.14
|
501
521
|
signing_key:
|
502
522
|
specification_version: 4
|
503
523
|
summary: contentful
|
@@ -515,11 +535,30 @@ test_files:
|
|
515
535
|
- spec/error_requests_spec.rb
|
516
536
|
- spec/field_spec.rb
|
517
537
|
- spec/file_spec.rb
|
538
|
+
- spec/fixtures/json_responses/400_details_errors_object.json
|
539
|
+
- spec/fixtures/json_responses/400_details_errors_string.json
|
540
|
+
- spec/fixtures/json_responses/400_details_string.json
|
541
|
+
- spec/fixtures/json_responses/403_reasons.json
|
542
|
+
- spec/fixtures/json_responses/404_id.json
|
543
|
+
- spec/fixtures/json_responses/404_type.json
|
518
544
|
- spec/fixtures/json_responses/content_type.json
|
545
|
+
- spec/fixtures/json_responses/default_400.json
|
546
|
+
- spec/fixtures/json_responses/default_401.json
|
547
|
+
- spec/fixtures/json_responses/default_403.json
|
548
|
+
- spec/fixtures/json_responses/default_404.json
|
549
|
+
- spec/fixtures/json_responses/default_429.json
|
550
|
+
- spec/fixtures/json_responses/default_500.json
|
551
|
+
- spec/fixtures/json_responses/default_502.json
|
552
|
+
- spec/fixtures/json_responses/default_503.json
|
519
553
|
- spec/fixtures/json_responses/includes.json
|
520
554
|
- spec/fixtures/json_responses/link_array.json
|
521
555
|
- spec/fixtures/json_responses/not_found.json
|
522
556
|
- spec/fixtures/json_responses/nyancat.json
|
557
|
+
- spec/fixtures/json_responses/other_error.json
|
558
|
+
- spec/fixtures/json_responses/other_error_no_details.json
|
559
|
+
- spec/fixtures/json_responses/other_error_no_message.json
|
560
|
+
- spec/fixtures/json_responses/other_error_no_request_id.json
|
561
|
+
- spec/fixtures/json_responses/other_error_nothing.json
|
523
562
|
- spec/fixtures/json_responses/self_link.json
|
524
563
|
- spec/fixtures/json_responses/unparsable.json
|
525
564
|
- spec/fixtures/vcr_cassettes/array.yml
|