lib/storage/google_cloud_storage.rb in cartup-1.0.0 vs lib/storage/google_cloud_storage.rb in cartup-1.0.1
- old
+ new
@@ -27,12 +27,12 @@
def create_bucket
@bucket = @storage.bucket @bucket_name
end
- def create_file(file_path)
- @bucket_object = @bucket.create_file(file_path, file_path)
+ def upload_file(file_path)
+ @bucket_object = @bucket.upload_file(file_path, file_path)
@bucket_object.signed_url(method: 'GET', expires: 3.154e+8)
end
def file_on_storage_cloud(file)
bucket_file = bucket.file file
@@ -42,15 +42,8 @@
def download_config_json_file(from_file)
json_file = @bucket.file from_file
json_file.download from_file
json_file
end
-
- def upload_json(json_path)
- CartLogger.log_info 'Starting upload file to google cloud'
- @bucket.create_file(json_path, json_path)
- CartLogger.log_info 'Uploaded complete'
- end
-
end
end