Top Level Namespace
Defined Under Namespace
Modules: DatabasedotcomConsole
Constant Summary collapse
- CLIENT_ID =
'3MVG9QDx8IX8nP5RUXIFbi3L4rSVruiBU4O_ozvkJiU0aGZDBxfsF6XDhngJf6Ha2fDNniyDxpt0Gb9Pp.2Tk'
- CLIENT_SECRET =
'7712607496533706277'
Instance Method Summary collapse
-
#get_creds ⇒ Object
UTIL METHOD.
- #supported_ruby ⇒ Object
Instance Method Details
#get_creds ⇒ Object
UTIL METHOD
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/databasedotcom_console/cli_tools.rb', line 32 def get_creds opts = @options creds = {} if opts[:host] creds[:host] = opts[:host] else print "HOST (test.salesforce.com, login.salesforce.com, etc): " creds[:host] = gets.strip end if opts[:un] creds[:un] = opts[:un] else print "USERNAME: " creds[:un] = gets.strip end if opts[:pw] creds[:pw] = opts[:pw] else print "PASSWORD (and security token if necessary): " creds[:pw] = STDIN.noecho(&:gets) if supported_ruby creds[:pw] = gets.strip unless supported_ruby end creds end |
#supported_ruby ⇒ Object
5 6 7 8 |
# File 'lib/databasedotcom_console/cli_tools.rb', line 5 def supported_ruby this_ruby = RUBY_VERSION.dup Gem::Version.new(this_ruby) >= Gem::Version.new("1.9.3") end |