s3_uploader 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/s3_uploader/s3_uploader.rb +3 -1
- data/lib/s3_uploader/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2e95e50bf6a94edfbd19e8e2804e057fe2c6255
|
4
|
+
data.tar.gz: 05fea879928d79bc17a1178b8061c7ed884defcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f2bb9c95e80a850c758bb43e26158c315da713c1ef703180ccf363563bd7f4959bbae25c6e22bf02afc60c44310b9010ef3da8a77deec4ee5446cd6b764a937
|
7
|
+
data.tar.gz: 4ed5caf7ca151896c6465274549e6e29775daeca4de9ffbf6ee468374d21174da2e396d5ce2441460993f7d10e7470a499d3157071fae785efe68405da0911d2
|
@@ -110,14 +110,16 @@ module S3Uploader
|
|
110
110
|
if file
|
111
111
|
key = file.gsub(source, '').gsub(options[:gzip_working_dir].to_s, '')[1..-1]
|
112
112
|
dest = "#{options[:destination_dir]}#{key}"
|
113
|
+
body = File.open(file)
|
113
114
|
log.info("[#{Thread.current["file_number"]}/#{total_files}] Uploading #{key} to s3://#{bucket}/#{dest}")
|
114
115
|
|
115
116
|
directory.files.create(
|
116
117
|
:key => dest,
|
117
|
-
:body =>
|
118
|
+
:body => body,
|
118
119
|
:public => options[:public],
|
119
120
|
:metadata => options[:metadata]
|
120
121
|
)
|
122
|
+
body.close
|
121
123
|
end
|
122
124
|
end
|
123
125
|
end
|
data/lib/s3_uploader/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3_uploader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Hein
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog
|
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
version: '0'
|
94
94
|
requirements: []
|
95
95
|
rubyforge_project:
|
96
|
-
rubygems_version: 2.
|
96
|
+
rubygems_version: 2.4.3
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: S3 multithreaded directory uploader
|