fog-brightbox 1.10.0 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +20 -3
  3. data/.rubocop.yml +15 -10
  4. data/CHANGELOG.md +34 -0
  5. data/README.md +6 -0
  6. data/Rakefile +1 -1
  7. data/fog-brightbox.gemspec +9 -3
  8. data/lib/fog/brightbox/compute/shared.rb +11 -10
  9. data/lib/fog/brightbox/compute.rb +20 -21
  10. data/lib/fog/brightbox/config.rb +6 -9
  11. data/lib/fog/brightbox/models/compute/api_client.rb +4 -4
  12. data/lib/fog/brightbox/models/compute/application.rb +2 -2
  13. data/lib/fog/brightbox/models/compute/cloud_ip.rb +11 -11
  14. data/lib/fog/brightbox/models/compute/collaboration.rb +3 -3
  15. data/lib/fog/brightbox/models/compute/collaborations.rb +1 -1
  16. data/lib/fog/brightbox/models/compute/config_map.rb +2 -3
  17. data/lib/fog/brightbox/models/compute/database_server.rb +17 -5
  18. data/lib/fog/brightbox/models/compute/database_snapshot.rb +2 -2
  19. data/lib/fog/brightbox/models/compute/firewall_policy.rb +6 -6
  20. data/lib/fog/brightbox/models/compute/firewall_rule.rb +9 -9
  21. data/lib/fog/brightbox/models/compute/image.rb +9 -9
  22. data/lib/fog/brightbox/models/compute/load_balancer.rb +12 -12
  23. data/lib/fog/brightbox/models/compute/server.rb +21 -23
  24. data/lib/fog/brightbox/models/compute/server_group.rb +6 -6
  25. data/lib/fog/brightbox/models/compute/user.rb +3 -3
  26. data/lib/fog/brightbox/models/compute/volume.rb +16 -16
  27. data/lib/fog/brightbox/models/storage/directories.rb +2 -2
  28. data/lib/fog/brightbox/models/storage/directory.rb +7 -7
  29. data/lib/fog/brightbox/models/storage/file.rb +13 -13
  30. data/lib/fog/brightbox/models/storage/files.rb +9 -13
  31. data/lib/fog/brightbox/oauth2.rb +13 -11
  32. data/lib/fog/brightbox/requests/compute/list_accounts.rb +1 -1
  33. data/lib/fog/brightbox/requests/compute/reset_database_server.rb +21 -0
  34. data/lib/fog/brightbox/requests/compute/resize_database_server.rb +25 -0
  35. data/lib/fog/brightbox/requests/compute/snapshot_database_server.rb +1 -1
  36. data/lib/fog/brightbox/requests/compute/snapshot_server.rb +1 -1
  37. data/lib/fog/brightbox/requests/storage/copy_object.rb +5 -5
  38. data/lib/fog/brightbox/requests/storage/delete_container.rb +3 -3
  39. data/lib/fog/brightbox/requests/storage/delete_multiple_objects.rb +7 -7
  40. data/lib/fog/brightbox/requests/storage/delete_object.rb +3 -3
  41. data/lib/fog/brightbox/requests/storage/delete_static_large_object.rb +6 -6
  42. data/lib/fog/brightbox/requests/storage/get_container.rb +4 -4
  43. data/lib/fog/brightbox/requests/storage/get_containers.rb +4 -4
  44. data/lib/fog/brightbox/requests/storage/get_object.rb +4 -6
  45. data/lib/fog/brightbox/requests/storage/get_object_http_url.rb +1 -1
  46. data/lib/fog/brightbox/requests/storage/get_object_https_url.rb +1 -1
  47. data/lib/fog/brightbox/requests/storage/head_container.rb +4 -4
  48. data/lib/fog/brightbox/requests/storage/head_containers.rb +4 -4
  49. data/lib/fog/brightbox/requests/storage/head_object.rb +3 -3
  50. data/lib/fog/brightbox/requests/storage/post_set_meta_temp_url_key.rb +3 -3
  51. data/lib/fog/brightbox/requests/storage/put_container.rb +4 -4
  52. data/lib/fog/brightbox/requests/storage/put_dynamic_obj_manifest.rb +4 -4
  53. data/lib/fog/brightbox/requests/storage/put_object.rb +7 -7
  54. data/lib/fog/brightbox/requests/storage/put_static_obj_manifest.rb +6 -6
  55. data/lib/fog/brightbox/storage/authentication_request.rb +4 -4
  56. data/lib/fog/brightbox/storage/connection.rb +2 -2
  57. data/lib/fog/brightbox/storage.rb +13 -14
  58. data/lib/fog/brightbox/version.rb +1 -1
  59. data/spec/fog/brightbox/compute/config_spec.rb +4 -4
  60. data/spec/fog/brightbox/compute/get_access_token_spec.rb +28 -28
  61. data/spec/fog/brightbox/compute/wrapped_request_spec.rb +23 -23
  62. data/spec/fog/brightbox/config_spec.rb +23 -23
  63. data/spec/fog/brightbox/oauth2/client_credentials_strategy_spec.rb +2 -2
  64. data/spec/fog/brightbox/oauth2/credential_set_spec.rb +5 -5
  65. data/spec/fog/brightbox/oauth2/grant_type_strategy_spec.rb +2 -2
  66. data/spec/fog/brightbox/oauth2/refresh_token_strategy_spec.rb +3 -3
  67. data/spec/fog/brightbox/oauth2/user_credentials_strategy_spec.rb +4 -4
  68. data/spec/fog/brightbox/storage/authentication_request_spec.rb +41 -34
  69. data/spec/fog/brightbox/storage/config_spec.rb +4 -4
  70. data/spec/fog/brightbox/storage/connection_errors_spec.rb +6 -6
  71. data/spec/fog/brightbox/storage/connection_spec.rb +37 -37
  72. data/spec/fog/brightbox/storage/directory_spec.rb +6 -6
  73. data/spec/fog/brightbox/storage/files_spec.rb +5 -5
  74. data/spec/fog/brightbox/storage_spec.rb +5 -5
  75. data/spec/fog/compute/brightbox/database_server_spec.rb +19 -19
  76. data/spec/fog/compute/brightbox/image_selector_spec.rb +18 -18
  77. data/spec/fog/compute/brightbox/load_balancer_spec.rb +5 -5
  78. data/spec/fog/compute/brightbox/server_spec.rb +44 -44
  79. data/spec/fog/compute/brightbox/volume_spec.rb +68 -69
  80. data/spec/fog/compute/brightbox_spec.rb +16 -10
  81. data/spec/fog/storage/brightbox_spec.rb +83 -83
  82. data/spec/model_setup.rb +9 -9
  83. data/spec/stock_storage_responses.rb +9 -9
  84. data/spec/supports_resource_locking.rb +6 -6
  85. data/tests/brightbox/compute/schema.rb +74 -74
  86. data/tests/brightbox/compute_tests.rb +14 -14
  87. data/tests/brightbox/models/compute/account_tests.rb +0 -10
  88. data/tests/brightbox/models/compute/server_tests.rb +0 -1
  89. data/tests/brightbox/requests/compute/account_tests.rb +7 -21
  90. data/tests/brightbox/requests/compute/api_client_tests.rb +9 -9
  91. data/tests/brightbox/requests/compute/application_test.rb +8 -8
  92. data/tests/brightbox/requests/compute/cloud_ip_tests.rb +11 -13
  93. data/tests/brightbox/requests/compute/collaboration_tests.rb +1 -1
  94. data/tests/brightbox/requests/compute/database_server_tests.rb +7 -7
  95. data/tests/brightbox/requests/compute/database_snapsnot_tests.rb +5 -5
  96. data/tests/brightbox/requests/compute/database_type_tests.rb +1 -1
  97. data/tests/brightbox/requests/compute/firewall_policy_tests.rb +7 -7
  98. data/tests/brightbox/requests/compute/firewall_rule_tests.rb +8 -10
  99. data/tests/brightbox/requests/compute/helper.rb +1 -1
  100. data/tests/brightbox/requests/compute/image_tests.rb +2 -2
  101. data/tests/brightbox/requests/compute/interface_tests.rb +1 -1
  102. data/tests/brightbox/requests/compute/load_balancer_tests.rb +23 -23
  103. data/tests/brightbox/requests/compute/server_group_tests.rb +16 -18
  104. data/tests/brightbox/requests/compute/server_tests.rb +12 -12
  105. data/tests/brightbox/requests/compute/server_type_tests.rb +2 -2
  106. data/tests/brightbox/requests/compute/user_tests.rb +4 -4
  107. data/tests/brightbox/requests/compute/volume_tests.rb +5 -5
  108. data/tests/brightbox/requests/compute/zone_tests.rb +2 -2
  109. data/tests/helper.rb +1 -1
  110. data/tests/helpers/collection_helper.rb +16 -23
  111. data/tests/helpers/compute/server_helper.rb +4 -6
  112. data/tests/helpers/formats_helper.rb +5 -5
  113. data/tests/helpers/formats_helper_tests.rb +16 -16
  114. data/tests/helpers/mock_helper.rb +84 -86
  115. data/tests/helpers/model_helper.rb +1 -3
  116. data/tests/helpers/schema_validator_tests.rb +14 -14
  117. metadata +22 -7
  118. data/.rubocop_todo.yml +0 -81
