brightbox-cli 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (224) hide show
  1. data/README +13 -17
  2. data/README.rdoc +13 -17
  3. data/brightbox-cli.gemspec +1 -1
  4. data/lib/brightbox-cli/accounts.rb +7 -0
  5. data/lib/brightbox-cli/api.rb +3 -0
  6. data/lib/brightbox-cli/commands/config-client-list.rb +1 -1
  7. data/lib/brightbox-cli/commands/firewall-rules-create.rb +4 -0
  8. data/lib/brightbox-cli/commands/firewall-rules-update.rb +49 -0
  9. data/lib/brightbox-cli/commands/groups-show.rb +1 -1
  10. data/lib/brightbox-cli/commands/groups-update.rb +3 -1
  11. data/lib/brightbox-cli/commands/images-destroy.rb +1 -1
  12. data/lib/brightbox-cli/commands/images-list.rb +9 -3
  13. data/lib/brightbox-cli/commands/images-register.rb +1 -1
  14. data/lib/brightbox-cli/commands/images-update.rb +3 -1
  15. data/lib/brightbox-cli/commands/lbs-update.rb +4 -2
  16. data/lib/brightbox-cli/commands/{servers-activate-cloud.rb → servers-activate-console.rb} +2 -1
  17. data/lib/brightbox-cli/commands/servers-update.rb +2 -1
  18. data/lib/brightbox-cli/config.rb +17 -2
  19. data/lib/brightbox-cli/detailed_server.rb +1 -1
  20. data/lib/brightbox-cli/firewall_rule.rb +6 -0
  21. data/lib/brightbox-cli/gli_global_hooks.rb +8 -1
  22. data/lib/brightbox-cli/images.rb +22 -1
  23. data/lib/brightbox-cli/nilable_hash.rb +7 -0
  24. data/lib/brightbox-cli/server_groups.rb +0 -6
  25. data/lib/brightbox-cli/servers.rb +6 -2
  26. data/lib/brightbox-cli/tables.rb +13 -0
  27. data/lib/brightbox-cli/vendor/fog/README.rdoc +2 -9
  28. data/lib/brightbox-cli/vendor/fog/Rakefile +3 -2
  29. data/lib/brightbox-cli/vendor/fog/changelog.txt +213 -0
  30. data/lib/brightbox-cli/vendor/fog/docs/_layouts/default.html +1 -1
  31. data/lib/brightbox-cli/vendor/fog/docs/about/contributing.markdown +1 -1
  32. data/lib/brightbox-cli/vendor/fog/docs/about/getting_started.markdown +28 -3
  33. data/lib/brightbox-cli/vendor/fog/docs/dns/index.markdown +1 -1
  34. data/lib/brightbox-cli/vendor/fog/docs/index.markdown +2 -10
  35. data/lib/brightbox-cli/vendor/fog/docs/storage/index.markdown +2 -2
  36. data/lib/brightbox-cli/vendor/fog/fog.gemspec +6 -5
  37. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/auto_scaling.rb +3 -1
  38. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/cloud_formation.rb +3 -0
  39. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/cloud_watch.rb +3 -1
  40. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/compute.rb +5 -3
  41. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/elb.rb +4 -2
  42. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/emr.rb +133 -0
  43. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/addresses.rb +1 -1
  44. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/key_pairs.rb +1 -1
  45. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/security_groups.rb +1 -1
  46. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/server.rb +4 -2
  47. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/servers.rb +1 -1
  48. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/snapshots.rb +1 -1
  49. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/spot_request.rb +21 -4
  50. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/spot_requests.rb +45 -1
  51. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/volumes.rb +1 -1
  52. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elb/load_balancer.rb +2 -0
  53. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/storage/file.rb +1 -1
  54. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cdn/get_invalidation_list.rb +0 -1
  55. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_formation/update_stack.rb +19 -0
  56. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/add_instance_groups.rb +28 -0
  57. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/add_job_flow_steps.rb +17 -0
  58. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/describe_job_flows.rb +140 -0
  59. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/modify_instance_groups.rb +17 -0
  60. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/run_job_flow.rb +19 -0
  61. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/set_termination_protection.rb +17 -0
  62. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/terminate_job_flows.rb +17 -0
  63. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/rds.rb +3 -1
  64. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_formation/create_stack.rb +6 -0
  65. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_formation/update_stack.rb +62 -0
  66. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/authorize_security_group_ingress.rb +141 -36
  67. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/delete_security_group.rb +25 -0
  68. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/delete_tags.rb +1 -1
  69. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_addresses.rb +2 -2
  70. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_availability_zones.rb +5 -2
  71. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_images.rb +1 -1
  72. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_instances.rb +15 -6
  73. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_key_pairs.rb +2 -2
  74. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_regions.rb +2 -2
  75. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_reserved_instances.rb +1 -1
  76. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_security_groups.rb +2 -2
  77. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_snapshots.rb +4 -4
  78. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_volumes.rb +2 -2
  79. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/modify_instance_attribute.rb +1 -1
  80. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/revoke_security_group_ingress.rb +41 -29
  81. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/describe_load_balancers.rb +3 -3
  82. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb +1 -1
  83. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/add_instance_groups.rb +46 -0
  84. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/add_job_flow_steps.rb +49 -0
  85. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/describe_job_flows.rb +108 -0
  86. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/modify_instance_groups.rb +40 -0
  87. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/run_job_flow.rb +106 -0
  88. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/set_termination_protection.rb +39 -0
  89. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/terminate_job_flows.rb +37 -0
  90. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/simpledb/get_attributes.rb +2 -2
  91. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/simpledb/select.rb +1 -1
  92. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/acl_utils.rb +62 -0
  93. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_bucket_acl.rb +7 -1
  94. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object_acl.rb +7 -1
  95. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object_url.rb +2 -2
  96. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/put_bucket_acl.rb +2 -2
  97. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/put_object_acl.rb +1 -1
  98. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/ses.rb +1 -1
  99. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/simpledb.rb +2 -0
  100. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/sns.rb +3 -1
  101. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/sqs.rb +4 -2
  102. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/storage.rb +10 -2
  103. data/lib/brightbox-cli/vendor/fog/lib/fog/aws.rb +26 -1
  104. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/aws.rb +8 -4
  105. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/bluebox.rb +2 -2
  106. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/brightbox.rb +1 -1
  107. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/dnsimple.rb +1 -1
  108. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/dnsmadeeasy.rb +1 -1
  109. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/ecloud.rb +1 -1
  110. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/glesys.rb +1 -1
  111. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/go_grid.rb +1 -1
  112. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/google.rb +1 -1
  113. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/libvirt.rb +1 -1
  114. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/linode.rb +2 -2
  115. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/local.rb +1 -1
  116. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/new_servers.rb +1 -1
  117. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/ninefold.rb +2 -2
  118. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/openstack.rb +1 -1
  119. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/rackspace.rb +3 -3
  120. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/slicehost.rb +1 -1
  121. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/stormondemand.rb +1 -1
  122. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/virtual_box.rb +1 -1
  123. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/vmfusion.rb +1 -1
  124. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/voxel.rb +1 -1
  125. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/zerigo.rb +1 -1
  126. data/lib/brightbox-cli/vendor/fog/lib/fog/bin.rb +1 -1
  127. data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/compute.rb +2 -0
  128. data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/cloud_ip.rb +10 -2
  129. data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/server.rb +11 -3
  130. data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/server_group.rb +9 -0
  131. data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +13 -0
  132. data/lib/brightbox-cli/vendor/fog/lib/fog/core/connection.rb +1 -1
  133. data/lib/brightbox-cli/vendor/fog/lib/fog/core/credentials.rb +3 -3
  134. data/lib/brightbox-cli/vendor/fog/lib/fog/core/deprecation.rb +2 -2
  135. data/lib/brightbox-cli/vendor/fog/lib/fog/core/logger.rb +8 -3
  136. data/lib/brightbox-cli/vendor/fog/lib/fog/core/mock.rb +4 -0
  137. data/lib/brightbox-cli/vendor/fog/lib/fog/core/provider.rb +7 -2
  138. data/lib/brightbox-cli/vendor/fog/lib/fog/core/service.rb +8 -2
  139. data/lib/brightbox-cli/vendor/fog/lib/fog/dnsmadeeasy/models/dns/record.rb +3 -2
  140. data/lib/brightbox-cli/vendor/fog/lib/fog/dynect/dns.rb +25 -3
  141. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/compute.rb +1 -1
  142. data/lib/brightbox-cli/vendor/fog/lib/fog/go_grid/requests/compute/grid_server_power.rb +1 -1
  143. data/lib/brightbox-cli/vendor/fog/lib/fog/google/models/storage/file.rb +1 -1
  144. data/lib/brightbox-cli/vendor/fog/lib/fog/google/requests/storage/get_object_url.rb +2 -2
  145. data/lib/brightbox-cli/vendor/fog/lib/fog/google/storage.rb +1 -1
  146. data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold/models/storage/file.rb +8 -6
  147. data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold/models/storage/files.rb +3 -2
  148. data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold/requests/storage/head_namespace.rb +20 -0
  149. data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold/storage.rb +4 -2
  150. data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/server.rb +7 -1
  151. data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/create_server.rb +6 -11
  152. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/load_balancers.rb +1 -0
  153. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/dns/callback.rb +1 -1
  154. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/dns/record.rb +1 -1
  155. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/dns/zone.rb +1 -1
  156. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/dns.rb +1 -0
  157. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/models/dns/record.rb +7 -3
  158. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/models/dns/zone.rb +1 -1
  159. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/parsers/dns/create_record.rb +8 -2
  160. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/parsers/dns/get_record.rb +17 -5
  161. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/parsers/dns/get_records.rb +10 -2
  162. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/requests/dns/get_record.rb +1 -1
  163. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/requests/dns/get_records.rb +7 -8
  164. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/requests/dns/update_record.rb +43 -0
  165. data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/models/compute/balancers.rb +1 -1
  166. data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/models/compute/configs.rb +1 -1
  167. data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/models/compute/images.rb +1 -1
  168. data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/models/compute/servers.rb +1 -1
  169. data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/models/compute/templates.rb +1 -1
  170. data/lib/brightbox-cli/vendor/fog/lib/fog/terremark/vcloud.rb +1 -1
  171. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/compute.rb +41 -23
  172. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/models/compute/server.rb +19 -0
  173. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/models/compute/servers.rb +8 -2
  174. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/datacenters.rb +34 -0
  175. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +83 -10
  176. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/vm_clone.rb +76 -37
  177. data/lib/brightbox-cli/vendor/fog/lib/fog.rb +1 -1
  178. data/lib/brightbox-cli/vendor/fog/tests/aws/models/cloud_watch/alarm_data_tests.rb +8 -6
  179. data/lib/brightbox-cli/vendor/fog/tests/aws/models/cloud_watch/alarm_history_tests.rb +3 -1
  180. data/lib/brightbox-cli/vendor/fog/tests/aws/models/compute/security_group_tests.rb +15 -10
  181. data/lib/brightbox-cli/vendor/fog/tests/aws/models/elb/model_tests.rb +4 -4
  182. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/cloud_formation/stack_tests.rb +14 -0
  183. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/instance_tests.rb +16 -1
  184. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/security_group_tests.rb +251 -32
  185. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/tag_tests.rb +2 -2
  186. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/emr/helper.rb +172 -0
  187. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/emr/instance_group_tests.rb +106 -0
  188. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/emr/job_flow_tests.rb +88 -0
  189. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/storage/acl_utils_tests.rb +209 -0
  190. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/storage/bucket_tests.rb +80 -55
  191. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/storage/object_tests.rb +42 -24
  192. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/account_tests.rb +11 -6
  193. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/api_client_tests.rb +23 -12
  194. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/cloud_ip_tests.rb +29 -20
  195. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/helper.rb +70 -14
  196. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/image_tests.rb +17 -14
  197. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/interface_tests.rb +3 -2
  198. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/load_balancer_tests.rb +57 -11
  199. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_group_tests.rb +29 -22
  200. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_tests.rb +38 -21
  201. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_type_tests.rb +7 -6
  202. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/user_tests.rb +11 -16
  203. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/zone_tests.rb +7 -6
  204. data/lib/brightbox-cli/vendor/fog/tests/compute/helper.rb +1 -1
  205. data/lib/brightbox-cli/vendor/fog/tests/core/credential_tests.rb +2 -2
  206. data/lib/brightbox-cli/vendor/fog/tests/core/mocking_tests.rb +60 -0
  207. data/lib/brightbox-cli/vendor/fog/tests/dns/models/record_tests.rb +4 -2
  208. data/lib/brightbox-cli/vendor/fog/tests/dns/models/records_tests.rb +4 -2
  209. data/lib/brightbox-cli/vendor/fog/tests/dns/models/zone_tests.rb +3 -1
  210. data/lib/brightbox-cli/vendor/fog/tests/dns/models/zones_tests.rb +4 -2
  211. data/lib/brightbox-cli/vendor/fog/tests/glesys/requests/compute/helper.rb +4 -2
  212. data/lib/brightbox-cli/vendor/fog/tests/glesys/requests/compute/server_tests.rb +1 -1
  213. data/lib/brightbox-cli/vendor/fog/tests/helper.rb +4 -0
  214. data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/dns/dns_tests.rb +16 -12
  215. data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/dns/records_tests.rb +13 -11
  216. data/lib/brightbox-cli/vendor/fog/tests/slicehost/requests/dns/dns_tests.rb +58 -11
  217. data/lib/brightbox-cli/vendor/fog/tests/vsphere/compute_tests.rb +18 -10
  218. data/lib/brightbox-cli/vendor/fog/tests/vsphere/requests/compute/vm_clone_tests.rb +3 -7
  219. data/lib/brightbox-cli/version.rb +1 -1
  220. data/lib/brightbox_cli.rb +1 -0
  221. data/spec/fixtures/vcr_cassettes/list_server_groups.yml +37 -6
  222. data/spec/nilable_hash_spec.rb +30 -0
  223. metadata +48 -18
  224. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/hash_to_acl.rb +0 -44
