active_presenter 0.0.2 → 0.0.3

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.
@@ -48,6 +48,8 @@ module ActivePresenter
48
48
  # If you don't specify an instance, one will be created by calling Model.new
49
49
  #
50
50
  def initialize(args = {})
51
+ args ||= {}
52
+
51
53
  presented.each do |type, klass|
52
54
  send("#{type}=", args[type].is_a?(klass) ? args.delete(type) : klass.new)
53
55
  end
@@ -2,7 +2,7 @@ module ActivePresenter
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/test/base_test.rb CHANGED
@@ -144,4 +144,9 @@ Expectations do
144
144
  expect 'Login' do
145
145
  SignupPresenter.human_attribute_name(:user_login)
146
146
  end
147
+
148
+ # it was raising with nil
149
+ expect SignupPresenter do
150
+ SignupPresenter.new(nil)
151
+ end
147
152
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_presenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Golick & Daniel Haran
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-07-28 00:00:00 -04:00
12
+ date: 2008-08-06 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -56,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  requirements: []
57
57
 
58
58
  rubyforge_project: active_presenter
59
- rubygems_version: 1.1.1
59
+ rubygems_version: 1.2.0
60
60
  signing_key:
61
61
  specification_version: 2
62
62
  summary: ActivePresenter is the presenter library you already know! (...if you know ActiveRecord)