fog-brightbox 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/.rubocop.yml +20 -0
  4. data/.rubocop_todo.yml +81 -0
  5. data/CHANGELOG.md +17 -0
  6. data/README.md +6 -0
  7. data/fog-brightbox.gemspec +10 -9
  8. data/gemfiles/Gemfile.1.8.7 +1 -0
  9. data/lib/fog/brightbox.rb +2 -2
  10. data/lib/fog/brightbox/compute.rb +47 -48
  11. data/lib/fog/brightbox/compute/resource_locking.rb +26 -20
  12. data/lib/fog/brightbox/compute/shared.rb +2 -7
  13. data/lib/fog/brightbox/config.rb +12 -15
  14. data/lib/fog/brightbox/core.rb +5 -5
  15. data/lib/fog/brightbox/link_helper.rb +33 -0
  16. data/lib/fog/brightbox/models/compute/account.rb +0 -1
  17. data/lib/fog/brightbox/models/compute/accounts.rb +2 -6
  18. data/lib/fog/brightbox/models/compute/api_client.rb +2 -2
  19. data/lib/fog/brightbox/models/compute/application.rb +2 -2
  20. data/lib/fog/brightbox/models/compute/applications.rb +2 -6
  21. data/lib/fog/brightbox/models/compute/cloud_ip.rb +0 -4
  22. data/lib/fog/brightbox/models/compute/cloud_ips.rb +2 -6
  23. data/lib/fog/brightbox/models/compute/collaboration.rb +4 -4
  24. data/lib/fog/brightbox/models/compute/database_server.rb +11 -4
  25. data/lib/fog/brightbox/models/compute/database_servers.rb +2 -6
  26. data/lib/fog/brightbox/models/compute/database_snapshot.rb +1 -1
  27. data/lib/fog/brightbox/models/compute/database_snapshots.rb +2 -2
  28. data/lib/fog/brightbox/models/compute/database_types.rb +2 -4
  29. data/lib/fog/brightbox/models/compute/event.rb +0 -2
  30. data/lib/fog/brightbox/models/compute/events.rb +2 -4
  31. data/lib/fog/brightbox/models/compute/firewall_policies.rb +2 -6
  32. data/lib/fog/brightbox/models/compute/firewall_policy.rb +2 -3
  33. data/lib/fog/brightbox/models/compute/firewall_rule.rb +2 -3
  34. data/lib/fog/brightbox/models/compute/firewall_rules.rb +2 -6
  35. data/lib/fog/brightbox/models/compute/flavor.rb +0 -1
  36. data/lib/fog/brightbox/models/compute/flavors.rb +2 -6
  37. data/lib/fog/brightbox/models/compute/image.rb +3 -3
  38. data/lib/fog/brightbox/models/compute/images.rb +2 -6
  39. data/lib/fog/brightbox/models/compute/load_balancer.rb +5 -5
  40. data/lib/fog/brightbox/models/compute/load_balancers.rb +2 -6
  41. data/lib/fog/brightbox/models/compute/server.rb +15 -9
  42. data/lib/fog/brightbox/models/compute/server_group.rb +1 -1
  43. data/lib/fog/brightbox/models/compute/server_groups.rb +2 -6
  44. data/lib/fog/brightbox/models/compute/servers.rb +2 -6
  45. data/lib/fog/brightbox/models/compute/user.rb +0 -1
  46. data/lib/fog/brightbox/models/compute/user_collaboration.rb +2 -3
  47. data/lib/fog/brightbox/models/compute/users.rb +2 -5
  48. data/lib/fog/brightbox/models/compute/zones.rb +2 -6
  49. data/lib/fog/brightbox/models/storage/directories.rb +6 -13
  50. data/lib/fog/brightbox/models/storage/directory.rb +5 -7
  51. data/lib/fog/brightbox/models/storage/file.rb +37 -45
  52. data/lib/fog/brightbox/models/storage/files.rb +21 -25
  53. data/lib/fog/brightbox/oauth2.rb +136 -137
  54. data/lib/fog/brightbox/requests/compute/accept_user_collaboration.rb +0 -1
  55. data/lib/fog/brightbox/requests/compute/activate_console_server.rb +0 -1
  56. data/lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb +0 -1
  57. data/lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb +0 -1
  58. data/lib/fog/brightbox/requests/compute/add_servers_server_group.rb +0 -1
  59. data/lib/fog/brightbox/requests/compute/apply_to_firewall_policy.rb +0 -1
  60. data/lib/fog/brightbox/requests/compute/create_api_client.rb +0 -1
  61. data/lib/fog/brightbox/requests/compute/create_application.rb +0 -1
  62. data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +0 -1
  63. data/lib/fog/brightbox/requests/compute/create_collaboration.rb +0 -1
  64. data/lib/fog/brightbox/requests/compute/create_database_server.rb +0 -1
  65. data/lib/fog/brightbox/requests/compute/create_firewall_policy.rb +0 -1
  66. data/lib/fog/brightbox/requests/compute/create_firewall_rule.rb +0 -1
  67. data/lib/fog/brightbox/requests/compute/create_image.rb +0 -1
  68. data/lib/fog/brightbox/requests/compute/create_load_balancer.rb +0 -1
  69. data/lib/fog/brightbox/requests/compute/create_server.rb +0 -1
  70. data/lib/fog/brightbox/requests/compute/create_server_group.rb +0 -1
  71. data/lib/fog/brightbox/requests/compute/get_account.rb +0 -1
  72. data/lib/fog/brightbox/requests/compute/get_api_client.rb +0 -1
  73. data/lib/fog/brightbox/requests/compute/get_application.rb +0 -1
  74. data/lib/fog/brightbox/requests/compute/get_authenticated_user.rb +0 -2
  75. data/lib/fog/brightbox/requests/compute/get_cloud_ip.rb +0 -1
  76. data/lib/fog/brightbox/requests/compute/get_collaboration.rb +0 -1
  77. data/lib/fog/brightbox/requests/compute/get_database_server.rb +0 -1
  78. data/lib/fog/brightbox/requests/compute/get_database_snapshot.rb +0 -1
  79. data/lib/fog/brightbox/requests/compute/get_database_type.rb +0 -1
  80. data/lib/fog/brightbox/requests/compute/get_firewall_policy.rb +0 -1
  81. data/lib/fog/brightbox/requests/compute/get_firewall_rule.rb +0 -1
  82. data/lib/fog/brightbox/requests/compute/get_image.rb +0 -1
  83. data/lib/fog/brightbox/requests/compute/get_interface.rb +0 -1
  84. data/lib/fog/brightbox/requests/compute/get_load_balancer.rb +0 -1
  85. data/lib/fog/brightbox/requests/compute/get_scoped_account.rb +0 -1
  86. data/lib/fog/brightbox/requests/compute/get_server.rb +0 -1
  87. data/lib/fog/brightbox/requests/compute/get_server_group.rb +0 -1
  88. data/lib/fog/brightbox/requests/compute/get_server_type.rb +0 -1
  89. data/lib/fog/brightbox/requests/compute/get_user.rb +0 -1
  90. data/lib/fog/brightbox/requests/compute/get_user_collaboration.rb +0 -1
  91. data/lib/fog/brightbox/requests/compute/get_zone.rb +0 -1
  92. data/lib/fog/brightbox/requests/compute/list_accounts.rb +0 -1
  93. data/lib/fog/brightbox/requests/compute/list_api_clients.rb +0 -1
  94. data/lib/fog/brightbox/requests/compute/list_applications.rb +0 -1
  95. data/lib/fog/brightbox/requests/compute/list_cloud_ips.rb +0 -1
  96. data/lib/fog/brightbox/requests/compute/list_collaborations.rb +0 -1
  97. data/lib/fog/brightbox/requests/compute/list_database_servers.rb +0 -1
  98. data/lib/fog/brightbox/requests/compute/list_database_snapshots.rb +0 -1
  99. data/lib/fog/brightbox/requests/compute/list_database_types.rb +0 -1
  100. data/lib/fog/brightbox/requests/compute/list_events.rb +0 -1
  101. data/lib/fog/brightbox/requests/compute/list_firewall_policies.rb +0 -1
  102. data/lib/fog/brightbox/requests/compute/list_images.rb +0 -1
  103. data/lib/fog/brightbox/requests/compute/list_load_balancers.rb +0 -1
  104. data/lib/fog/brightbox/requests/compute/list_server_groups.rb +0 -1
  105. data/lib/fog/brightbox/requests/compute/list_server_types.rb +0 -1
  106. data/lib/fog/brightbox/requests/compute/list_servers.rb +0 -1
  107. data/lib/fog/brightbox/requests/compute/list_user_collaborations.rb +0 -1
  108. data/lib/fog/brightbox/requests/compute/list_users.rb +0 -1
  109. data/lib/fog/brightbox/requests/compute/list_zones.rb +0 -1
  110. data/lib/fog/brightbox/requests/compute/lock_resource_database_server.rb +0 -1
  111. data/lib/fog/brightbox/requests/compute/lock_resource_database_snapshot.rb +0 -1
  112. data/lib/fog/brightbox/requests/compute/lock_resource_image.rb +0 -1
  113. data/lib/fog/brightbox/requests/compute/lock_resource_load_balancer.rb +0 -1
  114. data/lib/fog/brightbox/requests/compute/lock_resource_server.rb +0 -1
  115. data/lib/fog/brightbox/requests/compute/map_cloud_ip.rb +0 -1
  116. data/lib/fog/brightbox/requests/compute/move_servers_server_group.rb +0 -1
  117. data/lib/fog/brightbox/requests/compute/reboot_server.rb +0 -1
  118. data/lib/fog/brightbox/requests/compute/reject_user_collaboration.rb +0 -1
  119. data/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +0 -1
  120. data/lib/fog/brightbox/requests/compute/remove_listeners_load_balancer.rb +0 -1
  121. data/lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb +0 -1
  122. data/lib/fog/brightbox/requests/compute/remove_servers_server_group.rb +0 -1
  123. data/lib/fog/brightbox/requests/compute/resend_collaboration.rb +0 -1
  124. data/lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb +0 -2
  125. data/lib/fog/brightbox/requests/compute/reset_ftp_password_scoped_account.rb +0 -1
  126. data/lib/fog/brightbox/requests/compute/reset_password_database_server.rb +0 -1
  127. data/lib/fog/brightbox/requests/compute/reset_secret_api_client.rb +0 -1
  128. data/lib/fog/brightbox/requests/compute/reset_secret_application.rb +0 -1
  129. data/lib/fog/brightbox/requests/compute/reset_server.rb +0 -1
  130. data/lib/fog/brightbox/requests/compute/shutdown_server.rb +0 -1
  131. data/lib/fog/brightbox/requests/compute/snapshot_database_server.rb +19 -3
  132. data/lib/fog/brightbox/requests/compute/snapshot_server.rb +19 -3
  133. data/lib/fog/brightbox/requests/compute/start_server.rb +0 -1
  134. data/lib/fog/brightbox/requests/compute/stop_server.rb +0 -1
  135. data/lib/fog/brightbox/requests/compute/unlock_resource_database_server.rb +0 -1
  136. data/lib/fog/brightbox/requests/compute/unlock_resource_database_snapshot.rb +0 -1
  137. data/lib/fog/brightbox/requests/compute/unlock_resource_image.rb +0 -1
  138. data/lib/fog/brightbox/requests/compute/unlock_resource_load_balancer.rb +0 -1
  139. data/lib/fog/brightbox/requests/compute/unlock_resource_server.rb +0 -1
  140. data/lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb +0 -1
  141. data/lib/fog/brightbox/requests/compute/update_account.rb +0 -1
  142. data/lib/fog/brightbox/requests/compute/update_api_client.rb +0 -1
  143. data/lib/fog/brightbox/requests/compute/update_application.rb +0 -1
  144. data/lib/fog/brightbox/requests/compute/update_cloud_ip.rb +0 -1
  145. data/lib/fog/brightbox/requests/compute/update_database_server.rb +0 -1
  146. data/lib/fog/brightbox/requests/compute/update_database_snapshot.rb +0 -1
  147. data/lib/fog/brightbox/requests/compute/update_firewall_policy.rb +0 -1
  148. data/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +0 -1
  149. data/lib/fog/brightbox/requests/compute/update_image.rb +0 -1
  150. data/lib/fog/brightbox/requests/compute/update_load_balancer.rb +0 -1
  151. data/lib/fog/brightbox/requests/compute/update_scoped_account.rb +0 -1
  152. data/lib/fog/brightbox/requests/compute/update_server.rb +0 -1
  153. data/lib/fog/brightbox/requests/compute/update_server_group.rb +0 -1
  154. data/lib/fog/brightbox/requests/compute/update_user.rb +0 -1
  155. data/lib/fog/brightbox/requests/storage/copy_object.rb +8 -10
  156. data/lib/fog/brightbox/requests/storage/delete_container.rb +1 -3
  157. data/lib/fog/brightbox/requests/storage/delete_multiple_objects.rb +7 -9
  158. data/lib/fog/brightbox/requests/storage/delete_object.rb +1 -3
  159. data/lib/fog/brightbox/requests/storage/delete_static_large_object.rb +7 -9
  160. data/lib/fog/brightbox/requests/storage/get_container.rb +3 -5
  161. data/lib/fog/brightbox/requests/storage/get_containers.rb +4 -6
  162. data/lib/fog/brightbox/requests/storage/get_object.rb +1 -3
  163. data/lib/fog/brightbox/requests/storage/get_object_https_url.rb +5 -10
  164. data/lib/fog/brightbox/requests/storage/head_container.rb +2 -4
  165. data/lib/fog/brightbox/requests/storage/head_containers.rb +3 -5
  166. data/lib/fog/brightbox/requests/storage/head_object.rb +4 -6
  167. data/lib/fog/brightbox/requests/storage/post_set_meta_temp_url_key.rb +2 -6
  168. data/lib/fog/brightbox/requests/storage/put_container.rb +3 -5
  169. data/lib/fog/brightbox/requests/storage/put_dynamic_obj_manifest.rb +2 -4
  170. data/lib/fog/brightbox/requests/storage/put_object.rb +1 -2
  171. data/lib/fog/brightbox/requests/storage/put_object_manifest.rb +0 -2
  172. data/lib/fog/brightbox/requests/storage/put_static_obj_manifest.rb +2 -4
  173. data/lib/fog/brightbox/storage.rb +26 -29
  174. data/lib/fog/brightbox/storage/connection.rb +10 -10
  175. data/lib/fog/brightbox/version.rb +1 -1
  176. data/spec/fog/brightbox/link_helper_spec.rb +18 -0
  177. data/spec/fog/brightbox/storage/authentication_request_spec.rb +16 -16
  178. data/spec/fog/brightbox/storage/connection_spec.rb +12 -12
  179. data/spec/fog/compute/brightbox/database_server_spec.rb +31 -0
  180. data/spec/fog/compute/brightbox/server_spec.rb +31 -0
  181. data/spec/fog/storage/brightbox_spec.rb +3 -3
  182. data/spec/spec_helper.rb +1 -1
  183. metadata +28 -10
  184. data/spec/model_helper.rb +0 -22
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require "minitest/autorun"
2
2
  require "fog/brightbox"