data/README CHANGED
@@ -3,26 +3,21 @@
3
3
  brightbox-cli is a set of cli tools to interact with the Brightbox
4
4
  Cloud API.
5
5
 
6
- http://beta.brightbox.com
6
+ http://brightbox.com
7
7
 
8
- http://docs.brightbox.com/cli
8
+ http://docs.brightbox.com/reference/cli
9
9
 
10
- == Dependencies
11
-
12
- It has following dependencies and if you are trying to install the gem from
13
- a gem file (rather than via gem command), you might have to install the
14
- following:
15
-
16
- * fog - 0.8.2
17
- * json - 1.5.3
18
- * hirb - 0.3.5
10
+ http://docs.brightbox.com/reference/api/
19
11
 
20
12
  == Packaging
21
13
 
22
14
  === Vendoring libraries
23
15
 
24
- gems can be vendored into vendor/ for packaging and will be
25
- prioritized over any gems.
16
+ gems can be vendored into `lib/brightbox-cli/vendor/` for packaging
17
+ and will be prioritised over any gems.
18
+
19
+ We've customized some gems and they're permanently vendored (i.e: in
20
+ the git tree).
26
21
 
27
22
  === Debian/Ubuntu packaging
28
23
 
@@ -36,16 +31,17 @@ to packaging. These are:
36
31
  * fog
