file-manager 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +8 -3
- data/Gemfile +4 -0
- data/Gemfile.lock +29 -27
- data/README.md +4 -1
- data/Rakefile +1 -0
- data/file-manager.gemspec +3 -4
- data/lib/local_file_manager.rb +1 -1
- data/lib/s3_file_manager.rb +1 -1
- data/test/coverage_test.rb +15 -0
- data/test/file_manager_test.rb +11 -0
- data/test/{local_test.rb → local_file_manager_test.rb} +2 -0
- data/test/{memory_test.rb → memory_file_manager_test.rb} +2 -0
- data/test/{s3_test.rb → s3_file_manager_test.rb} +2 -0
- data/test/test_helper.rb +3 -4
- data/test/vcr_cassettes/test_downloading_to_temp_file.yml +4 -4
- data/test/vcr_cassettes/test_listing_files.yml +8 -8
- data/test/vcr_cassettes/test_listing_files_in_sub_dir.yml +8 -8
- data/test/vcr_cassettes/test_reading.yml +5 -5
- data/test/vcr_cassettes/test_reading_in_sub_dir.yml +5 -5
- data/test/vcr_cassettes/test_remove_not_existing_file_dont_raise.yml +2 -2
- metadata +20 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f4709dad37f74843db6ef637bcc5c32f8ae4a292a1af753633f6f14e611c837a
|
4
|
+
data.tar.gz: b6e055cee3df135bc8ee15e187410aa8ea9bfdca14d5b398423f9642419d03f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a628c66167c0e206cc55f2179391268298e373f3254d0dede72858b0b3a7cd8a83ba6bbe01f880df3954e0ec8796efdf220b6f62b019a63e3d8a9dc4ac00128
|
7
|
+
data.tar.gz: 0e00d7beebe557671ad764556b610096a7195e943c55686bcb28b8aed8ee8c81a7dce8c40dce880efc63041a1373df89b509eeec411a02f69c4aa2235f0d7a4a
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,38 +1,40 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
file-manager (0.
|
5
|
-
aws-sdk (
|
4
|
+
file-manager (0.4.0)
|
5
|
+
aws-sdk-s3 (~> 1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
addressable (2.
|
11
|
-
|
12
|
-
|
13
|
-
aws-
|
10
|
+
addressable (2.5.2)
|
11
|
+
public_suffix (>= 2.0.2, < 4.0)
|
12
|
+
aws-eventstream (1.0.1)
|
13
|
+
aws-partitions (1.94.0)
|
14
|
+
aws-sdk-core (3.21.3)
|
15
|
+
aws-eventstream (~> 1.0)
|
16
|
+
aws-partitions (~> 1.0)
|
17
|
+
aws-sigv4 (~> 1.0)
|
14
18
|
jmespath (~> 1.0)
|
15
|
-
aws-sdk-
|
16
|
-
aws-sdk-core (
|
17
|
-
|
18
|
-
|
19
|
+
aws-sdk-kms (1.5.0)
|
20
|
+
aws-sdk-core (~> 3)
|
21
|
+
aws-sigv4 (~> 1.0)
|
22
|
+
aws-sdk-s3 (1.14.0)
|
23
|
+
aws-sdk-core (~> 3, >= 3.21.2)
|
24
|
+
aws-sdk-kms (~> 1)
|
25
|
+
aws-sigv4 (~> 1.0)
|
26
|
+
aws-sigv4 (1.0.2)
|
19
27
|
crack (0.4.3)
|
20
28
|
safe_yaml (~> 1.0.0)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
minitest (5.8.4)
|
27
|
-
rake (10.5.0)
|
29
|
+
hashdiff (0.3.7)
|
30
|
+
jmespath (1.4.0)
|
31
|
+
minitest (5.11.3)
|
32
|
+
public_suffix (3.0.2)
|
33
|
+
rake (12.3.1)
|
28
34
|
safe_yaml (1.0.4)
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
simplecov-html (~> 0.10.0)
|
33
|
-
simplecov-html (0.10.0)
|
34
|
-
vcr (3.0.1)
|
35
|
-
webmock (1.22.6)
|
35
|
+
single_cov (1.0.3)
|
36
|
+
vcr (4.0.0)
|
37
|
+
webmock (3.4.2)
|
36
38
|
addressable (>= 2.3.6)
|
37
39
|
crack (>= 0.3.2)
|
38
40
|
hashdiff
|
@@ -42,13 +44,13 @@ PLATFORMS
|
|
42
44
|
ruby
|
43
45
|
|
44
46
|
DEPENDENCIES
|
45
|
-
bundler (
|
46
|
-
codeclimate-test-reporter
|
47
|
+
bundler (>= 1.16.2)
|
47
48
|
file-manager!
|
48
49
|
minitest
|
49
50
|
rake
|
51
|
+
single_cov
|
50
52
|
vcr
|
51
53
|
webmock
|
52
54
|
|
53
55
|
BUNDLED WITH
|
54
|
-
1.
|
56
|
+
1.16.2
|
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
# File::Manager
|
1
|
+
# File::Manager
|
2
|
+
|
3
|
+
[![Build Status](https://travis-ci.org/fortesinformatica/file-manager.svg?branch=master)](https://travis-ci.org/fortesinformatica/file-manager)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/fortesinformatica/file-manager/badges/gpa.svg)](https://codeclimate.com/github/fortesinformatica/file-manager)
|
2
5
|
|
3
6
|
File manager local or S3
|
4
7
|
|
data/Rakefile
CHANGED
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.4.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'
|
@@ -16,11 +16,10 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.require_paths = ["lib"]
|
17
17
|
spec.homepage = 'https://github.com/fortesinformatica/file-manager'
|
18
18
|
|
19
|
-
spec.add_dependency 'aws-sdk', '
|
20
|
-
spec.add_development_dependency "bundler", "
|
19
|
+
spec.add_dependency 'aws-sdk-s3', '~> 1'
|
20
|
+
spec.add_development_dependency "bundler", ">= 1.16.2"
|
21
21
|
spec.add_development_dependency "rake"
|
22
22
|
spec.add_development_dependency 'minitest'
|
23
23
|
spec.add_development_dependency 'vcr'
|
24
24
|
spec.add_development_dependency 'webmock'
|
25
|
-
spec.add_development_dependency 'codeclimate-test-reporter'
|
26
25
|
end
|
data/lib/local_file_manager.rb
CHANGED
@@ -48,7 +48,7 @@ class LocalFileManager < FileManager
|
|
48
48
|
def delete_file file_name
|
49
49
|
@logger.print "Deleting file \"#{file_name}\" from local folder \"#{root_path}\"..."
|
50
50
|
full_file_name = File.join(root_path, file_name)
|
51
|
-
File.delete(full_file_name) if File.
|
51
|
+
File.delete(full_file_name) if File.exist?(full_file_name)
|
52
52
|
@logger.puts 'done.'
|
53
53
|
end
|
54
54
|
|
data/lib/s3_file_manager.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
require './test/test_helper'
|
2
|
+
SingleCov.not_covered! # not testing any code in lib/
|
3
|
+
|
4
|
+
class CoverageTest < Minitest::Test
|
5
|
+
def test_for_untested_code
|
6
|
+
# option :tests to pass custom Dir.glob results
|
7
|
+
SingleCov.assert_used
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_for_untested_files
|
11
|
+
# option :tests and :files to pass custom Dir.glob results
|
12
|
+
# :untested to get it passing with known untested files
|
13
|
+
SingleCov.assert_tested untested: %w[lib/file_manager_factory.rb]
|
14
|
+
end
|
15
|
+
end
|
data/test/file_manager_test.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require './test/test_helper'
|
2
2
|
require 'memory_file_manager'
|
3
3
|
|
4
|
+
SingleCov.covered! uncovered: 5
|
5
|
+
|
4
6
|
module FileManagerTest
|
5
7
|
def test_reading
|
6
8
|
assert_raises(FileNotFoundError) { @manager.read_file 'not_saved' }
|
@@ -67,3 +69,12 @@ module FileManagerTest
|
|
67
69
|
end
|
68
70
|
|
69
71
|
end
|
72
|
+
|
73
|
+
class FileManagerLoggerTest < Minitest::Test
|
74
|
+
|
75
|
+
def test_logger_prints_and_puts
|
76
|
+
logger = FileManager::Logger.new({})
|
77
|
+
assert_output("hello\n") { logger.puts "hello" }
|
78
|
+
assert_output("hi") { logger.print "hi" }
|
79
|
+
end
|
80
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
require '
|
2
|
-
|
3
|
-
|
1
|
+
require 'single_cov'
|
2
|
+
SingleCov.setup :minitest, branches: SingleCov::BRANCH_COVERAGE_SUPPORTED && RUBY_PLATFORM != "java"
|
4
3
|
require 'minitest/autorun'
|
5
4
|
require 'webmock/minitest'
|
6
5
|
require 'vcr'
|
@@ -8,5 +7,5 @@ require 'vcr'
|
|
8
7
|
VCR.configure do |c|
|
9
8
|
c.cassette_library_dir = 'test/vcr_cassettes'
|
10
9
|
c.hook_into :webmock
|
11
|
-
c.
|
10
|
+
# c.debug_logger = File.open("record.log", 'w')
|
12
11
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: put
|
5
|
-
uri: https://file-manager-tests.s3
|
5
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/temp_file/saved
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: content
|
@@ -54,7 +54,7 @@ http_interactions:
|
|
54
54
|
recorded_at: Tue, 05 Sep 2017 19:31:12 GMT
|
55
55
|
- request:
|
56
56
|
method: get
|
57
|
-
uri: https://file-manager-tests.s3
|
57
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/temp_file/saved
|
58
58
|
body:
|
59
59
|
encoding: ASCII-8BIT
|
60
60
|
string: ''
|
@@ -108,7 +108,7 @@ http_interactions:
|
|
108
108
|
recorded_at: Tue, 05 Sep 2017 19:31:13 GMT
|
109
109
|
- request:
|
110
110
|
method: get
|
111
|
-
uri: https://file-manager-tests.s3
|
111
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/temp_file/saved
|
112
112
|
body:
|
113
113
|
encoding: ASCII-8BIT
|
114
114
|
string: ''
|
@@ -162,7 +162,7 @@ http_interactions:
|
|
162
162
|
recorded_at: Tue, 05 Sep 2017 19:31:13 GMT
|
163
163
|
- request:
|
164
164
|
method: delete
|
165
|
-
uri: https://file-manager-tests.s3
|
165
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/temp_file/saved
|
166
166
|
body:
|
167
167
|
encoding: ASCII-8BIT
|
168
168
|
string: ''
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://file-manager-tests.s3
|
5
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/?encoding-type=url&prefix=
|
6
6
|
body:
|
7
7
|
encoding: ASCII-8BIT
|
8
8
|
string: ''
|
@@ -54,7 +54,7 @@ http_interactions:
|
|
54
54
|
recorded_at: Tue, 05 Sep 2017 19:31:19 GMT
|
55
55
|
- request:
|
56
56
|
method: put
|
57
|
-
uri: https://file-manager-tests.s3
|
57
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/saved.*
|
58
58
|
body:
|
59
59
|
encoding: UTF-8
|
60
60
|
string: content
|
@@ -106,7 +106,7 @@ http_interactions:
|
|
106
106
|
recorded_at: Tue, 05 Sep 2017 19:31:20 GMT
|
107
107
|
- request:
|
108
108
|
method: get
|
109
|
-
uri: https://file-manager-tests.s3
|
109
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/?encoding-type=url&prefix=other_prefix
|
110
110
|
body:
|
111
111
|
encoding: ASCII-8BIT
|
112
112
|
string: ''
|
@@ -158,7 +158,7 @@ http_interactions:
|
|
158
158
|
recorded_at: Tue, 05 Sep 2017 19:31:20 GMT
|
159
159
|
- request:
|
160
160
|
method: get
|
161
|
-
uri: https://file-manager-tests.s3
|
161
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/?encoding-type=url&prefix=sav
|
162
162
|
body:
|
163
163
|
encoding: ASCII-8BIT
|
164
164
|
string: ''
|
@@ -210,7 +210,7 @@ http_interactions:
|
|
210
210
|
recorded_at: Tue, 05 Sep 2017 19:31:21 GMT
|
211
211
|
- request:
|
212
212
|
method: get
|
213
|
-
uri: https://file-manager-tests.s3
|
213
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/?encoding-type=url&prefix=
|
214
214
|
body:
|
215
215
|
encoding: ASCII-8BIT
|
216
216
|
string: ''
|
@@ -262,7 +262,7 @@ http_interactions:
|
|
262
262
|
recorded_at: Tue, 05 Sep 2017 19:31:22 GMT
|
263
263
|
- request:
|
264
264
|
method: get
|
265
|
-
uri: https://file-manager-tests.s3
|
265
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/?encoding-type=url&prefix=sav
|
266
266
|
body:
|
267
267
|
encoding: ASCII-8BIT
|
268
268
|
string: ''
|
@@ -314,7 +314,7 @@ http_interactions:
|
|
314
314
|
recorded_at: Tue, 05 Sep 2017 19:31:23 GMT
|
315
315
|
- request:
|
316
316
|
method: delete
|
317
|
-
uri: https://file-manager-tests.s3
|
317
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/saved.*
|
318
318
|
body:
|
319
319
|
encoding: ASCII-8BIT
|
320
320
|
string: ''
|
@@ -358,7 +358,7 @@ http_interactions:
|
|
358
358
|
recorded_at: Tue, 05 Sep 2017 19:31:24 GMT
|
359
359
|
- request:
|
360
360
|
method: get
|
361
|
-
uri: https://file-manager-tests.s3
|
361
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/?encoding-type=url&prefix=
|
362
362
|
body:
|
363
363
|
encoding: ASCII-8BIT
|
364
364
|
string: ''
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://file-manager-tests.s3
|
5
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/?encoding-type=url&prefix=
|
6
6
|
body:
|
7
7
|
encoding: ASCII-8BIT
|
8
8
|
string: ''
|
@@ -54,7 +54,7 @@ http_interactions:
|
|
54
54
|
recorded_at: Tue, 05 Sep 2017 19:31:05 GMT
|
55
55
|
- request:
|
56
56
|
method: put
|
57
|
-
uri: https://file-manager-tests.s3
|
57
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/sub_dir/saved.*
|
58
58
|
body:
|
59
59
|
encoding: UTF-8
|
60
60
|
string: content
|
@@ -106,7 +106,7 @@ http_interactions:
|
|
106
106
|
recorded_at: Tue, 05 Sep 2017 19:31:06 GMT
|
107
107
|
- request:
|
108
108
|
method: get
|
109
|
-
uri: https://file-manager-tests.s3
|
109
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/?encoding-type=url&prefix=other_prefix
|
110
110
|
body:
|
111
111
|
encoding: ASCII-8BIT
|
112
112
|
string: ''
|
@@ -158,7 +158,7 @@ http_interactions:
|
|
158
158
|
recorded_at: Tue, 05 Sep 2017 19:31:07 GMT
|
159
159
|
- request:
|
160
160
|
method: get
|
161
|
-
uri: https://file-manager-tests.s3
|
161
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/?encoding-type=url&prefix=sav
|
162
162
|
body:
|
163
163
|
encoding: ASCII-8BIT
|
164
164
|
string: ''
|
@@ -210,7 +210,7 @@ http_interactions:
|
|
210
210
|
recorded_at: Tue, 05 Sep 2017 19:31:08 GMT
|
211
211
|
- request:
|
212
212
|
method: get
|
213
|
-
uri: https://file-manager-tests.s3
|
213
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/?encoding-type=url&prefix=
|
214
214
|
body:
|
215
215
|
encoding: ASCII-8BIT
|
216
216
|
string: ''
|
@@ -262,7 +262,7 @@ http_interactions:
|
|
262
262
|
recorded_at: Tue, 05 Sep 2017 19:31:08 GMT
|
263
263
|
- request:
|
264
264
|
method: get
|
265
|
-
uri: https://file-manager-tests.s3
|
265
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/?encoding-type=url&prefix=sub_dir/sav
|
266
266
|
body:
|
267
267
|
encoding: ASCII-8BIT
|
268
268
|
string: ''
|
@@ -314,7 +314,7 @@ http_interactions:
|
|
314
314
|
recorded_at: Tue, 05 Sep 2017 19:31:09 GMT
|
315
315
|
- request:
|
316
316
|
method: delete
|
317
|
-
uri: https://file-manager-tests.s3
|
317
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/sub_dir/saved.*
|
318
318
|
body:
|
319
319
|
encoding: ASCII-8BIT
|
320
320
|
string: ''
|
@@ -358,7 +358,7 @@ http_interactions:
|
|
358
358
|
recorded_at: Tue, 05 Sep 2017 19:31:10 GMT
|
359
359
|
- request:
|
360
360
|
method: get
|
361
|
-
uri: https://file-manager-tests.s3
|
361
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/?encoding-type=url&prefix=
|
362
362
|
body:
|
363
363
|
encoding: ASCII-8BIT
|
364
364
|
string: ''
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://file-manager-tests.s3
|
5
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/not_saved
|
6
6
|
body:
|
7
7
|
encoding: ASCII-8BIT
|
8
8
|
string: ''
|
@@ -52,7 +52,7 @@ http_interactions:
|
|
52
52
|
recorded_at: Tue, 05 Sep 2017 19:31:15 GMT
|
53
53
|
- request:
|
54
54
|
method: put
|
55
|
-
uri: https://file-manager-tests.s3
|
55
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/saved
|
56
56
|
body:
|
57
57
|
encoding: UTF-8
|
58
58
|
string: content
|
@@ -104,7 +104,7 @@ http_interactions:
|
|
104
104
|
recorded_at: Tue, 05 Sep 2017 19:31:16 GMT
|
105
105
|
- request:
|
106
106
|
method: get
|
107
|
-
uri: https://file-manager-tests.s3
|
107
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/saved
|
108
108
|
body:
|
109
109
|
encoding: ASCII-8BIT
|
110
110
|
string: ''
|
@@ -158,7 +158,7 @@ http_interactions:
|
|
158
158
|
recorded_at: Tue, 05 Sep 2017 19:31:17 GMT
|
159
159
|
- request:
|
160
160
|
method: delete
|
161
|
-
uri: https://file-manager-tests.s3
|
161
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/saved
|
162
162
|
body:
|
163
163
|
encoding: ASCII-8BIT
|
164
164
|
string: ''
|
@@ -202,7 +202,7 @@ http_interactions:
|
|
202
202
|
recorded_at: Tue, 05 Sep 2017 19:31:17 GMT
|
203
203
|
- request:
|
204
204
|
method: get
|
205
|
-
uri: https://file-manager-tests.s3
|
205
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/saved
|
206
206
|
body:
|
207
207
|
encoding: ASCII-8BIT
|
208
208
|
string: ''
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://file-manager-tests.s3
|
5
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/sub_dir/not_saved
|
6
6
|
body:
|
7
7
|
encoding: ASCII-8BIT
|
8
8
|
string: ''
|
@@ -52,7 +52,7 @@ http_interactions:
|
|
52
52
|
recorded_at: Tue, 05 Sep 2017 19:31:01 GMT
|
53
53
|
- request:
|
54
54
|
method: put
|
55
|
-
uri: https://file-manager-tests.s3
|
55
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/sub_dir/saved
|
56
56
|
body:
|
57
57
|
encoding: UTF-8
|
58
58
|
string: content
|
@@ -104,7 +104,7 @@ http_interactions:
|
|
104
104
|
recorded_at: Tue, 05 Sep 2017 19:31:02 GMT
|
105
105
|
- request:
|
106
106
|
method: get
|
107
|
-
uri: https://file-manager-tests.s3
|
107
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/sub_dir/saved
|
108
108
|
body:
|
109
109
|
encoding: ASCII-8BIT
|
110
110
|
string: ''
|
@@ -158,7 +158,7 @@ http_interactions:
|
|
158
158
|
recorded_at: Tue, 05 Sep 2017 19:31:03 GMT
|
159
159
|
- request:
|
160
160
|
method: delete
|
161
|
-
uri: https://file-manager-tests.s3
|
161
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/sub_dir/saved
|
162
162
|
body:
|
163
163
|
encoding: ASCII-8BIT
|
164
164
|
string: ''
|
@@ -202,7 +202,7 @@ http_interactions:
|
|
202
202
|
recorded_at: Tue, 05 Sep 2017 19:31:04 GMT
|
203
203
|
- request:
|
204
204
|
method: get
|
205
|
-
uri: https://file-manager-tests.s3
|
205
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/sub_dir/saved
|
206
206
|
body:
|
207
207
|
encoding: ASCII-8BIT
|
208
208
|
string: ''
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://file-manager-tests.s3
|
5
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/?encoding-type=url&prefix=
|
6
6
|
body:
|
7
7
|
encoding: ASCII-8BIT
|
8
8
|
string: ''
|
@@ -54,7 +54,7 @@ http_interactions:
|
|
54
54
|
recorded_at: Tue, 15 Mar 2016 14:44:26 GMT
|
55
55
|
- request:
|
56
56
|
method: delete
|
57
|
-
uri: https://file-manager-tests.s3
|
57
|
+
uri: https://file-manager-tests.s3.us-west-2.amazonaws.com/sub_dir/saved.*
|
58
58
|
body:
|
59
59
|
encoding: ASCII-8BIT
|
60
60
|
string: ''
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: file-manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.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:
|
11
|
+
date: 2018-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: aws-sdk
|
14
|
+
name: aws-sdk-s3
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.16.2
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 1.16.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,20 +94,6 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: codeclimate-test-reporter
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
97
|
description: File manager, access S3 or local
|
112
98
|
email:
|
113
99
|
- franciscobarroso@grupofortes.com.br
|
@@ -129,10 +115,11 @@ files:
|
|
129
115
|
- lib/local_file_manager.rb
|
130
116
|
- lib/memory_file_manager.rb
|
131
117
|
- lib/s3_file_manager.rb
|
118
|
+
- test/coverage_test.rb
|
132
119
|
- test/file_manager_test.rb
|
133
|
-
- test/
|
134
|
-
- test/
|
135
|
-
- test/
|
120
|
+
- test/local_file_manager_test.rb
|
121
|
+
- test/memory_file_manager_test.rb
|
122
|
+
- test/s3_file_manager_test.rb
|
136
123
|
- test/test_helper.rb
|
137
124
|
- test/vcr_cassettes/test_downloading_to_temp_file.yml
|
138
125
|
- test/vcr_cassettes/test_listing_files.yml
|
@@ -159,15 +146,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
146
|
version: '0'
|
160
147
|
requirements: []
|
161
148
|
rubyforge_project:
|
162
|
-
rubygems_version: 2.
|
149
|
+
rubygems_version: 2.7.7
|
163
150
|
signing_key:
|
164
151
|
specification_version: 4
|
165
152
|
summary: File manager, access S3 or local
|
166
153
|
test_files:
|
154
|
+
- test/coverage_test.rb
|
167
155
|
- test/file_manager_test.rb
|
168
|
-
- test/
|
169
|
-
- test/
|
170
|
-
- test/
|
156
|
+
- test/local_file_manager_test.rb
|
157
|
+
- test/memory_file_manager_test.rb
|
158
|
+
- test/s3_file_manager_test.rb
|
171
159
|
- test/test_helper.rb
|
172
160
|
- test/vcr_cassettes/test_downloading_to_temp_file.yml
|
173
161
|
- test/vcr_cassettes/test_listing_files.yml
|