Class: Capistrano::Wearerequired::SlackistranoMessagingElements
- Inherits:
-
Slackistrano::Messaging::Base
- Object
- Slackistrano::Messaging::Base
- Capistrano::Wearerequired::SlackistranoMessagingElements
- Defined in:
- lib/capistrano/wearerequired/slackistrano_messaging_elements.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#deployer ⇒ Object
Override the deployer helper to pull the best name available (git, password file, env vars).
-
#initialize(options = {}) ⇒ SlackistranoMessagingElements
constructor
A new instance of SlackistranoMessagingElements.
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( = {}) super() end |
Instance Method Details
#deployer ⇒ Object
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 |