contentful-management 2.10.0 → 2.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -0
  3. data/README.md +30 -13
  4. data/contentful-management.gemspec +4 -3
  5. data/lib/contentful/management/asset.rb +2 -0
  6. data/lib/contentful/management/client.rb +10 -12
  7. data/lib/contentful/management/{client_usage_period_methods_factory.rb → client_organization_periodic_usage_methods_factory.rb} +3 -4
  8. data/lib/contentful/management/{client_api_usage_methods_factory.rb → client_space_periodic_usage_methods_factory.rb} +4 -11
  9. data/lib/contentful/management/entry.rb +16 -12
  10. data/lib/contentful/management/field.rb +3 -1
  11. data/lib/contentful/management/organization.rb +18 -8
  12. data/lib/contentful/management/{api_usage.rb → organization_periodic_usage.rb} +13 -18
  13. data/lib/contentful/management/organization_user_methods_factory.rb +18 -0
  14. data/lib/contentful/management/resource.rb +3 -2
  15. data/lib/contentful/management/resource/metadata.rb +48 -0
  16. data/lib/contentful/management/resource_builder.rb +8 -6
  17. data/lib/contentful/management/space.rb +10 -0
  18. data/lib/contentful/management/{usage_period.rb → space_periodic_usage.rb} +12 -9
  19. data/lib/contentful/management/space_user_methods_factory.rb +19 -0
  20. data/lib/contentful/management/tag.rb +14 -0
  21. data/lib/contentful/management/user.rb +7 -1
  22. data/lib/contentful/management/validation.rb +6 -1
  23. data/lib/contentful/management/version.rb +1 -1
  24. data/spec/fixtures/vcr_cassettes/asset/issue_219.yml +442 -0
  25. data/spec/fixtures/vcr_cassettes/entry/issue_215_1.yml +905 -0
  26. data/spec/fixtures/vcr_cassettes/entry/issue_215_2.yml +899 -0
  27. data/spec/fixtures/vcr_cassettes/entry/issue_215_3.yml +893 -0
  28. data/spec/fixtures/vcr_cassettes/entry/issue_219.yml +535 -0
  29. data/spec/fixtures/vcr_cassettes/organization/user.yml +238 -0
  30. data/spec/fixtures/vcr_cassettes/organization_periodic_usage/all.yml +368 -0
  31. data/spec/fixtures/vcr_cassettes/organization_periodic_usage/filters.yml +167 -0
  32. data/spec/fixtures/vcr_cassettes/space/user.yml +254 -0
  33. data/spec/fixtures/vcr_cassettes/space_periodic_usage/all.yml +6800 -0
  34. data/spec/fixtures/vcr_cassettes/space_periodic_usage/filters.yml +1976 -0
  35. data/spec/lib/contentful/management/asset_spec.rb +31 -0
  36. data/spec/lib/contentful/management/entry_spec.rb +77 -0
  37. data/spec/lib/contentful/management/organization_periodic_usage_spec.rb +36 -0
  38. data/spec/lib/contentful/management/organization_spec.rb +20 -0
  39. data/spec/lib/contentful/management/space_periodic_usage_spec.rb +36 -0
  40. data/spec/lib/contentful/management/space_spec.rb +20 -0
  41. metadata +60 -30
  42. data/spec/fixtures/vcr_cassettes/api_usage/all.yml +0 -155
  43. data/spec/fixtures/vcr_cassettes/usage_period/all.yml +0 -114
  44. data/spec/lib/contentful/management/api_usage_spec.rb +0 -28
  45. data/spec/lib/contentful/management/usage_period_spec.rb +0 -27
@@ -457,6 +457,37 @@ module Contentful
457
457
  end
458
458
 
459
459
  describe 'issues' do
