uricp 0.0.30 → 0.0.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/uricp/curl_primitives.rb +8 -4
- data/lib/uricp/strategy/piped_remote_get.rb +2 -1
- data/lib/uricp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4895addf1e14cf9a918d89e471fe0f30e12189bd942303806590aff1368a294
|
4
|
+
data.tar.gz: 97be8b34f73e4e0070cd6a0f6878a5f7dd9db465d7b5fd236c4497e72f5b83cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb45da786826b356a2a95b0764eb7e3d117d0933da0f0729e3473ee4715266217fe642fbe819a87f7b7330809bded5d1f7a92cc39c5c27c8766776577bec19e8
|
7
|
+
data.tar.gz: edc045ffc50f615a1f40ef8d4700c541658095ecef4eee84bbf196071a1e233c165eab0f8dd5c237d56aacbfe30ca7722db8398fd45de5fb46a6718356229368
|
data/Gemfile.lock
CHANGED
@@ -24,22 +24,26 @@ module Uricp::CurlPrimitives
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def authentication
|
27
|
-
"-H X-Auth-Token:#{options['authenticator'].call}" if http_authentication?
|
27
|
+
"-H 'X-Auth-Token:#{options['authenticator'].call}'" if http_authentication?
|
28
28
|
end
|
29
29
|
|
30
30
|
def http_authentication?
|
31
31
|
options['authenticator']
|
32
32
|
end
|
33
33
|
|
34
|
+
def temp_url?
|
35
|
+
from && from.query.to_s.include?('temp_url')
|
36
|
+
end
|
37
|
+
|
34
38
|
def curl_upload_from(source, destination = to)
|
35
|
-
"#{curl_command} #{authentication} -T #{source} #{destination};"
|
39
|
+
"#{curl_command} #{authentication} -T '#{source}' '#{destination}';"
|
36
40
|
end
|
37
41
|
|
38
42
|
def curl_download_to_pipe
|
39
|
-
"#{curl_command} #{authentication} #{from} |"
|
43
|
+
"#{curl_command} #{authentication unless temp_url?} '#{from}' |"
|
40
44
|
end
|
41
45
|
|
42
46
|
def curl_manifest(object_manifest, destination = to)
|
43
|
-
"#{curl_command} #{authentication} -X PUT -H 'X-Object-Manifest: #{object_manifest}' #{destination} --data-binary ''"
|
47
|
+
"#{curl_command} #{authentication} -X PUT -H 'X-Object-Manifest: #{object_manifest}' '#{destination}' --data-binary ''"
|
44
48
|
end
|
45
49
|
end
|
@@ -75,7 +75,8 @@ module Uricp::Strategy
|
|
75
75
|
|
76
76
|
def headers
|
77
77
|
headers = { 'Range' => 'bytes=0-7' }
|
78
|
-
headers
|
78
|
+
return headers if !http_authentication? || temp_url?
|
79
|
+
headers['X-Auth-Token'] = options['authenticator'].call
|
79
80
|
headers
|
80
81
|
end
|
81
82
|
end
|
data/lib/uricp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uricp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neil Wilson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aruba
|