brick_ftp 1.0.0 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +10 -3
  3. data/.github/action/publish_gem/Dockerfile +14 -0
  4. data/.github/action/publish_gem/entrypoint.sh +18 -0
  5. data/.github/action/write_github_release/Dockerfile +14 -0
  6. data/.github/action/write_github_release/entrypoint.sh +48 -0
  7. data/.github/main.workflow +14 -0
  8. data/CHANGELOG.md +77 -2
  9. data/README.md +6 -3
  10. data/brick_ftp.gemspec +1 -2
  11. data/lib/brick_ftp.rb +2 -1
  12. data/lib/brick_ftp/restful_api.rb +11 -11
  13. data/lib/brick_ftp/restful_api/add_group_member.rb +2 -2
  14. data/lib/brick_ftp/restful_api/client.rb +4 -2
  15. data/lib/brick_ftp/restful_api/complete_upload.rb +2 -2
  16. data/lib/brick_ftp/restful_api/continue_upload.rb +2 -2
  17. data/lib/brick_ftp/restful_api/copy_folder.rb +1 -1
  18. data/lib/brick_ftp/restful_api/count_folder_contents.rb +3 -3
  19. data/lib/brick_ftp/restful_api/count_users.rb +1 -1
  20. data/lib/brick_ftp/restful_api/create_api_key.rb +2 -2
  21. data/lib/brick_ftp/restful_api/create_behavior.rb +2 -2
  22. data/lib/brick_ftp/restful_api/create_bundle.rb +2 -2
  23. data/lib/brick_ftp/restful_api/create_folder.rb +1 -1
  24. data/lib/brick_ftp/restful_api/create_group.rb +2 -2
  25. data/lib/brick_ftp/restful_api/create_notification.rb +2 -2
  26. data/lib/brick_ftp/restful_api/create_permission.rb +2 -2
  27. data/lib/brick_ftp/restful_api/create_public_key.rb +2 -2
  28. data/lib/brick_ftp/restful_api/create_user.rb +2 -2
  29. data/lib/brick_ftp/restful_api/create_user_in_group.rb +2 -2
  30. data/lib/brick_ftp/restful_api/delete_api_key.rb +1 -1
  31. data/lib/brick_ftp/restful_api/delete_behavior.rb +1 -1
  32. data/lib/brick_ftp/restful_api/delete_bundle.rb +1 -1
  33. data/lib/brick_ftp/restful_api/delete_folder.rb +5 -7
  34. data/lib/brick_ftp/restful_api/delete_group.rb +1 -1
  35. data/lib/brick_ftp/restful_api/delete_notification.rb +1 -1
  36. data/lib/brick_ftp/restful_api/delete_permission.rb +1 -1
  37. data/lib/brick_ftp/restful_api/delete_public_key.rb +1 -1
  38. data/lib/brick_ftp/restful_api/delete_user.rb +1 -1
  39. data/lib/brick_ftp/restful_api/download_file.rb +2 -2
  40. data/lib/brick_ftp/restful_api/get_api_key.rb +2 -2
  41. data/lib/brick_ftp/restful_api/get_behavior.rb +2 -2
  42. data/lib/brick_ftp/restful_api/get_bundle.rb +2 -2
  43. data/lib/brick_ftp/restful_api/get_bundle_zip.rb +2 -2
  44. data/lib/brick_ftp/restful_api/get_file_in_bundle.rb +2 -2
  45. data/lib/brick_ftp/restful_api/get_folder_size.rb +1 -1
  46. data/lib/brick_ftp/restful_api/get_group.rb +2 -2
  47. data/lib/brick_ftp/restful_api/get_public_key.rb +2 -2
  48. data/lib/brick_ftp/restful_api/get_site_usage.rb +1 -1
  49. data/lib/brick_ftp/restful_api/get_user.rb +2 -2
  50. data/lib/brick_ftp/restful_api/list_api_keys.rb +2 -2
  51. data/lib/brick_ftp/restful_api/list_behaviors.rb +2 -2
  52. data/lib/brick_ftp/restful_api/list_bundle_contents.rb +2 -2
  53. data/lib/brick_ftp/restful_api/list_bundles.rb +2 -2
  54. data/lib/brick_ftp/restful_api/list_folder_behaviors.rb +2 -2
  55. data/lib/brick_ftp/restful_api/list_folders.rb +2 -2
  56. data/lib/brick_ftp/restful_api/list_groups.rb +2 -2
  57. data/lib/brick_ftp/restful_api/list_notifications.rb +2 -2
  58. data/lib/brick_ftp/restful_api/list_permissions.rb +2 -2
  59. data/lib/brick_ftp/restful_api/list_public_keys.rb +2 -2
  60. data/lib/brick_ftp/restful_api/list_users.rb +2 -2
  61. data/lib/brick_ftp/restful_api/move_folder.rb +1 -1
  62. data/lib/brick_ftp/restful_api/remove_group_member.rb +1 -1
  63. data/lib/brick_ftp/restful_api/retrieve_file_history.rb +1 -1
  64. data/lib/brick_ftp/restful_api/retrieve_folder_history.rb +1 -1
  65. data/lib/brick_ftp/restful_api/retrieve_history.rb +1 -1
  66. data/lib/brick_ftp/restful_api/retrieve_login_history.rb +1 -1
  67. data/lib/brick_ftp/restful_api/retrieve_site_history.rb +1 -1
  68. data/lib/brick_ftp/restful_api/retrieve_user_history.rb +1 -1
  69. data/lib/brick_ftp/restful_api/search_user.rb +2 -2
  70. data/lib/brick_ftp/restful_api/start_upload.rb +2 -2
  71. data/lib/brick_ftp/restful_api/unlock_user.rb +2 -2
  72. data/lib/brick_ftp/restful_api/update_behavior.rb +2 -2
  73. data/lib/brick_ftp/restful_api/update_group.rb +2 -2
  74. data/lib/brick_ftp/restful_api/update_group_member.rb +2 -2
  75. data/lib/brick_ftp/restful_api/update_user.rb +2 -2
  76. data/lib/brick_ftp/restful_api/upload_file.rb +4 -4
  77. data/lib/brick_ftp/types/behavior.rb +4 -2
  78. data/lib/brick_ftp/types/bundle.rb +4 -2
  79. data/lib/brick_ftp/types/bundle_content.rb +4 -2
  80. data/lib/brick_ftp/types/bundle_zip.rb +4 -2
  81. data/lib/brick_ftp/types/file.rb +4 -2
  82. data/lib/brick_ftp/types/file_in_bundle.rb +4 -2
  83. data/lib/brick_ftp/types/folder_contents_count.rb +5 -3
  84. data/lib/brick_ftp/types/group.rb +4 -2
  85. data/lib/brick_ftp/types/group_membership.rb +4 -2
  86. data/lib/brick_ftp/types/history.rb +4 -2
  87. data/lib/brick_ftp/types/ignore_undefined_attributes.rb +11 -0
  88. data/lib/brick_ftp/types/notification.rb +4 -2
  89. data/lib/brick_ftp/types/permission.rb +4 -2
  90. data/lib/brick_ftp/types/site_usage.rb +3 -1
  91. data/lib/brick_ftp/types/upload.rb +4 -2
  92. data/lib/brick_ftp/types/user.rb +4 -2
  93. data/lib/brick_ftp/types/user_api_key.rb +4 -2
  94. data/lib/brick_ftp/types/user_public_key.rb +4 -2
  95. data/lib/brick_ftp/version.rb +1 -1
  96. metadata +14 -23
