pushmi_pullyu 0.2.5 → 0.2.6
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 +4 -4
- data/lib/pushmi_pullyu/swift_depositer.rb +11 -3
- data/lib/pushmi_pullyu/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f283beb86e53c87da86178c6378da2522d41703
|
4
|
+
data.tar.gz: 629475e07add284c7af575932d6400af1ec7c50a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6606eb7bceef18a1a263f8e0f5ff6adc86f6d46b13a8e34ac4f3867ace42b91e9e71a00c794b1bd29a1a7a9b3dd8caae46cd1261ec988b4f6fd386644fda598
|
7
|
+
data.tar.gz: d8987510e6d8e4e99e27c38f49cddca65fe2cdbf17b28b0395503cb540698867065e36d43291897e4488f8e8bfc33444bc4a049f1abf52cbd52f1a438127c0d4
|
@@ -37,13 +37,21 @@ class PushmiPullyu::SwiftDepositer
|
|
37
37
|
# ruby-openstack wants all keys of the metadata to be named like "X-Object-Meta-{{Key}}", so update them
|
38
38
|
metadata.transform_keys! { |key| "X-Object-Meta-#{key}" }
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
# ruby-openstack expects the header hash in different structure for write vs create_object methods
|
41
|
+
# details see: https://github.com/ualbertalib/pushmi_pullyu/issues/105
|
43
42
|
if era_container.object_exists?(file_base_name)
|
43
|
+
# temporary solution until fixed in upstream:
|
44
|
+
# for update: construct hash for key/value pairs as strings,
|
45
|
+
# and metadata as additional key/value string pairs in the hash
|
46
|
+
headers = { 'etag' => checksum,
|
47
|
+
'content-type' => 'application/x-tar' }.merge(metadata)
|
44
48
|
deposited_file = era_container.object(file_base_name)
|
45
49
|
deposited_file.write(File.open(file_name), headers)
|
46
50
|
else
|
51
|
+
# for creating new: construct hash with symbols as keys, add metadata as a hash within the header hash
|
52
|
+
headers = { etag: checksum,
|
53
|
+
content_type: 'application/x-tar',
|
54
|
+
metadata: metadata }
|
47
55
|
deposited_file = era_container.create_object(file_base_name, headers, File.open(file_name))
|
48
56
|
end
|
49
57
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pushmi_pullyu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Murnaghan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|