@@ -1,7 +1,7 @@
1
1
  Shindo.tests("Fog::Schema::DataValidator", "meta") do
2
2
  validator = Fog::Schema::DataValidator.new
3
3
 
4
- tests('#validate') do
4
+ tests("#validate") do
5
5
  tests("returns true") do
6
6
  returns(true, "when value matches schema expectation") do
7
7
  validator.validate({ "key" => "Value" }, "key" => String)
@@ -12,7 +12,7 @@ Shindo.tests("Fog::Schema::DataValidator", "meta") do
12
12
  end
13
13
 
14
14
  returns(true, "when nested values match schema expectation") do
15
- validator.validate({ "key" => { :nested_key => "Value" } }, "key" => { :nested_key => String })
15
+ validator.validate({ "key" => { nested_key: "Value" } }, "key" => { nested_key: String })
16
16
  end
17
17
 
18
18
  returns(true, "when collection of values all match schema expectation") do
@@ -24,7 +24,7 @@ Shindo.tests("Fog::Schema::DataValidator", "meta") do
24
24
  end
25
25
 
26
26
  returns(true, "when additional keys are passed and not strict") do
27
- validator.validate({ "key" => "Value", :extra => "Bonus" }, { "key" => String }, :allow_extra_keys => true)
27
+ validator.validate({ "key" => "Value", :extra => "Bonus" }, { "key" => String }, allow_extra_keys: true)
28
28
  end
