static_model 1.0.0 → 1.0.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.
data/lib/static_model.rb CHANGED
@@ -5,7 +5,7 @@ require 'yaml' unless defined?(YAML)
5
5
  require 'erb' unless defined?(ERB)
6
6
 
7
7
  module StaticModel
8
- VERSION = '1.0.0'
8
+ VERSION = '1.0.1'
9
9
  end
10
10
 
11
11
  require 'static_model/active_support'
@@ -56,7 +56,7 @@ module StaticModel
56
56
  end
57
57
 
58
58
  def attributes
59
- @attributes ||= HashWithIndifferentAccess.new
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 = HashWithIndifferentAccess.new(data)
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{static_model}
8
- s.version = "1.0.0"
8
+ s.version = "1.0.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Aaron Quint"]
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.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: &2152745440 !ruby/object:Gem::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: *2152745440
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