brick_ftp 1.0.0.beta2 → 1.0.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/brick_ftp.gemspec +0 -2
  3. data/lib/brick_ftp.rb +0 -1
  4. data/lib/brick_ftp/core_ext/hash.rb +2 -0
  5. data/lib/brick_ftp/core_ext/hash/symbolize_keys.rb +20 -0
  6. data/lib/brick_ftp/restful_api/client.rb +1 -0
  7. data/lib/brick_ftp/restful_api/count_folder_contents.rb +1 -0
  8. data/lib/brick_ftp/restful_api/download_file.rb +1 -0
  9. data/lib/brick_ftp/restful_api/get_api_key.rb +1 -0
  10. data/lib/brick_ftp/restful_api/get_behavior.rb +1 -0
  11. data/lib/brick_ftp/restful_api/get_bundle.rb +1 -0
  12. data/lib/brick_ftp/restful_api/get_group.rb +1 -0
  13. data/lib/brick_ftp/restful_api/get_public_key.rb +1 -0
  14. data/lib/brick_ftp/restful_api/get_site_usage.rb +1 -0
  15. data/lib/brick_ftp/restful_api/get_user.rb +1 -0
  16. data/lib/brick_ftp/restful_api/list_api_keys.rb +1 -0
  17. data/lib/brick_ftp/restful_api/list_behaviors.rb +1 -0
  18. data/lib/brick_ftp/restful_api/list_bundles.rb +1 -0
  19. data/lib/brick_ftp/restful_api/list_folder_behaviors.rb +1 -0
  20. data/lib/brick_ftp/restful_api/list_groups.rb +1 -0
  21. data/lib/brick_ftp/restful_api/list_notifications.rb +1 -0
  22. data/lib/brick_ftp/restful_api/list_permissions.rb +1 -0
  23. data/lib/brick_ftp/restful_api/list_public_keys.rb +1 -0
  24. data/lib/brick_ftp/restful_api/list_users.rb +1 -0
  25. data/lib/brick_ftp/restful_api/retrieve_file_history.rb +1 -0
  26. data/lib/brick_ftp/restful_api/retrieve_folder_history.rb +1 -0
  27. data/lib/brick_ftp/restful_api/retrieve_history.rb +2 -0
  28. data/lib/brick_ftp/restful_api/search_user.rb +1 -0
  29. data/lib/brick_ftp/restful_api/start_upload.rb +1 -0
  30. data/lib/brick_ftp/restful_api/unlock_user.rb +1 -0
  31. data/lib/brick_ftp/version.rb +1 -1
  32. metadata +2 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1ef5df4b00b738d9a7b8974eb678950bfef8645f6ce1f4edf371425c23c17f5
4
- data.tar.gz: d7d81defe335eec5dbfe7d2c05c71c115331d38168ab6c9f1aa37f7396f97e05
3
+ metadata.gz: 8979b3718a0b1f4f86c6b4e004fc08d06770f368de48078ce8bb77defdcf1526
4
+ data.tar.gz: f70e17abc6fba41d18d7b86ba178506a0634845d07e885dcbce0756a833b15fa
5
5
  SHA512:
6
- metadata.gz: 5ccf332bbf3e7d6fd93aaaee8aa5df16637c706665c0245d867fa8eaac3881702ca4e67afd44ae7354f53f18a4fefaf670bc5987e3338e0589107531e28bb149
7
- data.tar.gz: 8b50c6a5689dac058835073ab27c6abca4b609a8aabe1d8d4aa026d1b76d2c866988b0eeb3dd019d6ed5d75a2416672f17a5fc17ad3016b825db907853e713d4
6
+ metadata.gz: 269f884c6e620f1eb20f7d8244c3d43ea992dc6716a44aa77651bdc6f0aedcbf8f0e7769d85a872a33aedf0585907121325e95ce81f8476d1365bc1b76f0f658
7
+ data.tar.gz: add28dea4b6053ce155cbcca67276e42c246123594a2d999d359f622f8be2a16600bb9fd31d75e10ccf834fb5840248be41dab29665a70ca9d59c9c5c8d64839
data/brick_ftp.gemspec CHANGED
@@ -32,6 +32,4 @@ Gem::Specification.new do |spec|
32
32
  spec.add_development_dependency 'simplecov', '~> 0.15'
33
33
  spec.add_development_dependency 'webmock', '~> 3.4'
34
34
  spec.add_development_dependency 'yard', '~> 0.9'
35
-
36
- spec.add_dependency 'deep_hash_transform', '~> 1.0'
37
35
  end
data/lib/brick_ftp.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'deep_hash_transform'
4
3
  require 'brick_ftp/version'