@@ -6,13 +6,13 @@ module BrickFTP
6
6
  module RESTfulAPI
7
7
  # Overview of uploading
8
8
  #
9
- # @see https://developers.brickftp.com/#overview-of-uploading Overview of uploading
9
+ # @see https://developers.files.com/#overview-of-uploading Overview of uploading
10
10
  #
11
11
  # ### Uploading files using the REST API is done in 3 stages:
12
12
  #
13
- # 1. {https://developers.brickftp.com/#starting-a-new-upload Start a new upload} by sending a request to REST API to indicate intent to upload a file.
14
- # 2. {https://developers.brickftp.com/#uploading-the-file-or-file-parts Upload the file} to the URL(s) provided by the REST API, possibly in parts via multiple uploads.
15
- # 3. {https://developers.brickftp.com/#completing-an-upload Complete the upload} by notifying the REST API that the file upload has completed.
13
+ # 1. {https://developers.files.com/#starting-a-new-upload Start a new upload} by sending a request to REST API to indicate intent to upload a file.
14
+ # 2. {https://developers.files.com/#uploading-the-file-or-file-parts Upload the file} to the URL(s) provided by the REST API, possibly in parts via multiple uploads.
15
+ # 3. {https://developers.files.com/#completing-an-upload Complete the upload} by notifying the REST API that the file upload has completed.
16
16
  #
17
17
  class UploadFile
18
18
  include Command
