Sha256: 63c3a36489c1f697d7bb7b76de5a9a9802a2a6fec183cd97292f69a01e96b571

Contents?: true

Size: 471 Bytes

Versions: 17

Compression:

Stored size: 471 Bytes

Contents

module Capsaicin
  module UI
    module AskPass
      def password_prompt(prompt='Password: ')
        if cap_askpass = ENV['CAP_ASKPASS']
          `#{cap_askpass} "#{prompt}"`.strip
        else
          password_prompt_console
        end
      end
    end
    
    (class << Capistrano::CLI; self; end).class_eval do
      alias :password_prompt_console :password_prompt
      include AskPass
      alias :password_prompt_askpass :password_prompt
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
joekhoobyar-capsaicin-0.1.1 lib/capsaicin/ui.rb
joekhoobyar-capsaicin-0.1.2 lib/capsaicin/ui.rb
joekhoobyar-capsaicin-0.1.3 lib/capsaicin/ui.rb
joekhoobyar-capsaicin-0.1.4 lib/capsaicin/ui.rb
joekhoobyar-capsaicin-0.1.5 lib/capsaicin/ui.rb
joekhoobyar-capsaicin-0.1.6 lib/capsaicin/ui.rb
joekhoobyar-capsaicin-0.1.7 lib/capsaicin/ui.rb
capsaicin-0.1.11 lib/capsaicin/ui.rb
capsaicin-0.1.10 lib/capsaicin/ui.rb
capsaicin-0.1.9 lib/capsaicin/ui.rb
capsaicin-0.1.8 lib/capsaicin/ui.rb
capsaicin-0.1.3 lib/capsaicin/ui.rb
capsaicin-0.1.2 lib/capsaicin/ui.rb
capsaicin-0.1.7 lib/capsaicin/ui.rb
capsaicin-0.1.6 lib/capsaicin/ui.rb
capsaicin-0.1.5 lib/capsaicin/ui.rb
capsaicin-0.1.4 lib/capsaicin/ui.rb