file-manager 0.6.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +26 -24
- 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/local_file_manager_test.rb +0 -1
- data/test/memory_file_manager_test.rb +0 -1
- data/test/s3_file_manager_test.rb +0 -1
- data/test/vcr_cassettes/test_downloading_to_temp_file.yml +79 -30
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71fbfea4aafaafea13fa3621484f5c4056e58292f7bca814bd66fa5d9eefa139
|
4
|
+
data.tar.gz: b8fff60170f81479af9ecd47536e75f0f4fa006aeac69b4a8d70e81bf92896c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e38752a0c002fe35f9f54b967312bfe1768c022bca776dd8962c5983faaded39c75e45d387cfa3c6c7ba41e602bf5ea8b2d138caec3d764be41901bfb8ea8ed2
|
7
|
+
data.tar.gz: e733d014c052c49d3e166fa7f30351cc5394e8c17e0723ed3a11b3b0b3e837093219280361ca6b5efd894479403e8a343e46ccb48fa87ef959e9f37d5c33f831
|
data/Gemfile.lock
CHANGED
@@ -1,40 +1,42 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
file-manager (0.
|
4
|
+
file-manager (0.7.1)
|
5
5
|
aws-sdk-s3 (~> 1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
addressable (2.
|
11
|
-
public_suffix (>= 2.0.2, <
|
12
|
-
aws-eventstream (1.
|
13
|
-
aws-partitions (1.
|
14
|
-
aws-sdk-core (3.
|
10
|
+
addressable (2.8.1)
|
11
|
+
public_suffix (>= 2.0.2, < 6.0)
|
12
|
+
aws-eventstream (1.2.0)
|
13
|
+
aws-partitions (1.679.0)
|
14
|
+
aws-sdk-core (3.168.4)
|
15
15
|
aws-eventstream (~> 1, >= 1.0.2)
|
16
|
-
aws-partitions (~> 1, >= 1.
|
16
|
+
aws-partitions (~> 1, >= 1.651.0)
|
17
|
+
aws-sigv4 (~> 1.5)
|
18
|
+
jmespath (~> 1, >= 1.6.1)
|
19
|
+
aws-sdk-kms (1.61.0)
|
20
|
+
aws-sdk-core (~> 3, >= 3.165.0)
|
17
21
|
aws-sigv4 (~> 1.1)
|
18
|
-
|
19
|
-
|
20
|
-
aws-sdk-core (~> 3, >= 3.109.0)
|
21
|
-
aws-sigv4 (~> 1.1)
|
22
|
-
aws-sdk-s3 (1.84.1)
|
23
|
-
aws-sdk-core (~> 3, >= 3.109.0)
|
22
|
+
aws-sdk-s3 (1.117.2)
|
23
|
+
aws-sdk-core (~> 3, >= 3.165.0)
|
24
24
|
aws-sdk-kms (~> 1)
|
25
|
-
aws-sigv4 (~> 1.
|
26
|
-
aws-sigv4 (1.
|
25
|
+
aws-sigv4 (~> 1.4)
|
26
|
+
aws-sigv4 (1.5.2)
|
27
27
|
aws-eventstream (~> 1, >= 1.0.2)
|
28
|
-
crack (0.4.
|
28
|
+
crack (0.4.5)
|
29
|
+
rexml
|
29
30
|
hashdiff (1.0.1)
|
30
|
-
jmespath (1.
|
31
|
-
minitest (5.
|
32
|
-
public_suffix (
|
33
|
-
rake (13.0.
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
31
|
+
jmespath (1.6.2)
|
32
|
+
minitest (5.16.3)
|
33
|
+
public_suffix (5.0.1)
|
34
|
+
rake (13.0.6)
|
35
|
+
rexml (3.2.5)
|
36
|
+
single_cov (1.7.0)
|
37
|
+
vcr (6.1.0)
|
38
|
+
webmock (3.18.1)
|
39
|
+
addressable (>= 2.8.0)
|
38
40
|
crack (>= 0.3.2)
|
39
41
|
hashdiff (>= 0.4.0, < 2.0.0)
|
40
42
|
|
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.1'
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francisco Barroso / Marlus Saraiva
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|
@@ -132,7 +132,7 @@ files:
|
|
132
132
|
homepage: https://github.com/fortesinformatica/file-manager
|
133
133
|
licenses: []
|
134
134
|
metadata: {}
|
135
|
-
post_install_message:
|
135
|
+
post_install_message:
|
136
136
|
rdoc_options: []
|
137
137
|
require_paths:
|
138
138
|
- lib
|
@@ -147,8 +147,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
- !ruby/object:Gem::Version
|
148
148
|
version: '0'
|
149
149
|
requirements: []
|
150
|
-
rubygems_version: 3.
|
151
|
-
signing_key:
|
150
|
+
rubygems_version: 3.3.8
|
151
|
+
signing_key:
|
152
152
|
specification_version: 4
|
153
153
|
summary: File manager, access S3 or local
|
154
154
|
test_files:
|