cfoundry 0.3.24 → 0.3.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,7 +63,9 @@ module CFoundry::V2
63
63
 
64
64
  def to_one(name, opts = {})
65
65
  obj = opts[:as] || name
66
- kls = obj.to_s.capitalize
66
+ kls = obj.to_s.capitalize.gsub(/(.)_(.)/) do
67
+ $1 + $2.upcase
68
+ end
67
69
 
68
70
  define_method(name) {
69
71
  if @manifest && @manifest[:entity].key?(name)
@@ -92,11 +94,14 @@ module CFoundry::V2
92
94
 
93
95
  def to_many(plural, opts = {})
94
96
  singular = plural.to_s.sub(/s$/, "").to_sym
95
- kls = singular.to_s.capitalize
96
97
 
97
98
  object = opts[:as] || singular
98
99
  plural_object = :"#{object}s"
99
100
 
101
+ kls = object.to_s.capitalize.gsub(/(.)_(.)/) do
102
+ $1 + $2.upcase
103
+ end
104
+
100
105
  define_method(plural) { |*args|
101
106
  depth, query = args
102
107
 
@@ -1,4 +1,4 @@
1
1
  module CFoundry # :nodoc:
2
2
  # CFoundry library version number.
3
- VERSION = "0.3.24"
3
+ VERSION = "0.3.25"
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: 35
4
+ hash: 33
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 24
10
- version: 0.3.24
9
+ - 25
10
+ version: 0.3.25
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-08-29 00:00:00 Z
18
+ date: 2012-08-30 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rest-client