Permalink
Browse files

allow for password to be passed via command line

  • Loading branch information...
1 parent d9e4b4f commit 8633b04594d03019612ee004a07189f9323fd712 Ryan Sonnek committed Jul 20, 2011
Showing with 3 additions and 2 deletions.
  1. +2 −1 lib/socialcast/cli.rb
  2. +1 −1 lib/socialcast/version.rb
@@ -22,11 +22,12 @@ def initialize(*args); super(*args) end
desc "authenticate", "Authenticate using your Socialcast credentials"
method_option :user, :type => :string, :aliases => '-u', :desc => 'email address for the authenticated user'
+ method_option :password, :type => :string, :aliases => '-p', :desc => 'password for the authenticated user'
method_option :domain, :type => :string, :default => 'api.socialcast.com', :desc => 'Socialcast community domain'
method_option :proxy, :type => :string, :desc => 'HTTP proxy options for connecting to Socialcast server'
def authenticate
user = options[:user] || ask('Socialcast username: ')
- password = HighLine.new.ask("Socialcast password: ") { |q| q.echo = false }
+ password = options[:password] || HighLine.new.ask("Socialcast password: ") { |q| q.echo = false }
domain = options[:domain]
url = ['https://', domain, '/api/authentication.json'].join
@@ -1,3 +1,3 @@
module Socialcast
- VERSION = "1.0.3"
+ VERSION = "1.0.4"
end

0 comments on commit 8633b04

Please sign in to comment.