brick_ftp 0.8.4 → 1.0.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +0 -5
  3. data/.rubocop.yml +2 -1
  4. data/.yardopts +1 -0
  5. data/CHANGELOG.md +16 -12
  6. data/Gemfile +2 -0
  7. data/README.md +24 -43
  8. data/Rakefile +2 -0
  9. data/bin/console +1 -0
  10. data/brick_ftp.gemspec +10 -9
  11. data/exe/brick_ftp +1 -0
  12. data/lib/brick_ftp.rb +5 -78
  13. data/lib/brick_ftp/client.rb +35 -411
  14. data/lib/brick_ftp/core_ext.rb +8 -0
  15. data/lib/brick_ftp/core_ext/hash.rb +13 -0
  16. data/lib/brick_ftp/core_ext/hash/compact.rb +13 -0
  17. data/lib/brick_ftp/core_ext/struct.rb +13 -0
  18. data/lib/brick_ftp/core_ext/struct/new.rb +16 -0
  19. data/lib/brick_ftp/restful_api.rb +82 -0
  20. data/lib/brick_ftp/restful_api/add_group_member.rb +44 -0
  21. data/lib/brick_ftp/restful_api/client.rb +179 -0
  22. data/lib/brick_ftp/restful_api/command.rb +21 -0
  23. data/lib/brick_ftp/restful_api/complete_upload.rb +46 -0
  24. data/lib/brick_ftp/restful_api/continue_upload.rb +50 -0
  25. data/lib/brick_ftp/restful_api/copy_folder.rb +46 -0
  26. data/lib/brick_ftp/restful_api/count_folder_contents.rb +36 -0
  27. data/lib/brick_ftp/restful_api/count_users.rb +22 -0
  28. data/lib/brick_ftp/restful_api/create_api_key.rb +46 -0
  29. data/lib/brick_ftp/restful_api/create_behavior.rb +42 -0
  30. data/lib/brick_ftp/restful_api/create_bundle.rb +40 -0
  31. data/lib/brick_ftp/restful_api/create_folder.rb +25 -0
  32. data/lib/brick_ftp/restful_api/create_group.rb +42 -0
  33. data/lib/brick_ftp/restful_api/create_notification.rb +44 -0
  34. data/lib/brick_ftp/restful_api/create_permission.rb +48 -0
  35. data/lib/brick_ftp/restful_api/create_public_key.rb +42 -0
  36. data/lib/brick_ftp/restful_api/create_user.rb +90 -0
  37. data/lib/brick_ftp/restful_api/create_user_in_group.rb +60 -0
  38. data/lib/brick_ftp/restful_api/delete_api_key.rb +23 -0
  39. data/lib/brick_ftp/restful_api/delete_behavior.rb +22 -0
  40. data/lib/brick_ftp/restful_api/delete_bundle.rb +22 -0
  41. data/lib/brick_ftp/restful_api/delete_folder.rb +32 -0
  42. data/lib/brick_ftp/restful_api/delete_group.rb +23 -0
  43. data/lib/brick_ftp/restful_api/delete_notification.rb +23 -0
  44. data/lib/brick_ftp/restful_api/delete_permission.rb +23 -0
  45. data/lib/brick_ftp/restful_api/delete_public_key.rb +23 -0
  46. data/lib/brick_ftp/restful_api/delete_user.rb +25 -0
  47. data/lib/brick_ftp/restful_api/download_file.rb +44 -0
  48. data/lib/brick_ftp/restful_api/get_api_key.rb +25 -0
  49. data/lib/brick_ftp/restful_api/get_behavior.rb +25 -0
  50. data/lib/brick_ftp/restful_api/get_bundle.rb +25 -0
  51. data/lib/brick_ftp/restful_api/get_bundle_zip.rb +48 -0
  52. data/lib/brick_ftp/restful_api/get_file_in_bundle.rb +49 -0
  53. data/lib/brick_ftp/restful_api/get_folder_size.rb +25 -0
  54. data/lib/brick_ftp/restful_api/get_group.rb +26 -0
  55. data/lib/brick_ftp/restful_api/get_public_key.rb +25 -0
  56. data/lib/brick_ftp/restful_api/get_site_usage.rb +19 -0
  57. data/lib/brick_ftp/restful_api/get_user.rb +26 -0
  58. data/lib/brick_ftp/restful_api/list_api_keys.rb +25 -0
  59. data/lib/brick_ftp/restful_api/list_behaviors.rb +23 -0
  60. data/lib/brick_ftp/restful_api/list_bundle_contents.rb +58 -0
  61. data/lib/brick_ftp/restful_api/list_bundles.rb +23 -0
  62. data/lib/brick_ftp/restful_api/list_folder_behaviors.rb +39 -0
  63. data/lib/brick_ftp/restful_api/list_folders.rb +108 -0
  64. data/lib/brick_ftp/restful_api/list_groups.rb +23 -0
  65. data/lib/brick_ftp/restful_api/list_notifications.rb +23 -0
  66. data/lib/brick_ftp/restful_api/list_permissions.rb +41 -0
  67. data/lib/brick_ftp/restful_api/list_public_keys.rb +25 -0
  68. data/lib/brick_ftp/restful_api/list_users.rb +60 -0
  69. data/lib/brick_ftp/restful_api/move_folder.rb +41 -0
  70. data/lib/brick_ftp/restful_api/remove_group_member.rb +23 -0
  71. data/lib/brick_ftp/restful_api/retrieve_file_history.rb +41 -0
  72. data/lib/brick_ftp/restful_api/retrieve_folder_history.rb +41 -0
  73. data/lib/brick_ftp/restful_api/retrieve_history.rb +54 -0
  74. data/lib/brick_ftp/restful_api/retrieve_login_history.rb +38 -0
  75. data/lib/brick_ftp/restful_api/retrieve_site_history.rb +38 -0
  76. data/lib/brick_ftp/restful_api/retrieve_user_history.rb +40 -0
  77. data/lib/brick_ftp/restful_api/search_user.rb +28 -0
  78. data/lib/brick_ftp/restful_api/start_upload.rb +27 -0
  79. data/lib/brick_ftp/restful_api/unlock_user.rb +25 -0
  80. data/lib/brick_ftp/restful_api/update_behavior.rb +39 -0
  81. data/lib/brick_ftp/restful_api/update_group.rb +44 -0
  82. data/lib/brick_ftp/restful_api/update_group_member.rb +40 -0
  83. data/lib/brick_ftp/restful_api/update_user.rb +101 -0
  84. data/lib/brick_ftp/restful_api/upload_file.rb +65 -0
  85. data/lib/brick_ftp/types.rb +23 -0
  86. data/lib/brick_ftp/types/behavior.rb +27 -0
  87. data/lib/brick_ftp/types/bundle.rb +34 -0
  88. data/lib/brick_ftp/types/bundle_content.rb +25 -0
  89. data/lib/brick_ftp/types/bundle_zip.rb +19 -0
  90. data/lib/brick_ftp/types/file.rb +45 -0
  91. data/lib/brick_ftp/types/file_in_bundle.rb +25 -0
  92. data/lib/brick_ftp/types/folder_contents_count.rb +24 -0
  93. data/lib/brick_ftp/types/group.rb +31 -0
  94. data/lib/brick_ftp/types/group_membership.rb +27 -0
  95. data/lib/brick_ftp/types/history.rb +43 -0
  96. data/lib/brick_ftp/types/notification.rb +31 -0
  97. data/lib/brick_ftp/types/permission.rb +35 -0
  98. data/lib/brick_ftp/types/site_usage.rb +23 -0
  99. data/lib/brick_ftp/types/upload.rb +45 -0
  100. data/lib/brick_ftp/types/user.rb +79 -0
  101. data/lib/brick_ftp/types/user_api_key.rb +33 -0
  102. data/lib/brick_ftp/types/user_public_key.rb +28 -0
  103. data/lib/brick_ftp/utils.rb +2 -0
  104. data/lib/brick_ftp/utils/chunk_io.rb +5 -4
  105. data/lib/brick_ftp/version.rb +3 -1
  106. metadata +123 -86
  107. data/lib/brick_ftp/api.rb +0 -9
  108. data/lib/brick_ftp/api/authentication.rb +0 -28
  109. data/lib/brick_ftp/api/authentication/session.rb +0 -25
  110. data/lib/brick_ftp/api/base.rb +0 -119
  111. data/lib/brick_ftp/api/behavior.rb +0 -19
  112. data/lib/brick_ftp/api/bundle.rb +0 -17
  113. data/lib/brick_ftp/api/bundle_content.rb +0 -18
  114. data/lib/brick_ftp/api/bundle_download.rb +0 -18
  115. data/lib/brick_ftp/api/file.rb +0 -20
  116. data/lib/brick_ftp/api/file_operation.rb +0 -6
  117. data/lib/brick_ftp/api/file_operation/copy.rb +0 -10
  118. data/lib/brick_ftp/api/file_operation/move.rb +0 -10
  119. data/lib/brick_ftp/api/file_operation/upload.rb +0 -66
  120. data/lib/brick_ftp/api/file_operation/uploading_result.rb +0 -22
  121. data/lib/brick_ftp/api/file_operation/uploading_session.rb +0 -95
  122. data/lib/brick_ftp/api/folder.rb +0 -22
  123. data/lib/brick_ftp/api/folder_behavior.rb +0 -12
  124. data/lib/brick_ftp/api/group.rb +0 -16
  125. data/lib/brick_ftp/api/history.rb +0 -6
  126. data/lib/brick_ftp/api/history/file.rb +0 -23
  127. data/lib/brick_ftp/api/history/folder.rb +0 -23
  128. data/lib/brick_ftp/api/history/login.rb +0 -23
  129. data/lib/brick_ftp/api/history/site.rb +0 -23
  130. data/lib/brick_ftp/api/history/user.rb +0 -23
  131. data/lib/brick_ftp/api/notification.rb +0 -14
  132. data/lib/brick_ftp/api/permission.rb +0 -17
  133. data/lib/brick_ftp/api/public_key.rb +0 -15
  134. data/lib/brick_ftp/api/site_usage.rb +0 -21
  135. data/lib/brick_ftp/api/user.rb +0 -36
  136. data/lib/brick_ftp/api_component.rb +0 -81
  137. data/lib/brick_ftp/api_definition.rb +0 -65
  138. data/lib/brick_ftp/cli.rb +0 -7
  139. data/lib/brick_ftp/cli/config.rb +0 -20
  140. data/lib/brick_ftp/cli/main.rb +0 -26
  141. data/lib/brick_ftp/cli/site.rb +0 -10
  142. data/lib/brick_ftp/configuration.rb +0 -121
  143. data/lib/brick_ftp/http_client.rb +0 -130
  144. data/lib/brick_ftp/log_formatter.rb +0 -15
  145. data/lib/brick_ftp/webhook.rb +0 -4
  146. data/lib/brick_ftp/webhook/request.rb +0 -28
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrickFTP
4
+ module Types
5
+ using BrickFTP::CoreExt::Struct
6
+
7
+ SiteUsage = Struct.new(
8
+ 'SiteUsage',
9
+ :id,
10
+ :live_current_storage,
11
+ :current_storage,
12
+ :usage_by_top_level_dir,
13
+ :high_water_storage,
14
+ :start_at,
15
+ :end_at,
16
+ :created_at,
17
+ :updated_at,
18
+ :total_uploads,
19
+ :total_downloads,
20
+ keyword_init: true
21
+ )
22
+ end
23
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrickFTP
4
+ module Types
5
+ using BrickFTP::CoreExt::Struct
6
+
7
+ # The upload object
8
+ #
9
+ # @see https://developers.brickftp.com/#the-upload-object The upload object
10
+ #
11
+ # ATTRIBUTE | TYPE | DESCRIPTION
12
+ # -------------------- | --------------- | -----------
13
+ # ref | string | Unique identifier to reference this file upload. This identifier is needed for subsequent requests to the REST API to complete the upload or request more upload URLs.
14
+ # http_method | string | Value is PUT or POST, and is the HTTP method used when uploading the file to S3 at the upload_uri.
15
+ # upload_uri | string | The URL where the file is uploaded to.
16
+ # partsize | integer | Recommended size of upload. When uploading file pieces, the piece sizes are required to be between 5 MB and 5 GB (except the last part). This value provides a recommended size to upload for this part without adding another part.
17
+ # part_number | integer | Number of this part, which is always between 1 and 10,000, and will always be 1 for the first upload URL at the beginning of uploading a new file.
18
+ # available_parts | integer | Number of parts available for this upload. For new file uploads this value is always 10,000, but it may be smaller for other uploads. When requesting more upload URLs from the REST API, the part numbers must be between 1 and this number.
19
+ # headers | key-value pairs | A list of required headers and their exact values to send in the file upload. It may be empty if no headers with fixed values are required.
20
+ # parameters | key-value pairs | A list of required parameters and their exact values to send in the file upload. If any values are in this array, it is implied that the upload request is formatted appropriately to send form data parameters. It will always be empty if the body of the request is specified to be where the file upload data goes (see send below).
21
+ # send | key-value pairs | This is an array of values to be sent in the file upload request. Possible sub-values are partsize, partdata, file, and Content-Type:<br>`file`: where to put the file data for the entire file upload<br>`partdata`: where to put the file data for this part<br>`partsize`: where to put the size of the upload for this file part<br>`Content-Type`: where to put the Content-Type of the file (which can have no bearing on the file's actual type)<br>Possible values for these parameters:<br>`body`: this information is the body of the PUT or POST request<br>`required-header <header name>`: this information goes in the named header<br>`required-parameter <parameter name>`: this information goes in the named parameter, and implies this request is formatted appropriately to send form data parameters
22
+ # path | string | Intended destination path of the file upload. Path may change upon finalization, depending on existance of another upload to the same location and the site's overwrite setting.
23
+ # action | string | Value is always write or put for this action.
24
+ # ask_about_overwrites | boolean | If true, a file by this name already exists and will be overwritten when this upload completes if it continues.
25
+ #
26
+ Upload = Struct.new(
27
+ 'Upload',
28
+ :ref,
29
+ :http_method,
30
+ :upload_uri,
31
+ :partsize,
32
+ :part_number,
33
+ :available_parts,
34
+ :headers,
35
+ :parameters,
36
+ :send,
37
+ :path,
38
+ :action,
39
+ :ask_about_overwrites,
40
+ :expires,
41
+ :next_partsize,
42
+ keyword_init: true
43
+ )
44
+ end
45
+ end
@@ -0,0 +1,79 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrickFTP
4
+ module Types
5
+ using BrickFTP::CoreExt::Struct
6
+
7
+ # The user object
8
+ #
9
+ # @see https://developers.brickftp.com/#the-user-object The user object
10
+ #
11
+ # ATTRIBUTE | TYPE | DESCRIPTION
12
+ # ----------------------- | ------------------------ | -----------
13
+ # id | integer | Globally unique identifier of each user. Each user is given an ID automatically upon creation.
14
+ # username | string | Username for the user. This is how the user will be displayed on the site. Maximum of 50 characters.
15
+ # authentication_method | enum | Authentication method for this user. Can be one of the following: password, ldap, or oauth_google. Default is password.
16
+ # last_login_at | datetime | The date and time of the most recent login for this user. This property is read-only.
17
+ # password | string | Password for the user. This property is write-only. It cannot be retrieved via the API.
18
+ # password_confirmation | string | Confirms the new password provided in the password field. This field is optional but will be validated if provided.
19
+ # authenticate_until | datetime | If set, the user will be blocked from logging in after this date.
20
+ # name | string | Real name of the user. For your reference. Maximum of 50 characters.
21
+ # email | string | E-Mail address of the user. Maximum of 50 characters.
22
+ # notes | text | You may use this property to store any additional information you require. There are no restrictions on its formatting.
23
+ # group_ids | comma-separated integers | IDs of the Groups that this user is in.
24
+ # ftp_permission | boolean | Allow user access via FTP/FTPS (port 21 or 990) interface. Default is true.
25
+ # sftp_permission | boolean | Allow user access via SFTP (port 22) interface. Default is true.
26
+ # dav_permission | boolean | Allow user access via WebDAV (port 443) interface. Default is true.
27
+ # restapi_permission | boolean | Allow user access the REST API, via HTTP/HTTPS (port 80 or 443), and the desktop application. Default is true.
28
+ # attachments_permission | boolean | Allow user to use Sharing tab in web interface to share files with anonymous users via a unique URL. Default is false.
29
+ # self_managed | boolean | Allow user to change their password and user information via the web interface. Default is true.
30
+ # require_password_change | boolean | Require user to change their password at their next login. Note: requires restapi_permission to be true, as password changes can only occur via the web interface. Default is false.
31
+ # allowed_ips | text | List allowed IPs, one per line. You may specify a range in CIDR format, such as 192.168.1.0/27. Leave blank to allow all IPs. If you are also restricting IP addresses on the Site tab, users matching in either place will be allowed to log in.
32
+ # user_root | string | Folder to show as the root when this user logs in via the FTP interface. Make sure this folder exists, as it will not be automatically created. Does not apply to the web interface! This should not contain a leading slash, but must contain a trailing slash. Example: Users/jenny/. Limit of 250 characters.
33
+ # time_zone | string | File modification times will be displayed in this time zone. Default is Eastern Time (US & Canada).
34
+ # language | string | The language that BrickFTP will be displayed in, if the translation is available. Leave as default (null) to auto-detect or use the site setting.
35
+ # grant_permission | enum | Value must be set to full, read, write, preview, read+write, or preview+write. The user will be granted that permission on their FTP root folder as defined by the user_root. This property is write-only. It cannot be retrieved via the User resource of the REST API, though may be obtained with the Permissions resource of the REST API.
36
+ # ssl_required | enum | Whether or not SSL encryption is required on all connections for this user. Can be one of the following: use_system_setting, always_require, or never_require. Default is use_system_setting.
37
+ # site_admin | boolean | If set to true, this user will be treated as a site-wide administrator. Default is false.
38
+ # receive_admin_alerts | boolean | Enable this user to receive alerts sent to site administrators. This property will only be accepted/returned if site_admin is true. Default is false.
39
+ # subscribe_to_newsletter | boolean | Add this user to the BrickFTP newsletter and our mailing list for notices about product updates. This property will only be accepted/returned if site_admin is true. Default is false.
40
+ # can_create_new_users | boolean | If true, this user will be able to create other users within groups where they have administrator privileges. Default is false.
41
+ # last_protocol_cipher | string | The encryption protocol (for HTTPS or FTPS) or ciphers (for SFTP) that this user last connected with. This property is read-only.
42
+ # lockout_expires | datetime | If the user has been locked out by Brute Force Login Protection, this will indicate when the lock expires. Otherwise this will be null. This property is read-only.
43
+ # admin_group_ids | comma-separated integers | IDs of the Groups that this user is an administrator of.
44
+ #
45
+ User = Struct.new(
46
+ 'User',
47
+ :id,
48
+ :username,
49
+ :authentication_method,
50
+ :last_login_at,
51
+ :authenticate_until,
52
+ :name,
53
+ :email,
54
+ :notes,
55
+ :group_ids,
56
+ :ftp_permission,
57
+ :sftp_permission,
58
+ :dav_permission,
59
+ :restapi_permission,
60
+ :attachments_permission,
61
+ :self_managed,
62
+ :require_password_change,
63
+ :require_2fa,
64
+ :allowed_ips,
65
+ :user_root,
66
+ :time_zone,
67
+ :language,
68
+ :ssl_required,
69
+ :site_admin,
70
+ :password_set_at,
71
+ :receive_admin_alerts,
72
+ :subscribe_to_newsletter,
73
+ :last_protocol_cipher,
74
+ :lockout_expires,
75
+ :admin_group_ids,
76
+ keyword_init: true
77
+ )
78
+ end
79
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrickFTP
4
+ module Types
5
+ using BrickFTP::CoreExt::Struct
6
+
7
+ # The API key object
8
+ #
9
+ # @see https://developers.brickftp.com/#the-api-key-object The API key object
10
+ #
11
+ # ATTRIBUTE | TYPE | DESCRIPTION
12
+ # -------------- | -------- | -----------
13
+ # id | integer | Globally unique identifier of each user API key. Each user API key is given an ID automatically upon creation.
14
+ # key | string | The API key itself. This property is read-only.
15
+ # name | string | Name to identify the user API key. For your reference. Maximum of 100 characters.
16
+ # permission_set | string | The permission set for the user API key. Can be desktop_app or full.
17
+ # platform | string | The platform for the user API key. Can be win32, macos, linux, or none. Applies only to API keys with a permission_set of desktop_app.
18
+ # expires_at | datetime | The date that this API key is valid through.
19
+ # created_at | datetime | Creation date of the user API key. This property is read-only.
20
+ #
21
+ UserAPIKey = Struct.new(
22
+ 'UserAPIKey',
23
+ :id,
24
+ :key,
25
+ :name,
26
+ :permission_set,
27
+ :platform,
28
+ :expires_at,
29
+ :created_at,
30
+ keyword_init: true
31
+ )
32
+ end
33
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrickFTP
4
+ module Types
5
+ using BrickFTP::CoreExt::Struct
6
+
7
+ # The public key object
8
+ #
9
+ # @see https://developers.brickftp.com/#the-public-key-object The public key object
10
+ #
11
+ # ATTRIBUTE | TYPE | DESCRIPTION
12
+ # ----------- | -------- | -----------
13
+ # id | integer | Globally unique identifier of each public key. Each public key is given an ID automatically upon creation.
14
+ # title | string | Title to identify the public key. For your reference. Maximum of 50 characters.
15
+ # fingerprint | string | RSA fingerprint of the public key. This property is read-only.
16
+ # public_key | string | The public key itself. This property is write-only. It cannot be retrieved via the API.
17
+ # created_at | datetime | Creation date of the public key. This property is read-only.
18
+ #
19
+ UserPublicKey = Struct.new(
20
+ 'UserPublicKey',
21
+ :id,
22
+ :title,
23
+ :fingerprint,
24
+ :created_at,
25
+ keyword_init: true
26
+ )
27
+ end
28
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module BrickFTP
2
4
  module Utils
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'tempfile'
2
4
 