460
+ describe 'metadata and tags do not break entry fetching - #219' do
461
+ let(:space_id) { '2l3j7k267g9k' }
462
+ let(:space) { client.spaces.find(space_id) }
463
+ let(:environment) { space.environments.find('master') }
464
+ let(:asset_id) { '2lxYoWv3LWHe0yhO3w2Yid' }
465
+
466
+ it 'can load an entry with tags' do
467
+ vcr('asset/issue_219') {
468
+ expect {
469
+ entry = environment.assets.find(asset_id)
470
+ }.not_to raise_error
471
+ }
472
+ end
473
+
474
+ it 'hydrates tags' do
475
+ vcr('asset/issue_219') {
476
+ asset = environment.assets.find(asset_id)
477
+ expect(asset.metadata[:tags].first).to be_a Contentful::Management::Link
478
+ }
479
+ end
480
+
481
+ it 'loads tag links with their proper attributes' do
482
+ vcr('asset/issue_219') {
483
+ asset = environment.assets.find(asset_id)
484
+ tag = asset.metadata[:tags].first
485
+ expect(tag.id).to eq 'mobQa'
486
+ expect(tag.link_type).to eq 'Tag'
487
+ }
488
+ end
489
+ end
490
+
460
491
  describe "Pagination on assets doesn't work without first calling limit - #143" do
461
492
  it 'shouldnt break on next page without parameters on original query' do
462
493
  vcr('asset/143_assets_next_page') do
@@ -866,6 +866,83 @@ describe Contentful::Management::Entry do
866
866
  end
867
867
 
868
868
  describe 'issues' do
869
+ let(:space_id) { 'vuo79u060fmw' }
870
+ let(:space) { client.spaces.find(space_id) }
871
+ let(:environment) { space.environments.find('master') }
872
+
873
+ describe 'metadata and tags do not break entry fetching - #219' do
874
+ let(:space_id) { '2l3j7k267g9k' }
875
+ let(:entry_id) { '2AtqG09C50s7kE66POudAV' }
876
+
877
+ it 'can load an entry with tags' do
878
+ vcr('entry/issue_219') {
879
+ expect {
880
+ entry = environment.entries.find(entry_id)
881
+ }.not_to raise_error
882
+ }
883
+ end
884
+
885
+ it 'hydrates tags' do
886
+ vcr('entry/issue_219') {
887
+ entry = environment.entries.find(entry_id)
888
+ expect(entry.metadata[:tags].first).to be_a Contentful::Management::Link
889
+ }
890
+ end
891
+
892
+ it 'loads tag links with their proper attributes' do
893
+ vcr('entry/issue_219') {
894
+ entry = environment.entries.find(entry_id)
895
+ tag = entry.metadata[:tags].first
896
+ expect(tag.id).to eq 'mobQa'
897
+ expect(tag.link_type).to eq 'Tag'
898
+ }
899
+ end
900
+ end
901
+
902
+ describe 'json fields do not get reset on save - #215' do
903
+ it 'can load a json array, modify it, save it, and retrieve it' do
904
+ vcr('entry/issue_215_1') {
905
+ entry = environment.entries.find('30QNJFxJQwLpdqZn8CHsHf')
906
+ expect(entry.json).to eq([1, 2, 3])
907
+
908
+ entry.json = entry.json.map { |e| e + 1 }
909
+ entry.save
910
+
911
+ entry.reload
912
+
913
+ expect(entry.json).to eq([2, 3, 4])
914
+ }
915
+ end
916
+
917
+ it 'can load a json object, modify it, save it, and retrieve it' do
918
+ vcr('entry/issue_215_2') {
919
+ entry = environment.entries.find('6kcaBzW7xgjVr825PmGCvP')
920
+ expect(entry.json).to eq({ "a" => 1 })
921
+
922
+ entry.json["a"] = 2
923
+ entry.save
924
+
925
+ entry.reload
926
+
927
+ expect(entry.json).to eq({ "a" => 2 })
928
+ }
929
+ end
930
+
931
+ it 'can load an empty json object, set it, save it, and retrieve it' do
932
+ vcr('entry/issue_215_3') {
933
+ entry = environment.entries.find('4aVBlJajh2rZb7ybW2tY2X')
934
+ expect(entry.json).to be_nil
935
+
936
+ entry.json = { "a" => 1 }
937
+ entry.save
938
+
939
+ entry.reload
940
+
941
+ expect(entry.json).to eq({ "a" => 1 })
942
+ }
943
+ end
944
+ end
945
+
869
946
  describe 'can send query parameters when requesting through environment proxy - #160' do
870
947
  it 'can filter by content type and set a limit different than 100' do
