StarRezApi 0.3.0 → 0.3.1

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.
Files changed (2) hide show
  1. data/lib/starrez_api/star_rez_api.rb +4 -4
  2. metadata +6 -6
@@ -38,7 +38,7 @@ module StarRezApi
38
38
  new_child.populate_variables(child)
39
39
  children << new_child
40
40
  end
41
- new_k = k.to_s.underscore.pluralize
41
+ new_k = k.to_s.gsub(/_/,'__').underscore.pluralize
42
42
  self.instance_variable_set("@#{new_k}", children)
43
43
  meta_def new_k do
44
44
  self.instance_variable_get("@#{new_k}")
@@ -50,7 +50,7 @@ module StarRezApi
50
50
  # Ignore sub-objects
51
51
  else
52
52
  unless k.blank?
53
- k = k.to_s.underscore
53
+ k = k.to_s.gsub(/_/,'__').underscore
54
54
  self.instance_variable_set("@#{k}",v)
55
55
  meta_def k do
56
56
  self.instance_variable_get("@#{k}")
@@ -70,7 +70,7 @@ module StarRezApi
70
70
  def changed
71
71
  changed_attributes = Hash.new
72
72
  self.instance_variable_get("@original_hash").each do |k,v|
73
- k = k.to_s.underscore
73
+ k = k.to_s.gsub(/_/,'__').underscore
74
74
  current_value = self.send(k.to_sym)
75
75
  unless current_value.eql? v
76
76
  changed_attributes[k.to_sym] = [v, current_value]
@@ -89,7 +89,7 @@ module StarRezApi
89
89
  if response.code.eql? 200
90
90
  original_hash = self.instance_variable_get("@original_hash")
91
91
  self.build_query(self.changed).keys.each do |attribute|
92
- original_hash[attribute.to_s] = self.send(attribute.to_s.underscore.to_sym)
92
+ original_hash[attribute.to_s] = self.send(attribute.to_s.gsub(/_/,'__').underscore.to_sym)
93
93
  end
94
94
  self.instance_variable_set("@original_hash",original_hash)
95
95
  return true
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.0
4
+ version: 0.3.1
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: 2011-10-31 00:00:00.000000000Z
13
+ date: 2011-11-02 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
17
- requirement: &70239052881360 !ruby/object:Gem::Requirement
17
+ requirement: &70210716162720 !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: *70239052881360
25
+ version_requirements: *70210716162720
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: xml-simple
28
- requirement: &70239052880820 !ruby/object:Gem::Requirement
28
+ requirement: &70210716162120 !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: *70239052880820
36
+ version_requirements: *70210716162120
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