3
5
  module BrickFTP
@@ -9,9 +11,8 @@ module BrickFTP
9
11
 
10
12
  # Wrap IO object.
11
13
  #
12
- # @param [IO, StringIO] io an IO object.
14
+ # @param [IO] io an IO object.
13
15
  # @param [Integer] chunk_size Size of chunk.
14
- # This option is ignored if `io` is `StringIO`.
15
16
  #
16
17
  def initialize(io, chunk_size: nil)
17
18
  @io = io
@@ -21,12 +22,12 @@ module BrickFTP
21
22
  # Iterate with chunked IO object.
22
23
  #
23
24
  # @yield [chunk] Give a chunk IO object to block.
24
- # @yieldparam [IO] chunk a chunked IO object.
25
+ # @yieldparam [StringIO] chunk a chunked IO object.
25
26
  #
26
27
  def each(&block)
27
28
  return enum_for(__method__) unless block
28
29
 
29
- if chunk_size && io.is_a?(IO)
30
+ if chunk_size
30
31
  each_chunk(&block)
31
32
  else
32
33
  whole(&block)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module BrickFTP
2
- VERSION = '0.8.4'.freeze
4
+ VERSION = '1.0.0.beta'
3
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brick_ftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 1.0.0.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - koshigoe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-05 00:00:00.000000000 Z
11
+ date: 2018-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.12'
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
- version: '1.12'
26
+ version: '1.16'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: codecov
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,56 +44,70 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.10'
47
+ version: '0.11'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.10'
54
+ version: '0.11'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '12.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '12.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: redcarpet
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.4'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.4'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rspec
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - "~>"
74
88
  - !ruby/object:Gem::Version