37
32
  * hirb
38
33
  * ini
34
+ * multi_json
39
35
 
40
- Rubygems support can be disabled by defining the DISABLE_RUBYGEMS
41
- constant in lib/bbcloud/os_config.rb
36
+ Rubygems support can be disabled by defining the `DISABLE_RUBYGEMS`
37
+ constant in `lib/bbcloud/os_config.rb`
42
38
 
43
39
  Ubuntu packaging scripts are available on the packaging-lucid git
44
40
  branch.
45
41
 
46
42
  == License
47
43
 
48
- Copyright (c) 2010,2011 John Leach, Brightbox Systems Ltd <john@brightbox.co.uk>
44
+ Copyright (c) 2010,2011,2012 John Leach, Brightbox Systems Ltd <john@brightbox.co.uk>
49
45
 
50
46
  Permission is hereby granted, free of charge, to any person obtaining a copy
51
47
  of this software and associated documentation files (the "Software"), to deal
@@ -63,4 +59,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
63
59
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64
60
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
65
61
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
66
- THE SOFTWARE.
62
+ THE SOFTWARE.
data/README.rdoc CHANGED
@@ -3,26 +3,21 @@
3
3
  brightbox-cli is a set of cli tools to interact with the Brightbox
4
4
  Cloud API.
5
5
 
