plain_old_model 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -117,16 +117,16 @@ module PlainOldModel
117
117
  def merge_association_instance_variables_with_attributes(association, attr_name, attributes)
118
118
  association_instance = send(attr_name)
119
119
  if association.class == HasOneAssociation
120
- instance_hash = create_association_hash(association_instance,{})
121
- merged_result = instance_hash.with_indifferent_access.deep_merge(attributes[attr_name])
120
+ instance_hash = create_association_hash(association_instance,HashWithIndifferentAccess.new)
121
+ merged_result = instance_hash.deep_merge(attributes[attr_name])
122
122
  elsif association.class == HasManyAssociation
123
123
  association_instance_array = []
124
124
  if association_instance.nil?
125
125
  merged_result = attributes[attr_name]
126
126
  else
127
127
  for i in 0..association_instance.length-1
128
- instance_hash = create_association_hash(association_instance[i],{})
129
- association_instance_array << instance_hash.with_indifferent_access.deep_merge(attributes[attr_name][i])
128
+ instance_hash = create_association_hash(association_instance[i],HashWithIndifferentAccess.new)
129
+ association_instance_array << instance_hash.deep_merge(attributes[attr_name][i])
130
130
  end
131
131
  merged_result = association_instance_array
132
132
  end
@@ -138,7 +138,7 @@ module PlainOldModel
138
138
  unless association_instance.nil?
139
139
  association_instance.instance_variables.each do |var|
140
140
  if association_instance.instance_variable_get(var).instance_variables.length > 0
141
- association_instance_hash[var.to_s.delete("@")] = create_association_hash(association_instance.instance_variable_get(var),{})
141
+ association_instance_hash[var.to_s.delete("@")] = create_association_hash(association_instance.instance_variable_get(var),HashWithIndifferentAccess.new)
142
142
  else
143
143
  association_instance_hash[var.to_s.delete("@")] = association_instance.instance_variable_get(var)
144
144
  end
@@ -1,3 +1,3 @@
1
1
  module PlainOldModel
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -7,7 +7,7 @@ Gem::Specification.new do |gem|
7
7
  gem.name = "plain_old_model"
8
8
  gem.version = PlainOldModel::VERSION
9
9
  gem.authors = ["Bhaskar Sundarraj", "Getty Images"]
10
- gem.email = ["bhaskar.sundarraj@gmail.com""bhaskar.sundarraj@gettyimages.com" ,"AppDev_RailGun@gettyimages.com"]
10
+ gem.email = ["bhaskar.sundarraj@gmail.com","opensourcereview@gettyimages.com"]
11
11
  gem.description = %q{This gem is created to cater the projects which do not require a backend/database,
12
12
  but still need some of the niceties offered by the ActiveRecord}
