files.com 1.1.802 → 1.1.804
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 +10 -6
- data/_VERSION +1 -1
- data/spec/models/file_spec.rb +9 -7
- data/spec/models/folder_spec.rb +12 -7
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '03977dbe44f5a5b6d323404d96e561cabb387d7149f48407fe25c42a0bde36c6'
|
|
4
|
+
data.tar.gz: 89bbfc5340eaab7364cbf41d0a9f9f3058e69e40143b24cc7313635424fa7218
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c3db26ca133482457a91c59f867d0a9c47832ce8251d7a8404d330ba6a6f0fb7a3ee2b6b14b59b78f9dcf6b21dcb007bf65ff6b83604bc3756be91b417a05033
|
|
7
|
+
data.tar.gz: add67cad0aa41b76c4c5c74153b4639c9d51389f2361f9b652d2069d18f038b0e2a2e7e623a179e84f82477c360e69ca1a4fe8833885c5adc3ad003caeb0ba9d
|
data/Gemfile.lock
CHANGED
|
@@ -22,7 +22,8 @@ GEM
|
|
|
22
22
|
base64 (0.2.0)
|
|
23
23
|
benchmark (0.4.1)
|
|
24
24
|
bigdecimal (4.1.3)
|
|
25
|
-
byebug (
|
|
25
|
+
byebug (13.0.0)
|
|
26
|
+
reline (>= 0.6.0)
|
|
26
27
|
coderay (1.1.3)
|
|
27
28
|
concurrent-ruby (1.3.8)
|
|
28
29
|
connection_pool (2.2.5)
|
|
@@ -31,12 +32,13 @@ GEM
|
|
|
31
32
|
faraday-net_http (>= 2.0, < 3.5)
|
|
32
33
|
json
|
|
33
34
|
logger
|
|
34
|
-
faraday-multipart (1.0
|
|
35
|
-
multipart-post (~> 2)
|
|
35
|
+
faraday-multipart (1.2.0)
|
|
36
|
+
multipart-post (~> 2.0)
|
|
36
37
|
faraday-net_http (3.0.0)
|
|
37
38
|
faraday-net_http_persistent (2.1.0)
|
|
38
39
|
faraday (~> 2.5)
|
|
39
40
|
net-http-persistent (~> 4.0)
|
|
41
|
+
io-console (0.9.5)
|
|
40
42
|
json (2.6.2)
|
|
41
43
|
logger (1.6.6)
|
|
42
44
|
memory_profiler (1.0.0)
|
|
@@ -51,14 +53,16 @@ GEM
|
|
|
51
53
|
pry (0.14.1)
|
|
52
54
|
coderay (~> 1.1)
|
|
53
55
|
method_source (~> 1.0)
|
|
54
|
-
pry-byebug (3.
|
|
55
|
-
byebug (~>
|
|
56
|
-
pry (>= 0.13, < 0.
|
|
56
|
+
pry-byebug (3.12.0)
|
|
57
|
+
byebug (~> 13.0)
|
|
58
|
+
pry (>= 0.13, < 0.17)
|
|
57
59
|
public_suffix (5.0.0)
|
|
58
60
|
racc (1.8.1)
|
|
59
61
|
rainbow (3.1.1)
|
|
60
62
|
rake (13.0.6)
|
|
61
63
|
regexp_parser (2.5.0)
|
|
64
|
+
reline (0.7.0)
|
|
65
|
+
io-console (~> 0.5)
|
|
62
66
|
rexml (3.4.4)
|
|
63
67
|
rspec (3.11.0)
|
|
64
68
|
rspec-core (~> 3.11.0)
|
data/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.1.
|
|
1
|
+
1.1.804
|
data/spec/models/file_spec.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require "spec_helper"
|
|
2
2
|
require "tempfile"
|
|
3
3
|
|
|
4
|
-
RSpec.describe Files::File, :with_test_folder
|
|
4
|
+
RSpec.describe Files::File, :with_test_folder do
|
|
5
5
|
describe "#read" do
|
|
6
6
|
before do
|
|
7
7
|
Files::File.open(test_folder.join("[[strange stuff]]#yes.text").to_s, 'w', options) do |f|
|
|
@@ -17,7 +17,8 @@ RSpec.describe Files::File, :with_test_folder, skip: ENV.fetch("GITLAB", nil) do
|
|
|
17
17
|
context "stream failure" do
|
|
18
18
|
let(:expired_download) { "https://s3.amazonaws.com/objects.brickftp.com/metadata/37868/52f55a21-1685-46aa-aaff-99ca8b172c00?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIEWLY3MN4YGZQOWA%2F20210621%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210621T202802Z&X-Amz-Expires=60&X-Amz-SignedHeaders=host&response-cache-control=no-cache%2C%20no-store&response-content-disposition=attachment%3B%20filename%3D%22write-as-io.txt%22&response-content-type=text%2Fplain&X-Amz-Signature=83d5b5789cbd2282bfea6e560e4319385135204dc0df3217930f96905c9cb18f" }
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
# The download URL is a real, expired S3 URL outside the simulator, so CI never requests it.
|
|
21
|
+
it "waits for io to be ready", skip: ENV.fetch("GITLAB", nil) do
|
|
21
22
|
file = Files::File.new
|
|
22
23
|
allow(file).to receive(:download_uri_with_load).and_return(expired_download)
|
|
23
24
|
expect { file.read_io }.to raise_error('403 "Forbidden"')
|
|
@@ -40,10 +41,10 @@ RSpec.describe Files::File, :with_test_folder, skip: ENV.fetch("GITLAB", nil) do
|
|
|
40
41
|
end
|
|
41
42
|
|
|
42
43
|
it "works for file with zero bytes" do
|
|
43
|
-
file = Files::File.open("zero-byte.txt", 'w', options)
|
|
44
|
+
file = Files::File.open(test_folder.join("zero-byte.txt").to_s, 'w', options)
|
|
44
45
|
file.write("")
|
|
45
46
|
file.close
|
|
46
|
-
file = Files::File.find("zero-byte.txt", {}, options)
|
|
47
|
+
file = Files::File.find(test_folder.join("zero-byte.txt").to_s, {}, options)
|
|
47
48
|
expect(file.read_io.read).to eq("")
|
|
48
49
|
end
|
|
49
50
|
end
|
|
@@ -83,7 +84,8 @@ RSpec.describe Files::File, :with_test_folder, skip: ENV.fetch("GITLAB", nil) do
|
|
|
83
84
|
temp_file.close
|
|
84
85
|
end
|
|
85
86
|
|
|
86
|
-
|
|
87
|
+
# The simulator answers with_rename with 501 (simulation/not-supported), so CI leaves this probe out.
|
|
88
|
+
it "will send with_rename", skip: ENV.fetch("GITLAB", nil) do
|
|
87
89
|
path = test_folder.join("with_rename_test.txt").to_s
|
|
88
90
|
io = StringIO.new("I am a string via IO")
|
|
89
91
|
file = Files::File.new({ path: path, with_rename: true }, options)
|
|
@@ -123,8 +125,8 @@ RSpec.describe Files::File, :with_test_folder, skip: ENV.fetch("GITLAB", nil) do
|
|
|
123
125
|
end
|
|
124
126
|
|
|
125
127
|
it "returns a directory type" do
|
|
126
|
-
Files::Folder.mkdir("testdir", {}, options)
|
|
127
|
-
expect(Files::File.from_path("testdir", options).type).to eq("directory")
|
|
128
|
+
Files::Folder.mkdir(test_folder.join("testdir").to_s, {}, options)
|
|
129
|
+
expect(Files::File.from_path(test_folder.join("testdir").to_s, options).type).to eq("directory")
|
|
128
130
|
end
|
|
129
131
|
end
|
|
130
132
|
end
|
data/spec/models/folder_spec.rb
CHANGED
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
RSpec.describe Files::Folder, :with_test_folder do
|
|
4
|
-
|
|
4
|
+
describe "#list_for" do
|
|
5
|
+
# The shared fixture already makes test_folder/nested, so the listing gets a folder of its own.
|
|
6
|
+
let(:listed_folder) { test_folder.join("listed") }
|
|
7
|
+
|
|
5
8
|
before do
|
|
6
|
-
Files::
|
|
9
|
+
Files::Folder.mkdir(listed_folder.to_s, {}, options)
|
|
10
|
+
|
|
11
|
+
Files::File.open(listed_folder.join("example.txt").to_s, 'w', options) do |f|
|
|
7
12
|
f.write("my text")
|
|
8
13
|
end
|
|
9
14
|
|
|
10
|
-
Files::Folder.mkdir(
|
|
15
|
+
Files::Folder.mkdir(listed_folder.join("other").to_s, {}, options)
|
|
11
16
|
|
|
12
|
-
Files::File.open(
|
|
17
|
+
Files::File.open(listed_folder.join("other/example2.txt").to_s, 'w', options) do |f|
|
|
13
18
|
f.write("my text 2")
|
|
14
19
|
end
|
|
15
20
|
end
|
|
16
21
|
|
|
17
22
|
it "lists from the root" do
|
|
18
|
-
results = described_class.list_for(
|
|
23
|
+
results = described_class.list_for(listed_folder.to_s, {}, options)
|
|
19
24
|
|
|
20
|
-
expect(results.map(&:path).to_a).to match_array([
|
|
25
|
+
expect(results.map(&:path).to_a).to match_array([ listed_folder.join("example.txt").to_s, listed_folder.join("other").to_s ])
|
|
21
26
|
expect(results.map(&:type).to_a).to match_array(%w[file directory])
|
|
22
27
|
end
|
|
23
28
|
end
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
describe "#delete" do
|
|
26
31
|
it "deletes a folder" do
|
|
27
32
|
Files::Folder.mkdir(test_folder.join("my-new-folder").to_s, {}, options)
|
|
28
33
|
Files::Folder.delete(test_folder.join("my-new-folder").to_s, {}, options)
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: files.com
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.804
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- files.com
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: addressable
|
|
@@ -507,7 +506,6 @@ homepage: https://www.files.com
|
|
|
507
506
|
licenses:
|
|
508
507
|
- MIT
|
|
509
508
|
metadata: {}
|
|
510
|
-
post_install_message:
|
|
511
509
|
rdoc_options: []
|
|
512
510
|
require_paths:
|
|
513
511
|
- lib
|
|
@@ -522,8 +520,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
522
520
|
- !ruby/object:Gem::Version
|
|
523
521
|
version: '0'
|
|
524
522
|
requirements: []
|
|
525
|
-
rubygems_version:
|
|
526
|
-
signing_key:
|
|
523
|
+
rubygems_version: 4.0.20
|
|
527
524
|
specification_version: 4
|
|
528
525
|
summary: Files.com Ruby client.
|
|
529
526
|
test_files: []
|