6
- http://beta.brightbox.com
6
+ http://brightbox.com
7
7
 
8
- http://docs.brightbox.com/cli
8
+ http://docs.brightbox.com/reference/cli
9
9
 
10
- == Dependencies
11
-
12
- It has following dependencies and if you are trying to install the gem from
13
- a gem file (rather than via gem command), you might have to install the
14
- following:
15
-
16
- * fog - 0.8.2
17
- * json - 1.5.3
18
- * hirb - 0.3.5
10
+ http://docs.brightbox.com/reference/api/
19
11
 
20
12
  == Packaging
21
13
 
22
14
  === Vendoring libraries
23
15
 
24
- gems can be vendored into vendor/ for packaging and will be
25
- prioritized over any gems.
16
+ gems can be vendored into `lib/brightbox-cli/vendor/` for packaging
17
+ and will be prioritised over any gems.
18
+
19
+ We've customized some gems and they're permanently vendored (i.e: in
20
+ the git tree).
26
21
 
27
22
  === Debian/Ubuntu packaging
28
23
 
@@ -36,16 +31,17 @@ to packaging. These are:
36
31
  * fog
37
32
  * hirb
38
33
  * ini
34
+ * multi_json
39
35
 
40
- Rubygems support can be disabled by defining the DISABLE_RUBYGEMS
41
- constant in lib/bbcloud/os_config.rb
36
+ Rubygems support can be disabled by defining the `DISABLE_RUBYGEMS`
37
+ constant in `lib/bbcloud/os_config.rb`
42
38
 
43
39
  Ubuntu packaging scripts are available on the packaging-lucid git
44
40
  branch.
45
41
 
46
42
  == License
47
43
 
48
- Copyright (c) 2010,2011 John Leach, Brightbox Systems Ltd <john@brightbox.co.uk>
44
+ Copyright (c) 2010,2011,2012 John Leach, Brightbox Systems Ltd <john@brightbox.co.uk>
49
45
 
50
46
  Permission is hereby granted, free of charge, to any person obtaining a copy
51
47
  of this software and associated documentation files (the "Software"), to deal
@@ -63,4 +59,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
63
59
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64
60
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
65
61
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
66
- THE SOFTWARE.
62
+ THE SOFTWARE.
@@ -24,8 +24,8 @@ Gem::Specification.new do |s|
24
24
  s.add_dependency 'excon', '~> 0.6.1'
25
25
  s.add_dependency 'builder'
26
26
  s.add_dependency 'mime-types'
27
- s.add_dependency 'net-scp', '~> 1.0.4'
28
27
  s.add_dependency 'net-ssh', '~> 2.2.1'
28
+ s.add_dependency 'net-scp', '~> 1.0.4'
29
29
  s.add_dependency 'nokogiri', '~> 1.5.0'
30
30
  s.add_dependency 'ruby-hmac'
