gooddata_s3 0.1.0 → 0.1.1
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 +4 -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: fe09d7f2dd088273e558da512d285874d8a9accd
|
|
4
|
+
data.tar.gz: b6da9e073aa45a8f4ec8c6db43e8add3e087076d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8cc780e41b6edac1a295d4b046927174924691621035b3236a448894ece9121d6304f1c29f5d0398f136c6e299124fc7e42c9aeb8e79f56233553b88ae3f8823
|
|
7
|
+
data.tar.gz: 0d0b90f4e929595edc6e5b0654e70c84954830f174669f944fb906e2014364396b1d92f74aeca5a26106bab7cf89fe6e09951806f6adfc08849c62cc710c64e8
|
data/lib/gooddata_s3/client.rb
CHANGED
|
@@ -140,12 +140,13 @@ class GoodDataS3::Client
|
|
|
140
140
|
file = config[:file] || 'gooddata_connector_config.json'
|
|
141
141
|
|
|
142
142
|
if self.exists? file
|
|
143
|
+
|
|
144
|
+
File.delete(file)
|
|
145
|
+
|
|
143
146
|
json = JSON.parse(self.download(file), :symbolize_names => true)
|
|
144
147
|
|
|
145
148
|
File.open(file,'w'){ |f| JSON.dump(json, f) }
|
|
146
149
|
|
|
147
|
-
self.download(file)
|
|
148
|
-
|
|
149
150
|
json
|
|
150
151
|
|
|
151
152
|
else
|
|
@@ -202,7 +203,7 @@ class GoodDataS3::Client
|
|
|
202
203
|
|
|
203
204
|
def exists? file
|
|
204
205
|
begin
|
|
205
|
-
@s3.get_object(bucket_name: @bucket_name, key:file)
|
|
206
|
+
@s3.get_object(bucket_name: @bucket_name, key:"/#{file}")
|
|
206
207
|
true
|
|
207
208
|
rescue AWS::S3::Errors::NoSuchKey
|
|
208
209
|
false
|