cloud_encrypted_sync 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock
CHANGED
@@ -3,7 +3,7 @@ module CloudEncryptedSync
|
|
3
3
|
|
4
4
|
class << self
|
5
5
|
|
6
|
-
attr_reader :option_parser
|
6
|
+
attr_reader :option_parser, :cached_argv
|
7
7
|
|
8
8
|
def settings
|
9
9
|
@settings ||= load
|
@@ -13,12 +13,17 @@ module CloudEncryptedSync
|
|
13
13
|
command_line_options[:data_dir]
|
14
14
|
end
|
15
15
|
|
16
|
+
def signature
|
17
|
+
Cryptographer.hash_data(cached_argv.to_s + config_file_settings.to_s)
|
18
|
+
end
|
19
|
+
|
16
20
|
#######
|
17
21
|
private
|
18
22
|
#######
|
19
23
|
|
20
24
|
def load
|
21
25
|
touch_data_folder
|
26
|
+
cache_argv
|
22
27
|
loaded_settings = config_file_settings.merge(command_line_options).with_indifferent_access
|
23
28
|
|
24
29
|
loaded_settings[:sync_path] = ARGV.shift unless ARGV.empty?
|
@@ -28,6 +33,14 @@ module CloudEncryptedSync
|
|
28
33
|
return loaded_settings
|
29
34
|
end
|
30
35
|
|
36
|
+
def touch_data_folder
|
37
|
+
FileUtils.mkdir_p(data_folder_path) unless Dir.exists?(data_folder_path)
|
38
|
+
end
|
39
|
+
|
40
|
+
def cache_argv
|
41
|
+
@cached_argv ||= ARGV.dup
|
42
|
+
end
|
43
|
+
|
31
44
|
def config_file_settings
|
32
45
|
@config_file_settings ||= load_config_file_settings
|
33
46
|
end
|
@@ -50,10 +63,6 @@ module CloudEncryptedSync
|
|
50
63
|
end
|
51
64
|
end
|
52
65
|
|
53
|
-
def touch_data_folder
|
54
|
-
FileUtils.mkdir_p(data_folder_path) unless Dir.exists?(data_folder_path)
|
55
|
-
end
|
56
|
-
|
57
66
|
def config_file_path
|
58
67
|
data_folder_path+'/config.rc.yml'
|
59
68
|
end
|