@@ -6,7 +6,7 @@ module BrickFTP
6
6
 
7
7
  # ## The behavior object
8
8
  #
9
- # @see https://developers.brickftp.com/#the-behavior-object The behavior object
9
+ # @see https://developers.files.com/#the-behavior-object The behavior object
10
10
  #
11
11
  # ATTRIBUTE | TYPE | DESCRIPTION
12
12
  # ---------- | -------- | -----------
@@ -22,6 +22,8 @@ module BrickFTP
22
22
  :behavior,
23
23
  :value,
24
24
  keyword_init: true
25
- )
25
+ ) do
26
+ prepend IgnoreUndefinedAttributes
27
+ end
26
28
  end
27
29
  end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
 
7
7
  # The bundle object
8
8
  #
9
- # @see https://developers.brickftp.com/#the-bundle-object The bundle object
9
+ # @see https://developers.files.com/#the-bundle-object The bundle object
10
10
  #
11
11
  # ATTRIBUTE | TYPE | DESCRIPTION
12
12
  # ---------- | -------- | -----------
@@ -29,6 +29,8 @@ module BrickFTP
29
29
  :expires_at,
30
30
  :username,
31
31
  keyword_init: true
32
- )
32
+ ) do
33
+ prepend IgnoreUndefinedAttributes
34
+ end
33
35
  end
34
36
  end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
 
7
7
  # An element of bundle contents
8
8
  #
9
- # @see https://developers.brickftp.com/#list-bundle-contents List bundle contents
9
+ # @see https://developers.files.com/#list-bundle-contents List bundle contents
10
10
  #
11
11
  # ATTRIBUTE | TYPE | DESCRIPTION
12
12
  # --------- | ------- | -----------
@@ -20,6 +20,8 @@ module BrickFTP
20
20
  :type,
21
21
  :size,
22
22
  keyword_init: true
23
- )
23
+ ) do
24
+ prepend IgnoreUndefinedAttributes
25
+ end
24
26
  end
25
27
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module Types
5
5
  using BrickFTP::CoreExt::Struct
6
6
 
7
- # @see https://developers.brickftp.com/#download-entire-bundle-as-zip Download entire bundle as ZIP
7
+ # @see https://developers.files.com/#download-entire-bundle-as-zip Download entire bundle as ZIP
8
8
  #
9
9
  # ATTRIBUTE | TYPE | DESCRIPTION
10
10
  # ------------ | -------- | -----------
@@ -14,6 +14,8 @@ module BrickFTP
14
14
  'BundleZip',
15
15
  :download_uri,
16
16
  keyword_init: true
17
- )
17
+ ) do
18
+ prepend IgnoreUndefinedAttributes
19
+ end
18
20
  end
19
21
  end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
 
7
7
  # The file/folder object
8
8
  #
9
- # @see https://developers.brickftp.com/#the-file-folder-object The file/folder object
9
+ # @see https://developers.files.com/#the-file-folder-object The file/folder object
10
10
  #
11
11
  # ATTRIBUTE | TYPE | DESCRIPTION
12
12
  # ------------------ | -------- | -----------
@@ -40,6 +40,8 @@ module BrickFTP
40
40
  :download_uri,
41
41
  :subfolders_locked?,
42
42
  keyword_init: true
43
- )
43
+ ) do
44
+ prepend IgnoreUndefinedAttributes
45
+ end
44
46
  end
45
47
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module Types
5
5
  using BrickFTP::CoreExt::Struct
6
6
 
7
- # @see https://developers.brickftp.com/#download-one-file-in-a-bundle Download one file in a bundle
7
+ # @see https://developers.files.com/#download-one-file-in-a-bundle Download one file in a bundle
8
8
  #
9
9
  # ATTRIBUTE | TYPE | DESCRIPTION
10
10
  # ------------ | -------- | -----------
@@ -20,6 +20,8 @@ module BrickFTP
20
20
  :size,
21
21
  :download_uri,
22
22
  keyword_init: true
23
- )
23
+ ) do
24
+ prepend IgnoreUndefinedAttributes
25
+ end
24
26
  end
25
27
  end
@@ -4,8 +4,8 @@ module BrickFTP
4
4
  module Types
5
5
  using BrickFTP::CoreExt::Struct
6
6
 
7
- # @see https://developers.brickftp.com/#count-folder-contents-recursively Count folder contents recursively
8
- # @see https://developers.brickftp.com/#count-folder-contents-non-recursively Count folder contents non-recursively
7
+ # @see https://developers.files.com/#count-folder-contents-recursively Count folder contents recursively
8
+ # @see https://developers.files.com/#count-folder-contents-non-recursively Count folder contents non-recursively
9
9
  #
