file-manager 0.0.11 → 0.0.12
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/Gemfile.lock +21 -17
- data/file-manager.gemspec +1 -1
- data/lib/file_manager.rb +4 -0
- data/lib/local_file_manager.rb +12 -6
- data/lib/s3_file_manager.rb +10 -10
- data/test/file_manager_test.rb +23 -0
- data/test/local_test.rb +1 -1
- data/test/s3_test.rb +1 -1
- data/test/vcr_cassettes/test_listing_files.yml +64 -416
- data/test/vcr_cassettes/test_listing_files_in_sub_dir.yml +353 -0
- data/test/vcr_cassettes/test_reading.yml +34 -263
- data/test/vcr_cassettes/test_reading_in_sub_dir.yml +216 -0
- metadata +8 -3
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: get
|
|
5
|
+
uri: https://file-manager-tests.s3.amazonaws.com/sub_dir/not_saved
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: ''
|
|
9
|
+
headers:
|
|
10
|
+
Content-Type:
|
|
11
|
+
- ''
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- ''
|
|
14
|
+
User-Agent:
|
|
15
|
+
- aws-sdk-ruby/1.52.0 ruby/2.2.1 x86_64-darwin14
|
|
16
|
+
Date:
|
|
17
|
+
- Thu, 21 Jan 2016 21:01:37 GMT
|
|
18
|
+
Authorization:
|
|
19
|
+
- AWS AKIAJ73G6IOWSUPCKP5A:Us20AcjKsjgrh2zLaMFP2KIZPLk=
|
|
20
|
+
Accept:
|
|
21
|
+
- "*/*"
|
|
22
|
+
response:
|
|
23
|
+
status:
|
|
24
|
+
code: 404
|
|
25
|
+
message: Not Found
|
|
26
|
+
headers:
|
|
27
|
+
X-Amz-Request-Id:
|
|
28
|
+
- BE32128CE96DE87D
|
|
29
|
+
X-Amz-Id-2:
|
|
30
|
+
- mMS0aEGlrv1HbWDqz1U+teGC3gB7rMP2eV71lthClsKzxda7SC5w0NkYhBV/lnTAhkdzlQfnJCg=
|
|
31
|
+
Content-Type:
|
|
32
|
+
- application/xml
|
|
33
|
+
Transfer-Encoding:
|
|
34
|
+
- chunked
|
|
35
|
+
Date:
|
|
36
|
+
- Thu, 21 Jan 2016 21:01:37 GMT
|
|
37
|
+
Server:
|
|
38
|
+
- AmazonS3
|
|
39
|
+
body:
|
|
40
|
+
encoding: UTF-8
|
|
41
|
+
string: |-
|
|
42
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
43
|
+
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>sub_dir/not_saved</Key><RequestId>BE32128CE96DE87D</RequestId><HostId>mMS0aEGlrv1HbWDqz1U+teGC3gB7rMP2eV71lthClsKzxda7SC5w0NkYhBV/lnTAhkdzlQfnJCg=</HostId></Error>
|
|
44
|
+
http_version:
|
|
45
|
+
recorded_at: Thu, 21 Jan 2016 21:01:37 GMT
|
|
46
|
+
- request:
|
|
47
|
+
method: put
|
|
48
|
+
uri: https://file-manager-tests.s3.amazonaws.com/sub_dir/saved
|
|
49
|
+
body:
|
|
50
|
+
encoding: ASCII-8BIT
|
|
51
|
+
string: content
|
|
52
|
+
headers:
|
|
53
|
+
Content-Type:
|
|
54
|
+
- ''
|
|
55
|
+
Accept-Encoding:
|
|
56
|
+
- ''
|
|
57
|
+
Content-Length:
|
|
58
|
+
- '7'
|
|
59
|
+
User-Agent:
|
|
60
|
+
- aws-sdk-ruby/1.52.0 ruby/2.2.1 x86_64-darwin14
|
|
61
|
+
Date:
|
|
62
|
+
- Thu, 21 Jan 2016 21:01:37 GMT
|
|
63
|
+
Authorization:
|
|
64
|
+
- AWS AKIAJ73G6IOWSUPCKP5A:LpFLSg72CHsSRm02RTwfDAZQIwo=
|
|
65
|
+
Accept:
|
|
66
|
+
- "*/*"
|
|
67
|
+
response:
|
|
68
|
+
status:
|
|
69
|
+
code: 200
|
|
70
|
+
message: OK
|
|
71
|
+
headers:
|
|
72
|
+
X-Amz-Id-2:
|
|
73
|
+
- Jd3BN2UOjYexAhBXbzZuNGT0K7rOXBgeCagiwM5c+1x5ELwCnGZVHWZV4K1NAf6md8xNGim7YYY=
|
|
74
|
+
X-Amz-Request-Id:
|
|
75
|
+
- 40D36A97C15D4790
|
|
76
|
+
Date:
|
|
77
|
+
- Thu, 21 Jan 2016 21:01:39 GMT
|
|
78
|
+
Etag:
|
|
79
|
+
- '"9a0364b9e99bb480dd25e1f0284c8555"'
|
|
80
|
+
Content-Length:
|
|
81
|
+
- '0'
|
|
82
|
+
Server:
|
|
83
|
+
- AmazonS3
|
|
84
|
+
body:
|
|
85
|
+
encoding: UTF-8
|
|
86
|
+
string: ''
|
|
87
|
+
http_version:
|
|
88
|
+
recorded_at: Thu, 21 Jan 2016 21:01:38 GMT
|
|
89
|
+
- request:
|
|
90
|
+
method: get
|
|
91
|
+
uri: https://file-manager-tests.s3.amazonaws.com/sub_dir/saved
|
|
92
|
+
body:
|
|
93
|
+
encoding: US-ASCII
|
|
94
|
+
string: ''
|
|
95
|
+
headers:
|
|
96
|
+
Content-Type:
|
|
97
|
+
- ''
|
|
98
|
+
Accept-Encoding:
|
|
99
|
+
- ''
|
|
100
|
+
User-Agent:
|
|
101
|
+
- aws-sdk-ruby/1.52.0 ruby/2.2.1 x86_64-darwin14
|
|
102
|
+
Date:
|
|
103
|
+
- Thu, 21 Jan 2016 21:01:38 GMT
|
|
104
|
+
Authorization:
|
|
105
|
+
- AWS AKIAJ73G6IOWSUPCKP5A:tJNrySpqnboHG959cE5GMQvnxjg=
|
|
106
|
+
Accept:
|
|
107
|
+
- "*/*"
|
|
108
|
+
response:
|
|
109
|
+
status:
|
|
110
|
+
code: 200
|
|
111
|
+
message: OK
|
|
112
|
+
headers:
|
|
113
|
+
X-Amz-Id-2:
|
|
114
|
+
- WgD+EDhz3Nz+foJIIk3N7bQZiEy6q2Cpn3kkM0rVJGm3J+Z9Mnzch2Z3oET1v5qFaOP06RKuVc8=
|
|
115
|
+
X-Amz-Request-Id:
|
|
116
|
+
- 3C181ED3642D4518
|
|
117
|
+
Date:
|
|
118
|
+
- Thu, 21 Jan 2016 21:01:39 GMT
|
|
119
|
+
Last-Modified:
|
|
120
|
+
- Thu, 21 Jan 2016 21:01:39 GMT
|
|
121
|
+
Etag:
|
|
122
|
+
- '"9a0364b9e99bb480dd25e1f0284c8555"'
|
|
123
|
+
Accept-Ranges:
|
|
124
|
+
- bytes
|
|
125
|
+
Content-Type:
|
|
126
|
+
- ''
|
|
127
|
+
Content-Length:
|
|
128
|
+
- '7'
|
|
129
|
+
Server:
|
|
130
|
+
- AmazonS3
|
|
131
|
+
body:
|
|
132
|
+
encoding: UTF-8
|
|
133
|
+
string: content
|
|
134
|
+
http_version:
|
|
135
|
+
recorded_at: Thu, 21 Jan 2016 21:01:38 GMT
|
|
136
|
+
- request:
|
|
137
|
+
method: delete
|
|
138
|
+
uri: https://file-manager-tests.s3.amazonaws.com/sub_dir/saved
|
|
139
|
+
body:
|
|
140
|
+
encoding: US-ASCII
|
|
141
|
+
string: ''
|
|
142
|
+
headers:
|
|
143
|
+
Content-Type:
|
|
144
|
+
- ''
|
|
145
|
+
Accept-Encoding:
|
|
146
|
+
- ''
|
|
147
|
+
User-Agent:
|
|
148
|
+
- aws-sdk-ruby/1.52.0 ruby/2.2.1 x86_64-darwin14
|
|
149
|
+
Date:
|
|
150
|
+
- Thu, 21 Jan 2016 21:01:38 GMT
|
|
151
|
+
Authorization:
|
|
152
|
+
- AWS AKIAJ73G6IOWSUPCKP5A:mk9I82LPhT2Gsu3KxfCtxDZoHhI=
|
|
153
|
+
Accept:
|
|
154
|
+
- "*/*"
|
|
155
|
+
response:
|
|
156
|
+
status:
|
|
157
|
+
code: 204
|
|
158
|
+
message: No Content
|
|
159
|
+
headers:
|
|
160
|
+
X-Amz-Id-2:
|
|
161
|
+
- sm+M7tbMmLTPBVmZxXt/EZxkIzYPRXwr+RKDj05HKbKVwudCrECsyVLdcozCtRJVMRKkcNKOHQg=
|
|
162
|
+
X-Amz-Request-Id:
|
|
163
|
+
- 8CCD4CB6B4E622BE
|
|
164
|
+
Date:
|
|
165
|
+
- Thu, 21 Jan 2016 21:01:40 GMT
|
|
166
|
+
Server:
|
|
167
|
+
- AmazonS3
|
|
168
|
+
body:
|
|
169
|
+
encoding: UTF-8
|
|
170
|
+
string: ''
|
|
171
|
+
http_version:
|
|
172
|
+
recorded_at: Thu, 21 Jan 2016 21:01:39 GMT
|
|
173
|
+
- request:
|
|
174
|
+
method: get
|
|
175
|
+
uri: https://file-manager-tests.s3.amazonaws.com/sub_dir/saved
|
|
176
|
+
body:
|
|
177
|
+
encoding: US-ASCII
|
|
178
|
+
string: ''
|
|
179
|
+
headers:
|
|
180
|
+
Content-Type:
|
|
181
|
+
- ''
|
|
182
|
+
Accept-Encoding:
|
|
183
|
+
- ''
|
|
184
|
+
User-Agent:
|
|
185
|
+
- aws-sdk-ruby/1.52.0 ruby/2.2.1 x86_64-darwin14
|
|
186
|
+
Date:
|
|
187
|
+
- Thu, 21 Jan 2016 21:01:39 GMT
|
|
188
|
+
Authorization:
|
|
189
|
+
- AWS AKIAJ73G6IOWSUPCKP5A:+wyIRJ9wqotv06n03bqQh+BlY8c=
|
|
190
|
+
Accept:
|
|
191
|
+
- "*/*"
|
|
192
|
+
response:
|
|
193
|
+
status:
|
|
194
|
+
code: 404
|
|
195
|
+
message: Not Found
|
|
196
|
+
headers:
|
|
197
|
+
X-Amz-Request-Id:
|
|
198
|
+
- E7BDA154328F279C
|
|
199
|
+
X-Amz-Id-2:
|
|
200
|
+
- yd1xFjuM8mV3UEChyto8p1bodgrlvNZS7HIadxox5Ocz2yqqOY+awxPAWHLKgTOijPIocnFPIw8=
|
|
201
|
+
Content-Type:
|
|
202
|
+
- application/xml
|
|
203
|
+
Transfer-Encoding:
|
|
204
|
+
- chunked
|
|
205
|
+
Date:
|
|
206
|
+
- Thu, 21 Jan 2016 21:01:39 GMT
|
|
207
|
+
Server:
|
|
208
|
+
- AmazonS3
|
|
209
|
+
body:
|
|
210
|
+
encoding: UTF-8
|
|
211
|
+
string: |-
|
|
212
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
213
|
+
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>sub_dir/saved</Key><RequestId>E7BDA154328F279C</RequestId><HostId>yd1xFjuM8mV3UEChyto8p1bodgrlvNZS7HIadxox5Ocz2yqqOY+awxPAWHLKgTOijPIocnFPIw8=</HostId></Error>
|
|
214
|
+
http_version:
|
|
215
|
+
recorded_at: Thu, 21 Jan 2016 21:01:40 GMT
|
|
216
|
+
recorded_with: VCR 3.0.1
|
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.0.
|
|
4
|
+
version: 0.0.12
|
|
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:
|
|
11
|
+
date: 2016-01-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk
|
|
@@ -135,7 +135,9 @@ files:
|
|
|
135
135
|
- test/s3_test.rb
|
|
136
136
|
- test/test_helper.rb
|
|
137
137
|
- test/vcr_cassettes/test_listing_files.yml
|
|
138
|
+
- test/vcr_cassettes/test_listing_files_in_sub_dir.yml
|
|
138
139
|
- test/vcr_cassettes/test_reading.yml
|
|
140
|
+
- test/vcr_cassettes/test_reading_in_sub_dir.yml
|
|
139
141
|
homepage: https://github.com/fortesinformatica/file-manager
|
|
140
142
|
licenses: []
|
|
141
143
|
metadata: {}
|
|
@@ -155,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
155
157
|
version: '0'
|
|
156
158
|
requirements: []
|
|
157
159
|
rubyforge_project:
|
|
158
|
-
rubygems_version: 2.
|
|
160
|
+
rubygems_version: 2.4.5
|
|
159
161
|
signing_key:
|
|
160
162
|
specification_version: 4
|
|
161
163
|
summary: File manager, access S3 or local
|
|
@@ -166,4 +168,7 @@ test_files:
|
|
|
166
168
|
- test/s3_test.rb
|
|
167
169
|
- test/test_helper.rb
|
|
168
170
|
- test/vcr_cassettes/test_listing_files.yml
|
|
171
|
+
- test/vcr_cassettes/test_listing_files_in_sub_dir.yml
|
|
169
172
|
- test/vcr_cassettes/test_reading.yml
|
|
173
|
+
- test/vcr_cassettes/test_reading_in_sub_dir.yml
|
|
174
|
+
has_rdoc:
|