29
29
 
30
30
  returns(true, "when value is nil and schema expects NilClass") do
@@ -43,22 +43,22 @@ Shindo.tests("Fog::Schema::DataValidator", "meta") do
43
43
  validator.validate({ "time" => Time.now }, "time" => Time)
44
44
  end
45
45
 
46
- returns(true, 'when key is missing but value should be NilClass (#1477)') do
47
- validator.validate({}, { "key" => NilClass }, :allow_optional_rules => true)
46
+ returns(true, "when key is missing but value should be NilClass (#1477)") do
47
+ validator.validate({}, { "key" => NilClass }, allow_optional_rules: true)
48
48
  end
49
49
 
50
- returns(true, 'when key is missing but value is nullable (#1477)') do
51
- validator.validate({}, { "key" => Fog::Nullable::String }, :allow_optional_rules => true)
50
+ returns(true, "when key is missing but value is nullable (#1477)") do
51
+ validator.validate({}, { "key" => Fog::Nullable::String }, allow_optional_rules: true)
52
52
  end
53
53
  end
54
54
 
55
55
  tests("returns false") do
56
56
  returns(false, "when value does not match schema expectation") do
57
- validator.validate({ "key" => nil }, { "key" => String })
57
+ validator.validate({ "key" => nil }, "key" => String)
58
58
  end
59
59
 
60
60
  returns(false, "when key formats do not match") do
61
- validator.validate({ "key" => "Value" }, :key => String)
61
+ validator.validate({ "key" => "Value" }, key: String)
62
62
  end
63
63
 
64
64
  returns(false, "when additional keys are passed and strict") do
@@ -86,15 +86,15 @@ Shindo.tests("Fog::Schema::DataValidator", "meta") do
86
86
  end
87
87
 
88
88
  returns(false, "when a hash is expected but another data type is found") do
89
- validator.validate({ "key" => { :nested_key => [] } }, "key" => { :nested_key => {} })
89
+ validator.validate({ "key" => { nested_key: [] } }, "key" => { nested_key: {} })
90
90
  end
91
91
 
92
- returns(false, 'when key is missing but value should be NilClass (#1477)') do
93
- validator.validate({}, { "key" => NilClass }, :allow_optional_rules => false)
92
+ returns(false, "when key is missing but value should be NilClass (#1477)") do
93
+ validator.validate({}, { "key" => NilClass }, allow_optional_rules: false)
94
94
  end
95
95
 
96
- returns(false, 'when key is missing but value is nullable (#1477)') do
97
- validator.validate({}, { "key" => Fog::Nullable::String }, :allow_optional_rules => false)
96
+ returns(false, "when key is missing but value is nullable (#1477)") do
97
+ validator.validate({}, { "key" => Fog::Nullable::String }, allow_optional_rules: false)
98
98
  end
99
99
  end
100
100
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-brightbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Thornthwaite
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 1970-01-01 00:00:00.000000000 Z
11
+ date: 2024-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core
@@ -114,6 +114,20 @@ dependencies:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
+ - !ruby/object:Gem::Dependency
118
+ name: rubocop
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
117
131
  - !ruby/object:Gem::Dependency
118
132
  name: shindo
119
133
  requirement: !ruby/object:Gem::Requirement
@@ -166,7 +180,6 @@ files:
166
180
  - ".github/workflows/ruby.yml"
