smart_s3_sync 0.0.9 → 0.0.10
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.
- checksums.yaml +4 -4
- data/lib/smart_s3_sync/file_target.rb +9 -1
- data/lib/smart_s3_sync/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8214123ba6189742c8b87d62600513448e54bf7f
|
|
4
|
+
data.tar.gz: 8aa4c37adacbedc3a1de7ec9ad07ebd4e7e155e5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 52dbcb5285295c8b7ecbc52fb116c3a98b9356fb64c362b7b5aa52fcbd46d06c2e9ade8168ee2ea1b3fec8b7cfaed9b33f4c20b64a543e1a55386fc4adbee468
|
|
7
|
+
data.tar.gz: c668bb00211a1340f2d25e10652414c9dbbed6201c75a537ed1cb78cd23a2e5bd4c7b1c691970bd5ec05ab858244b096574371f1937eebd30bf14dc96fbee589
|
|
@@ -18,7 +18,7 @@ module SmartS3Sync
|
|
|
18
18
|
# we don't add it to the list of destinations and instead
|
|
19
19
|
# mark it as a local source.
|
|
20
20
|
if File.exists?(file) && file_hash(file) == digest.to_s
|
|
21
|
-
|
|
21
|
+
add_local_source(file)
|
|
22
22
|
else
|
|
23
23
|
destinations.push(file)
|
|
24
24
|
end
|
|
@@ -76,6 +76,14 @@ module SmartS3Sync
|
|
|
76
76
|
end
|
|
77
77
|
end
|
|
78
78
|
|
|
79
|
+
def add_local_source(file)
|
|
80
|
+
if local_source.nil?
|
|
81
|
+
@local_source = file
|
|
82
|
+
else
|
|
83
|
+
FileUtils.ln(local_source, file, :force => true)
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
79
87
|
def file_hash(path)
|
|
80
88
|
DigestCache.digest(path)
|
|
81
89
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smart_s3_sync
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Rhoden
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-06-
|
|
11
|
+
date: 2014-06-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sqlite3
|