entasis 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.3.2
2
+ Do not require attribute hash at initialization (Jack Christensen and Joshua Davey)
3
+
1
4
  == 0.3.1
2
5
  Allow attributes to be inherited (Joshua Davey and Johnny Winn)
3
6
 
data/lib/entasis/model.rb CHANGED
@@ -25,7 +25,7 @@ module Entasis
25
25
  #
26
26
  # Takes a hash and assigns keys and values to it's attributes members
27
27
  #
28
- def initialize(hash)
28
+ def initialize(hash={})
29
29
  self.attributes = hash
30
30
  end
31
31
 
@@ -1,3 +1,3 @@
1
1
  module Entasis
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
data/spec/entasis_spec.rb CHANGED
@@ -15,6 +15,10 @@ describe "Entasis::Model" do
15
15
  Person.new(undefined: 'value')
16
16
  }.to raise_error Person::UnknownAttributeError, 'unkown attribute: undefined'
17
17
  end
18
+
19
+ it "does not require attribute hash" do
20
+ expect { Person.new }.to_not raise_error
21
+ end
18
22
  end
19
23
 
20
24
  describe "#attribute_names" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: entasis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-27 00:00:00.000000000 Z
12
+ date: 2013-01-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel