bin/birstcl in Birst_Command-0.4.0 vs bin/birstcl in Birst_Command-0.5.0
- old
+ new
@@ -12,14 +12,10 @@
if @options[:version]
puts "Birst_Command Version: #{Birst_Command::VERSION}"
exit
end
- if @options[:encrypt_password]
- encrypt_password(@options[:encrypt_password])
- end
-
if @options[:command]
read_config_file
execute_command
end
end
@@ -42,15 +38,10 @@
opts.on("-h","--help", "Show this message") do
puts opts
exit
end
- @options[:encrypt_password] = nil
- opts.on("-e","--encrypt_password <PASSWORD>","Generates an encrypted version of PASSWORD that needs to be placed in ~/.birstcl") do |opt|
- @options[:encrypt_password] = opt
- end
-
@options[:command] = nil
opts.on("-c","--command <COMMAND>","COMMAND is the snake_case Birst web API command") do |opt|
@options[:command] = opt
end
@@ -85,18 +76,9 @@
def read_config_file
Birst_Command::Config.read_config(@options[:config_full_path])
end
-
- def encrypt_password(password)
- Birst_Command::Password.generate_keys(verbose: true)
- puts <<-EOF.unindent
- ...
- Use this encrypted password in your .birstcl file: "#{Birst_Command::Password.encrypt(password)}"
- EOF
- end
-
def write_cookie_file(file_full_path)
return nil if file_full_path.nil?
File.open(file_full_path, 'w') {|f| f.write(Marshal.dump(@session_cookie)) }
end