871
948
  vcr('entry/issue_160') {
@@ -0,0 +1,36 @@
1
+ require 'spec_helper'
2
+ require 'contentful/management/space'
3
+ require 'contentful/management/client'
4
+
5
+ module Contentful
6
+ module Management
7
+ describe OrganizationPeriodicUsage do
8
+ let(:token) { ENV.fetch('CF_TEST_CMA_TOKEN', '<ACCESS_TOKEN>') }
9
+ let(:organization_id) { 'org_id' }
10
+
11
+ let!(:client) { Client.new(token) }
12
+
13
+ subject { client.organization_periodic_usages(organization_id) }
14
+
15
+ describe '.all' do
16
+ it 'class method also works' do
17
+ vcr('organization_periodic_usage/all') { expect(Contentful::Management::OrganizationPeriodicUsage.all(client, organization_id)).to be_kind_of Contentful::Management::Array }
18
+ end
19
+ it 'returns a Contentful::Array' do
20
+ vcr('organization_periodic_usage/all') { expect(subject.all).to be_kind_of Contentful::Management::Array }
21
+ end
22
+ it 'builds a Contentful::Management::OrganizationPeriodicUsage object' do
23
+ vcr('organization_periodic_usage/all') { expect(subject.all.first).to be_kind_of Contentful::Management::OrganizationPeriodicUsage }
24
+ end
25
+ it 'builds a Contentful::Management::OrganizationPeriodicUsage object' do
26
+ vcr('organization_periodic_usage/filters') {
27
+ result = subject.all('metric[in]' => 'cda')
28
+ expect(result.size).to eq 1
29
+ expect(result.first).to be_kind_of Contentful::Management::OrganizationPeriodicUsage
30
+ expect(result.first.metric).to eq 'cda'
31
+ }
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -28,6 +28,26 @@ module Contentful
28
28
  expect { subject.find }.to raise_error 'Not supported'
29
29
  end
30
30
  end
31
+
32
+ describe "users" do
33
+ describe '.find' do
34
+ it "should fetch the user if under the organizaton id" do
35
+ vcr('organization/user') {
36
+ organization = subject.all.first
37
+ user = organization.users.find('user_id')
38
+
39
+ expect(user).to be_a Contentful::Management::User
40
+ expect(user.first_name).to eq 'Bhushan'
41
+ expect(user.last_name).to eq 'Lodha'
42
+ expect(user.email).to eq 'bhushanlodha@gmail.com'
43
+ expect(user.activated).to eq true
44
+ expect(user.confirmed).to eq true
45
+ expect(user.sign_in_count).to eq 42
46
+ expect(user.avatar_url).to be_truthy
47
+ }
48
+ end
49
+ end
50
+ end
31
51
  end
32
52
  end
33
53
  end
@@ -0,0 +1,36 @@
1
+ require 'spec_helper'
2
+ require 'contentful/management/space'
3
+ require 'contentful/management/client'
4
+
5
+ module Contentful
6
+ module Management
7
+ describe SpacePeriodicUsage do
8
+ let(:token) { ENV.fetch('CF_TEST_CMA_TOKEN', '<ACCESS_TOKEN>') }
9
+ let(:organization_id) { 'org_id' }
10
+
11
+ let!(:client) { Client.new(token) }
12
+
13
+ subject { client.space_periodic_usages(organization_id) }
14
+
15
+ describe '.all' do
16
+ it 'class method also works' do
17
+ vcr('space_periodic_usage/all') { expect(Contentful::Management::SpacePeriodicUsage.all(client, organization_id)).to be_kind_of Contentful::Management::Array }
18
+ end
19
+ it 'returns a Contentful::Array' do
20
+ vcr('space_periodic_usage/all') { expect(subject.all).to be_kind_of Contentful::Management::Array }
21
+ end
22
+ it 'builds a Contentful::Management::SpacePeriodicUsage object' do
23
+ vcr('space_periodic_usage/all') { expect(subject.all.first).to be_kind_of Contentful::Management::SpacePeriodicUsage }
24
+ end
25
+ it 'builds a Contentful::Management::SpacePeriodicUsage object' do
26
+ vcr('space_periodic_usage/filters') {
27
+ result = subject.all('metric[in]' => 'cda')
28
+ expect(result.all? { |pu| pu.metric == 'cda' }).to be_truthy
29
+ expect(result.first).to be_kind_of Contentful::Management::SpacePeriodicUsage
30
+ expect(result.first.metric).to eq 'cda'
31
+ }
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -240,6 +240,26 @@ module Contentful
240
240
  }
241
241
  end
242
242
  end
