cloudsync 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/cloudsync.gemspec +1 -1
- data/lib/cloudsync/backend/base.rb +2 -12
- data/lib/cloudsync/sync_manager.rb +1 -1
- metadata +3 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.1.
|
|
1
|
+
2.1.1
|
data/cloudsync.gemspec
CHANGED
|
@@ -33,10 +33,10 @@ module Cloudsync
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
# needs_update?
|
|
36
|
-
def needs_update?(file
|
|
36
|
+
def needs_update?(file)
|
|
37
37
|
$LOGGER.debug("Checking if #{file} needs update")
|
|
38
38
|
|
|
39
|
-
local_backend_file =
|
|
39
|
+
local_backend_file = get_file_from_store(file)
|
|
40
40
|
|
|
41
41
|
if local_backend_file.nil?
|
|
42
42
|
$LOGGER.debug("File doesn't exist at #{self} (#{file})")
|
|
@@ -78,11 +78,6 @@ module Cloudsync
|
|
|
78
78
|
all_files
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
-
# find_file_from_list_or_store
|
|
82
|
-
def find_file_from_list_or_store(file, file_list=[])
|
|
83
|
-
get_file_from_list(file, file_list) || get_file_from_store(file)
|
|
84
|
-
end
|
|
85
|
-
|
|
86
81
|
private
|
|
87
82
|
|
|
88
83
|
def dry_run?
|
|
@@ -94,11 +89,6 @@ module Cloudsync
|
|
|
94
89
|
def get_file_from_store(file)
|
|
95
90
|
raise NotImplementedError
|
|
96
91
|
end
|
|
97
|
-
|
|
98
|
-
# get_file_from_list
|
|
99
|
-
def get_file_from_list(file, file_list)
|
|
100
|
-
file_list.detect {|f| f.full_name == file.full_name}
|
|
101
|
-
end
|
|
102
92
|
end
|
|
103
93
|
end
|
|
104
94
|
end
|
|
@@ -80,7 +80,7 @@ module Cloudsync
|
|
|
80
80
|
|
|
81
81
|
to_backend_files.each_with_index do |file, index|
|
|
82
82
|
$LOGGER.debug("Checking if file #{file} exists on [#{from_backend}]")
|
|
83
|
-
if found_file = from_backend.
|
|
83
|
+
if found_file = from_backend.get_file_from_store(file)
|
|
84
84
|
$LOGGER.debug("Keeping file #{file} because it was found on #{from_backend}.")
|
|
85
85
|
file_stats[:skipped] << file
|
|
86
86
|
else
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cloudsync
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 9
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 2
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 2.1.
|
|
9
|
+
- 1
|
|
10
|
+
version: 2.1.1
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Cory Forsyth
|