accounts_client 0.0.16 → 0.0.18

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.
Files changed (2) hide show
  1. data/lib/accounts/is_a_user.rb +8 -1
  2. metadata +2 -2
@@ -15,7 +15,14 @@ module Accounts
15
15
  base.send(:include, Gravtastic)
16
16
  base.send(:gravtastic)
17
17
 
18
- base.send(:delegate, :email, to: :padma_user, allow_nil: true)
18
+ begin
19
+ unless base.new.respond_to?(:email)
20
+ base.send(:delegate, :email, to: :padma_user, allow_nil: true)
21
+ end
22
+ rescue
23
+ # this is run when booting app, is base model needs DB persistance and this has not yet been provided
24
+ # app will never boot or be able to run migrations. so we rescue exception here.
25
+ end
19
26
  base.send(:delegate, :verbose_help?, to: :padma_user, allow_nil: true)
20
27
  end
21
28
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: accounts_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.18
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: 2013-05-14 00:00:00.000000000 Z
12
+ date: 2013-05-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties