files.com 1.0.105 → 1.0.110
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/_VERSION +1 -1
- data/docs/app.md +2 -0
- data/docs/file.md +2 -4
- data/docs/file_upload_part.md +39 -0
- data/docs/folder.md +1 -3
- data/docs/sso_strategy.md +4 -0
- data/lib/files.com.rb +1 -1
- data/lib/files.com/api_client.rb +5 -1
- data/lib/files.com/models/app.rb +5 -0
- data/lib/files.com/models/file.rb +2 -11
- data/lib/files.com/models/file_action.rb +1 -1
- data/lib/files.com/models/{file_part_upload.rb → file_upload_part.rb} +12 -12
- data/lib/files.com/models/folder.rb +1 -10
- data/lib/files.com/models/sso_strategy.rb +10 -0
- metadata +4 -4
- data/docs/file_part_upload.md +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b823cad7eb84b62cf77fbf4b37829a3b36c937c1532c7d9798fd7910fa48adf1
|
4
|
+
data.tar.gz: 839b5d017058a7a21afe3b90a8acee4ddf5df348712ab2b61285be58441430a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab72c400c26db6e38f5c4c94ea1bfe01f60093dfbbfddb1c3c26699ba31bcdce257bd9422697f555914b8d2c403a0a28983af54a2097bb2a4e3277485127b883
|
7
|
+
data.tar.gz: 2f0688fea58866785311afc8260306260d3d4d6ad811ce851dd9a2dffe899a9e39451c223b8fb40b1e01f70462f44ed8569b8179e3d73328e9d00e5d521321bb
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.110
|
data/docs/app.md
CHANGED
@@ -9,6 +9,7 @@
|
|
9
9
|
"documentation_links": "Important Info => http://files.test/learn-more",
|
10
10
|
"icon_url": "",
|
11
11
|
"logo_url": "",
|
12
|
+
"screenshot_list_urls": "",
|
12
13
|
"logo_thumbnail_url": "",
|
13
14
|
"sso_strategy_type": "",
|
14
15
|
"remote_server_type": "",
|
@@ -24,6 +25,7 @@
|
|
24
25
|
* `documentation_links` (string): Collection of named links to documentation
|
25
26
|
* `icon_url` (string): App icon
|
26
27
|
* `logo_url` (string): Full size logo for the App
|
28
|
+
* `screenshot_list_urls` (string): Screenshots of the App
|
27
29
|
* `logo_thumbnail_url` (string): Logo thumbnail for the App
|
28
30
|
* `sso_strategy_type` (string): Associated SSO Strategy type, if any
|
29
31
|
* `remote_server_type` (string): Associated Remote Server type, if any
|
data/docs/file.md
CHANGED
@@ -7,7 +7,6 @@ may places where a Ruby File object can be used.
|
|
7
7
|
|
8
8
|
```
|
9
9
|
{
|
10
|
-
"id": 1,
|
11
10
|
"path": "path/file.txt",
|
12
11
|
"display_name": "file.txt",
|
13
12
|
"type": "file",
|
@@ -27,7 +26,6 @@ may places where a Ruby File object can be used.
|
|
27
26
|
}
|
28
27
|
```
|
29
28
|
|
30
|
-
* `id` (int64): File/Folder ID
|
31
29
|
* `path` (string): File/Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
32
30
|
* `display_name` (string): File/Folder display name
|
33
31
|
* `type` (string): Type: `directory` or `file`.
|
@@ -141,7 +139,7 @@ Files::File.delete(path,
|
|
141
139
|
### Parameters
|
142
140
|
|
143
141
|
* `path` (string): Required - Path to operate on.
|
144
|
-
* `recursive` (boolean): If true, will recursively delete folers. Otherwise, will error on non-empty folders.
|
142
|
+
* `recursive` (boolean): If true, will recursively delete folers. Otherwise, will error on non-empty folders.
|
145
143
|
|
146
144
|
|
147
145
|
---
|
@@ -201,4 +199,4 @@ file.delete(
|
|
201
199
|
### Parameters
|
202
200
|
|
203
201
|
* `path` (string): Required - Path to operate on.
|
204
|
-
* `recursive` (boolean): If true, will recursively delete folers. Otherwise, will error on non-empty folders.
|
202
|
+
* `recursive` (boolean): If true, will recursively delete folers. Otherwise, will error on non-empty folders.
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# FileUploadPart
|
2
|
+
|
3
|
+
## Example FileUploadPart Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"send": "",
|
8
|
+
"action": "multipart",
|
9
|
+
"ask_about_overwrites": true,
|
10
|
+
"available_parts": 1,
|
11
|
+
"expires": "",
|
12
|
+
"headers": "",
|
13
|
+
"http_method": "PUT",
|
14
|
+
"next_partsize": 1,
|
15
|
+
"parallel_parts": true,
|
16
|
+
"parameters": "{}",
|
17
|
+
"part_number": 1,
|
18
|
+
"partsize": 1,
|
19
|
+
"path": "",
|
20
|
+
"ref": "upload-1",
|
21
|
+
"upload_uri": ""
|
22
|
+
}
|
23
|
+
```
|
24
|
+
|
25
|
+
* `send` (object): Content-Type and File to send
|
26
|
+
* `action` (string): Type of upload
|
27
|
+
* `ask_about_overwrites` (boolean): If `true`, this file exists and you may wish to ask the user for overwrite confirmation
|
28
|
+
* `available_parts` (int64): Number of parts in the upload
|
29
|
+
* `expires` (string): Date/time of when this Upload part expires and the URL cannot be used any more
|
30
|
+
* `headers` (object): Additional upload headers to provide as part of the upload
|
31
|
+
* `http_method` (string): HTTP Method to use for uploading the part, usually `PUT`
|
32
|
+
* `next_partsize` (int64): Size in bytes for this part
|
33
|
+
* `parallel_parts` (boolean): If `true`, multiple parts may be uploaded in parallel. If `false`, be sure to only upload one part at a time, in order.
|
34
|
+
* `parameters` (object): Additional HTTP parameters to send with the upload
|
35
|
+
* `part_number` (int64): Number of this upload part
|
36
|
+
* `partsize` (int64): Size in bytes for the next upload part
|
37
|
+
* `path` (string): New file path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
38
|
+
* `ref` (string): Reference name for this upload part
|
39
|
+
* `upload_uri` (string): URI to upload this part to
|
data/docs/folder.md
CHANGED
@@ -9,7 +9,6 @@ Files::Dir is an alias of Files::Folder
|
|
9
9
|
|
10
10
|
```
|
11
11
|
{
|
12
|
-
"id": 1,
|
13
12
|
"path": "path/file.txt",
|
14
13
|
"display_name": "file.txt",
|
15
14
|
"type": "file",
|
@@ -29,7 +28,6 @@ Files::Dir is an alias of Files::Folder
|
|
29
28
|
}
|
30
29
|
```
|
31
30
|
|
32
|
-
* `id` (int64): File/Folder ID
|
33
31
|
* `path` (string): File/Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
34
32
|
* `display_name` (string): File/Folder display name
|
35
33
|
* `type` (string): Type: `directory` or `file`.
|
@@ -66,7 +64,7 @@ Files::Folder.list_for(path,
|
|
66
64
|
|
67
65
|
* `page` (int64): Current page number.
|
68
66
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
69
|
-
* `action` (string): Action to take. Can be `count`, `
|
67
|
+
* `action` (string): Action to take. Can be `count`, `size`, `permissions`, or blank.
|
70
68
|
* `cursor` (string): Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor header.
|
71
69
|
* `path` (string): Required - Path to operate on.
|
72
70
|
* `filter` (string): If specified, will to filter folders/files list by this string. Wildcards of `*` and `?` are acceptable here.
|
data/docs/sso_strategy.md
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
"id": 1,
|
14
14
|
"saml_provider_cert_fingerprint": "",
|
15
15
|
"saml_provider_issuer_url": "",
|
16
|
+
"saml_provider_metadata_content": "",
|
16
17
|
"saml_provider_metadata_url": "",
|
17
18
|
"saml_provider_slo_target_url": "",
|
18
19
|
"saml_provider_sso_target_url": "",
|
@@ -23,6 +24,7 @@
|
|
23
24
|
"provision_groups": true,
|
24
25
|
"deprovision_users": true,
|
25
26
|
"deprovision_groups": true,
|
27
|
+
"deprovision_behavior": "disable",
|
26
28
|
"provision_group_default": "Employees",
|
27
29
|
"provision_group_exclusion": "Employees",
|
28
30
|
"provision_group_inclusion": "Employees",
|
@@ -52,6 +54,7 @@
|
|
52
54
|
* `id` (int64): ID
|
53
55
|
* `saml_provider_cert_fingerprint` (string): Identity provider sha256 cert fingerprint if saml_provider_metadata_url is not available.
|
54
56
|
* `saml_provider_issuer_url` (string): Identity provider issuer url
|
57
|
+
* `saml_provider_metadata_content` (string): Custom identity provider metadata
|
55
58
|
* `saml_provider_metadata_url` (string): Metadata URL for the SAML identity provider
|
56
59
|
* `saml_provider_slo_target_url` (string): Identity provider SLO endpoint
|
57
60
|
* `saml_provider_sso_target_url` (string): Identity provider SSO endpoint if saml_provider_metadata_url is not available.
|
@@ -62,6 +65,7 @@
|
|
62
65
|
* `provision_groups` (boolean): Auto-provision group membership based on group memberships on the SSO side?
|
63
66
|
* `deprovision_users` (boolean): Auto-deprovision users?
|
64
67
|
* `deprovision_groups` (boolean): Auto-deprovision group membership based on group memberships on the SSO side?
|
68
|
+
* `deprovision_behavior` (string): Method used for deprovisioning users.
|
65
69
|
* `provision_group_default` (string): Comma-separated list of group names for groups to automatically add all auto-provisioned users to.
|
66
70
|
* `provision_group_exclusion` (string): Comma-separated list of group names for groups (with optional wildcards) that will be excluded from auto-provisioning.
|
67
71
|
* `provision_group_inclusion` (string): Comma-separated list of group names for groups (with optional wildcards) that will be auto-provisioned.
|
data/lib/files.com.rb
CHANGED
@@ -46,7 +46,7 @@ require "files.com/models/file"
|
|
46
46
|
require "files.com/models/file_action"
|
47
47
|
require "files.com/models/file_comment"
|
48
48
|
require "files.com/models/file_comment_reaction"
|
49
|
-
require "files.com/models/
|
49
|
+
require "files.com/models/file_upload_part"
|
50
50
|
require "files.com/models/folder"
|
51
51
|
require "files.com/models/group"
|
52
52
|
require "files.com/models/group_user"
|
data/lib/files.com/api_client.rb
CHANGED
@@ -170,7 +170,11 @@ module Files
|
|
170
170
|
end
|
171
171
|
|
172
172
|
private def api_url(url = "", base_url = nil)
|
173
|
-
Addressable::URI.
|
173
|
+
uri = Addressable::URI.new
|
174
|
+
uri.host = Addressable::URI.parse(base_url).host
|
175
|
+
uri.path = "/api/rest/v1" + url
|
176
|
+
uri.scheme = Addressable::URI.parse(base_url).scheme
|
177
|
+
uri.normalize!.to_s
|
174
178
|
end
|
175
179
|
|
176
180
|
private def check_api_key!(api_key)
|
data/lib/files.com/models/app.rb
CHANGED
@@ -34,6 +34,11 @@ module Files
|
|
34
34
|
@attributes[:logo_url]
|
35
35
|
end
|
36
36
|
|
37
|
+
# string - Screenshots of the App
|
38
|
+
def screenshot_list_urls
|
39
|
+
@attributes[:screenshot_list_urls]
|
40
|
+
end
|
41
|
+
|
37
42
|
# string - Logo thumbnail for the App
|
38
43
|
def logo_thumbnail_url
|
39
44
|
@attributes[:logo_thumbnail_url]
|
@@ -588,15 +588,6 @@ module Files
|
|
588
588
|
@write_io.write_nonblock *args
|
589
589
|
end
|
590
590
|
|
591
|
-
# int64 - File/Folder ID
|
592
|
-
def id
|
593
|
-
@attributes[:id]
|
594
|
-
end
|
595
|
-
|
596
|
-
def id=(value)
|
597
|
-
@attributes[:id] = value
|
598
|
-
end
|
599
|
-
|
600
591
|
# string - File/Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
601
592
|
def path
|
602
593
|
@attributes[:path]
|
@@ -857,7 +848,7 @@ module Files
|
|
857
848
|
end
|
858
849
|
|
859
850
|
# Parameters:
|
860
|
-
# recursive - boolean - If true, will recursively delete folers. Otherwise, will error on non-empty folders.
|
851
|
+
# recursive - boolean - If true, will recursively delete folers. Otherwise, will error on non-empty folders.
|
861
852
|
def delete(params = {})
|
862
853
|
params ||= {}
|
863
854
|
params[:path] = @attributes[:path]
|
@@ -946,7 +937,7 @@ module Files
|
|
946
937
|
end
|
947
938
|
|
948
939
|
# Parameters:
|
949
|
-
# recursive - boolean - If true, will recursively delete folers. Otherwise, will error on non-empty folders.
|
940
|
+
# recursive - boolean - If true, will recursively delete folers. Otherwise, will error on non-empty folders.
|
950
941
|
def self.delete(path, params = {}, options = {})
|
951
942
|
params ||= {}
|
952
943
|
params[:path] = path
|
@@ -119,7 +119,7 @@ module Files
|
|
119
119
|
|
120
120
|
response, options = Api.send_request("/file_actions/begin_upload/#{params[:path]}", :post, params, options)
|
121
121
|
response.data.map do |entity_data|
|
122
|
-
|
122
|
+
FileUploadPart.new(entity_data, options)
|
123
123
|
end
|
124
124
|
end
|
125
125
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Files
|
4
|
-
class
|
4
|
+
class FileUploadPart
|
5
5
|
attr_reader :options, :attributes
|
6
6
|
|
7
7
|
def initialize(attributes = {}, options = {})
|
@@ -19,57 +19,57 @@ module Files
|
|
19
19
|
@attributes[:action]
|
20
20
|
end
|
21
21
|
|
22
|
-
# boolean - If
|
22
|
+
# boolean - If `true`, this file exists and you may wish to ask the user for overwrite confirmation
|
23
23
|
def ask_about_overwrites
|
24
24
|
@attributes[:ask_about_overwrites]
|
25
25
|
end
|
26
26
|
|
27
|
-
#
|
27
|
+
# int64 - Number of parts in the upload
|
28
28
|
def available_parts
|
29
29
|
@attributes[:available_parts]
|
30
30
|
end
|
31
31
|
|
32
|
-
# string -
|
32
|
+
# string - Date/time of when this Upload part expires and the URL cannot be used any more
|
33
33
|
def expires
|
34
34
|
@attributes[:expires]
|
35
35
|
end
|
36
36
|
|
37
|
-
# object - Additional upload headers
|
37
|
+
# object - Additional upload headers to provide as part of the upload
|
38
38
|
def headers
|
39
39
|
@attributes[:headers]
|
40
40
|
end
|
41
41
|
|
42
|
-
# string -
|
42
|
+
# string - HTTP Method to use for uploading the part, usually `PUT`
|
43
43
|
def http_method
|
44
44
|
@attributes[:http_method]
|
45
45
|
end
|
46
46
|
|
47
|
-
#
|
47
|
+
# int64 - Size in bytes for this part
|
48
48
|
def next_partsize
|
49
49
|
@attributes[:next_partsize]
|
50
50
|
end
|
51
51
|
|
52
|
-
# boolean - If true
|
52
|
+
# boolean - If `true`, multiple parts may be uploaded in parallel. If `false`, be sure to only upload one part at a time, in order.
|
53
53
|
def parallel_parts
|
54
54
|
@attributes[:parallel_parts]
|
55
55
|
end
|
56
56
|
|
57
|
-
#
|
57
|
+
# object - Additional HTTP parameters to send with the upload
|
58
58
|
def parameters
|
59
59
|
@attributes[:parameters]
|
60
60
|
end
|
61
61
|
|
62
|
-
#
|
62
|
+
# int64 - Number of this upload part
|
63
63
|
def part_number
|
64
64
|
@attributes[:part_number]
|
65
65
|
end
|
66
66
|
|
67
|
-
#
|
67
|
+
# int64 - Size in bytes for the next upload part
|
68
68
|
def partsize
|
69
69
|
@attributes[:partsize]
|
70
70
|
end
|
71
71
|
|
72
|
-
# string -
|
72
|
+
# string - New file path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
73
73
|
def path
|
74
74
|
@attributes[:path]
|
75
75
|
end
|
@@ -150,15 +150,6 @@ module Files
|
|
150
150
|
path
|
151
151
|
end
|
152
152
|
|
153
|
-
# int64 - File/Folder ID
|
154
|
-
def id
|
155
|
-
@attributes[:id]
|
156
|
-
end
|
157
|
-
|
158
|
-
def id=(value)
|
159
|
-
@attributes[:id] = value
|
160
|
-
end
|
161
|
-
|
162
153
|
# string - File/Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
163
154
|
def path
|
164
155
|
@attributes[:path]
|
@@ -311,7 +302,7 @@ module Files
|
|
311
302
|
# Parameters:
|
312
303
|
# page - int64 - Current page number.
|
313
304
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
314
|
-
# action - string - Action to take. Can be `count`, `
|
305
|
+
# action - string - Action to take. Can be `count`, `size`, `permissions`, or blank.
|
315
306
|
# cursor - string - Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor header.
|
316
307
|
# path (required) - string - Path to operate on.
|
317
308
|
# filter - string - If specified, will to filter folders/files list by this string. Wildcards of `*` and `?` are acceptable here.
|
@@ -44,6 +44,11 @@ module Files
|
|
44
44
|
@attributes[:saml_provider_issuer_url]
|
45
45
|
end
|
46
46
|
|
47
|
+
# string - Custom identity provider metadata
|
48
|
+
def saml_provider_metadata_content
|
49
|
+
@attributes[:saml_provider_metadata_content]
|
50
|
+
end
|
51
|
+
|
47
52
|
# string - Metadata URL for the SAML identity provider
|
48
53
|
def saml_provider_metadata_url
|
49
54
|
@attributes[:saml_provider_metadata_url]
|
@@ -94,6 +99,11 @@ module Files
|
|
94
99
|
@attributes[:deprovision_groups]
|
95
100
|
end
|
96
101
|
|
102
|
+
# string - Method used for deprovisioning users.
|
103
|
+
def deprovision_behavior
|
104
|
+
@attributes[:deprovision_behavior]
|
105
|
+
end
|
106
|
+
|
97
107
|
# string - Comma-separated list of group names for groups to automatically add all auto-provisioned users to.
|
98
108
|
def provision_group_default
|
99
109
|
@attributes[:provision_group_default]
|
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.0.
|
4
|
+
version: 1.0.110
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -105,7 +105,7 @@ files:
|
|
105
105
|
- docs/file_action.md
|
106
106
|
- docs/file_comment.md
|
107
107
|
- docs/file_comment_reaction.md
|
108
|
-
- docs/
|
108
|
+
- docs/file_upload_part.md
|
109
109
|
- docs/file_utils.md
|
110
110
|
- docs/folder.md
|
111
111
|
- docs/group.md
|
@@ -170,7 +170,7 @@ files:
|
|
170
170
|
- lib/files.com/models/file_action.rb
|
171
171
|
- lib/files.com/models/file_comment.rb
|
172
172
|
- lib/files.com/models/file_comment_reaction.rb
|
173
|
-
- lib/files.com/models/
|
173
|
+
- lib/files.com/models/file_upload_part.rb
|
174
174
|
- lib/files.com/models/file_utils.rb
|
175
175
|
- lib/files.com/models/folder.rb
|
176
176
|
- lib/files.com/models/group.rb
|
data/docs/file_part_upload.md
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
# FilePartUpload
|
2
|
-
|
3
|
-
## Example FilePartUpload Object
|
4
|
-
|
5
|
-
```
|
6
|
-
{
|
7
|
-
"send": "",
|
8
|
-
"action": "upload/direct",
|
9
|
-
"ask_about_overwrites": true,
|
10
|
-
"available_parts": "",
|
11
|
-
"expires": "",
|
12
|
-
"headers": "",
|
13
|
-
"http_method": "POST",
|
14
|
-
"next_partsize": "",
|
15
|
-
"parallel_parts": true,
|
16
|
-
"parameters": "",
|
17
|
-
"part_number": "",
|
18
|
-
"partsize": "",
|
19
|
-
"path": "",
|
20
|
-
"ref": "upload-1",
|
21
|
-
"upload_uri": ""
|
22
|
-
}
|
23
|
-
```
|
24
|
-
|
25
|
-
* `send` (object): Content-Type and File to send
|
26
|
-
* `action` (string): Type of upload
|
27
|
-
* `ask_about_overwrites` (boolean): If false, rename conflicting files instead of asking for overwrite confirmation
|
28
|
-
* `available_parts` (string): Currently unused
|
29
|
-
* `expires` (string): Currently unused
|
30
|
-
* `headers` (object): Additional upload headers
|
31
|
-
* `http_method` (string): Upload method, usually POST
|
32
|
-
* `next_partsize` (string): Currently unused
|
33
|
-
* `parallel_parts` (boolean): If true, parts may be uploaded in parallel
|
34
|
-
* `parameters` (string): Additional upload parameters
|
35
|
-
* `part_number` (string): Currently unused
|
36
|
-
* `partsize` (string): Currently unused
|
37
|
-
* `path` (string): Upload path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
38
|
-
* `ref` (string): Reference name for this upload part
|
39
|
-
* `upload_uri` (string): URI to upload this part to
|