167
181
  - ".gitignore"
168
182
  - ".rubocop.yml"
169
- - ".rubocop_todo.yml"
170
183
  - CHANGELOG.md
171
184
  - Gemfile
172
185
  - LICENSE.txt
@@ -325,12 +338,14 @@ files:
325
338
  - lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb
326
339
  - lib/fog/brightbox/requests/compute/remove_servers_server_group.rb
327
340
  - lib/fog/brightbox/requests/compute/resend_collaboration.rb
341
+ - lib/fog/brightbox/requests/compute/reset_database_server.rb
328
342
  - lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb
329
343
  - lib/fog/brightbox/requests/compute/reset_ftp_password_scoped_account.rb
330
344
  - lib/fog/brightbox/requests/compute/reset_password_database_server.rb
331
345
  - lib/fog/brightbox/requests/compute/reset_secret_api_client.rb
332
346
  - lib/fog/brightbox/requests/compute/reset_secret_application.rb
333
347
  - lib/fog/brightbox/requests/compute/reset_server.rb
348
+ - lib/fog/brightbox/requests/compute/resize_database_server.rb
334
349
  - lib/fog/brightbox/requests/compute/resize_volume.rb
335
350
  - lib/fog/brightbox/requests/compute/shutdown_server.rb
336
351
  - lib/fog/brightbox/requests/compute/snapshot_database_server.rb
@@ -480,7 +495,7 @@ homepage: https://github.com/fog/fog-brightbox
480
495
  licenses:
481
496
  - MIT
482
497
  metadata: {}
483
- post_install_message:
498
+ post_install_message:
484
499
  rdoc_options: []
485
500
  require_paths:
486
501
  - lib
@@ -495,8 +510,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
495
510
  - !ruby/object:Gem::Version
496
511
  version: '0'
497
512
  requirements: []
498
- rubygems_version: 3.0.6
499
- signing_key:
513
+ rubygems_version: 3.4.19
514
+ signing_key:
500
515
  specification_version: 4
501
516
  summary: This library can be used as a module for `fog` or as standalone provider
502
517
  to use the Brightbox Cloud in applications
data/.rubocop_todo.yml DELETED
@@ -1,81 +0,0 @@
1
- # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2014-10-23 16:16:50 +0100 using RuboCop version 0.23.0.
3
- # The point is for the user to remove these configuration records
4
- # one by one as the offenses are removed from the code base.
5
- # Note that changes in the inspected code, or installation of new
6
- # versions of RuboCop, may require this file to be generated again.
7
-
8
- # Offense count: 2
9
- # Configuration parameters: AllowSafeAssignment.
10
- Lint/AssignmentInCondition:
11
- Enabled: false
12
-
13
- # Offense count: 4
14
- Style/AccessorMethodName:
15
- Enabled: false
16
-
17
- # Offense count: 2
18
- # Cop supports --auto-correct.
19
- Style/Blocks:
20
- Enabled: false
21
-
22
- # Offense count: 4
23
- # Configuration parameters: CountComments.
24
- Style/ClassLength:
25
- Max: 165
26
-
27
- # Offense count: 4
28
- Style/CyclomaticComplexity:
29
- Max: 8
30
-
31
- # Offense count: 190
32
- Style/Documentation:
33
- Enabled: false
34
-
35
- # Offense count: 26
36
- # Configuration parameters: EnforcedStyle, SupportedStyles.
37
- Style/DotPosition:
38
- Enabled: false
39
-
40
- # Offense count: 5
41
- Style/DoubleNegation:
42
- Enabled: false
43
-
44
- # Offense count: 2
45
- # Configuration parameters: MinBodyLength.
46
- Style/GuardClause:
47
- Enabled: false
48
-
49
- # Offense count: 1
50
- # Configuration parameters: MaxLineLength.
51
- Style/IfUnlessModifier:
52
- Enabled: false
53
-
54
- # Offense count: 23
55
- # Configuration parameters: CountComments.
56
- Style/MethodLength:
57
- Max: 24
58
-
59
- # Offense count: 2
60
- Style/MultilineBlockChain:
61
- Enabled: false
62
-
63
- # Offense count: 1
64
- # Configuration parameters: EnforcedStyle, SupportedStyles.
65
- Style/Next:
66
- Enabled: false
67
-
68
- # Offense count: 9
69
- # Configuration parameters: EnforcedStyle, SupportedStyles.
70
- Style/RaiseArgs:
71
- Enabled: false
72
-
73
- # Offense count: 3
74
- Style/RegexpLiteral:
75
- MaxSlashes: 0
76
-
77
- # Offense count: 1
78
- # Cop supports --auto-correct.
79
- # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, Whitelist.
80
- Style/TrivialAccessors:
81
- Enabled: false