global_registry_models 0.8.0 → 0.8.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c518ac0e203b6a04fc6b0bda68eaf25868dfaca0
|
4
|
+
data.tar.gz: b55a75d8c3a979b1aea24e68d4dc1dcf9d4101f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b49abcf9efaf39871fa279b5e3f2729192f46e2758f622bc0c152e2e059d2b875ac671ac1a6686bcf038a24ccf811b72ea4d92bce52f9f61c94c1480b1a4cf4d
|
7
|
+
data.tar.gz: 7f040286f685e9b54a0862d896e1a54baa5a40b227c8d5338796b36b02864ac6e533da119c7618a6fc59fe33e3e041d0d12bc7a9a5e7ffdbe2ea9ab824be0243
|
@@ -9,7 +9,7 @@ module GlobalRegistryModels
|
|
9
9
|
if entity.valid?
|
10
10
|
attribute_keys_to_create = attributes.keys.collect(&:to_sym) & writeable_attributes
|
11
11
|
create_attributes = entity.attributes.with_indifferent_access.slice(*attribute_keys_to_create)
|
12
|
-
new
|
12
|
+
new global_registry_resource.post({ entity: { name => create_attributes }})['entity'][name]
|
13
13
|
else
|
14
14
|
raise GlobalRegistryModels::RecordInvalid.new
|
15
15
|
end
|
@@ -26,7 +26,7 @@ module GlobalRegistryModels
|
|
26
26
|
if entity.valid?
|
27
27
|
attribute_keys_to_update = (attributes.keys.collect(&:to_sym) << :client_integration_id) & writeable_attributes
|
28
28
|
update_attributes = entity.attributes.with_indifferent_access.slice(*attribute_keys_to_update)
|
29
|
-
new
|
29
|
+
new global_registry_resource.put(id, { entity: { name => update_attributes }})['entity'][name]
|
30
30
|
else
|
31
31
|
raise GlobalRegistryModels::RecordInvalid.new
|
32
32
|
end
|