Class: Boxen::Preflight::Identity
Instance Attribute Summary
Attributes inherited from Check
#config
Instance Method Summary
collapse
Methods inherited from Check
#abort, checks, #initialize, register, run, #warn
Constructor Details
This class inherits a constructor from Boxen::Check
Instance Method Details
#ok? ⇒ Boolean
4
5
6
|
# File 'lib/boxen/preflight/identity.rb', line 4
def ok?
!user || (config.email && config.name)
end
|
#run ⇒ Object
8
9
10
11
|
# File 'lib/boxen/preflight/identity.rb', line 8
def run
config.email = user.email
config.name = user.name
end
|
#user ⇒ Object
13
14
15
|
# File 'lib/boxen/preflight/identity.rb', line 13
def user
@user ||= config.api.user rescue nil
end
|