s3_meta_sync 0.4.3 → 0.4.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0452dfe946a8a1e9c79d516b1755435c6c46cdeb
4
- data.tar.gz: fb29c38c0508f48a69a505fed4c14d9a2b382579
3
+ metadata.gz: 3976f983750855ddbbc8de6d7b7a38f8b25471dc
4
+ data.tar.gz: 2d707bbccab3b1b88b89191aae7ee9bf332b78d2
5
5
  SHA512:
6
- metadata.gz: 974de199c5fc3ea6c2f94972a9353f3613eadb51c054a0d067848c47721237d528a134532ec534fee1cfed7c6023f2251b1745cdfc9f3663e16268691ed5a804
7
- data.tar.gz: 5d0e8eeb264463f5a551143efb0675044896742886072074565c7385b4723aed7a6b2cbd80d2644e507abe5d19cc4d30dd5ddb1114c4f8eeefb1b28898974e8f
6
+ metadata.gz: e771453d6350103c521afb15dc23c54e4884dc20aac8e7c26a2214f4a9d7f86012e341b7e7dcd4c88ddefaaa1b75c2d8a06e4aedbdf20c2864ec3098f4d67a95
7
+ data.tar.gz: c68eaf670258095a802683804ea301e68f2d644418507f56eb5b1d1af866c4ef5412b713ce1a80fddca3b81ee07b1552f1093e366adfde2aa77f1c5539eb2e07
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -117,8 +117,9 @@ module S3MetaSync
117
117
  if remote != actual
118
118
  corrupted = actual.select { |file, md5| remote[file] && remote[file] != md5 }.map(&:first)
119
119
  File.write("#{destination}/#{CORRUPT_FILES_LOG}", corrupted.join("\n"))
120
- log "corrupted files downloaded:\n#{corrupted.join("\n")}", true
121
- raise RemoteCorrupt
120
+ message = "corrupted files downloaded:\n#{corrupted.join("\n")}"
121
+ log message, true
122
+ raise RemoteCorrupt, message
122
123
  end
123
124
  end
124
125
 
@@ -137,7 +138,7 @@ module S3MetaSync
137
138
  def upload_file(source, path, destination)
138
139
  log "Uploading #{path}"
139
140
  content = File.read("#{source}/#{path}")
140
- content = Zip.zip(content) if @config[:zip]
141
+ content = Zip.zip(content) if @config[:zip] && path != META_FILE
141
142
  s3.objects["#{destination}/#{path}"].write content, :acl => :public_read
142
143
  end
143
144
 
@@ -176,7 +177,9 @@ module S3MetaSync
176
177
  files = Dir["**/*"].select { |f| File.file?(f) }
177
178
  Hash[files.map { |file| [file, Digest::MD5.file(file).to_s] }]
178
179
  end
179
- {files: files}
180
+ result = {files: files}
181
+ result[:zip] = @config[:zip] if @config[:zip]
182
+ result
180
183
  end
181
184
 
182
185
  def read_meta(source)
@@ -1,3 +1,3 @@
1
1
  module S3MetaSync
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3_meta_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
metadata.gz.sig CHANGED
Binary file