cfoundry 0.3.51 → 0.3.52
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cfoundry/baseclient.rb +1 -1
- data/lib/cfoundry/v2/app.rb +1 -1
- data/lib/cfoundry/v2/base.rb +1 -1
- data/lib/cfoundry/v2/domain.rb +3 -2
- data/lib/cfoundry/v2/model.rb +12 -2
- data/lib/cfoundry/v2/route.rb +1 -1
- data/lib/cfoundry/version.rb +1 -1
- metadata +4 -4
data/lib/cfoundry/baseclient.rb
CHANGED
data/lib/cfoundry/v2/app.rb
CHANGED
data/lib/cfoundry/v2/base.rb
CHANGED
@@ -186,7 +186,7 @@ module CFoundry::V2
|
|
186
186
|
"[%s] %0.3fs %s %6s -> %d %s\n",
|
187
187
|
Time.now.strftime("%F %T"),
|
188
188
|
data[:time],
|
189
|
-
data[:response][:headers][
|
189
|
+
data[:response][:headers]["x-vcap-request-id"],
|
190
190
|
data[:request][:method].to_s.upcase,
|
191
191
|
data[:response][:code],
|
192
192
|
data[:request][:url])
|
data/lib/cfoundry/v2/domain.rb
CHANGED
@@ -4,8 +4,9 @@ module CFoundry::V2
|
|
4
4
|
class Domain < Model
|
5
5
|
attribute :name, :string
|
6
6
|
attribute :wildcard, :boolean, :default => true
|
7
|
-
to_one :owning_organization, :as => :organization
|
7
|
+
to_one :owning_organization, :as => :organization, :default => nil
|
8
8
|
|
9
|
-
|
9
|
+
# hide wildcard support for now
|
10
|
+
private :wildcard=
|
10
11
|
end
|
11
12
|
end
|
data/lib/cfoundry/v2/model.rb
CHANGED
@@ -78,11 +78,19 @@ module CFoundry::V2
|
|
78
78
|
$1 + $2.upcase
|
79
79
|
end
|
80
80
|
|
81
|
+
default = opts[:default]
|
82
|
+
|
83
|
+
if has_default = opts.key?(:default)
|
84
|
+
defaults[:"#{name}_guid"] = default
|
85
|
+
end
|
86
|
+
|
81
87
|
define_method(name) {
|
82
88
|
if @manifest && @manifest[:entity].key?(name)
|
83
89
|
@client.send(:"make_#{obj}", @manifest[:entity][name])
|
84
90
|
elsif url = send("#{name}_url")
|
85
91
|
@client.send(:"#{obj}_from", url, opts[:depth] || 1)
|
92
|
+
else
|
93
|
+
default
|
86
94
|
end
|
87
95
|
}
|
88
96
|
|
@@ -91,12 +99,14 @@ module CFoundry::V2
|
|
91
99
|
}
|
92
100
|
|
93
101
|
define_method(:"#{name}=") { |x|
|
94
|
-
|
102
|
+
unless has_default && x == default
|
103
|
+
Model.validate_type(x, CFoundry::V2.const_get(kls))
|
104
|
+
end
|
95
105
|
|
96
106
|
@manifest ||= {}
|
97
107
|
@manifest[:entity] ||= {}
|
98
108
|
@manifest[:entity][:"#{name}_guid"] =
|
99
|
-
@diff[:"#{name}_guid"] = x.guid
|
109
|
+
@diff[:"#{name}_guid"] = x && x.guid
|
100
110
|
}
|
101
111
|
end
|
102
112
|
|
data/lib/cfoundry/v2/route.rb
CHANGED
data/lib/cfoundry/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfoundry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 123
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 52
|
10
|
+
version: 0.3.52
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alex Suraci
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-11-
|
18
|
+
date: 2012-11-05 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: multipart-post
|