75
- version: '3.0'
89
+ version: '3.7'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '3.0'
96
+ version: '3.7'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: rubocop
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: 0.55.0
103
+ version: 0.57.0
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: 0.55.0
110
+ version: 0.57.0
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: simplecov
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -114,14 +128,14 @@ dependencies:
114
128
  requirements:
115
129
  - - "~>"
116
130
  - !ruby/object:Gem::Version
117
- version: '2.1'
131
+ version: '3.4'
118
132
  type: :development
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
136
  - - "~>"
123
137
  - !ruby/object:Gem::Version
124
- version: '2.1'
138
+ version: '3.4'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: yard
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -150,34 +164,6 @@ dependencies:
150
164
  - - "~>"
151
165
  - !ruby/object:Gem::Version
152
166
  version: '1.0'
153
- - !ruby/object:Gem::Dependency
154
- name: inifile
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: 3.0.0
160
- type: :runtime
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
165
- - !ruby/object:Gem::Version
166
- version: 3.0.0
167
- - !ruby/object:Gem::Dependency
168
- name: thor
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - "~>"
172
- - !ruby/object:Gem::Version
173
- version: '0.20'
174
- type: :runtime
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - "~>"
179
- - !ruby/object:Gem::Version
180
- version: '0.20'
181
167
  description: BrickFTP's REST API client.
182
168
  email:
183
169
  - koshigoeb@gmail.com
@@ -193,6 +179,7 @@ files:
193
179
  - ".rspec"
194
180
  - ".rubocop.yml"
195
181
  - ".rubocop_todo.yml"
182
+ - ".yardopts"
196
183
  - CHANGELOG.md
197
184
  - Gemfile
198
185
  - LICENSE.txt
@@ -203,50 +190,99 @@ files:
203
190
  - brick_ftp.gemspec
204
191
  - exe/brick_ftp
205
192
  - lib/brick_ftp.rb
206
- - lib/brick_ftp/api.rb
207
- - lib/brick_ftp/api/authentication.rb
208
- - lib/brick_ftp/api/authentication/session.rb
209
- - lib/brick_ftp/api/base.rb
210
- - lib/brick_ftp/api/behavior.rb
211
- - lib/brick_ftp/api/bundle.rb
212
- - lib/brick_ftp/api/bundle_content.rb
213
- - lib/brick_ftp/api/bundle_download.rb
214
- - lib/brick_ftp/api/file.rb
215
- - lib/brick_ftp/api/file_operation.rb
216
- - lib/brick_ftp/api/file_operation/copy.rb
217
- - lib/brick_ftp/api/file_operation/move.rb
218
- - lib/brick_ftp/api/file_operation/upload.rb
219
- - lib/brick_ftp/api/file_operation/uploading_result.rb
220
- - lib/brick_ftp/api/file_operation/uploading_session.rb
221
- - lib/brick_ftp/api/folder.rb
222
- - lib/brick_ftp/api/folder_behavior.rb
223
- - lib/brick_ftp/api/group.rb
224
- - lib/brick_ftp/api/history.rb
225
- - lib/brick_ftp/api/history/file.rb
226
- - lib/brick_ftp/api/history/folder.rb
227
- - lib/brick_ftp/api/history/login.rb
228
- - lib/brick_ftp/api/history/site.rb
229
- - lib/brick_ftp/api/history/user.rb
230
- - lib/brick_ftp/api/notification.rb
231
- - lib/brick_ftp/api/permission.rb
232
- - lib/brick_ftp/api/public_key.rb
233
- - lib/brick_ftp/api/site_usage.rb
234
- - lib/brick_ftp/api/user.rb
235
- - lib/brick_ftp/api_component.rb
236
- - lib/brick_ftp/api_definition.rb
237
- - lib/brick_ftp/cli.rb
238
- - lib/brick_ftp/cli/config.rb
239
- - lib/brick_ftp/cli/main.rb
240
- - lib/brick_ftp/cli/site.rb
241
193
  - lib/brick_ftp/client.rb
