gooddata_s3 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gooddata_s3/client.rb +7 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf21433f8b5c3aa67545ac281ed48d0718c81cf2
4
- data.tar.gz: e003a0fe9b34af3e586fe4efd26eb80654a873bb
3
+ metadata.gz: 844e2f2a8c252fb8dd755516aa1a81f4e63e95b1
4
+ data.tar.gz: cebb5fb9d9161c8f2994c11bf2e68b33c0137002
5
5
  SHA512:
6
- metadata.gz: 61ccf70b048d8d9dfd963ea7cb7eaa60d714e18c383dd5839281a63b398fb01a391230c5f1e5a88814f778648bd033443c6329b131ce56ef00ea7ab81026335c
7
- data.tar.gz: 0bc85e02ba1bfe189ab0e7b9c9c230d400904dee38e323f67c924d5da74b9d7f584d0c9bca93eefa79c1b11647598f5771c4325405384fb1132e7b5b81d2b013
6
+ metadata.gz: a89d4aa9251b94f8d3a0d6fa07410cf227c0d9bd07c2d8948d94af713f03676f91f1e10e7e446a2347b7d6d411e751e359e4ff8420659dbb4b65b63583d26bbb
7
+ data.tar.gz: 9b8d8b8388e379e31483cc8509dcc51337857081721d8236d3e763e0a83ca57ddfde6b79933f7bb1d0975b3186e723cca057ab8c9aeb3d3166978473ea19eb8d
@@ -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
- key = directory+"/"+local_file
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gooddata_s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick McConlogue