static_model 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/static_model.rb +1 -1
- data/lib/static_model/base.rb +3 -2
- data/static_model.gemspec +1 -1
- metadata +3 -3
data/lib/static_model.rb
CHANGED
data/lib/static_model/base.rb
CHANGED
@@ -56,7 +56,7 @@ module StaticModel
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def attributes
|
59
|
-
@attributes ||=
|
59
|
+
@attributes ||= Hash.new
|
60
60
|
end
|
61
61
|
|
62
62
|
def attributes=(attribute_hash)
|
@@ -132,7 +132,8 @@ module StaticModel
|
|
132
132
|
records = []
|
133
133
|
if data.is_a?(Hash) && data.has_key?('records')
|
134
134
|
records = data.delete('records')
|
135
|
-
@class_attributes =
|
135
|
+
@class_attributes = Hash.new(data)
|
136
|
+
@class_attributes.make_indifferent! if @class_attributes.respond_to?(:make_indifferent!)
|
136
137
|
elsif data.is_a?(Array)
|
137
138
|
records = data
|
138
139
|
end
|
data/static_model.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: static_model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ default_executable:
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: Shoulda
|
17
|
-
requirement: &
|
17
|
+
requirement: &2156263560 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,7 +22,7 @@ dependencies:
|
|
22
22
|
version: 1.2.0
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2156263560
|
26
26
|
description: StaticModel provides a Base class much like ActiveRecord which supports
|
27
27
|
reading from a YAML file and basic associations to ActiveRecord
|
28
28
|
email: aaron@quirkey.com
|