gooddata_s3 0.1.4 → 0.1.5
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/gooddata_s3/client.rb +7 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 844e2f2a8c252fb8dd755516aa1a81f4e63e95b1
|
4
|
+
data.tar.gz: cebb5fb9d9161c8f2994c11bf2e68b33c0137002
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a89d4aa9251b94f8d3a0d6fa07410cf227c0d9bd07c2d8948d94af713f03676f91f1e10e7e446a2347b7d6d411e751e359e4ff8420659dbb4b65b63583d26bbb
|
7
|
+
data.tar.gz: 9b8d8b8388e379e31483cc8509dcc51337857081721d8236d3e763e0a83ca57ddfde6b79933f7bb1d0975b3186e723cca057ab8c9aeb3d3166978473ea19eb8d
|
data/lib/gooddata_s3/client.rb
CHANGED
@@ -102,7 +102,11 @@ class GoodDataS3::Client
|
|
102
102
|
|
103
103
|
raise 'Could not find local file...' unless File.exists? local_file
|
104
104
|
|
105
|
-
|
105
|
+
if directory
|
106
|
+
key = directory+"/"+local_file
|
107
|
+
else
|
108
|
+
key = local_file
|
109
|
+
end
|
106
110
|
|
107
111
|
puts "#{Time.now} => Uploading local file \"#{local_file}\" to S3 Bucket \"#{@bucket_name}\" (\"#{key}\")"
|
108
112
|
resp = @s3.put_object(
|
@@ -145,7 +149,7 @@ class GoodDataS3::Client
|
|
145
149
|
|
146
150
|
puts "#{Time.now} => Downloading from S3 Bucket (#{@bucket_name}): \"#{key}\""
|
147
151
|
|
148
|
-
key = "/#{key}" unless key[0] == '/'
|
152
|
+
#key = "/#{key}" unless key[0] == '/'
|
149
153
|
|
150
154
|
resp = @s3.get_object(bucket_name: @bucket_name, key:key)
|
151
155
|
resp[:data]
|
@@ -255,7 +259,7 @@ class GoodDataS3::Client
|
|
255
259
|
|
256
260
|
end
|
257
261
|
|
258
|
-
key = "/#{key}" unless key[0] == '/'
|
262
|
+
#key = "/#{key}" unless key[0] == '/'
|
259
263
|
|
260
264
|
puts "#{Time.now} => Deleting from S3 Bucket (#{@bucket_name}): \"#{key}\""
|
261
265
|
@s3.delete_object(bucket_name: @bucket_name, key: key)
|