31
31
  s.add_development_dependency('rake', '~> 0.8.0')
@@ -23,6 +23,13 @@ module Brightbox
23
23
  [a]
24
24
  end
25
25
 
26
+ # The account associated with this connection
27
+ def self.conn_account
28
+ a = conn.account
29
+ a.connection = conn
30
+ a
31
+ end
32
+
26
33
  def self.get(id)
27
34
  a = conn.account
28
35
  a.connection = conn
@@ -1,4 +1,7 @@
1
1
  module Brightbox
2
+ # The length of the identifier string.
3
+ IDENTIFIER_SIZE = 9
4
+
2
5
  class Api
3
6
  attr_reader :id
4
7
  class ApiError < StandardError ; end
@@ -19,7 +19,7 @@ module Brightbox
19
19
  }
20
20
  end
21
21
 
22
- render_table clients, :fields => [:alias, :client_id, :secret, :api_url, :auth_url]
22
+ render_table clients, global_options.merge(:fields => [:alias, :client_id, :secret, :api_url, :auth_url])
23
23
  end
24
24
  end
25
25
 
@@ -21,6 +21,9 @@ module Brightbox
21
21
  c.desc "Icmp Type name"
22
22
  c.flag [:i, :icmptype]
23
23
 
24
+ c.desc "Description"
25
+ c.flag :description
26
+
24
27
  c.action do |global_options, options, args|
25
28
  if args && args.empty?
26
29
  raise "You must specify the firewall_policy_id as the first argument"
@@ -42,6 +45,7 @@ module Brightbox
42
45
  create_options[:destination_port] = options[:e] if options[:e]
43
46
  create_options[:icmp_type_name] = options[:i] if options[:i]
44
47
  create_options[:protocol] = options[:p]
48
+ create_options[:description] = options[:description] if options[:description]
45
49
 
46
50
  create_options[:firewall_policy_id] = firewall_policy.id
47
51
  firewall_rule = FirewallRule.create(create_options)
@@ -0,0 +1,49 @@
1
+ module Brightbox
2
+ desc 'Update Firewall Rule'
3
+ arg_name '[firewall-policy-id...]'
4
+
5
+ command [:update] do |c|
6
+ c.desc "Protocol - [tcp/udp/icmp/Protocol numbers]"
7
+ c.flag [:p, :protocol]
8
+
9
+ c.desc "Source - IPv4/IPv6 address or range (CIDR notation), 'any' for combined IPv4/IPv6 wildcard, server group identifer, server identifier."
10
+ c.flag [:s, :source]
11
+
12
+ c.desc "Source Port"
13
+ c.flag [:t, :sport]
14
+
15
+ c.desc "Destination. IPv4/IPv6 address or range (CIDR notation), 'any' for combined IPv4/IPv6 wildcard, server group identifer, server identifier."
16
+ c.flag [:d, :destination]
17
+
18
+ c.desc "Destination Port"
19
+ c.flag [:e, :dport]
20
+
21
+ c.desc "Icmp Type name"
22
+ c.flag [:i, :icmptype]
23
+
24
+ c.desc "Description"
25
+ c.flag :description
26
+
27
+ c.action do |global_options, options, args|
28
+ fwr_id = args.shift
29
+ raise "You must specify a valid firewall rule id as the first argument" unless fwr_id =~ /^fwr-/
30
+ firewall_rule = FirewallRule.find fwr_id
31
+ raise "Could not find firewall rule with #{firewall_rule_id}" unless firewall_rule
32
+
33
+ params = NilableHash.new
34
+ params[:source_port] = options[:t] if options[:t]
35
+ params[:source] = options[:s] if options[:s]
36
+ params[:destination] = options[:d] if options[:d]
37
+ params[:destination_port] = options[:e] if options[:e]
38
+ params[:icmp_type_name] = options[:i] if options[:i]
39
+ params[:protocol] = options[:p] if options[:p]
40
+ params[:description] = options[:description] if options[:description]
41
+ params.nilify_blanks
42
+
43
+ info "Updating firewall rule #{firewall_rule}"
44
+ firewall_rule.update(params)
45
+
46
+ render_table([firewall_rule], global_options)
47
+ end
48
+ end
49
+ end
@@ -8,7 +8,7 @@ module Brightbox
8
8
  sgs = DetailedServerGroup.find_or_call(args) do |id|
9
9
  raise "Couldn't find server group #{id}"
10
10
  end
11
- render_table(sgs, :vertical => true)
11
+ render_table(sgs, global_options.merge(:vertical => true))
12
12
  end
13
13
  end
14
14
  end
@@ -14,7 +14,7 @@ module Brightbox
14
14
  grp_id = args.shift
15
15
  raise "You must specify the server group to update as the first argument" unless grp_id =~ /^grp-/
16
16
 
17
- params = {}
17
+ params = NilableHash.new
18
18
 
19
19
  # unless args.empty?
20
20
  # params[:servers] = args.collect { |a| { :server => a } }