5
4
  require 'brick_ftp/client'
6
5
  require 'brick_ftp/core_ext'
@@ -4,9 +4,11 @@ module BrickFTP
4
4
  module CoreExt
5
5
  module Hash
6
6
  autoload :Compact, 'brick_ftp/core_ext/hash/compact'
7
+ autoload :SymbolizeKeys, 'brick_ftp/core_ext/hash/symbolize_keys'
7
8
 
8
9
  refine ::Hash do
9
10
  include(BrickFTP::CoreExt::Hash::Compact) unless ::Hash.instance_methods(false).include?(:compact)
11
+ include(BrickFTP::CoreExt::Hash::SymbolizeKeys) unless ::Hash.instance_methods(false).include?(:symbolize_keys)
10
12
  end
11
13
  end
12
14
  end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrickFTP
4
+ module CoreExt
5
+ module Hash
6
+ module SymbolizeKeys
7
+ def symbolize_keys
8
+ each_key.each_with_object({}) do |key, mem|
9
+ symbolized_key = begin
10
+ key.to_sym
11
+ rescue StandardError
12
+ key
13
+ end
14
+ mem[symbolized_key] = self[key]
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -7,6 +7,7 @@ module BrickFTP
7
7
  module RESTfulAPI
8
8
  class Client
9
9
  using BrickFTP::CoreExt::Struct
10
+ using BrickFTP::CoreExt::Hash
10
11
 
11
12
  OPEN_TIMEOUT = 60
12
13
  READ_TIMEOUT = 60
@@ -11,6 +11,7 @@ module BrickFTP
11
11
  #
12
12
  class CountFolderContents
13
13
  include Command
14
+ using BrickFTP::CoreExt::Hash
14
15
 
15
16
  # Returns number of files and folders.
16
17
  #
@@ -14,6 +14,7 @@ module BrickFTP
14
14
  #
15
15
  class DownloadFile
16
16
  include Command
17
+ using BrickFTP::CoreExt::Hash
17
18
 
18
19
  # Provides a download URL that will enable you to download a file.
19
20
  #
@@ -8,6 +8,7 @@ module BrickFTP
8
8
  #
9
9
  class GetAPIKey
10
10
  include Command
11
+ using BrickFTP::CoreExt::Hash
11
12
 
12
13
  # Returns a single API key.
13
14
  #
@@ -8,6 +8,7 @@ module BrickFTP
8
8
  #
9
9
  class GetBehavior
10
10
  include Command
11
+ using BrickFTP::CoreExt::Hash
11
12
 
12
13
  # Returns a single behavior.
13
14
  #
@@ -8,6 +8,7 @@ module BrickFTP
8
8
  #
9
9
  class GetBundle
10
10
  include Command
11
+ using BrickFTP::CoreExt::Hash
11
12
 
12
13
  # Returns a single bundle.
13
14
  #
@@ -8,6 +8,7 @@ module BrickFTP
8
8
  #
9
9
  class GetGroup
10
10
  include Command
11
+ using BrickFTP::CoreExt::Hash
11
12
 
12
13
  # Returns a single group.
13
14
  #
@@ -8,6 +8,7 @@ module BrickFTP
8
8
  #
9
9
  class GetPublicKey
10
10
  include Command
11
+ using BrickFTP::CoreExt::Hash
11
12
 
12
13
  # Returns a single public key.
13
14
  #
@@ -4,6 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  class GetSiteUsage
6
6
  include Command
7
+ using BrickFTP::CoreExt::Hash
7
8
 
8
9
  # Returns site usage
9
10
  #
@@ -8,6 +8,7 @@ module BrickFTP
8
8
  #
9
9
  class GetUser
10
10
  include Command
11
+ using BrickFTP::CoreExt::Hash
11
12
 
12
13
  # Returns a single user.
13
14
  #
@@ -8,6 +8,7 @@ module BrickFTP
8
8
  #
9
9
  class ListAPIKeys
10
10
  include Command
11
+ using BrickFTP::CoreExt::Hash
11
12
 
12
13
  # Returns a list of all API keys for a user on the current site.
13
14
  #
@@ -8,6 +8,7 @@ module BrickFTP
8
8
  #
9
9
  class ListBehaviors
10
10
  include Command
11
+ using BrickFTP::CoreExt::Hash
11
12
 
12
13
  # Returns a list of all behaviors on the current site.
13
14
  #
@@ -8,6 +8,7 @@ module BrickFTP
8
8
  #
9
9
  class ListBundles
10
10
  include Command
11
+ using BrickFTP::CoreExt::Hash
11
12
 
12
13
  # Returns a list of all bundles on the current site.
13
14
  #