13
13
  gem.summary = %q{This gem is created to cater the projects which do not require a backend/database,
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plain_old_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Bhaskar Sundarraj
@@ -9,84 +10,93 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2013-04-03 00:00:00.000000000 Z
13
+ date: 2013-04-06 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: activesupport
16
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
17
19
  requirements:
18
- - - '>='
20
+ - - ! '>='
19
21
  - !ruby/object:Gem::Version
20
22
  version: '0'
21
23
  type: :runtime
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
24
27
  requirements:
25
- - - '>='
28
+ - - ! '>='
26
29
  - !ruby/object:Gem::Version
27
30
  version: '0'
28
31
  - !ruby/object:Gem::Dependency
29
32
  name: activemodel
30
33
  requirement: !ruby/object:Gem::Requirement
34
+ none: false
31
35
  requirements:
32
- - - '>='
36
+ - - ! '>='
33
37
  - !ruby/object:Gem::Version
34
38
  version: '0'
35
39
  type: :runtime
36
40
  prerelease: false
37
41
  version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
38
43
  requirements:
39
- - - '>='
44
+ - - ! '>='
40
45
  - !ruby/object:Gem::Version
41
46
  version: '0'
42
47
  - !ruby/object:Gem::Dependency
43
48
  name: rake
44
49
  requirement: !ruby/object:Gem::Requirement
50
+ none: false
45
51
  requirements:
46
- - - '>='
52
+ - - ! '>='
47
53
  - !ruby/object:Gem::Version
48
54
  version: '0'
49
55
  type: :development
50
56
  prerelease: false
51
57
  version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
52
59
  requirements:
53
- - - '>='
60
+ - - ! '>='
54
61
  - !ruby/object:Gem::Version
55
62
  version: '0'
56
63
  - !ruby/object:Gem::Dependency
57
64
  name: rspec
58
65
  requirement: !ruby/object:Gem::Requirement
66
+ none: false
59
67
  requirements:
60
- - - '>='
68
+ - - ! '>='
61
69
  - !ruby/object:Gem::Version
62
70
  version: '0'
63
71
  type: :development
64
72
  prerelease: false
65
73
  version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
66
75
  requirements:
67
- - - '>='
76
+ - - ! '>='
68
77
  - !ruby/object:Gem::Version
69
78
  version: '0'
70
79
  - !ruby/object:Gem::Dependency
71
80
  name: rspec-core
72
81
  requirement: !ruby/object:Gem::Requirement
82
+ none: false
73
83
  requirements:
74
- - - '>='
84
+ - - ! '>='
75
85
  - !ruby/object:Gem::Version
76
86
  version: '0'
77
87
  type: :development
78
88
  prerelease: false
79
89
  version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
80
91
  requirements:
81
- - - '>='
92
+ - - ! '>='
82
93
  - !ruby/object:Gem::Version
83
94
  version: '0'
84
- description: |-
85
- This gem is created to cater the projects which do not require a backend/database,
86
- but still need some of the niceties offered by the ActiveRecord
95
+ description: ! "This gem is created to cater the projects which do not require a backend/database,\n
96
+ \ but still need some of the niceties offered by the ActiveRecord"
87
97
  email:
88
- - bhaskar.sundarraj@gmail.combhaskar.sundarraj@gettyimages.com
89
- - AppDev_RailGun@gettyimages.com
98
+ - bhaskar.sundarraj@gmail.com
99
+ - opensourcereview@gettyimages.com
90
100
  executables: []
91
101
  extensions: []
92
102
  extra_rdoc_files: []
@@ -108,26 +118,33 @@ files:
108
118
  - spec/spec_helper.rb
109
119
  homepage: ''
110
120
  licenses: []
111
- metadata: {}
112
121
  post_install_message:
113
122
  rdoc_options: []
114
123
  require_paths:
115
124
  - lib
116
125
  required_ruby_version: !ruby/object:Gem::Requirement
126
+ none: false
117
127
  requirements:
118
- - - '>='
128
+ - - ! '>='
119
129
  - !ruby/object:Gem::Version
120
130
  version: '0'
131
+ segments:
132
+ - 0
133
+ hash: 2945831570350845540
121
134
  required_rubygems_version: !ruby/object:Gem::Requirement
135
+ none: false
122
136
  requirements:
123
- - - '>='
137
+ - - ! '>='
124
138
  - !ruby/object:Gem::Version
125
139
  version: '0'
140
+ segments:
141
+ - 0
142
+ hash: 2945831570350845540
126
143
  requirements: []
127
144
  rubyforge_project:
128
- rubygems_version: 2.0.3
145
+ rubygems_version: 1.8.25
129
146
  signing_key:
130
- specification_version: 4
147
+ specification_version: 3
131
148
  summary: This gem is created to cater the projects which do not require a backend/database,
132
149
  but still need some of the niceties offered by the ActiveRecord
133
150
  test_files:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 9297bff31a1a9c7c81a1e680deccc78635a75ef1
4
- data.tar.gz: a654e2e11817af53461572c0747ff7b00dbd3c77
5
- SHA512:
6
- metadata.gz: 0151bd58b7e8a3f8bd380fc1b3800b9e1fff52faca87417dea9e910dfd3ea94d430f720ee01aa7c26dea496002f34d3fccc71821155ef398d6580edac3b9bdf2
7
- data.tar.gz: 64b8ead6435fe72dacc3e2e7793023b5c6a9e50b3e41e6e1987448e3af7fdebc8e200cc37ac21c3ba3b65e30a335c9b31cb0438a77203b7a2d4e7fc0f38a1644