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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '081c2d7ebdab8d2afe2bd9bac7fcd210ad17dc8c3ee9f5ec9acc1460b303f091'
4
- data.tar.gz: e43d97cf6aa7b84b343d9dcc44f95b747ee7123e30e23f86134061c2f6815042
3
+ metadata.gz: 816ae4a055ba38f5d6851e218eac7311d15379a44a0380237caa83fb0548b1c0
4
+ data.tar.gz: a10ec30cbec8d5b22cc20f9acfabf4445683a81f802a3a866fdb03f54079a35d
5
5
  SHA512:
6
- metadata.gz: 7edddaa3e2eb4296c887c1081f35ed2d7442e23e117a5f5d2dd83ca5fb46289ae7bd287a3b1ddad30ba80087bca42e32847ab4ac0f87e142746ff1817c2991d8
7
- data.tar.gz: 0efab00c49a38434425056590665567754a92c5fa5e102f67c23b304de99cf7eff49b113c22e4e2ae81a5692eac5c7078e910cca30aae37010d6e55bb058a6b1
6
+ metadata.gz: 40bda48606690f14cd437759f8d0aa4cd131c35bae2da6a4c61516097c83154bef9e525f41890e26281a81db83c8ef2182a456d025d1dfd4a7e3a317a94425e2
7
+ data.tar.gz: 356e9f96eef12675316affa0aa1562612f516226a573e2be035bddcbfae635c585513d495de6d78a72bc7dd42100460c0160aa4436758220bebfbfa0766a2c17
@@ -55,7 +55,7 @@ module FDE
55
55
  self.s3.bucket(self.config.bucket_name)
56
56
  end
57
57
 
58
- def self.upload(file_path, options = {})
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
@@ -1,5 +1,5 @@
1
1
  module FDE
2
2
  module S3Client
3
- VERSION = "0.3.1"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
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.3.1
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-04 00:00:00.000000000 Z
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