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: b8fd27ad3b07bda906169814dea5a5e305174715de286d749c9825dfdd5f2d98
4
- data.tar.gz: e67315f5d0825f5c66cef22667424b1a5d90f04e060ec91801cd3a00e376131e
3
+ metadata.gz: 42d30e739b51ead61d8891b289acf10f8dea51d324625886b70f652706518fc0
4
+ data.tar.gz: e0b13979817b999fdf60205938e25313f69f26e202a119d90548becd14dbcc4b
5
5
  SHA512:
6
- metadata.gz: daa4996fb18897a4ec59844e858d997e581fbfba067374243d5f02f649913642b3a22b1f056868dad3e7dde84b51d4918031312b8c83774ee115523c4243060e
7
- data.tar.gz: 55b449a47b42b1a36bb2f1f17c893421f9628b5a96ccc53d3dbeffdc2f2a5375c9538048932775434bd75077ecd9ef0940d7da9da7bcea014a42620dfacfbb4b
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)
@@ -1,3 +1,3 @@
1
1
  module ArchivedRemoteObject
2
- VERSION = "0.1.2".freeze
2
+ VERSION = "0.1.3".freeze
3
3
  end
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.2
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-26 00:00:00.000000000 Z
11
+ date: 2021-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk