outreach_gem 1.0.57 → 1.0.60

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3fc9117fd3649e9c20dd05372207bad7473d82d3b1119143933c6a2a117c947
4
- data.tar.gz: 4f599d071b0e212fd4365ab0f338b8fead89ed5e7320db50b20b5922e2dea4ee
3
+ metadata.gz: a2568f9276ebe9ffa271c36d35582cc6be434086368a3c546705ac6d6683de26
4
+ data.tar.gz: 61ae2d3315b0d4a7a7177b56fc989ecc4fb0ac38aee773cc3903176b81d2af42
5
5
  SHA512:
6
- metadata.gz: 05e59be8ec7cd204866744b9e1644bc2529b1b482ec3cc07d29678de155365eaf3f5ca098872e9a5467aca1c482f2f38987421302881123ed53f331dccb00edb
7
- data.tar.gz: 07ab14cf00c218b1c1a12d3b266b5c0f623dd0cbdb4303545b5e41659758e2edc9c221664ecb5dbb2bcd42f8aa25a739689cb65dcb4a1c38cf485b4a4873a175
6
+ metadata.gz: d74f56a34fbd4c99f101ddc25752eabf1f81f56afb7df1a38bfb88ce903b7786cc86b3632890470d729799f38dbaf4346e36e2a6aa4c357da2bc45d455615884
7
+ data.tar.gz: ee0ff39ef9c2f4e44198231e87150f649d9a67796d11092a7395d654cafc58441e6831ee88be3cb01ab00db734c49b7be5c9077e525c2dfe14db78f2dde16cef
@@ -47,10 +47,10 @@ class OutreachUploadS3
47
47
  return obj
48
48
  end
49
49
 
50
- # Retrieve an item from S3
50
+ # Retrieve an item from S3 and return it in memory
51
51
  # @param [string] The key representing the item in the bucket
52
52
  # @return [S3Object] Return the S3 Object if it exists, if not then nil
53
- def getItem(item_name)
53
+ def getItemInRam(item_name)
54
54
  if item_name.nil? or item_name.empty?
55
55
  raise 'Cannot have an empty or nil item to retrieve from S3'
56
56
  end
@@ -61,6 +61,23 @@ class OutreachUploadS3
61
61
  return object
62
62
  end
63
63
 
64
+ # Retrieve an item from S3 and return it on disk
65
+ # @param [string] The key representing the item in the bucket
66
+ # @return [S3Object] Return the S3 Object if it exists, if not then nil
67
+ def getItemOnDisk(item_name, file_path)
68
+ if item_name.nil? or item_name.empty?
69
+ raise 'Cannot have an empty or nil item to retrieve from S3'
70
+ end
71
+ object = @s3_client.get_object(
72
+ response_target: file_path,
73
+ bucket: @bucketName,
74
+ key: item_name)
75
+ if object.nil?
76
+ return nil
77
+ end
78
+ return object
79
+ end
80
+
64
81
  # Delete the S3Object
65
82
  # @param s3_object [S3Object] Delete the S3 Object from the bucket
66
83
  # @raise RuntimeError object cannot be nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: outreach_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.57
4
+ version: 1.0.60
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrique Legault