contentful-management 2.12.0 → 2.12.1
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/contentful-management.gemspec +1 -1
- data/lib/contentful/management/entry.rb +14 -12
- data/lib/contentful/management/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/entry/issue_215_1.yml +905 -0
- data/spec/fixtures/vcr_cassettes/entry/issue_215_2.yml +899 -0
- data/spec/fixtures/vcr_cassettes/entry/issue_215_3.yml +893 -0
- data/spec/lib/contentful/management/entry_spec.rb +48 -0
- metadata +13 -7
@@ -866,6 +866,54 @@ 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 'json fields do not get reset on save - #215' do
|
874
|
+
it 'can load a json array, modify it, save it, and retrieve it' do
|
875
|
+
vcr('entry/issue_215_1') {
|
876
|
+
entry = environment.entries.find('30QNJFxJQwLpdqZn8CHsHf')
|
877
|
+
expect(entry.json).to eq([1, 2, 3])
|
878
|
+
|
879
|
+
entry.json = entry.json.map { |e| e + 1 }
|
880
|
+
entry.save
|
881
|
+
|
882
|
+
entry.reload
|
883
|
+
|
884
|
+
expect(entry.json).to eq([2, 3, 4])
|
885
|
+
}
|
886
|
+
end
|
887
|
+
|
888
|
+
it 'can load a json object, modify it, save it, and retrieve it' do
|
889
|
+
vcr('entry/issue_215_2') {
|
890
|
+
entry = environment.entries.find('6kcaBzW7xgjVr825PmGCvP')
|
891
|
+
expect(entry.json).to eq({ "a" => 1 })
|
892
|
+
|
893
|
+
entry.json["a"] = 2
|
894
|
+
entry.save
|
895
|
+
|
896
|
+
entry.reload
|
897
|
+
|
898
|
+
expect(entry.json).to eq({ "a" => 2 })
|
899
|
+
}
|
900
|
+
end
|
901
|
+
|
902
|
+
it 'can load an empty json object, set it, save it, and retrieve it' do
|
903
|
+
vcr('entry/issue_215_3') {
|
904
|
+
entry = environment.entries.find('4aVBlJajh2rZb7ybW2tY2X')
|
905
|
+
expect(entry.json).to be_nil
|
906
|
+
|
907
|
+
entry.json = { "a" => 1 }
|
908
|
+
entry.save
|
909
|
+
|
910
|
+
entry.reload
|
911
|
+
|
912
|
+
expect(entry.json).to eq({ "a" => 1 })
|
913
|
+
}
|
914
|
+
end
|
915
|
+
end
|
916
|
+
|
869
917
|
describe 'can send query parameters when requesting through environment proxy - #160' do
|
870
918
|
it 'can filter by content type and set a limit different than 100' do
|
871
919
|
vcr('entry/issue_160') {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contentful-management
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.12.
|
4
|
+
version: 2.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Protas
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-07-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: http
|
@@ -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:
|
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:
|
96
|
+
version: 12.3.3
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: public_suffix
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -566,6 +566,9 @@ files:
|
|
566
566
|
- spec/fixtures/vcr_cassettes/entry/find.yml
|
567
567
|
- spec/fixtures/vcr_cassettes/entry/find_not_found.yml
|
568
568
|
- spec/fixtures/vcr_cassettes/entry/issue_160.yml
|
569
|
+
- spec/fixtures/vcr_cassettes/entry/issue_215_1.yml
|
570
|
+
- spec/fixtures/vcr_cassettes/entry/issue_215_2.yml
|
571
|
+
- spec/fixtures/vcr_cassettes/entry/issue_215_3.yml
|
569
572
|
- spec/fixtures/vcr_cassettes/entry/issue_61_1.yml
|
570
573
|
- spec/fixtures/vcr_cassettes/entry/issue_61_2.yml
|
571
574
|
- spec/fixtures/vcr_cassettes/entry/issue_61_3.yml
|
@@ -799,7 +802,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
799
802
|
- !ruby/object:Gem::Version
|
800
803
|
version: '0'
|
801
804
|
requirements: []
|
802
|
-
rubygems_version: 3.
|
805
|
+
rubygems_version: 3.1.2
|
803
806
|
signing_key:
|
804
807
|
specification_version: 4
|
805
808
|
summary: contentful management api
|
@@ -970,6 +973,9 @@ test_files:
|
|
970
973
|
- spec/fixtures/vcr_cassettes/entry/find.yml
|
971
974
|
- spec/fixtures/vcr_cassettes/entry/find_not_found.yml
|
972
975
|
- spec/fixtures/vcr_cassettes/entry/issue_160.yml
|
976
|
+
- spec/fixtures/vcr_cassettes/entry/issue_215_1.yml
|
977
|
+
- spec/fixtures/vcr_cassettes/entry/issue_215_2.yml
|
978
|
+
- spec/fixtures/vcr_cassettes/entry/issue_215_3.yml
|
973
979
|
- spec/fixtures/vcr_cassettes/entry/issue_61_1.yml
|
974
980
|
- spec/fixtures/vcr_cassettes/entry/issue_61_2.yml
|
975
981
|
- spec/fixtures/vcr_cassettes/entry/issue_61_3.yml
|