Coding style in Ruby format in an method and variable assign
Case 1_a. Don't mix pure functions (sub) with destructive functions (sub!). Whenever possible use pure methods:

zip_file = file.sub(directory, '').sub(/^\//, '')
zipfile.add(zip_file, file)


But can't you write simply?

zip_file = File.basename(file)


Case 1_b: I prefer to set variables. Giving names to things is good.

Case 2 : It's ok. I also prefer to write a comma at the last element so it can be freely reordered. I'd also change the structure of settings so it's easier to write:

settings = [
  ["-i", params[:remote_focu][:ip]],
  ["-u", params[:remote_focu][:username]],
  ...
].map { |opt, value| [opt, value].join(" ") }


Case 3 : Use the same indentation style that you used for array. Also, use the library facilities, don't manipulate paths as strings (extremely prone to bugs):

@rf = {
  folder: File.join(Rails.root, ENV["module_remote_focus_folder_path"]),
  ...
}