10
10
  # ATTRIBUTE | TYPE | DESCRIPTION
11
11
  # ---------- | ------- | -----------
@@ -19,6 +19,8 @@ module BrickFTP
19
19
  :files,
20
20
  :folders,
21
21
  keyword_init: true
22
- )
22
+ ) do
23
+ prepend IgnoreUndefinedAttributes
24
+ end
23
25
  end
24
26
  end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
 
7
7
  # The group object
8
8
  #
9
- # @see https://developers.brickftp.com/#the-group-object The group object
9
+ # @see https://developers.files.com/#the-group-object The group object
10
10
  #
11
11
  # ATTRIBUTE | TYPE | DESCRIPTION
12
12
  # --------- | ------------------------ | -----------
@@ -26,6 +26,8 @@ module BrickFTP
26
26
  :usernames,
27
27
  :admin_ids,
28
28
  keyword_init: true
29
- )
29
+ ) do
30
+ prepend IgnoreUndefinedAttributes
31
+ end
30
32
  end
31
33
  end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
 
7
7
  # membership object
8
8
  #
9
- # @see https://developers.brickftp.com/#add-a-member membership object
9
+ # @see https://developers.files.com/#add-a-member membership object
10
10
  #
11
11
  # ATTRIBUTE | TYPE | DESCRIPTION
12
12
  # --------- | ------- | -----------
@@ -22,6 +22,8 @@ module BrickFTP
22
22
  :user_id,
23
23
  :admin,
24
24
  keyword_init: true
25
- )
25
+ ) do
26
+ prepend IgnoreUndefinedAttributes
27
+ end
26
28
  end
27
29
  end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
 
7
7
  # The notification object
8
8
  #
9
- # @see https://developers.brickftp.com/#the-notification-object The notification object
9
+ # @see https://developers.files.com/#the-notification-object The notification object
10
10
  #
11
11
  # ATTRIBUTE | TYPE | DESCRIPTION
12
12
  # ------------- | -------- | -----------
@@ -38,6 +38,8 @@ module BrickFTP
38
38
  :ip,
39
39
  :interface,
40
40
  keyword_init: true
41
- )
41
+ ) do
42
+ prepend IgnoreUndefinedAttributes
43
+ end
42
44
  end
43
45
  end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrickFTP
4
+ module Types
5
+ module IgnoreUndefinedAttributes
6
+ def initialize(**kwargs)
7
+ super(**members.each_with_object({}) { |k, m| m[k] = kwargs[k] })
8
+ end
9
+ end
10
+ end
11
+ end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
 
7
7
  # The notification object
8
8
  #
9
- # @see https://developers.brickftp.com/#the-notification-object The notification object
9
+ # @see https://developers.files.com/#the-notification-object The notification object
10
10
  #
11
11
  # ATTRIBUTE | TYPE | DESCRIPTION
12
12
  # ------------- | ------- | -----------
@@ -26,6 +26,8 @@ module BrickFTP
26
26
  :send_interval,
27
27
  :unsubscribed,
28
28
  keyword_init: true
29
- )
29
+ ) do
30
+ prepend IgnoreUndefinedAttributes
31
+ end
30
32
  end
31
33
  end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
 
7
7
  # The permission object
8
8
  #
9
- # @see https://developers.brickftp.com/#the-permission-object The permission object
9
+ # @see https://developers.files.com/#the-permission-object The permission object
10
10
  #
11
11
  # ATTRIBUTE | TYPE | DESCRIPTION
12
12
  # ---------- | ------- | -----------
@@ -30,6 +30,8 @@ module BrickFTP
30
30
  :permission,
31
31
  :recursive,
32
32
  keyword_init: true
33
- )
33
+ ) do
34
+ prepend IgnoreUndefinedAttributes
35
+ end
34
36
  end
35
37
  end
@@ -18,6 +18,8 @@ module BrickFTP
18
18
  :total_uploads,
19
19
  :total_downloads,
20
20
  keyword_init: true
21
- )
21
+ ) do
22
+ prepend IgnoreUndefinedAttributes
23
+ end
22
24
  end
23
25
  end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
 
7
7
  # The upload object
8
8
  #
9
- # @see https://developers.brickftp.com/#the-upload-object The upload object
9
+ # @see https://developers.files.com/#the-upload-object The upload object
10
10
  #
11
11
  # ATTRIBUTE | TYPE | DESCRIPTION
