contentful-management 2.1.1 → 2.2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d377237ac5fae9287e980db31e4968afa5b8ecd1628ffdc2adce1035332b57a8
|
4
|
+
data.tar.gz: 3a5116a7e471a60e25baa932e64efaef17a0c3b5866a8223c2d124dff4ef2b33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91fce556a7f693dd2f8d08970eabfbc576cd40b21be13abfbb385ad42cba7fdab347b22f68dde00593753777516f6620592348b34a75b0838c76a2350f6712a0
|
7
|
+
data.tar.gz: cd4b54ccd6a43acecb2d021096b4dd5e1142e6fd3327d2c217b38ce3e0df7d1a796162321d6f81eeec3652485df3a989b54dc7fa80d7c0ea94b486d2a5a0f0ec
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
## Master
|
4
4
|
|
5
|
+
## 2.2.0
|
6
|
+
### Added
|
7
|
+
* Added `#save` as a shortcut for `editor_interface.update(controls: editor_interface.controls)`. [#155](https://github.com/contentful/contentful-management.rb/issues/155)
|
8
|
+
|
5
9
|
## 2.1.1
|
6
10
|
### Fixed
|
7
11
|
* Fixed query parameter forwarding when querying from an environment proxy. [#160](https://github.com/contentful/contentful-management.rb/issues/160)
|
@@ -71,6 +71,14 @@ module Contentful
|
|
71
71
|
)
|
72
72
|
end
|
73
73
|
|
74
|
+
# Saves the current editor interface.
|
75
|
+
# @see _ README for details.
|
76
|
+
#
|
77
|
+
# @return [Contentful::Management::EditorInterface]
|
78
|
+
def save
|
79
|
+
update(controls: controls) if id
|
80
|
+
end
|
81
|
+
|
74
82
|
# Destroys an EditorInterface.
|
75
83
|
#
|
76
84
|
# Not Supported
|
@@ -5,7 +5,7 @@ require 'contentful/management/client'
|
|
5
5
|
module Contentful
|
6
6
|
module Management
|
7
7
|
describe EditorInterface do
|
8
|
-
let(:token) { '<ACCESS_TOKEN>' }
|
8
|
+
let(:token) { ENV.fetch('CF_TEST_CMA_TOKEN', '<ACCESS_TOKEN>') }
|
9
9
|
let(:space_id) { 'oe3b689om6k5' }
|
10
10
|
let(:content_type_id) { 'testInterfaces' }
|
11
11
|
let(:editor_interface_id) { 'default' }
|
@@ -52,6 +52,25 @@ module Contentful
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
55
|
+
|
56
|
+
describe '#save' do
|
57
|
+
let(:content_type_id) { 'smallerType' }
|
58
|
+
|
59
|
+
it 'can update the editor_interface - a shortcut to #update(controls: editor_interface.controls)' do
|
60
|
+
vcr('editor_interfaces/update') do
|
61
|
+
editor_interface = described_class.default(client, space_id, 'master', content_type_id)
|
62
|
+
|
63
|
+
expect(editor_interface.controls.first['widgetId']).to eq 'singleline'
|
64
|
+
|
65
|
+
editor_interface.controls.first['widgetId'] = 'urlEditor'
|
66
|
+
editor_interface.save
|
67
|
+
|
68
|
+
editor_interface.reload
|
69
|
+
|
70
|
+
expect(editor_interface.controls.first['widgetId']).to eq 'urlEditor'
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
55
74
|
end
|
56
75
|
end
|
57
76
|
end
|
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.
|
4
|
+
version: 2.2.0
|
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: 2018-05
|
13
|
+
date: 2018-06-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: http
|