StarRezApi 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/starrez_api/star_rez_api.rb +5 -5
- metadata +6 -6
@@ -224,17 +224,17 @@ module StarRezApi
|
|
224
224
|
end
|
225
225
|
unless options[:fields].blank?
|
226
226
|
fields = Array.new
|
227
|
-
options[:fields].each { |f| fields << f.to_s
|
227
|
+
options[:fields].each { |f| fields << net_camelize(f.to_s) }
|
228
228
|
query_array << "_fields=#{fields.join(',')}"
|
229
229
|
end
|
230
230
|
tables = Array.new
|
231
231
|
unless options[:include].blank?
|
232
|
-
options[:include].each { |t| tables << t.to_s
|
232
|
+
options[:include].each { |t| tables << net_camelize(t.to_s)}
|
233
233
|
query_array << "_relatedtables=#{tables.join(',')}"
|
234
234
|
end
|
235
235
|
unless options[:order].blank?
|
236
236
|
order = Array.new
|
237
|
-
options[:order].each { |o| order << (options[:order][o].eql? :desc) ? "#{o.to_s
|
237
|
+
options[:order].each { |o| order << (options[:order][o].eql? :desc) ? "#{net_camelize(o.to_s)}.desc" : "#{net_camelize(o.to_s)}"}
|
238
238
|
query_array << "_orderby=#{order.join(',')}"
|
239
239
|
end
|
240
240
|
unless options[:limit].blank?
|
@@ -279,7 +279,7 @@ module StarRezApi
|
|
279
279
|
def build_query(hash)
|
280
280
|
query = Hash.new
|
281
281
|
hash.keys.each do |attribute|
|
282
|
-
query[attribute.to_s.
|
282
|
+
query[net_camelize(attribute.to_s).to_sym] = self.send(attribute)
|
283
283
|
end
|
284
284
|
return query
|
285
285
|
end
|
@@ -304,7 +304,7 @@ module StarRezApi
|
|
304
304
|
queries = Array.new
|
305
305
|
if conditions.is_a?(Hash)
|
306
306
|
conditions.each_pair do |column, value|
|
307
|
-
query = column.to_s
|
307
|
+
query = net_camelize(column.to_s)
|
308
308
|
if value.is_a?(Hash)
|
309
309
|
query += "[_operator%3D#{value.keys.first.to_s}]=#{parse_value(value[value.keys.first])}"
|
310
310
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: StarRezApi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-02-
|
13
|
+
date: 2012-02-09 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|
17
|
-
requirement: &
|
17
|
+
requirement: &70153006571060 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 0.7.4
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70153006571060
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: xml-simple
|
28
|
-
requirement: &
|
28
|
+
requirement: &70153006569680 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: 1.0.12
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70153006569680
|
37
37
|
description: This gem that allows the user access to the StarRez REST Web Services,
|
38
38
|
Reporting, and Accounts API
|
39
39
|
email: dreedy@housing.siu.edu
|