242
- - lib/brick_ftp/configuration.rb
243
- - lib/brick_ftp/http_client.rb
244
- - lib/brick_ftp/log_formatter.rb
194
+ - lib/brick_ftp/core_ext.rb
195
+ - lib/brick_ftp/core_ext/hash.rb
196
+ - lib/brick_ftp/core_ext/hash/compact.rb
197
+ - lib/brick_ftp/core_ext/struct.rb
198
+ - lib/brick_ftp/core_ext/struct/new.rb
199
+ - lib/brick_ftp/restful_api.rb
200
+ - lib/brick_ftp/restful_api/add_group_member.rb
201
+ - lib/brick_ftp/restful_api/client.rb
202
+ - lib/brick_ftp/restful_api/command.rb
203
+ - lib/brick_ftp/restful_api/complete_upload.rb
204
+ - lib/brick_ftp/restful_api/continue_upload.rb
205
+ - lib/brick_ftp/restful_api/copy_folder.rb
206
+ - lib/brick_ftp/restful_api/count_folder_contents.rb
207
+ - lib/brick_ftp/restful_api/count_users.rb
208
+ - lib/brick_ftp/restful_api/create_api_key.rb
209
+ - lib/brick_ftp/restful_api/create_behavior.rb
210
+ - lib/brick_ftp/restful_api/create_bundle.rb
211
+ - lib/brick_ftp/restful_api/create_folder.rb
212
+ - lib/brick_ftp/restful_api/create_group.rb
213
+ - lib/brick_ftp/restful_api/create_notification.rb
214
+ - lib/brick_ftp/restful_api/create_permission.rb
215
+ - lib/brick_ftp/restful_api/create_public_key.rb
216
+ - lib/brick_ftp/restful_api/create_user.rb
217
+ - lib/brick_ftp/restful_api/create_user_in_group.rb
218
+ - lib/brick_ftp/restful_api/delete_api_key.rb
219
+ - lib/brick_ftp/restful_api/delete_behavior.rb
220
+ - lib/brick_ftp/restful_api/delete_bundle.rb
221
+ - lib/brick_ftp/restful_api/delete_folder.rb
222
+ - lib/brick_ftp/restful_api/delete_group.rb
223
+ - lib/brick_ftp/restful_api/delete_notification.rb
224
+ - lib/brick_ftp/restful_api/delete_permission.rb
225
+ - lib/brick_ftp/restful_api/delete_public_key.rb
226
+ - lib/brick_ftp/restful_api/delete_user.rb
227
+ - lib/brick_ftp/restful_api/download_file.rb
228
+ - lib/brick_ftp/restful_api/get_api_key.rb
229
+ - lib/brick_ftp/restful_api/get_behavior.rb
230
+ - lib/brick_ftp/restful_api/get_bundle.rb
231
+ - lib/brick_ftp/restful_api/get_bundle_zip.rb
232
+ - lib/brick_ftp/restful_api/get_file_in_bundle.rb
233
+ - lib/brick_ftp/restful_api/get_folder_size.rb
234
+ - lib/brick_ftp/restful_api/get_group.rb
235
+ - lib/brick_ftp/restful_api/get_public_key.rb
236
+ - lib/brick_ftp/restful_api/get_site_usage.rb
237
+ - lib/brick_ftp/restful_api/get_user.rb
238
+ - lib/brick_ftp/restful_api/list_api_keys.rb
239
+ - lib/brick_ftp/restful_api/list_behaviors.rb
240
+ - lib/brick_ftp/restful_api/list_bundle_contents.rb
241
+ - lib/brick_ftp/restful_api/list_bundles.rb
242
+ - lib/brick_ftp/restful_api/list_folder_behaviors.rb
243
+ - lib/brick_ftp/restful_api/list_folders.rb
244
+ - lib/brick_ftp/restful_api/list_groups.rb
245
+ - lib/brick_ftp/restful_api/list_notifications.rb
246
+ - lib/brick_ftp/restful_api/list_permissions.rb
247
+ - lib/brick_ftp/restful_api/list_public_keys.rb
248
+ - lib/brick_ftp/restful_api/list_users.rb
249
+ - lib/brick_ftp/restful_api/move_folder.rb
250
+ - lib/brick_ftp/restful_api/remove_group_member.rb
251
+ - lib/brick_ftp/restful_api/retrieve_file_history.rb
252
+ - lib/brick_ftp/restful_api/retrieve_folder_history.rb
253
+ - lib/brick_ftp/restful_api/retrieve_history.rb
254
+ - lib/brick_ftp/restful_api/retrieve_login_history.rb
255
+ - lib/brick_ftp/restful_api/retrieve_site_history.rb
256
+ - lib/brick_ftp/restful_api/retrieve_user_history.rb
257
+ - lib/brick_ftp/restful_api/search_user.rb
258
+ - lib/brick_ftp/restful_api/start_upload.rb
259
+ - lib/brick_ftp/restful_api/unlock_user.rb
260
+ - lib/brick_ftp/restful_api/update_behavior.rb
261
+ - lib/brick_ftp/restful_api/update_group.rb
262
+ - lib/brick_ftp/restful_api/update_group_member.rb
263
+ - lib/brick_ftp/restful_api/update_user.rb
264
+ - lib/brick_ftp/restful_api/upload_file.rb
265
+ - lib/brick_ftp/types.rb
266
+ - lib/brick_ftp/types/behavior.rb
267
+ - lib/brick_ftp/types/bundle.rb
268
+ - lib/brick_ftp/types/bundle_content.rb
269
+ - lib/brick_ftp/types/bundle_zip.rb
270
+ - lib/brick_ftp/types/file.rb
271
+ - lib/brick_ftp/types/file_in_bundle.rb
272
+ - lib/brick_ftp/types/folder_contents_count.rb
273
+ - lib/brick_ftp/types/group.rb
274
+ - lib/brick_ftp/types/group_membership.rb
275
+ - lib/brick_ftp/types/history.rb
276
+ - lib/brick_ftp/types/notification.rb
277
+ - lib/brick_ftp/types/permission.rb
278
+ - lib/brick_ftp/types/site_usage.rb
279
+ - lib/brick_ftp/types/upload.rb
280
+ - lib/brick_ftp/types/user.rb
281
+ - lib/brick_ftp/types/user_api_key.rb
282
+ - lib/brick_ftp/types/user_public_key.rb
245
283
  - lib/brick_ftp/utils.rb
246
284
  - lib/brick_ftp/utils/chunk_io.rb
247
285
  - lib/brick_ftp/version.rb
248
- - lib/brick_ftp/webhook.rb
249
- - lib/brick_ftp/webhook/request.rb
250
286
  homepage: https://github.com/koshigoe/brick_ftp
251
287
  licenses:
252
288
  - MIT
@@ -259,14 +295,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
259
295
  requirements:
260
296
  - - ">="
261
297
  - !ruby/object:Gem::Version
262
- version: 2.2.0
298
+ version: 2.3.0
263
299
  required_rubygems_version: !ruby/object:Gem::Requirement
264
300
  requirements:
265
- - - ">="
301
+ - - ">"
266
302
  - !ruby/object:Gem::Version
267
- version: '0'
303
+ version: 1.3.1
268
304
  requirements: []
269
- rubygems_version: 3.0.3
305
+ rubyforge_project:
306
+ rubygems_version: 2.7.6
270
307
  signing_key:
271
308
  specification_version: 4
272
309
  summary: BrickFTP's REST API client.