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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a8fb8f3417ec607cb24ed10345b5592ddeecde7
4
- data.tar.gz: 7f749a8deb7fe99d35c4365f264b2bb57206807c
3
+ metadata.gz: f2e95e50bf6a94edfbd19e8e2804e057fe2c6255
4
+ data.tar.gz: 05fea879928d79bc17a1178b8061c7ed884defcc
5
5
  SHA512:
6
- metadata.gz: aaaaf8f47a0548a371c867c0de00f639ec0fad740844892d4ba7d0aac4afb3679cb7fcc43737a155c72882e7212d242dfa8595d1cdd03737a705efe1d1c63b9b
7
- data.tar.gz: 13a457b7691ad2a21ec201a5a64f80a36950edace655852122dc21d55e8c6128c00ec3eb0dabca051c013649b0bc1b4a4fa1d4306470894d19519a4b8cffb2f9
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 => File.open(file),
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
@@ -1,3 +1,3 @@
1
1
  module S3Uploader
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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: 2014-08-15 00:00:00.000000000 Z
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.2.2
96
+ rubygems_version: 2.4.3
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: S3 multithreaded directory uploader