lib/boxafe/box.rb in boxafe-0.1.1 vs lib/boxafe/box.rb in boxafe-0.1.2
- old
+ new
@@ -1,11 +1,11 @@
# encoding: UTF-8
require 'fileutils'
class Boxafe::Box
- OPTION_KEYS = [ :name, :root, :mount, :volume, :config, :keychain ]
+ OPTION_KEYS = [ :name, :root, :mount, :volume, :encfs_config, :keychain ]
def initialize options = {}
raise Boxafe::Error, "The :name option is required" unless options[:name]
@@ -59,11 +59,11 @@
Paint["#{opts[:mount]} (not mounted)", :yellow]
end
s << "\nVolume Name: #{opts[:volume]}"
s << "\nKeychain Password: #{opts[:keychain]}" if opts[:keychain]
- s << "\nEncFS Config: #{opts[:config]}" if opts[:config]
+ s << "\nEncFS Config: #{opts[:encfs_config]}" if opts[:encfs_config]
s << "\nCommand: #{Paint[encfs.command, :yellow]}" if verbose
end
end
@@ -85,10 +85,10 @@
def options
@options.tap do |opts|
opts[:root] = File.expand_path opts[:root] || "~/Dropbox/#{opts[:name]}"
opts[:mount] = File.expand_path opts[:mount] || "/Volumes/#{opts[:name]}"
- opts[:config] = File.expand_path opts[:config] if opts[:config]
+ opts[:encfs_config] = File.expand_path opts[:encfs_config] if opts[:encfs_config]
opts[:volume] ||= opts[:name]
opts[:keychain] = opts[:name] if opts[:keychain] == true
end
end