243
+
244
+ describe "users" do
245
+ describe "find" do
246
+ it "should fetch the user if under the space id" do
247
+ vcr('space/user') {
248
+ space = subject.find('space_id')
249
+ user = space.users.find('user_id')
250
+
251
+ expect(user).to be_a Contentful::Management::User
252
+ expect(user.first_name).to eq 'Bhushan'
253
+ expect(user.last_name).to eq 'Test'
254
+ expect(user.email).to eq 'bhushanlodha@gmail.com'
255
+ expect(user.activated).to eq true
256
+ expect(user.confirmed).to eq true
257
+ expect(user.sign_in_count).to eq 42
258
+ expect(user.avatar_url).to be_truthy
259
+ }
260
+ end
261
+ end
262
+ end
243
263
  end
244
264
  end
245
265
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentful-management
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.0
4
+ version: 2.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Protas
8
8
  - Tomasz Warkocki
9
9
  - Contentful GmbH (Andreas Tiefenthaler)
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-06-12 00:00:00.000000000 Z
13
+ date: 2021-01-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: http
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '1.0'
22
22
  - - "<"
23
23
  - !ruby/object:Gem::Version
24
- version: '3.0'
24
+ version: '5.0'
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
@@ -31,7 +31,7 @@ dependencies:
31
31
  version: '1.0'
32
32
  - - "<"
33
33
  - !ruby/object:Gem::Version
34
- version: '3.0'
34
+ version: '5.0'
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: multi_json
37
37
  requirement: !ruby/object:Gem::Requirement
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "<"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '11.0'
89
+ version: 12.3.3
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "<"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '11.0'
96
+ version: 12.3.3
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: public_suffix
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -238,22 +238,30 @@ dependencies:
238
238
  name: webmock
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
- - - "~>"
242
- - !ruby/object:Gem::Version
243
- version: '1'
244
241
  - - ">="
245
242
  - !ruby/object:Gem::Version
246
- version: 1.17.3
243
+ version: '0'
247
244
  type: :development
248
245
  prerelease: false
249
246
  version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - ">="
249
+ - !ruby/object:Gem::Version
250
+ version: '0'
251
+ - !ruby/object:Gem::Dependency
252
+ name: tins
253
+ requirement: !ruby/object:Gem::Requirement
250
254
  requirements:
251
255
  - - "~>"
252
256
  - !ruby/object:Gem::Version
253
- version: '1'
254
- - - ">="
257
+ version: 1.6.0
258
+ type: :development
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - "~>"
255
263
  - !ruby/object:Gem::Version
256
- version: 1.17.3
264
+ version: 1.6.0
257
265
  - !ruby/object:Gem::Dependency
258
266
  name: simplecov
259
267
  requirement: !ruby/object:Gem::Requirement
@@ -299,12 +307,10 @@ files:
299
307
  - examples/create_space.rb
300
308
  - lib/contentful/management.rb
301
309
  - lib/contentful/management/api_key.rb
302
- - lib/contentful/management/api_usage.rb
303
310
  - lib/contentful/management/array.rb
304
311
  - lib/contentful/management/asset.rb
305
312
  - lib/contentful/management/client.rb
306
313
  - lib/contentful/management/client_api_key_methods_factory.rb
307
- - lib/contentful/management/client_api_usage_methods_factory.rb
308
314
  - lib/contentful/management/client_asset_methods_factory.rb
309
315
  - lib/contentful/management/client_association_all_published_method_factory.rb
310
316
  - lib/contentful/management/client_association_methods_factory.rb
@@ -314,15 +320,16 @@ files:
314
320
  - lib/contentful/management/client_environment_methods_factory.rb
315
321
  - lib/contentful/management/client_locale_methods_factory.rb
316
322
  - lib/contentful/management/client_organization_methods_factory.rb
323
+ - lib/contentful/management/client_organization_periodic_usage_methods_factory.rb
317
324
  - lib/contentful/management/client_personal_access_tokens_methods_factory.rb
318
325
  - lib/contentful/management/client_preview_api_key_methods_factory.rb
319
326
  - lib/contentful/management/client_role_methods_factory.rb
320
327
  - lib/contentful/management/client_snapshot_methods_factory.rb
321
328
  - lib/contentful/management/client_space_membership_methods_factory.rb
322
329
  - lib/contentful/management/client_space_methods_factory.rb