12
12
  # -------------------- | --------------- | -----------
@@ -40,6 +40,8 @@ module BrickFTP
40
40
  :expires,
41
41
  :next_partsize,
42
42
  keyword_init: true
43
- )
43
+ ) do
44
+ prepend IgnoreUndefinedAttributes
45
+ end
44
46
  end
45
47
  end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
 
7
7
  # The user object
8
8
  #
9
- # @see https://developers.brickftp.com/#the-user-object The user object
9
+ # @see https://developers.files.com/#the-user-object The user object
10
10
  #
11
11
  # ATTRIBUTE | TYPE | DESCRIPTION
12
12
  # ----------------------- | ------------------------ | -----------
@@ -74,6 +74,8 @@ module BrickFTP
74
74
  :lockout_expires,
75
75
  :admin_group_ids,
76
76
  keyword_init: true
77
- )
77
+ ) do
78
+ prepend IgnoreUndefinedAttributes
79
+ end
78
80
  end
79
81
  end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
 
7
7
  # The API key object
8
8
  #
9
- # @see https://developers.brickftp.com/#the-api-key-object The API key object
9
+ # @see https://developers.files.com/#the-api-key-object The API key object
10
10
  #
11
11
  # ATTRIBUTE | TYPE | DESCRIPTION
12
12
  # -------------- | -------- | -----------
@@ -28,6 +28,8 @@ module BrickFTP
28
28
  :expires_at,
29
29
  :created_at,
30
30
  keyword_init: true
31
- )
31
+ ) do
32
+ prepend IgnoreUndefinedAttributes
33
+ end
32
34
  end
33
35
  end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
 
7
7
  # The public key object
8
8
  #
9
- # @see https://developers.brickftp.com/#the-public-key-object The public key object
9
+ # @see https://developers.files.com/#the-public-key-object The public key object
10
10
  #
11
11
  # ATTRIBUTE | TYPE | DESCRIPTION
12
12
  # ----------- | -------- | -----------
@@ -23,6 +23,8 @@ module BrickFTP
23
23
  :fingerprint,
24
24
  :created_at,
25
25
  keyword_init: true
26
- )
26
+ ) do
27
+ prepend IgnoreUndefinedAttributes
28
+ end
27
29
  end
28
30
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BrickFTP
4
- VERSION = '1.0.0'
4
+ VERSION = '2.0.3'
5
5
  end
metadata CHANGED
@@ -1,43 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brick_ftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - koshigoe
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-03 00:00:00.000000000 Z
11
+ date: 2020-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.16'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.16'
27
- - !ruby/object:Gem::Dependency
28
- name: codecov
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 0.1.10
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 0.1.10
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: pry
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -160,6 +146,11 @@ files:
160
146
  - ".circleci/config.yml"
161
147
  - ".github/ISSUE_TEMPLATE.md"
162
148
  - ".github/PULL_REQUEST_TEMPLATE.md"
149
+ - ".github/action/publish_gem/Dockerfile"
150
+ - ".github/action/publish_gem/entrypoint.sh"
151
+ - ".github/action/write_github_release/Dockerfile"
152
+ - ".github/action/write_github_release/entrypoint.sh"
153
+ - ".github/main.workflow"
163
154
  - ".gitignore"
164
155
  - ".rspec"
165
156
  - ".rubocop.yml"
@@ -258,6 +249,7 @@ files:
258
249
  - lib/brick_ftp/types/group.rb
259
250
  - lib/brick_ftp/types/group_membership.rb
260
251
  - lib/brick_ftp/types/history.rb
252
+ - lib/brick_ftp/types/ignore_undefined_attributes.rb
261
253
  - lib/brick_ftp/types/notification.rb
262
254
  - lib/brick_ftp/types/permission.rb
263
255
  - lib/brick_ftp/types/site_usage.rb
@@ -272,7 +264,7 @@ homepage: https://github.com/koshigoe/brick_ftp
272
264
  licenses:
273
265
  - MIT
274
266
  metadata: {}
275
- post_install_message:
267
+ post_install_message:
276
268
  rdoc_options: []
277
269
  require_paths:
278
270
  - lib
@@ -287,9 +279,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
287
279
  - !ruby/object:Gem::Version
288
280
  version: '0'
289
281
  requirements: []
290
- rubyforge_project:
291
- rubygems_version: 2.7.3
292
- signing_key:
282
+ rubygems_version: 3.1.4
283
+ signing_key:
293
284
  specification_version: 4
294
285
  summary: BrickFTP's REST API client.
295
286
  test_files: []