@@ -16,6 +16,7 @@ module BrickFTP
16
16
  #
17
17
  class ListFolderBehaviors
18
18
  include Command
19
+ using BrickFTP::CoreExt::Hash
19
20
 
20
21
  # Returns the behaviors that apply to the given path.
21
22
  #
@@ -8,6 +8,7 @@ module BrickFTP
8
8
  #
9
9
  class ListGroups
10
10
  include Command
11
+ using BrickFTP::CoreExt::Hash
11
12
 
12
13
  # Returns a list of all groups on the current site.
13
14
  #
@@ -8,6 +8,7 @@ module BrickFTP
8
8
  #
9
9
  class ListNotifications
10
10
  include Command
11
+ using BrickFTP::CoreExt::Hash
11
12
 
12
13
  # Returns a list of all notifications on the current site.
13
14
  #
@@ -16,6 +16,7 @@ module BrickFTP
16
16
  #
17
17
  class ListPermissions
18
18
  include Command
19
+ using BrickFTP::CoreExt::Hash
19
20
 
20
21
  # Returns a list of permissions on the current site.
21
22
  #
@@ -8,6 +8,7 @@ module BrickFTP
8
8
  #
9
9
  class ListPublicKeys
10
10
  include Command
11
+ using BrickFTP::CoreExt::Hash
11
12
 
12
13
  # Returns a list of all public keys for a user on the current site.
13
14
  #
@@ -15,6 +15,7 @@ module BrickFTP
15
15
  #
16
16
  class ListUsers
17
17
  include Command
18
+ using BrickFTP::CoreExt::Hash
18
19
 
19
20
  # Returns a list of users on the current site.
20
21
  #
@@ -19,6 +19,7 @@ module BrickFTP
19
19
  class RetrieveFileHistory
20
20
  include Command
21
21
  include RetrieveHistory
22
+ using BrickFTP::CoreExt::Hash
22
23
 
23
24
  # Returns all history for a specific file.
24
25
  #
@@ -19,6 +19,7 @@ module BrickFTP
19
19
  class RetrieveFolderHistory
20
20
  include Command
21
21
  include RetrieveHistory
22
+ using BrickFTP::CoreExt::Hash
22
23
 
23
24
  # Returns all history for a specific folder.
24
25
  #
@@ -5,6 +5,8 @@ require 'erb'
5
5
  module BrickFTP
6
6
  module RESTfulAPI
7
7
  module RetrieveHistory
8
+ using BrickFTP::CoreExt::Hash
9
+
8
10
  def retrieve(path, page, per_page, start_at)
9
11
  validate_page!(page)
10
12
  validate_per_page!(per_page)
@@ -10,6 +10,7 @@ module BrickFTP
10
10
  #
11
11
  class SearchUser
12
12
  include Command
13
+ using BrickFTP::CoreExt::Hash
13
14
 
14
15
  # Returns a single user.
15
16
  #
@@ -10,6 +10,7 @@ module BrickFTP
10
10
  #
11
11
  class StartUpload
12
12
  include Command
13
+ using BrickFTP::CoreExt::Hash
13
14
 
14
15
  # The first request to upload a new file is a POST request to /files/PATH_AND_FILENAME.EXT
15
16
  # with an action parameter with the value of put.
@@ -8,6 +8,7 @@ module BrickFTP
8
8
  #
9
9
  class UnlockUser
10
10
  include Command
11
+ using BrickFTP::CoreExt::Hash
11
12
 
12
13
  # Unlocks a user that has been locked out by Brute Force Login Protection.
13
14
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BrickFTP
4
- VERSION = '1.0.0.beta2'
4
+ VERSION = '1.0.0.beta3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brick_ftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta2
4
+ version: 1.0.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - koshigoe
@@ -150,20 +150,6 @@ dependencies:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0.9'
153
- - !ruby/object:Gem::Dependency
154
- name: deep_hash_transform
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: '1.0'
160
- type: :runtime
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
165
- - !ruby/object:Gem::Version
166
- version: '1.0'
167
153
  description: BrickFTP's REST API client.
168
154
  email:
169
155
  - koshigoeb@gmail.com
@@ -192,6 +178,7 @@ files:
192
178
  - lib/brick_ftp/core_ext.rb
193
179
  - lib/brick_ftp/core_ext/hash.rb
194
180
  - lib/brick_ftp/core_ext/hash/compact.rb
181
+ - lib/brick_ftp/core_ext/hash/symbolize_keys.rb
195
182
  - lib/brick_ftp/core_ext/struct.rb
196
183
  - lib/brick_ftp/core_ext/struct/new.rb
197
184
  - lib/brick_ftp/restful_api.rb