Class: Capistrano::Wearerequired::SlackistranoMessagingElements

Inherits:
Slackistrano::Messaging::Base
  • Object
show all
Defined in:
lib/capistrano/wearerequired/slackistrano_messaging_elements.rb

Direct Known Subclasses

SlackistranoMessagingColors

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ SlackistranoMessagingElements

Returns a new instance of SlackistranoMessagingElements.



7
8
9
# File 'lib/capistrano/wearerequired/slackistrano_messaging_elements.rb', line 7

def initialize(options = {})
  super(options)
end

Instance Method Details

#deployerObject

Override the deployer helper to pull the best name available (git, password file, env vars).



12
13
14
15
16
17
# File 'lib/capistrano/wearerequired/slackistrano_messaging_elements.rb', line 12

def deployer
  name = `git config user.name`.strip.split.first
  name = nil if name.empty?
  name ||= Etc.getpwnam(ENV['USER']).gecos || ENV['USER'] || ENV['USERNAME']
  name
end