fde-s3_client 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fde/s3_client.rb +5 -1
- data/lib/fde/s3_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 816ae4a055ba38f5d6851e218eac7311d15379a44a0380237caa83fb0548b1c0
|
4
|
+
data.tar.gz: a10ec30cbec8d5b22cc20f9acfabf4445683a81f802a3a866fdb03f54079a35d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40bda48606690f14cd437759f8d0aa4cd131c35bae2da6a4c61516097c83154bef9e525f41890e26281a81db83c8ef2182a456d025d1dfd4a7e3a317a94425e2
|
7
|
+
data.tar.gz: 356e9f96eef12675316affa0aa1562612f516226a573e2be035bddcbfae635c585513d495de6d78a72bc7dd42100460c0160aa4436758220bebfbfa0766a2c17
|
data/lib/fde/s3_client.rb
CHANGED
@@ -55,7 +55,7 @@ module FDE
|
|
55
55
|
self.s3.bucket(self.config.bucket_name)
|
56
56
|
end
|
57
57
|
|
58
|
-
def self.
|
58
|
+
def self.upload_file(file_path, options = {})
|
59
59
|
if options[:key]
|
60
60
|
key = options[:folder].to_s + options[:key]
|
61
61
|
else
|
@@ -64,6 +64,10 @@ module FDE
|
|
64
64
|
self.s3.bucket(self.config.bucket_name).object(key).upload_file(file_path)
|
65
65
|
end
|
66
66
|
|
67
|
+
def self.upload_content(key, content)
|
68
|
+
self.s3.bucket(self.config.bucket_name).object(key).put(body: content)
|
69
|
+
end
|
70
|
+
|
67
71
|
def self.delete(key)
|
68
72
|
object = self.bucket.object(key)
|
69
73
|
object.delete
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fde-s3_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Langenegger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|