3
- require "model_helper"
3
+ require "model_setup"
4
4
  require "supports_resource_locking"
5
5
  require "stock_storage_responses"
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: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Thornthwaite
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-22 00:00:00.000000000 Z
11
+ date: 2014-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: inflecto
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 0.0.2
48
48
  type: :runtime
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'
54
+ version: 0.0.2
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.3'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rake
70
+ name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: minitest
98
+ name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: yard
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
125
139
  description: Module for the 'fog' gem to support Brightbox Cloud
126
140
  email:
127
141
  - tokengeek@gmail.com
@@ -130,6 +144,8 @@ extensions: []
130
144
  extra_rdoc_files: []
131
145
  files:
132
146
  - ".gitignore"
147
+ - ".rubocop.yml"
148
+ - ".rubocop_todo.yml"
133
149
  - ".travis.yml"
134
150
  - CHANGELOG.md
135
151
  - Gemfile
@@ -146,6 +162,7 @@ files:
146
162
  - lib/fog/brightbox/compute/shared.rb
147
163
  - lib/fog/brightbox/config.rb
148
164
  - lib/fog/brightbox/core.rb
165
+ - lib/fog/brightbox/link_helper.rb
149
166
  - lib/fog/brightbox/model.rb
150
167
  - lib/fog/brightbox/model_helper.rb
151
168
  - lib/fog/brightbox/models/compute/account.rb
@@ -332,6 +349,7 @@ files:
332
349
  - lib/fog/brightbox/version.rb
333
350
  - spec/fog/brightbox/compute/config_spec.rb
334
351
  - spec/fog/brightbox/config_spec.rb
352
+ - spec/fog/brightbox/link_helper_spec.rb
335
353
  - spec/fog/brightbox/storage/authentication_request_spec.rb
336
354
  - spec/fog/brightbox/storage/config_spec.rb
337
355
  - spec/fog/brightbox/storage/connection_errors_spec.rb
@@ -356,7 +374,6 @@ files:
356
374
  - spec/fog/compute/brightbox/zone_spec.rb
357
375
  - spec/fog/compute/brightbox_spec.rb
358
376
  - spec/fog/storage/brightbox_spec.rb
359
- - spec/model_helper.rb
360
377
  - spec/model_setup.rb
361
378
  - spec/spec_helper.rb
362
379
  - spec/stock_storage_responses.rb
@@ -389,6 +406,7 @@ summary: This library can be used as a module for `fog` or as standalone provide
389
406
  test_files:
390
407
  - spec/fog/brightbox/compute/config_spec.rb
391
408
  - spec/fog/brightbox/config_spec.rb