330
+ - lib/contentful/management/client_space_periodic_usage_methods_factory.rb
323
331
  - lib/contentful/management/client_ui_extension_methods_factory.rb
324
332
  - lib/contentful/management/client_upload_methods_factory.rb
325
- - lib/contentful/management/client_usage_period_methods_factory.rb
326
333
  - lib/contentful/management/client_user_methods_factory.rb
327
334
  - lib/contentful/management/client_webhook_call_methods_factory.rb
328
335
  - lib/contentful/management/client_webhook_health_methods_factory.rb
@@ -351,6 +358,8 @@ files:
351
358
  - lib/contentful/management/locale.rb
352
359
  - lib/contentful/management/location.rb
353
360
  - lib/contentful/management/organization.rb
361
+ - lib/contentful/management/organization_periodic_usage.rb
362
+ - lib/contentful/management/organization_user_methods_factory.rb
354
363
  - lib/contentful/management/personal_access_token.rb
355
364
  - lib/contentful/management/preview_api_key.rb
356
365
  - lib/contentful/management/request.rb
@@ -363,6 +372,7 @@ files:
363
372
  - lib/contentful/management/resource/environment_aware.rb
364
373
  - lib/contentful/management/resource/field_aware.rb
365
374
  - lib/contentful/management/resource/fields.rb
375
+ - lib/contentful/management/resource/metadata.rb
366
376
  - lib/contentful/management/resource/publisher.rb
367
377
  - lib/contentful/management/resource/refresher.rb
368
378
  - lib/contentful/management/resource/system_properties.rb
@@ -376,14 +386,16 @@ files:
376
386
  - lib/contentful/management/space_association_methods_factory.rb
377
387
  - lib/contentful/management/space_environment_methods_factory.rb
378
388
  - lib/contentful/management/space_membership.rb
389
+ - lib/contentful/management/space_periodic_usage.rb
379
390
  - lib/contentful/management/space_preview_api_key_methods_factory.rb
380
391
  - lib/contentful/management/space_role_methods_factory.rb
381
392
  - lib/contentful/management/space_space_membership_methods_factory.rb
393
+ - lib/contentful/management/space_user_methods_factory.rb
382
394
  - lib/contentful/management/space_webhook_methods_factory.rb
383
395
  - lib/contentful/management/support.rb
396
+ - lib/contentful/management/tag.rb
384
397
  - lib/contentful/management/ui_extension.rb
385
398
  - lib/contentful/management/upload.rb
386
- - lib/contentful/management/usage_period.rb
387
399
  - lib/contentful/management/user.rb
388
400
  - lib/contentful/management/validation.rb
389
401
  - lib/contentful/management/version.rb
@@ -425,7 +437,6 @@ files:
425
437
  - spec/fixtures/vcr_cassettes/api_key/find_for_space_not_found.yml
426
438
  - spec/fixtures/vcr_cassettes/api_key/issue_189.yml
427
439
  - spec/fixtures/vcr_cassettes/api_key/preview.yml
428
- - spec/fixtures/vcr_cassettes/api_usage/all.yml
429
440
  - spec/fixtures/vcr_cassettes/array_page_1.yml
430
441
  - spec/fixtures/vcr_cassettes/asset/143_assets_next_page.yml
431
442
  - spec/fixtures/vcr_cassettes/asset/196_environment_id.yml
@@ -442,6 +453,7 @@ files:
442
453
  - spec/fixtures/vcr_cassettes/asset/destroy_published.yml
443
454
  - spec/fixtures/vcr_cassettes/asset/find.yml
444
455
  - spec/fixtures/vcr_cassettes/asset/find_not_found.yml
456
+ - spec/fixtures/vcr_cassettes/asset/issue_219.yml
445
457
  - spec/fixtures/vcr_cassettes/asset/limited_assets_next_page.yml
446
458
  - spec/fixtures/vcr_cassettes/asset/locale.yml
447
459
  - spec/fixtures/vcr_cassettes/asset/process.yml
@@ -559,6 +571,10 @@ files:
559
571
  - spec/fixtures/vcr_cassettes/entry/find.yml
560
572
  - spec/fixtures/vcr_cassettes/entry/find_not_found.yml
561
573
  - spec/fixtures/vcr_cassettes/entry/issue_160.yml
