dato 0.3.25 → 0.3.26

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
  SHA1:
3
- metadata.gz: dbd06b2736c126c279c96931245a0953dbc19fd8
4
- data.tar.gz: 20057113543c2f32291d21bd816d57b8dcd55ff5
3
+ metadata.gz: 65fe8023f11c1495b22541ec74741d7e8049603e
4
+ data.tar.gz: c286e1fe8f3a10cf52ae5db5ebef259fd882ac7d
5
5
  SHA512:
6
- metadata.gz: 450f89165246df9aee9aaf407b2a52d7736bb6e3b83b19c8cfeae4243c6ef3112803aaa6fada271c40ed5f4b091f143c7c54f181311eca747ebcd344a079a3fd
7
- data.tar.gz: 2712cbaebc6a3143378a163ace27999ca97e893c70ab2ece8e93d3e1bfe5cf486cd7a926879a495efcccb6b93b4144bd180e50f247ae764933180ba1da22b081
6
+ metadata.gz: f54d9be946cd418d5761755faf464245f00e4acf63a19a70c89bcfbade6d8de28a175589c262988d7113235a1e8c6ee7302b4cacc899ae3b885e721c54f20938
7
+ data.tar.gz: cbe0b62dab152f78e70dabc942ac18de8a6cec8bc9f7acae5e592298ba7da484af449cd75b2d573ecd33e568dbed0d46e3f9bb4b1b62d1221f02e7996777bdc5
@@ -54,7 +54,9 @@ module Dato
54
54
  end
55
55
 
56
56
  def collection_item_types
57
- item_types - single_instance_item_types
57
+ item_types.select do |item_type|
58
+ !item_type.singleton && !item_type.modular_block
59
+ end
58
60
  end
59
61
 
60
62
  def items_of_type(item_type)
@@ -18,7 +18,7 @@ module Dato
18
18
  def update(field_id, resource_attributes)
19
19
  body = JsonApiSerializer.new(
20
20
  type: :field,
21
- attributes: %i(api_key appeareance hint label localized position validators)
21
+ attributes: %i(api_key appeareance field_type hint label localized position validators)
22
22
  ).serialize(resource_attributes, field_id)
23
23
 
24
24
  put_request "/fields/#{field_id}", body
@@ -8,9 +8,9 @@ module Dato
8
8
  def create(resource_attributes)
9
9
  body = JsonApiSerializer.new(
10
10
  type: :item_type,
11
- attributes: %i(api_key name ordering_direction singleton sortable tree),
11
+ attributes: %i(api_key modular_block name ordering_direction singleton sortable tree),
12
12
  relationships: { ordering_field: { collection: false, type: :field } },
13
- required_attributes: %i(api_key name ordering_direction singleton sortable tree),
13
+ required_attributes: %i(api_key modular_block name ordering_direction singleton sortable tree),
14
14
  required_relationships: %i(ordering_field)
15
15
  ).serialize(resource_attributes)
16
16
 
@@ -20,9 +20,9 @@ module Dato
20
20
  def update(item_type_id, resource_attributes)
21
21
  body = JsonApiSerializer.new(
22
22
  type: :item_type,
23
- attributes: %i(api_key name ordering_direction singleton sortable tree),
23
+ attributes: %i(api_key modular_block name ordering_direction singleton sortable tree),
24
24
  relationships: { ordering_field: { collection: false, type: :field } },
25
- required_attributes: %i(api_key name ordering_direction singleton sortable tree),
25
+ required_attributes: %i(api_key modular_block name ordering_direction singleton sortable tree),
26
26
  required_relationships: %i(ordering_field)
27
27
  ).serialize(resource_attributes, item_type_id)
28
28
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Dato
3
- VERSION = '0.3.25'
3
+ VERSION = '0.3.26'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dato
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.25
4
+ version: 0.3.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Verna
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-28 00:00:00.000000000 Z
11
+ date: 2017-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler