cfoundry 0.3.50 → 0.3.51

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,10 +42,11 @@ module CFoundry::V2
42
42
  end
43
43
 
44
44
  def attribute(name, type, opts = {})
45
- default = opts[:default] || nil
45
+ default = opts[:default]
46
46
 
47
- has_default = opts.key?(:default)
48
- defaults[name] = default if has_default
47
+ if has_default = opts.key?(:default)
48
+ defaults[name] = default
49
+ end
49
50
 
50
51
  define_method(name) {
51
52
  manifest[:entity][name] || default
@@ -80,11 +81,8 @@ module CFoundry::V2
80
81
  define_method(name) {
81
82
  if @manifest && @manifest[:entity].key?(name)
82
83
  @client.send(:"make_#{obj}", @manifest[:entity][name])
83
- else
84
- @client.send(
85
- :"#{obj}_from",
86
- send("#{name}_url"),
87
- opts[:depth] || 1)
84
+ elsif url = send("#{name}_url")
85
+ @client.send(:"#{obj}_from", url, opts[:depth] || 1)
88
86
  end
89
87
  }
90
88
 
@@ -1,4 +1,4 @@
1
1
  module CFoundry # :nodoc:
2
2
  # CFoundry library version number.
3
- VERSION = "0.3.50"
3
+ VERSION = "0.3.51"
4
4
  end
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: 119
4
+ hash: 117
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 50
10
- version: 0.3.50
9
+ - 51
10
+ version: 0.3.51
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-10-29 00:00:00 Z
18
+ date: 2012-11-01 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: multipart-post