574
+ - spec/fixtures/vcr_cassettes/entry/issue_215_1.yml
575
+ - spec/fixtures/vcr_cassettes/entry/issue_215_2.yml
576
+ - spec/fixtures/vcr_cassettes/entry/issue_215_3.yml
577
+ - spec/fixtures/vcr_cassettes/entry/issue_219.yml
562
578
  - spec/fixtures/vcr_cassettes/entry/issue_61_1.yml
563
579
  - spec/fixtures/vcr_cassettes/entry/issue_61_2.yml
564
580
  - spec/fixtures/vcr_cassettes/entry/issue_61_3.yml
@@ -639,6 +655,9 @@ files:
639
655
  - spec/fixtures/vcr_cassettes/locale/update_code.yml
640
656
  - spec/fixtures/vcr_cassettes/locale/update_name.yml
641
657
  - spec/fixtures/vcr_cassettes/organization/all.yml
658
+ - spec/fixtures/vcr_cassettes/organization/user.yml
659
+ - spec/fixtures/vcr_cassettes/organization_periodic_usage/all.yml
660
+ - spec/fixtures/vcr_cassettes/organization_periodic_usage/filters.yml
642
661
  - spec/fixtures/vcr_cassettes/personal_access_token/all.yml
643
662
  - spec/fixtures/vcr_cassettes/personal_access_token/create.yml
644
663
  - spec/fixtures/vcr_cassettes/personal_access_token/find.yml
@@ -706,6 +725,7 @@ files:
706
725
  - spec/fixtures/vcr_cassettes/space/save_update_space.yml
707
726
  - spec/fixtures/vcr_cassettes/space/update.yml
708
727
  - spec/fixtures/vcr_cassettes/space/update_with_the_same_data.yml
728
+ - spec/fixtures/vcr_cassettes/space/user.yml
709
729
  - spec/fixtures/vcr_cassettes/space/webhook/all.yml
710
730
  - spec/fixtures/vcr_cassettes/space/webhook/create.yml
711
731
  - spec/fixtures/vcr_cassettes/space/webhook/find.yml
@@ -714,6 +734,8 @@ files:
714
734
  - spec/fixtures/vcr_cassettes/space_memberships/delete.yml
715
735
  - spec/fixtures/vcr_cassettes/space_memberships/find.yml
716
736
  - spec/fixtures/vcr_cassettes/space_memberships/find_2.yml
737
+ - spec/fixtures/vcr_cassettes/space_periodic_usage/all.yml
738
+ - spec/fixtures/vcr_cassettes/space_periodic_usage/filters.yml
717
739
  - spec/fixtures/vcr_cassettes/ui_extension/all.yml
718
740
  - spec/fixtures/vcr_cassettes/ui_extension/create.yml
719
741
  - spec/fixtures/vcr_cassettes/ui_extension/create_parameters.yml
@@ -725,7 +747,6 @@ files:
725
747
  - spec/fixtures/vcr_cassettes/upload/destroy.yml
726
748
  - spec/fixtures/vcr_cassettes/upload/find.yml
727
749
  - spec/fixtures/vcr_cassettes/upload/find_not_found.yml
728
- - spec/fixtures/vcr_cassettes/usage_period/all.yml
729
750
  - spec/fixtures/vcr_cassettes/user/find.yml
730
751
  - spec/fixtures/vcr_cassettes/webhook/all.yml
731
752
  - spec/fixtures/vcr_cassettes/webhook/create.yml
@@ -744,7 +765,6 @@ files:
744
765
  - spec/fixtures/vcr_cassettes/webhook_call/find_not_found.yml
745
766
  - spec/fixtures/vcr_cassettes/webhook_health/find.yml
746
767
  - spec/lib/contentful/management/api_key_spec.rb
747
- - spec/lib/contentful/management/api_usage_spec.rb
748
768
  - spec/lib/contentful/management/array_spec.rb
749
769
  - spec/lib/contentful/management/asset_spec.rb
750
770
  - spec/lib/contentful/management/client_spec.rb
@@ -754,15 +774,16 @@ files:
754
774
  - spec/lib/contentful/management/environment_spec.rb
755
775
  - spec/lib/contentful/management/error_class_spec.rb
756
776
  - spec/lib/contentful/management/locale_spec.rb
777
+ - spec/lib/contentful/management/organization_periodic_usage_spec.rb
757
778
  - spec/lib/contentful/management/organization_spec.rb
