files.com 1.1.248 → 1.1.250
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/README.md +6 -0
- data/_VERSION +1 -1
- data/docs/automation_run.md +2 -0
- data/docs/bundle_action.md +4 -1
- data/docs/bundle_registration.md +2 -0
- data/docs/user_cipher_use.md +1 -1
- data/docs/user_sftp_client_use.md +1 -1
- data/lib/files.com/api_client.rb +1 -0
- data/lib/files.com/models/automation_run.rb +2 -0
- data/lib/files.com/models/bundle_action.rb +2 -0
- data/lib/files.com/models/bundle_registration.rb +2 -0
- data/lib/files.com/models/file.rb +2 -2
- data/lib/files.com/models/user_cipher_use.rb +1 -1
- data/lib/files.com/models/user_sftp_client_use.rb +1 -1
- data/lib/files.com/version.rb +1 -1
- data/lib/files.com.rb +2 -1
- data/spec/language_spec.rb +14 -0
- data/spec/models/file_spec.rb +3 -6
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98805d730e8daca6c153de77617d11faee90e48adec0b25dec18ad78b317df3e
|
4
|
+
data.tar.gz: b33bcf640dc80be6556bc619df8335187eb98d79048ee29ed05074c605a2339e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58ca2f7dcb116582d7d2e218f87fe182affa718badcbbdf717aea620e47bf932aad051a2f433d34057fd8667703598ae0bc268762f238de57f7ba0c32351df11
|
7
|
+
data.tar.gz: d47cede62ff9c887a6d6d20ecbe9a9bf38f0a8c3f695ae4f771070d7d45073aa4cf7be27b793a63496968da37e1db4da05be33da87d48b178d886bf274134b10
|
data/README.md
CHANGED
@@ -338,6 +338,12 @@ and error descriptions.
|
|
338
338
|
|
339
339
|
If the specified language is not supported or the value is omitted, the API defaults to English.
|
340
340
|
|
341
|
+
```shell title="Example Request"
|
342
|
+
require 'files.com'
|
343
|
+
|
344
|
+
Files.language = 'es'
|
345
|
+
```
|
346
|
+
|
341
347
|
## Errors
|
342
348
|
|
343
349
|
The Files.com Ruby SDK will return errors by raising exceptions. There are many exception classes defined in the Files SDK that correspond
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.250
|
data/docs/automation_run.md
CHANGED
@@ -41,12 +41,14 @@
|
|
41
41
|
|
42
42
|
```
|
43
43
|
Files::AutomationRun.list(
|
44
|
+
user_id: 1,
|
44
45
|
automation_id: 1
|
45
46
|
)
|
46
47
|
```
|
47
48
|
|
48
49
|
### Parameters
|
49
50
|
|
51
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
50
52
|
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
51
53
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
52
54
|
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `automation_id`, `created_at` or `status`.
|
data/docs/bundle_action.md
CHANGED
@@ -42,11 +42,14 @@
|
|
42
42
|
## List Bundle Actions
|
43
43
|
|
44
44
|
```
|
45
|
-
Files::BundleAction.list
|
45
|
+
Files::BundleAction.list(
|
46
|
+
user_id: 1
|
47
|
+
)
|
46
48
|
```
|
47
49
|
|
48
50
|
### Parameters
|
49
51
|
|
52
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
50
53
|
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
51
54
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
52
55
|
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`.
|
data/docs/bundle_registration.md
CHANGED
@@ -43,12 +43,14 @@
|
|
43
43
|
|
44
44
|
```
|
45
45
|
Files::BundleRegistration.list(
|
46
|
+
user_id: 1,
|
46
47
|
bundle_id: 1
|
47
48
|
)
|
48
49
|
```
|
49
50
|
|
50
51
|
### Parameters
|
51
52
|
|
53
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
52
54
|
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
53
55
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
54
56
|
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `bundle_id`.
|
data/docs/user_cipher_use.md
CHANGED
@@ -35,6 +35,6 @@ Files::UserCipherUse.list(
|
|
35
35
|
|
36
36
|
### Parameters
|
37
37
|
|
38
|
-
* `user_id` (int64): User ID.
|
38
|
+
* `user_id` (int64): User ID. If provided, will return uses for this user.
|
39
39
|
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
40
40
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
@@ -31,6 +31,6 @@ Files::UserSftpClientUse.list(
|
|
31
31
|
|
32
32
|
### Parameters
|
33
33
|
|
34
|
-
* `user_id` (int64): User ID.
|
34
|
+
* `user_id` (int64): User ID. If provided, will return uses for this user.
|
35
35
|
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
36
36
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
data/lib/files.com/api_client.rb
CHANGED
@@ -75,12 +75,14 @@ module Files
|
|
75
75
|
end
|
76
76
|
|
77
77
|
# Parameters:
|
78
|
+
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
78
79
|
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
79
80
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
80
81
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `automation_id`, `created_at` or `status`.
|
81
82
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status` and `automation_id`. Valid field combinations are `[ automation_id, status ]`.
|
82
83
|
# automation_id (required) - int64 - ID of the associated Automation.
|
83
84
|
def self.list(params = {}, options = {})
|
85
|
+
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
84
86
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
85
87
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
86
88
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
@@ -40,6 +40,7 @@ module Files
|
|
40
40
|
end
|
41
41
|
|
42
42
|
# Parameters:
|
43
|
+
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
43
44
|
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
44
45
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
45
46
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`.
|
@@ -49,6 +50,7 @@ module Files
|
|
49
50
|
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
|
50
51
|
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
|
51
52
|
def self.list(params = {}, options = {})
|
53
|
+
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
52
54
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
53
55
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
54
56
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
@@ -75,11 +75,13 @@ module Files
|
|
75
75
|
end
|
76
76
|
|
77
77
|
# Parameters:
|
78
|
+
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
78
79
|
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
79
80
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
80
81
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `bundle_id`.
|
81
82
|
# bundle_id - int64 - ID of the associated Bundle
|
82
83
|
def self.list(params = {}, options = {})
|
84
|
+
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
83
85
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
84
86
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
85
87
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
@@ -45,7 +45,7 @@ module Files
|
|
45
45
|
end
|
46
46
|
|
47
47
|
# Parameters:
|
48
|
-
# user_id - int64 - User ID.
|
48
|
+
# user_id - int64 - User ID. If provided, will return uses for this user.
|
49
49
|
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
50
50
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
51
51
|
def self.list(params = {}, options = {})
|
@@ -35,7 +35,7 @@ module Files
|
|
35
35
|
end
|
36
36
|
|
37
37
|
# Parameters:
|
38
|
-
# user_id - int64 - User ID.
|
38
|
+
# user_id - int64 - User ID. If provided, will return uses for this user.
|
39
39
|
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
40
40
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
41
41
|
def self.list(params = {}, options = {})
|
data/lib/files.com/version.rb
CHANGED
data/lib/files.com.rb
CHANGED
@@ -138,6 +138,7 @@ module Files
|
|
138
138
|
@api_key = nil
|
139
139
|
@app_info = nil
|
140
140
|
@base_url = "https://app.files.com"
|
141
|
+
@language = nil
|
141
142
|
@log_level = nil
|
142
143
|
@logger = nil
|
143
144
|
@proxy = nil
|
@@ -152,7 +153,7 @@ module Files
|
|
152
153
|
@read_timeout = 60
|
153
154
|
|
154
155
|
class << self
|
155
|
-
attr_accessor :api_key, :base_url, :default_headers, :initial_network_retry_delay, :max_network_retry_delay, :open_timeout, :read_timeout, :proxy, :session_id
|
156
|
+
attr_accessor :api_key, :base_url, :default_headers, :initial_network_retry_delay, :language, :max_network_retry_delay, :open_timeout, :read_timeout, :proxy, :session_id
|
156
157
|
end
|
157
158
|
|
158
159
|
# map to the same values as the standard library's logger
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe 'Language setting', :with_test_folder do
|
4
|
+
it 'sets the language' do
|
5
|
+
# Set language and verify
|
6
|
+
Files.language = 'es'
|
7
|
+
expect(Files.language).to eq('es')
|
8
|
+
begin
|
9
|
+
Files::File.find(test_folder.join("read.txt").to_s, {}, options)
|
10
|
+
rescue StandardError => e
|
11
|
+
expect(e.message).to include('No se ha encontrado')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/spec/models/file_spec.rb
CHANGED
@@ -97,9 +97,6 @@ RSpec.describe Files::File, :with_test_folder, skip: ENV.fetch("GITLAB", nil) do
|
|
97
97
|
|
98
98
|
file = Files::File.find(test_folder.join("with_rename_test.txt").to_s, {}, options)
|
99
99
|
expect(file.read).to eq("I am a string via IO")
|
100
|
-
|
101
|
-
file = Files::File.find(test_folder.join("with_rename_test_1.txt").to_s, {}, options)
|
102
|
-
expect(file.read).to eq("I am a string via IO")
|
103
100
|
end
|
104
101
|
end
|
105
102
|
|
@@ -122,12 +119,12 @@ RSpec.describe Files::File, :with_test_folder, skip: ENV.fetch("GITLAB", nil) do
|
|
122
119
|
Files::File.open(test_folder.join("read.txt").to_s, 'w', options) do |f|
|
123
120
|
f.write("contents")
|
124
121
|
end
|
125
|
-
expect(Files::File.from_path(test_folder.join("read.txt").to_s).type).to eq("file")
|
122
|
+
expect(Files::File.from_path(test_folder.join("read.txt").to_s, options).type).to eq("file")
|
126
123
|
end
|
127
124
|
|
128
125
|
it "returns a directory type" do
|
129
|
-
Files::Folder.mkdir("testdir") unless Files::Folder.exist?("testdir")
|
130
|
-
expect(Files::File.from_path("testdir").type).to eq("directory")
|
126
|
+
Files::Folder.mkdir("testdir", {}, options) unless Files::Folder.exist?("testdir", options)
|
127
|
+
expect(Files::File.from_path("testdir", options).type).to eq("directory")
|
131
128
|
end
|
132
129
|
end
|
133
130
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.250
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-05-
|
11
|
+
date: 2025-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -330,6 +330,7 @@ files:
|
|
330
330
|
- shared/header_test_data.json
|
331
331
|
- shared/normalization_for_comparison_test_data.json
|
332
332
|
- shared/url_test_data.json
|
333
|
+
- spec/language_spec.rb
|
333
334
|
- spec/lib/api_client_spec.rb
|
334
335
|
- spec/list_spec.rb
|
335
336
|
- spec/models/file_spec.rb
|