archived_remote_object 0.1.2 → 0.1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42d30e739b51ead61d8891b289acf10f8dea51d324625886b70f652706518fc0
|
4
|
+
data.tar.gz: e0b13979817b999fdf60205938e25313f69f26e202a119d90548becd14dbcc4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85b80ffa1c6faa61998dcaf3f0a31dd8e371d750c93593382dfe1aa9a950a526455d39726a70c43a5d1d123741d54874b68d374f826e66a93036db36fda91496
|
7
|
+
data.tar.gz: 68aeddf6f3dc26445377f3485e0af30013af2fe34c587de661d5c6fca9db340c1b65d30c5c9dd7dc5526b2ec39d62119339ce8f977820a017df19384472cc28c
|
@@ -33,6 +33,11 @@ module ArchivedRemoteObject
|
|
33
33
|
s3_client.restore_object(bucket: bucket, key: key, restore_request: { days: duration })
|
34
34
|
end
|
35
35
|
|
36
|
+
def assign_tag(key:, set:)
|
37
|
+
s3_client.stub_responses(:put_object_tagging) if stubbed?
|
38
|
+
s3_client.put_object_tagging(bucket: bucket, key: key, tagging: { tag_set: [{ key: set[0], value: set[1] }] })
|
39
|
+
end
|
40
|
+
|
36
41
|
def assign_storage_class(key:, storage_class:)
|
37
42
|
s3_client.stub_responses(:copy_object) if stubbed?
|
38
43
|
s3_client.copy_object(bucket: bucket, key: key, copy_source: "#{bucket}/#{key}", storage_class: storage_class)
|
@@ -23,6 +23,10 @@ module ArchivedRemoteObject
|
|
23
23
|
remote_client.restore(**args)
|
24
24
|
end
|
25
25
|
|
26
|
+
def assign_tag(key:, value:)
|
27
|
+
remote_client.assign_tag(key: self.key, set: [key, value])
|
28
|
+
end
|
29
|
+
|
26
30
|
def storage_class=(storage_class)
|
27
31
|
# accepts STANDARD, STANDARD_IA, ONEZONE_IA, GLACIER, INTELLIGENT_TIERING, DEEP_ARCHIVE
|
28
32
|
remote_client.assign_storage_class(key: key, storage_class: storage_class)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: archived_remote_object
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleksey Strizhak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|