758
779
  - spec/lib/contentful/management/personal_access_token_spec.rb
759
780
  - spec/lib/contentful/management/role_spec.rb
760
781
  - spec/lib/contentful/management/snapshot_spec.rb
761
782
  - spec/lib/contentful/management/space_membership_spec.rb
783
+ - spec/lib/contentful/management/space_periodic_usage_spec.rb
762
784
  - spec/lib/contentful/management/space_spec.rb
763
785
  - spec/lib/contentful/management/ui_extension_spec.rb
764
786
  - spec/lib/contentful/management/upload_spec.rb
765
- - spec/lib/contentful/management/usage_period_spec.rb
766
787
  - spec/lib/contentful/management/user_spec.rb
767
788
  - spec/lib/contentful/management/webhook_calls_spec.rb
768
789
  - spec/lib/contentful/management/webhook_health_spec.rb
@@ -774,7 +795,7 @@ homepage: https://github.com/contentful/contentful-management.rb
774
795
  licenses:
775
796
  - MIT
776
797
  metadata: {}
777
- post_install_message:
798
+ post_install_message:
778
799
  rdoc_options: []
779
800
  require_paths:
780
801
  - lib
@@ -790,7 +811,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
790
811
  version: '0'
791
812
  requirements: []
792
813
  rubygems_version: 3.0.3
793
- signing_key:
814
+ signing_key:
794
815
  specification_version: 4
795
816
  summary: contentful management api
796
817
  test_files:
@@ -827,7 +848,6 @@ test_files:
827
848
  - spec/fixtures/vcr_cassettes/api_key/find_for_space_not_found.yml
828
849
  - spec/fixtures/vcr_cassettes/api_key/issue_189.yml
829
850
  - spec/fixtures/vcr_cassettes/api_key/preview.yml
830
- - spec/fixtures/vcr_cassettes/api_usage/all.yml
831
851
  - spec/fixtures/vcr_cassettes/array_page_1.yml
832
852
  - spec/fixtures/vcr_cassettes/asset/143_assets_next_page.yml
833
853
  - spec/fixtures/vcr_cassettes/asset/196_environment_id.yml
@@ -844,6 +864,7 @@ test_files:
844
864
  - spec/fixtures/vcr_cassettes/asset/destroy_published.yml
845
865
  - spec/fixtures/vcr_cassettes/asset/find.yml
846
866
  - spec/fixtures/vcr_cassettes/asset/find_not_found.yml
867
+ - spec/fixtures/vcr_cassettes/asset/issue_219.yml
847
868
  - spec/fixtures/vcr_cassettes/asset/limited_assets_next_page.yml
848
869
  - spec/fixtures/vcr_cassettes/asset/locale.yml
849
870
  - spec/fixtures/vcr_cassettes/asset/process.yml
@@ -961,6 +982,10 @@ test_files:
961
982
  - spec/fixtures/vcr_cassettes/entry/find.yml
962
983
  - spec/fixtures/vcr_cassettes/entry/find_not_found.yml
963
984
  - spec/fixtures/vcr_cassettes/entry/issue_160.yml
985
+ - spec/fixtures/vcr_cassettes/entry/issue_215_1.yml
986
+ - spec/fixtures/vcr_cassettes/entry/issue_215_2.yml
987
+ - spec/fixtures/vcr_cassettes/entry/issue_215_3.yml
988
+ - spec/fixtures/vcr_cassettes/entry/issue_219.yml
964
989
  - spec/fixtures/vcr_cassettes/entry/issue_61_1.yml
965
990
  - spec/fixtures/vcr_cassettes/entry/issue_61_2.yml
966
991
  - spec/fixtures/vcr_cassettes/entry/issue_61_3.yml
@@ -1041,6 +1066,9 @@ test_files:
1041
1066
  - spec/fixtures/vcr_cassettes/locale/update_code.yml
1042
1067
  - spec/fixtures/vcr_cassettes/locale/update_name.yml
1043
1068
  - spec/fixtures/vcr_cassettes/organization/all.yml
1069
+ - spec/fixtures/vcr_cassettes/organization/user.yml
1070
+ - spec/fixtures/vcr_cassettes/organization_periodic_usage/all.yml
1071
+ - spec/fixtures/vcr_cassettes/organization_periodic_usage/filters.yml
1044
1072
  - spec/fixtures/vcr_cassettes/personal_access_token/all.yml