@@ -28,6 +28,8 @@ module Brightbox
28
28
  params[:description] = options[:d]
29
29
  end
30
30
 
31
+ params.nilify_blanks
32
+
31
33
  sg = ServerGroup.find grp_id
32
34
  info "Updating server group #{sg}"
33
35
  sg = sg.update(params)
@@ -19,7 +19,7 @@ module Brightbox
19
19
  i.reload
20
20
  end
21
21
 
22
- render_table(images)
22
+ render_table(images, global_options)
23
23
 
24
24
  end
25
25
  end
@@ -2,8 +2,11 @@ module Brightbox
2
2
  desc 'List available images'
3
3
  arg_name '[image-id...]'
4
4
  command [:list] do |c|
5
- c.action do |global_options, options, args|
5
+ c.desc "Show all public images from all accounts"
6
+ c.switch [:a, "show-all"]
6
7
 
8
+ c.action do |global_options, options, args|
9
+
7
10
  if args.empty?
8
11
  images = Image.find(:all)
9
12
  else
@@ -16,10 +19,13 @@ module Brightbox
16
19
 
17
20
  images = images - snapshots
18
21
 
19
- images.sort! do |a,b|
20
- [a.official ? 0 : 1, a.name, a.arch] <=> [b.official ? 0 : 1, b.name, b.arch]
22
+ unless options[:a]
23
+ account = Account.conn_account
24
+ images.reject! { |i| !i.official and i.owner_id != account.id }
21
25
  end
22
26
 
27
+ images.sort! { |a, b| a.default_sort_fields <=> b.default_sort_fields }
28
+
23
29
  snapshots.sort! { |a, b| a.created_at <=> b.created_at }
24
30
 
25
31
  render_table(images + snapshots, global_options)
@@ -53,7 +53,7 @@ module Brightbox
53
53
 
54
54
  image = Image.register(image_options)
55
55
 
56
- render_table([image])
56
+ render_table([image], global_options)
57
57
 
58
58
  end
59
59
  end
@@ -34,7 +34,7 @@ module Brightbox
34
34
  raise "Public must be true or false" unless options[:p] == "true" || options[:p] == "false"
35
35
  end
36
36
 
37
- params = {}
37
+ params = NilableHash.new
38
38
  params[:name] = options[:n] if options[:n]
39
39
  params[:arch] = options[:a] if options[:a]
40
40
  params[:source] = options[:s] if options[:s]
@@ -51,6 +51,8 @@ module Brightbox
51
51
  params[:status] = "deprecated" if options[:deprecated] == "true"
52
52
  params[:status] = "available" if options[:deprecated] == "false"
53
53
 
54
+ params.nilify_blanks
55
+
54
56
  image = Image.find img_id
55
57
 
56
58
  info "Updating image #{image}"
@@ -40,7 +40,7 @@ module Brightbox
40
40
  lb_id = args.shift
41
41
  raise "You must specify the load balancer to update as the first argument" unless lb_id =~ /^lba-/
42
42
 
43
- lbopts = {}
43
+ lbopts = NilableHash.new
44
44
 
45
45
  unless args.empty?
46
46
  lbopts[:nodes] = args.collect { |a| { :node => a } }
@@ -75,7 +75,9 @@ module Brightbox
75
75
 
76
76
  if options[:p]
77
77
  lbopts[:policy] = options[:p]
78
- end
78
+ end
79
+
80
+ lbopts.nilify_blanks
79
81
 
80
82
  lb = LoadBalancer.find lb_id
81
83
 
@@ -16,7 +16,8 @@ module Brightbox
16
16
  servers.each do |s|
17
17
  info "Activating console for server #{s}"
18
18
  r = s.activate_console
19
- consoles << { :url => r["console_url"], :token => r["console_token"], :expires => r["console_token_expires"] }
19
+ url = "#{r["console_url"]}/?password=#{r["console_token"]}"
20
+ consoles << { :url => url, :token => r["console_token"], :expires => r["console_token_expires"] }
20
21
  end
21
22
 
22
23
  render_table(consoles, global_options.merge(:fields => [:url, :token, :expires]))
@@ -46,9 +46,10 @@ module Brightbox
46
46
  raise "User data too big (>16k)" if user_data.size > 16 * 1024
47
47
  end
48
48
 
49
- params = {}
49
+ params = NilableHash.new
50
50
  params[:name] = options[:n] if options[:n]
51
51
  params[:user_data] = user_data if user_data
52
+ params.nilify_blanks
52
53
 
53
54
  info "Updating server #{server}#{" with %.2fk of user data" % (user_data.size / 1024.0) if user_data}"
54
55
  server.update params
@@ -104,6 +104,10 @@ module Brightbox
104
104
  end
105
105
  end
106
106
 
107
+ def alias
108
+ config[client_name]['alias']
109
+ end
110
+
107
111
  def to_fog
108
112
  raise Ini::Error, "No api client configured" unless configured?
109
113
  c = config[client_name]
@@ -122,6 +126,12 @@ module Brightbox
122
126
  }
