file-manager 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/file-manager.gemspec +1 -1
- data/lib/local_file_manager.rb +2 -0
- data/lib/s3_file_manager.rb +2 -0
- data/test/file_manager_test.rb +1 -0
- data/test/vcr_cassettes/test_downloading_to_temp_file.yml +79 -30
- 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: f13f65293d73d3c2a9579e931eece74f25a71dade78f8683c18225d421bdd325
|
4
|
+
data.tar.gz: a4e2a80b4b11d894129f39a843ed1304e197a2b2e92d66f8bbffc7dfefd30306
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4034f8b52e6a0d28219fb97fc7912889193967d84930fd8cfa96a800a175c5f7d27271d6a403cf924fe947b30e1e0ccd97334945be70110357c1de5a08508c4
|
7
|
+
data.tar.gz: 3e04ef0a2d74bcb42ce53618b6e4188e446e28297aa343601d82adb9e1befe256fbafa56b205bcc435b761f66ca2c1871bef8a6fc85ba48dbefcf8cc2853a0f7
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
file-manager (0.
|
4
|
+
file-manager (0.7.0)
|
5
5
|
aws-sdk-s3 (~> 1)
|
6
6
|
|
7
7
|
GEM
|
@@ -10,8 +10,8 @@ GEM
|
|
10
10
|
addressable (2.7.0)
|
11
11
|
public_suffix (>= 2.0.2, < 5.0)
|
12
12
|
aws-eventstream (1.1.0)
|
13
|
-
aws-partitions (1.
|
14
|
-
aws-sdk-core (3.109.
|
13
|
+
aws-partitions (1.394.0)
|
14
|
+
aws-sdk-core (3.109.3)
|
15
15
|
aws-eventstream (~> 1, >= 1.0.2)
|
16
16
|
aws-partitions (~> 1, >= 1.239.0)
|
17
17
|
aws-sigv4 (~> 1.1)
|
data/file-manager.gemspec
CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = "file-manager"
|
6
|
-
spec.version = '0.
|
6
|
+
spec.version = '0.7.0'
|
7
7
|
spec.authors = ["Francisco Barroso / Marlus Saraiva"]
|
8
8
|
spec.email = ["franciscobarroso@grupofortes.com.br"]
|
9
9
|
spec.description = 'File manager, access S3 or local'
|
data/lib/local_file_manager.rb
CHANGED
data/lib/s3_file_manager.rb
CHANGED
data/test/file_manager_test.rb
CHANGED
@@ -20,13 +20,13 @@ http_interactions:
|
|
20
20
|
Host:
|
21
21
|
- file-manager-tests.s3.us-west-2.amazonaws.com
|
22
22
|
X-Amz-Date:
|
23
|
-
-
|
23
|
+
- 20201124T145029Z
|
24
24
|
X-Amz-Content-Sha256:
|
25
25
|
- ed7002b439e9ac845f22357d822bac1444730fbdb6016d3ec9432297b9ec9f73
|
26
26
|
Authorization:
|
27
|
-
- AWS4-HMAC-SHA256 Credential=AKIAJ73G6IOWSUPCKP5A/
|
27
|
+
- AWS4-HMAC-SHA256 Credential=AKIAJ73G6IOWSUPCKP5A/20201124/us-west-2/s3/aws4_request,
|
28
28
|
SignedHeaders=content-md5;host;user-agent;x-amz-content-sha256;x-amz-date,
|
29
|
-
Signature=
|
29
|
+
Signature=1553631fdede92e7c00cdfc3c2695fddd968619d76c58a3aedb4ec3d2af6216d
|
30
30
|
Content-Length:
|
31
31
|
- '7'
|
32
32
|
Accept:
|
@@ -37,11 +37,11 @@ http_interactions:
|
|
37
37
|
message: OK
|
38
38
|
headers:
|
39
39
|
X-Amz-Id-2:
|
40
|
-
-
|
40
|
+
- M+sMGbF/0sv9rsxptZZE54Y3+E7Zr0lLMs2jmlBLlykPHYQFuxqRCL5/SXOKPyC+6eFW8WdJhpo=
|
41
41
|
X-Amz-Request-Id:
|
42
|
-
-
|
42
|
+
- E2ED2A94148D8A42
|
43
43
|
Date:
|
44
|
-
-
|
44
|
+
- Tue, 24 Nov 2020 14:50:30 GMT
|
45
45
|
Etag:
|
46
46
|
- '"9a0364b9e99bb480dd25e1f0284c8555"'
|
47
47
|
Content-Length:
|
@@ -51,7 +51,7 @@ http_interactions:
|
|
51
51
|
body:
|
52
52
|
encoding: UTF-8
|
53
53
|
string: ''
|
54
|
-
recorded_at:
|
54
|
+
recorded_at: Tue, 24 Nov 2020 14:50:30 GMT
|
55
55
|
- request:
|
56
56
|
method: get
|
57
57
|
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/temp_file/saved
|
@@ -68,12 +68,12 @@ http_interactions:
|
|
68
68
|
Host:
|
69
69
|
- file-manager-tests.s3.us-west-2.amazonaws.com
|
70
70
|
X-Amz-Date:
|
71
|
-
-
|
71
|
+
- 20201124T145030Z
|
72
72
|
X-Amz-Content-Sha256:
|
73
73
|
- e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
74
74
|
Authorization:
|
75
|
-
- AWS4-HMAC-SHA256 Credential=AKIAJ73G6IOWSUPCKP5A/
|
76
|
-
SignedHeaders=host;user-agent;x-amz-content-sha256;x-amz-date, Signature=
|
75
|
+
- AWS4-HMAC-SHA256 Credential=AKIAJ73G6IOWSUPCKP5A/20201124/us-west-2/s3/aws4_request,
|
76
|
+
SignedHeaders=host;user-agent;x-amz-content-sha256;x-amz-date, Signature=3553a99ec17f350f66cd836de1c4232204bb6880ee0225d11eef0d96cc077a0e
|
77
77
|
Content-Length:
|
78
78
|
- '0'
|
79
79
|
Accept:
|
@@ -84,13 +84,13 @@ http_interactions:
|
|
84
84
|
message: OK
|
85
85
|
headers:
|
86
86
|
X-Amz-Id-2:
|
87
|
-
-
|
87
|
+
- 66mnB4P9tZ5nspyQ91ANVbtwvcgI156GsyxjMURwCFU35qeTq4co1NdqLZCg39tcH3r54+ljkwU=
|
88
88
|
X-Amz-Request-Id:
|
89
|
-
-
|
89
|
+
- CFEFB83676E3AD41
|
90
90
|
Date:
|
91
|
-
-
|
91
|
+
- Tue, 24 Nov 2020 14:50:31 GMT
|
92
92
|
Last-Modified:
|
93
|
-
-
|
93
|
+
- Tue, 24 Nov 2020 14:50:30 GMT
|
94
94
|
Etag:
|
95
95
|
- '"9a0364b9e99bb480dd25e1f0284c8555"'
|
96
96
|
Accept-Ranges:
|
@@ -104,7 +104,7 @@ http_interactions:
|
|
104
104
|
body:
|
105
105
|
encoding: UTF-8
|
106
106
|
string: content
|
107
|
-
recorded_at:
|
107
|
+
recorded_at: Tue, 24 Nov 2020 14:50:30 GMT
|
108
108
|
- request:
|
109
109
|
method: get
|
110
110
|
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/temp_file/saved
|
@@ -121,12 +121,12 @@ http_interactions:
|
|
121
121
|
Host:
|
122
122
|
- file-manager-tests.s3.us-west-2.amazonaws.com
|
123
123
|
X-Amz-Date:
|
124
|
-
-
|
124
|
+
- 20201124T145030Z
|
125
125
|
X-Amz-Content-Sha256:
|
126
126
|
- e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
127
127
|
Authorization:
|
128
|
-
- AWS4-HMAC-SHA256 Credential=AKIAJ73G6IOWSUPCKP5A/
|
129
|
-
SignedHeaders=host;user-agent;x-amz-content-sha256;x-amz-date, Signature=
|
128
|
+
- AWS4-HMAC-SHA256 Credential=AKIAJ73G6IOWSUPCKP5A/20201124/us-west-2/s3/aws4_request,
|
129
|
+
SignedHeaders=host;user-agent;x-amz-content-sha256;x-amz-date, Signature=3553a99ec17f350f66cd836de1c4232204bb6880ee0225d11eef0d96cc077a0e
|
130
130
|
Content-Length:
|
131
131
|
- '0'
|
132
132
|
Accept:
|
@@ -137,13 +137,13 @@ http_interactions:
|
|
137
137
|
message: OK
|
138
138
|
headers:
|
139
139
|
X-Amz-Id-2:
|
140
|
-
-
|
140
|
+
- s31pm0mfwgROmbOaNEzb6u1AWjGhnLB7PBfgNfZp0AZ/gA6I4wb6TZ/ZOArBdfqkEhLGlpuXQ8U=
|
141
141
|
X-Amz-Request-Id:
|
142
|
-
-
|
142
|
+
- AB6B9F1835ABBBB4
|
143
143
|
Date:
|
144
|
-
-
|
144
|
+
- Tue, 24 Nov 2020 14:50:32 GMT
|
145
145
|
Last-Modified:
|
146
|
-
-
|
146
|
+
- Tue, 24 Nov 2020 14:50:30 GMT
|
147
147
|
Etag:
|
148
148
|
- '"9a0364b9e99bb480dd25e1f0284c8555"'
|
149
149
|
Accept-Ranges:
|
@@ -157,7 +157,7 @@ http_interactions:
|
|
157
157
|
body:
|
158
158
|
encoding: UTF-8
|
159
159
|
string: content
|
160
|
-
recorded_at:
|
160
|
+
recorded_at: Tue, 24 Nov 2020 14:50:31 GMT
|
161
161
|
- request:
|
162
162
|
method: delete
|
163
163
|
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/temp_file/saved
|
@@ -174,12 +174,12 @@ http_interactions:
|
|
174
174
|
Host:
|
175
175
|
- file-manager-tests.s3.us-west-2.amazonaws.com
|
176
176
|
X-Amz-Date:
|
177
|
-
-
|
177
|
+
- 20201124T145031Z
|
178
178
|
X-Amz-Content-Sha256:
|
179
179
|
- e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
180
180
|
Authorization:
|
181
|
-
- AWS4-HMAC-SHA256 Credential=AKIAJ73G6IOWSUPCKP5A/
|
182
|
-
SignedHeaders=host;user-agent;x-amz-content-sha256;x-amz-date, Signature=
|
181
|
+
- AWS4-HMAC-SHA256 Credential=AKIAJ73G6IOWSUPCKP5A/20201124/us-west-2/s3/aws4_request,
|
182
|
+
SignedHeaders=host;user-agent;x-amz-content-sha256;x-amz-date, Signature=ea30154941154ad4249905230d8fac332aec2dcbb81302d1bc607616c0a0caf3
|
183
183
|
Content-Length:
|
184
184
|
- '0'
|
185
185
|
Accept:
|
@@ -190,15 +190,64 @@ http_interactions:
|
|
190
190
|
message: No Content
|
191
191
|
headers:
|
192
192
|
X-Amz-Id-2:
|
193
|
-
-
|
193
|
+
- JFGwdnwwfZkQ3RZMgmgrspZEyv/F7lNEMgynTh5CezJGG8in7MMAXOPLWipSp4cA41S4L2zOiu4=
|
194
194
|
X-Amz-Request-Id:
|
195
|
-
-
|
195
|
+
- F24A51B9E5B403A8
|
196
196
|
Date:
|
197
|
-
-
|
197
|
+
- Tue, 24 Nov 2020 14:50:33 GMT
|
198
198
|
Server:
|
199
199
|
- AmazonS3
|
200
200
|
body:
|
201
201
|
encoding: UTF-8
|
202
202
|
string: ''
|
203
|
-
recorded_at:
|
203
|
+
recorded_at: Tue, 24 Nov 2020 14:50:32 GMT
|
204
|
+
- request:
|
205
|
+
method: get
|
206
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/temp_file/saved
|
207
|
+
body:
|
208
|
+
encoding: UTF-8
|
209
|
+
string: ''
|
210
|
+
headers:
|
211
|
+
Content-Type:
|
212
|
+
- ''
|
213
|
+
Accept-Encoding:
|
214
|
+
- ''
|
215
|
+
User-Agent:
|
216
|
+
- aws-sdk-ruby3/3.109.2 ruby/2.5.3 x86_64-linux aws-sdk-s3/1.84.1
|
217
|
+
Host:
|
218
|
+
- file-manager-tests.s3.us-west-2.amazonaws.com
|
219
|
+
X-Amz-Date:
|
220
|
+
- 20201124T145032Z
|
221
|
+
X-Amz-Content-Sha256:
|
222
|
+
- e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
223
|
+
Authorization:
|
224
|
+
- AWS4-HMAC-SHA256 Credential=AKIAJ73G6IOWSUPCKP5A/20201124/us-west-2/s3/aws4_request,
|
225
|
+
SignedHeaders=host;user-agent;x-amz-content-sha256;x-amz-date, Signature=e0d987aab7932cf51f4fba7447e5cf057a5a78e4737c477e6e0ce1bed651d99a
|
226
|
+
Content-Length:
|
227
|
+
- '0'
|
228
|
+
Accept:
|
229
|
+
- "*/*"
|
230
|
+
response:
|
231
|
+
status:
|
232
|
+
code: 404
|
233
|
+
message: Not Found
|
234
|
+
headers:
|
235
|
+
X-Amz-Request-Id:
|
236
|
+
- '09FAB9D7EA1E6425'
|
237
|
+
X-Amz-Id-2:
|
238
|
+
- lUWz95OFeBVsoYoLv0UDvqIvcW+mmS8b6NdfpdVukU+VCDC+A5xS1XGkPq+YxO3Es/nfuus/kow=
|
239
|
+
Content-Type:
|
240
|
+
- application/xml
|
241
|
+
Transfer-Encoding:
|
242
|
+
- chunked
|
243
|
+
Date:
|
244
|
+
- Tue, 24 Nov 2020 14:50:32 GMT
|
245
|
+
Server:
|
246
|
+
- AmazonS3
|
247
|
+
body:
|
248
|
+
encoding: UTF-8
|
249
|
+
string: |-
|
250
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
251
|
+
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>temp_file/saved</Key><RequestId>09FAB9D7EA1E6425</RequestId><HostId>lUWz95OFeBVsoYoLv0UDvqIvcW+mmS8b6NdfpdVukU+VCDC+A5xS1XGkPq+YxO3Es/nfuus/kow=</HostId></Error>
|
252
|
+
recorded_at: Tue, 24 Nov 2020 14:50:32 GMT
|
204
253
|
recorded_with: VCR 6.0.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: file-manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francisco Barroso / Marlus Saraiva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|