409
+ - spec/fog/brightbox/link_helper_spec.rb
392
410
  - spec/fog/brightbox/storage/authentication_request_spec.rb
393
411
  - spec/fog/brightbox/storage/config_spec.rb
394
412
  - spec/fog/brightbox/storage/connection_errors_spec.rb
@@ -413,8 +431,8 @@ test_files:
413
431
  - spec/fog/compute/brightbox/zone_spec.rb
414
432
  - spec/fog/compute/brightbox_spec.rb
415
433
  - spec/fog/storage/brightbox_spec.rb
416
- - spec/model_helper.rb
417
434
  - spec/model_setup.rb
418
435
  - spec/spec_helper.rb
419
436
  - spec/stock_storage_responses.rb
420
437
  - spec/supports_resource_locking.rb
438
+ has_rdoc:
data/spec/model_helper.rb DELETED
@@ -1,22 +0,0 @@
1
- module ModelSetup
2
- def self.included(base)
3
- base.class_eval do
4
- let(:configuration) do
5
- {
6
- :brightbox_auth_url => "http://localhost",
7
- :brightbox_api_url => "http://localhost",
8
- :brightbox_client_id => "",
9
- :brightbox_secret => "",
10
- :brightbox_username => "",
11
- :brightbox_password => "",
12
- :brightbox_account => "",
13
- :brightbox_default_image => "img-test",
14
- :brightbox_access_token => "FAKECACHEDTOKEN"
15
- }
16
- end
17
-
18
- let(:config) { Fog::Brightbox::Config.new(configuration) }
19
- let(:service) { Fog::Compute::Brightbox.new(config) }
20
- end
21
- end
22
- end