123
127
  end
124
128
 
129
+ def api_hostname
130
+ URI(to_fog[:brightbox_api_url]).host
131
+ rescue StandardError
132
+ "api.gb1.brightbox.com"
133
+ end
134
+
125
135
  def oauth_token
126
136
  if @oauth_token.nil?
127
137
  if File.exists? oauth_token_filename
@@ -139,19 +149,24 @@ module Brightbox
139
149
 
140
150
  def finish
141
151
  begin
142
- if configured? and @oauth_token != Api.conn.oauth_token
152
+ if configured? && @oauth_token != Api.conn.oauth_token
143
153
  File.open(oauth_token_filename + ".#{$$}", "w") do |f|
144
154
  f.write Api.conn.oauth_token
145
155
  end
146
156
  FileUtils.mv oauth_token_filename + ".#{$$}", oauth_token_filename
147
157
  end
158
+ rescue BBConfigError
148
159
  rescue StandardError => e
149
160
  warn "Error writing auth token #{oauth_token_filename}: #{e.class}: #{e}"
150
161
  end
151
162
  end
152
163
 
153
164
  def configured?
154
- client_name != nil and !clients.empty?
165
+ configured = client_name != nil && !clients.empty?
166
+ if configured && (config[client_name].nil? || config[client_name].empty?)
167
+ raise BBConfigError, "client id or alias #{client_name.inspect} not defined in config"
168
+ end
169
+ configured
155
170
  end
156
171
 
157
172
  private
@@ -35,7 +35,7 @@ module Brightbox
35
35
  [:id, :status, :name, :created_at, :deleted_at,
36
36
  :zone, :type, :type_name, :type_handle, :ram, :cores,
37
37
  :disk, :image, :image_name, :private_ips, :cloud_ips, :ipv6_address,
38
- :cloud_ip_ids, :hostname, :public_hostname, :snapshots,
38
+ :cloud_ip_ids, :hostname, :public_hostname, :ipv6_hostname, :snapshots,
39
39
  :server_groups
40
40
  ]
41
41
  end
@@ -11,6 +11,12 @@ module Brightbox
11
11
  conn.firewall_rules.get(id)
12
12
  end
13
13
 
14
+ def update params
15
+ self.class.conn.update_firewall_rule id, params
16
+ self.reload
17
+ self
18
+ end
19
+
14
20
  def attributes
15
21
  t = @attributes || fog_model.attributes
16
22
  t[:sport] = t[:source_port]
@@ -34,8 +34,15 @@ module Brightbox
34
34
  end
35
35
  end
36
36
  end
37
+
38
+ unless global_options[:s]
39
+ Hirb.enable
40
+ Hirb::View.resize
41
+ end
42
+
37
43
  command = commands[:help] if global_options[:h]
38
- info "INFO: client_id: #{CONFIG.client_name}" if CONFIG.clients.size > 1
44
+ config_alias = CONFIG.alias == CONFIG.client_name ? nil : "(#{CONFIG.alias})"
45
+ info "INFO: client_id: #{CONFIG.client_name} #{config_alias}" if CONFIG.clients.size > 1
39
46
  true
40
47
  end
41
48
 
@@ -15,7 +15,7 @@ module Brightbox
15
15
  end
16
16
 
17
17
  def self.default_field_order
18
- [:id, :owner, :type, :created_on, :status, :size, :username, :name]
18
+ [:id, :owner, :type, :created_on, :status, :size, :name]
19
19
  end
20
20
 
21
21
  def update options
@@ -53,5 +53,26 @@ module Brightbox
53
53
  public
54
54
  end
55
55
 
56
+ def status_sort_code
57
+ case self.status
58
+ when 'available'
59
+ (self.public ? 1 : 2)
60
+ when 'deprecated'
61
+ 3
62
+ else
63
+ 4
64
+ end
65
+ end
66
+
67
+ def default_sort_fields
68
+ [
69
+ self.official ? 0 : 1,
70
+ self.name,
71
+ self.arch,
72
+ self.status_sort_code,
73
+ - self.created_at.to_i
74
+ ]
75
+ end
76
+
56
77
  end
57
78
  end
@@ -0,0 +1,7 @@
1
+ class NilableHash < Hash
2
+ def nilify_blanks
3
+ keys.each do |k|
4
+ self[k] = nil if self[k] == ''
5
+ end
6
+ end
7
+ end
@@ -52,11 +52,5 @@ module Brightbox
52
52
  server_ids.respond_to?(:join) ? server_ids.join(" ") : ""
53
53
  end
54
54
 
55
- def server_ids
56
- if attributes["servers"]
57
- @server_ids ||= attributes["servers"].collect { |s| s["id"] }
58
- end
59
- end
60
-
61
55
  end
62
56
  end
@@ -45,6 +45,7 @@ module Brightbox
45
45
  a[:zone] = zone && zone['handle']
46
46
  a[:hostname] = hostname
