smart_s3_sync 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1877dd76000693f18bb93eb3fd9ef7f3204f899b
4
- data.tar.gz: a9c323bb9e7b32228d62c57c7a0605d90de39c6c
3
+ metadata.gz: 8214123ba6189742c8b87d62600513448e54bf7f
4
+ data.tar.gz: 8aa4c37adacbedc3a1de7ec9ad07ebd4e7e155e5
5
5
  SHA512:
6
- metadata.gz: c8c0683871f22c9e1fad10faef86f5108944ece2a71868f5246d61c5998ac3104b536e54166d9b1bf8c00406ec6a14b1a3aa186a51e3d446097008ff4e2f4835
7
- data.tar.gz: 762076a8dcc8d02bae68802d194b9384cc1e7ba1e2574652ca987fa62e647c323975ccdf76973a1d9c23af282e47ef3d13b8d1e38729d535d1695a1afcc48231
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
- @local_source = file
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
@@ -1,3 +1,3 @@
1
1
  module SmartS3Sync
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  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.9
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-27 00:00:00.000000000 Z
11
+ date: 2014-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sqlite3