fog-brightbox 1.10.0 → 1.11.0
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/.rubocop.yml +15 -10
- data/CHANGELOG.md +17 -0
- data/Rakefile +1 -1
- data/fog-brightbox.gemspec +5 -3
- data/lib/fog/brightbox/compute/shared.rb +11 -10
- data/lib/fog/brightbox/compute.rb +20 -21
- data/lib/fog/brightbox/config.rb +6 -9
- data/lib/fog/brightbox/models/compute/api_client.rb +4 -4
- data/lib/fog/brightbox/models/compute/application.rb +2 -2
- data/lib/fog/brightbox/models/compute/cloud_ip.rb +11 -11
- data/lib/fog/brightbox/models/compute/collaboration.rb +3 -3
- data/lib/fog/brightbox/models/compute/collaborations.rb +1 -1
- data/lib/fog/brightbox/models/compute/config_map.rb +2 -3
- data/lib/fog/brightbox/models/compute/database_server.rb +17 -5
- data/lib/fog/brightbox/models/compute/database_snapshot.rb +2 -2
- data/lib/fog/brightbox/models/compute/firewall_policy.rb +6 -6
- data/lib/fog/brightbox/models/compute/firewall_rule.rb +9 -9
- data/lib/fog/brightbox/models/compute/image.rb +9 -9
- data/lib/fog/brightbox/models/compute/load_balancer.rb +12 -12
- data/lib/fog/brightbox/models/compute/server.rb +21 -23
- data/lib/fog/brightbox/models/compute/server_group.rb +6 -6
- data/lib/fog/brightbox/models/compute/user.rb +3 -3
- data/lib/fog/brightbox/models/compute/volume.rb +16 -16
- data/lib/fog/brightbox/models/storage/directories.rb +2 -2
- data/lib/fog/brightbox/models/storage/directory.rb +7 -7
- data/lib/fog/brightbox/models/storage/file.rb +13 -13
- data/lib/fog/brightbox/models/storage/files.rb +9 -13
- data/lib/fog/brightbox/oauth2.rb +11 -11
- data/lib/fog/brightbox/requests/compute/list_accounts.rb +1 -1
- data/lib/fog/brightbox/requests/compute/reset_database_server.rb +21 -0
- data/lib/fog/brightbox/requests/compute/resize_database_server.rb +25 -0
- data/lib/fog/brightbox/requests/compute/snapshot_database_server.rb +1 -1
- data/lib/fog/brightbox/requests/compute/snapshot_server.rb +1 -1
- data/lib/fog/brightbox/requests/storage/copy_object.rb +5 -5
- data/lib/fog/brightbox/requests/storage/delete_container.rb +3 -3
- data/lib/fog/brightbox/requests/storage/delete_multiple_objects.rb +7 -7
- data/lib/fog/brightbox/requests/storage/delete_object.rb +3 -3
- data/lib/fog/brightbox/requests/storage/delete_static_large_object.rb +6 -6
- data/lib/fog/brightbox/requests/storage/get_container.rb +4 -4
- data/lib/fog/brightbox/requests/storage/get_containers.rb +4 -4
- data/lib/fog/brightbox/requests/storage/get_object.rb +4 -6
- data/lib/fog/brightbox/requests/storage/get_object_http_url.rb +1 -1
- data/lib/fog/brightbox/requests/storage/get_object_https_url.rb +1 -1
- data/lib/fog/brightbox/requests/storage/head_container.rb +4 -4
- data/lib/fog/brightbox/requests/storage/head_containers.rb +4 -4
- data/lib/fog/brightbox/requests/storage/head_object.rb +3 -3
- data/lib/fog/brightbox/requests/storage/post_set_meta_temp_url_key.rb +3 -3
- data/lib/fog/brightbox/requests/storage/put_container.rb +4 -4
- data/lib/fog/brightbox/requests/storage/put_dynamic_obj_manifest.rb +4 -4
- data/lib/fog/brightbox/requests/storage/put_object.rb +7 -7
- data/lib/fog/brightbox/requests/storage/put_static_obj_manifest.rb +6 -6
- data/lib/fog/brightbox/storage/authentication_request.rb +4 -4
- data/lib/fog/brightbox/storage/connection.rb +2 -2
- data/lib/fog/brightbox/storage.rb +13 -14
- data/lib/fog/brightbox/version.rb +1 -1
- data/spec/fog/brightbox/compute/config_spec.rb +4 -4
- data/spec/fog/brightbox/compute/get_access_token_spec.rb +28 -28
- data/spec/fog/brightbox/compute/wrapped_request_spec.rb +23 -23
- data/spec/fog/brightbox/config_spec.rb +23 -23
- data/spec/fog/brightbox/oauth2/client_credentials_strategy_spec.rb +2 -2
- data/spec/fog/brightbox/oauth2/credential_set_spec.rb +5 -5
- data/spec/fog/brightbox/oauth2/grant_type_strategy_spec.rb +2 -2
- data/spec/fog/brightbox/oauth2/refresh_token_strategy_spec.rb +3 -3
- data/spec/fog/brightbox/oauth2/user_credentials_strategy_spec.rb +4 -4
- data/spec/fog/brightbox/storage/authentication_request_spec.rb +34 -34
- data/spec/fog/brightbox/storage/config_spec.rb +4 -4
- data/spec/fog/brightbox/storage/connection_errors_spec.rb +6 -6
- data/spec/fog/brightbox/storage/connection_spec.rb +37 -37
- data/spec/fog/brightbox/storage/directory_spec.rb +6 -6
- data/spec/fog/brightbox/storage/files_spec.rb +5 -5
- data/spec/fog/brightbox/storage_spec.rb +5 -5
- data/spec/fog/compute/brightbox/database_server_spec.rb +19 -19
- data/spec/fog/compute/brightbox/image_selector_spec.rb +18 -18
- data/spec/fog/compute/brightbox/load_balancer_spec.rb +5 -5
- data/spec/fog/compute/brightbox/server_spec.rb +44 -44
- data/spec/fog/compute/brightbox/volume_spec.rb +68 -69
- data/spec/fog/compute/brightbox_spec.rb +10 -10
- data/spec/fog/storage/brightbox_spec.rb +83 -83
- data/spec/model_setup.rb +9 -9
- data/spec/stock_storage_responses.rb +9 -9
- data/spec/supports_resource_locking.rb +6 -6
- data/tests/brightbox/compute/schema.rb +74 -74
- data/tests/brightbox/compute_tests.rb +14 -14
- data/tests/brightbox/models/compute/server_tests.rb +0 -1
- data/tests/brightbox/requests/compute/account_tests.rb +9 -9
- data/tests/brightbox/requests/compute/api_client_tests.rb +9 -9
- data/tests/brightbox/requests/compute/application_test.rb +8 -8
- data/tests/brightbox/requests/compute/cloud_ip_tests.rb +11 -13
- data/tests/brightbox/requests/compute/collaboration_tests.rb +1 -1
- data/tests/brightbox/requests/compute/database_server_tests.rb +7 -7
- data/tests/brightbox/requests/compute/database_snapsnot_tests.rb +5 -5
- data/tests/brightbox/requests/compute/database_type_tests.rb +1 -1
- data/tests/brightbox/requests/compute/firewall_policy_tests.rb +7 -7
- data/tests/brightbox/requests/compute/firewall_rule_tests.rb +8 -10
- data/tests/brightbox/requests/compute/helper.rb +1 -1
- data/tests/brightbox/requests/compute/image_tests.rb +2 -2
- data/tests/brightbox/requests/compute/interface_tests.rb +1 -1
- data/tests/brightbox/requests/compute/load_balancer_tests.rb +23 -23
- data/tests/brightbox/requests/compute/server_group_tests.rb +16 -18
- data/tests/brightbox/requests/compute/server_tests.rb +12 -12
- data/tests/brightbox/requests/compute/server_type_tests.rb +2 -2
- data/tests/brightbox/requests/compute/user_tests.rb +4 -4
- data/tests/brightbox/requests/compute/volume_tests.rb +5 -5
- data/tests/brightbox/requests/compute/zone_tests.rb +2 -2
- data/tests/helper.rb +1 -1
- data/tests/helpers/collection_helper.rb +16 -23
- data/tests/helpers/compute/server_helper.rb +4 -6
- data/tests/helpers/formats_helper.rb +5 -5
- data/tests/helpers/formats_helper_tests.rb +16 -16
- data/tests/helpers/mock_helper.rb +84 -86
- data/tests/helpers/model_helper.rb +1 -3
- data/tests/helpers/schema_validator_tests.rb +14 -14
- metadata +17 -2
- 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(
|
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" => { :
|
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 }, :
|
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,
|
47
|
-
validator.validate({}, { "key" => NilClass }, :
|
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,
|
51
|
-
validator.validate({}, { "key" => Fog::Nullable::String }, :
|
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 },
|
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" }, :
|
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" => { :
|
89
|
+
validator.validate({ "key" => { nested_key: [] } }, "key" => { nested_key: {} })
|
90
90
|
end
|
91
91
|
|
92
|
-
returns(false,
|
93
|
-
validator.validate({}, { "key" => NilClass }, :
|
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,
|
97
|
-
validator.validate({}, { "key" => Fog::Nullable::String }, :
|
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,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-brightbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Thornthwaite
|
@@ -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.50'
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "<"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0.50'
|
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
|
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
|