cfoundry 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cfoundry/baseclient.rb +2 -0
- data/lib/cfoundry/v2/model.rb +4 -1
- data/lib/cfoundry/v2/user.rb +3 -1
- data/lib/cfoundry/version.rb +1 -1
- metadata +3 -3
data/lib/cfoundry/baseclient.rb
CHANGED
data/lib/cfoundry/v2/model.rb
CHANGED
@@ -52,10 +52,13 @@ module CFoundry::V2
|
|
52
52
|
def create!
|
53
53
|
payload = {}
|
54
54
|
|
55
|
+
@manifest ||= {}
|
56
|
+
@manifest[:entity] ||= {}
|
57
|
+
|
55
58
|
self.class.defaults.merge(@manifest[:entity]).each do |k, v|
|
56
59
|
if v.is_a?(Hash) && v.key?(:metadata)
|
57
60
|
# skip; there's a _guid attribute already
|
58
|
-
elsif v.is_a?(Array) && v.all? { |x|
|
61
|
+
elsif v.is_a?(Array) && !v.empty? && v.all? { |x|
|
59
62
|
x.is_a?(Hash) && x.key?(:metadata)
|
60
63
|
}
|
61
64
|
singular = k.to_s.sub(/s$/, "")
|
data/lib/cfoundry/v2/user.rb
CHANGED
data/lib/cfoundry/version.rb
CHANGED
metadata
CHANGED