47
47
  a[:public_hostname] = public_hostname unless cloud_ips.empty?
48
+ a[:ipv6_hostname] = ipv6_hostname if interfaces.any? {|i| i['ipv6_address'] }
48
49
  a
49
50
  end
50
51
 
@@ -60,13 +61,16 @@ module Brightbox
60
61
  end
61
62
 
62
63
  def hostname
63
- "#{id}.gb1.brightbox.com"
64
+ "#{id}.#{Brightbox::CONFIG.api_hostname}"
64
65
  end
65
66
 
66
67
  def public_hostname
67
68
  "public.#{hostname}"
68
69
  end
69
- end
70
70
 
71
+ def ipv6_hostname
72
+ "ipv6.#{hostname}"
73
+ end
74
+ end
71
75
 
72
76
  end
@@ -1,6 +1,13 @@
1
1
  require 'hirb'
2
2
 
3
3
  module Brightbox
4
+
5
+ # Hack to set ascii art table cell width due to limitations in Hirb
6
+ class Hirb::Helpers::Table
7
+ remove_const :BORDER_LENGTH
8
+ BORDER_LENGTH = 2
9
+ end
10
+
4
11
  # Remove most of the ascii art table output
5
12
  class SimpleTable < Hirb::Helpers::Table
6
13
  def render_table_header
@@ -26,6 +33,12 @@ module Brightbox
26
33
  end
27
34
  end
28
35
 
36
+ def enforce_field_constraints
37
+ max_fields.each {|k,max| @field_lengths[k] = max if @field_lengths[k].to_i > max }
38
+ # Never shrink the id field
39
+ @field_lengths[:id] = IDENTIFIER_SIZE if @field_lengths[:id]
40
+ end
41
+
29
42
  end
30
43
 
31
44
  # Vertical table for "show" views
@@ -105,20 +105,12 @@ geemus says: "That should give you everything you need to get started, but let m
105
105
 
106
106
  == Contributing
107
107
 
108
- * Find something you would like to work on. For suggestions look for the `easy`, `medium` and `hard` tags in the {issues}[http://github.com/geemus/fog/issues]
108
+ * Find something you would like to work on. For suggestions look for the `easy`, `medium` and `hard` tags in the {issues}[http://github.com/fog/fog/issues]
109
109
  * Fork the project and do your work in a topic branch.
110
110
  * Add shindo tests to prove your code works and run all the tests using `bundle exec rake`.
111
111
  * Rebase your branch against geemus/fog to make sure everything is up to date.
112
112
  * Commit your changes and send a pull request.
113
113
 
114
- == T-Shirts
115
-
116
- Wonder how you can get a lovely fog shirt? Look no further!
117
-
118
- * Blue shirts go to people who have contributed indirectly, great examples are writing blog posts or giving lightning talks.
119
- * Grey shirts and a follow from @fog go to people who have made it on to the {contributors list}[https://github.com/geemus/fog/contributors] by submitting code.
120
- * Black shirts go to people who have made it on to the {collaborators list}[https://github.com/api/v2/json/repos/show/geemus/fog/collaborators] by coercing geemus into adding them.
121
-
122
114
  == Additional Resources
123
115
 
124
116
  {fog.io}[http://fog.io]
@@ -128,6 +120,7 @@ Wonder how you can get a lovely fog shirt? Look no further!
128
120
  http://www.engineyard.com/images/logo.png
129
121
 
130
122
  All new work on fog is sponsored by {Engine Yard}[http://engineyard.com]
123
+
131
124
  == Copyright
132
125
 
133
126
  (The MIT License)
@@ -203,9 +203,9 @@ task :changelog do
203
203
  changelog << ''
204
204
 
205
205
  require 'multi_json'
206
- github_repo_data = MultiJson.decode(Excon.get('http://github.com/api/v2/json/repos/show/geemus/fog').body)
206
+ github_repo_data = MultiJson.decode(Excon.get('http://github.com/api/v2/json/repos/show/fog/fog').body)
207
207
  data = github_repo_data['repository'].reject {|key, value| !['forks', 'open_issues', 'watchers'].include?(key)}
208
- github_collaborator_data = MultiJson.decode(Excon.get('http://github.com/api/v2/json/repos/show/geemus/fog/collaborators').body)
208
+ github_collaborator_data = MultiJson.decode(Excon.get('http://github.com/api/v2/json/repos/show/fog/fog/collaborators').body)
209
209
  data['collaborators'] = github_collaborator_data['collaborators'].length
210
210
  rubygems_data = MultiJson.decode(Excon.get('https://rubygems.org/api/v1/gems/fog.json').body)
211
211
  data['downloads'] = rubygems_data['downloads']
@@ -249,6 +249,7 @@ task :changelog do
249
249
  'Henry Addison',
250
250
  'Lincoln Stoll',
251
251
  'Luqman Amjad',
252
+ 'Michael Zeng',
252
253
  'nightshade427',
253
254
  'Patrick Debois',
254
255
  'Wesley Beary'