1045
1073
  - spec/fixtures/vcr_cassettes/personal_access_token/create.yml
1046
1074
  - spec/fixtures/vcr_cassettes/personal_access_token/find.yml
@@ -1108,6 +1136,7 @@ test_files:
1108
1136
  - spec/fixtures/vcr_cassettes/space/save_update_space.yml
1109
1137
  - spec/fixtures/vcr_cassettes/space/update.yml
1110
1138
  - spec/fixtures/vcr_cassettes/space/update_with_the_same_data.yml
1139
+ - spec/fixtures/vcr_cassettes/space/user.yml
1111
1140
  - spec/fixtures/vcr_cassettes/space/webhook/all.yml
1112
1141
  - spec/fixtures/vcr_cassettes/space/webhook/create.yml
1113
1142
  - spec/fixtures/vcr_cassettes/space/webhook/find.yml
@@ -1116,6 +1145,8 @@ test_files:
1116
1145
  - spec/fixtures/vcr_cassettes/space_memberships/delete.yml
1117
1146
  - spec/fixtures/vcr_cassettes/space_memberships/find.yml
1118
1147
  - spec/fixtures/vcr_cassettes/space_memberships/find_2.yml
1148
+ - spec/fixtures/vcr_cassettes/space_periodic_usage/all.yml
1149
+ - spec/fixtures/vcr_cassettes/space_periodic_usage/filters.yml
1119
1150
  - spec/fixtures/vcr_cassettes/ui_extension/all.yml
1120
1151
  - spec/fixtures/vcr_cassettes/ui_extension/create.yml
1121
1152
  - spec/fixtures/vcr_cassettes/ui_extension/create_parameters.yml
@@ -1127,7 +1158,6 @@ test_files:
1127
1158
  - spec/fixtures/vcr_cassettes/upload/destroy.yml
1128
1159
  - spec/fixtures/vcr_cassettes/upload/find.yml
1129
1160
  - spec/fixtures/vcr_cassettes/upload/find_not_found.yml
1130
- - spec/fixtures/vcr_cassettes/usage_period/all.yml
1131
1161
  - spec/fixtures/vcr_cassettes/user/find.yml
1132
1162
  - spec/fixtures/vcr_cassettes/webhook/all.yml
1133
1163
  - spec/fixtures/vcr_cassettes/webhook/create.yml
@@ -1146,7 +1176,6 @@ test_files:
1146
1176
  - spec/fixtures/vcr_cassettes/webhook_call/find_not_found.yml
1147
1177
  - spec/fixtures/vcr_cassettes/webhook_health/find.yml
1148
1178
  - spec/lib/contentful/management/api_key_spec.rb
1149
- - spec/lib/contentful/management/api_usage_spec.rb
1150
1179
  - spec/lib/contentful/management/array_spec.rb
1151
1180
  - spec/lib/contentful/management/asset_spec.rb
1152
1181
  - spec/lib/contentful/management/client_spec.rb
@@ -1156,15 +1185,16 @@ test_files:
1156
1185
  - spec/lib/contentful/management/environment_spec.rb
1157
1186
  - spec/lib/contentful/management/error_class_spec.rb
1158
1187
  - spec/lib/contentful/management/locale_spec.rb
1188
+ - spec/lib/contentful/management/organization_periodic_usage_spec.rb
1159
1189
  - spec/lib/contentful/management/organization_spec.rb
1160
1190
  - spec/lib/contentful/management/personal_access_token_spec.rb
1161
1191
  - spec/lib/contentful/management/role_spec.rb
1162
1192
  - spec/lib/contentful/management/snapshot_spec.rb
1163
1193
  - spec/lib/contentful/management/space_membership_spec.rb
1194
+ - spec/lib/contentful/management/space_periodic_usage_spec.rb
1164
1195
  - spec/lib/contentful/management/space_spec.rb
1165
1196
  - spec/lib/contentful/management/ui_extension_spec.rb
1166
1197
  - spec/lib/contentful/management/upload_spec.rb
1167
- - spec/lib/contentful/management/usage_period_spec.rb
1168
1198
  - spec/lib/contentful/management/user_spec.rb
1169
1199
  - spec/lib/contentful/management/webhook_calls_spec.rb
1170
1200
  - spec/lib/contentful/management/webhook_health_spec.rb