fog 1.7.0 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (219) hide show
  1. data/.gitignore +2 -2
  2. data/README.md +9 -10
  3. data/Rakefile +15 -299
  4. data/changelog.txt +153 -0
  5. data/docs/about/contributing.markdown +1 -0
  6. data/docs/dns/index.markdown +1 -1
  7. data/docs/index.markdown +8 -3
  8. data/fog.gemspec +3 -3
  9. data/lib/fog.rb +0 -5
  10. data/lib/fog/aws/auto_scaling.rb +1 -1
  11. data/lib/fog/aws/cloud_watch.rb +1 -1
  12. data/lib/fog/aws/compute.rb +2 -1
  13. data/lib/fog/aws/dynamodb.rb +30 -64
  14. data/lib/fog/aws/elb.rb +1 -1
  15. data/lib/fog/aws/glacier.rb +1 -1
  16. data/lib/fog/aws/iam.rb +1 -0
  17. data/lib/fog/aws/models/auto_scaling/group.rb +1 -1
  18. data/lib/fog/aws/models/compute/server.rb +2 -0
  19. data/lib/fog/aws/models/compute/volume.rb +0 -1
  20. data/lib/fog/aws/models/iam/user.rb +1 -1
  21. data/lib/fog/aws/parsers/compute/describe_instances.rb +3 -1
  22. data/lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb +1 -1
  23. data/lib/fog/aws/parsers/storage/delete_multiple_objects.rb +50 -0
  24. data/lib/fog/aws/rds.rb +2 -2
  25. data/lib/fog/aws/requests/compute/describe_availability_zones.rb +3 -0
  26. data/lib/fog/aws/requests/compute/describe_reserved_instances_offerings.rb +11 -8
  27. data/lib/fog/aws/requests/compute/modify_volume_attribute.rb +51 -0
  28. data/lib/fog/aws/requests/dns/change_resource_record_sets.rb +1 -0
  29. data/lib/fog/aws/requests/storage/delete_multiple_objects.rb +172 -0
  30. data/lib/fog/aws/signaturev4.rb +1 -1
  31. data/lib/fog/aws/sqs.rb +1 -1
  32. data/lib/fog/aws/storage.rb +2 -0
  33. data/lib/fog/bluebox/requests/compute/create_block.rb +1 -3
  34. data/lib/fog/brightbox/compute.rb +239 -84
  35. data/lib/fog/brightbox/models/compute/account.rb +9 -3
  36. data/lib/fog/brightbox/models/compute/server.rb +2 -1
  37. data/lib/fog/brightbox/models/compute/servers.rb +33 -1
  38. data/lib/fog/brightbox/oauth2.rb +164 -0
  39. data/lib/fog/brightbox/requests/compute/activate_console_server.rb +9 -2
  40. data/lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb +11 -2
  41. data/lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb +11 -2
  42. data/lib/fog/brightbox/requests/compute/add_servers_server_group.rb +9 -11
  43. data/lib/fog/brightbox/requests/compute/apply_to_firewall_policy.rb +11 -2
  44. data/lib/fog/brightbox/requests/compute/create_api_client.rb +11 -2
  45. data/lib/fog/brightbox/requests/compute/create_application.rb +11 -2
  46. data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +11 -1
  47. data/lib/fog/brightbox/requests/compute/create_firewall_policy.rb +13 -2
  48. data/lib/fog/brightbox/requests/compute/create_firewall_rule.rb +17 -2
  49. data/lib/fog/brightbox/requests/compute/create_image.rb +18 -2
  50. data/lib/fog/brightbox/requests/compute/create_load_balancer.rb +14 -2
  51. data/lib/fog/brightbox/requests/compute/create_server.rb +17 -2
  52. data/lib/fog/brightbox/requests/compute/create_server_group.rb +11 -2
  53. data/lib/fog/brightbox/requests/compute/destroy_api_client.rb +9 -2
  54. data/lib/fog/brightbox/requests/compute/destroy_application.rb +9 -2
  55. data/lib/fog/brightbox/requests/compute/destroy_cloud_ip.rb +9 -2
  56. data/lib/fog/brightbox/requests/compute/destroy_firewall_policy.rb +9 -2
  57. data/lib/fog/brightbox/requests/compute/destroy_firewall_rule.rb +9 -2
  58. data/lib/fog/brightbox/requests/compute/destroy_image.rb +9 -2
  59. data/lib/fog/brightbox/requests/compute/destroy_load_balancer.rb +9 -2
  60. data/lib/fog/brightbox/requests/compute/destroy_server.rb +9 -2
  61. data/lib/fog/brightbox/requests/compute/destroy_server_group.rb +9 -2
  62. data/lib/fog/brightbox/requests/compute/get_account.rb +7 -15
  63. data/lib/fog/brightbox/requests/compute/get_api_client.rb +9 -2
  64. data/lib/fog/brightbox/requests/compute/get_application.rb +9 -2
  65. data/lib/fog/brightbox/requests/compute/get_authenticated_user.rb +1 -3
  66. data/lib/fog/brightbox/requests/compute/get_cloud_ip.rb +9 -2
  67. data/lib/fog/brightbox/requests/compute/get_firewall_policy.rb +9 -2
  68. data/lib/fog/brightbox/requests/compute/get_firewall_rule.rb +9 -2
  69. data/lib/fog/brightbox/requests/compute/get_image.rb +9 -2
  70. data/lib/fog/brightbox/requests/compute/get_interface.rb +9 -2
  71. data/lib/fog/brightbox/requests/compute/get_load_balancer.rb +9 -2
  72. data/lib/fog/brightbox/requests/compute/get_scoped_account.rb +1 -5
  73. data/lib/fog/brightbox/requests/compute/get_server.rb +9 -2
  74. data/lib/fog/brightbox/requests/compute/get_server_group.rb +9 -2
  75. data/lib/fog/brightbox/requests/compute/get_server_type.rb +9 -2
  76. data/lib/fog/brightbox/requests/compute/get_user.rb +7 -15
  77. data/lib/fog/brightbox/requests/compute/get_zone.rb +9 -2
  78. data/lib/fog/brightbox/requests/compute/list_accounts.rb +6 -2
  79. data/lib/fog/brightbox/requests/compute/list_api_clients.rb +8 -2
  80. data/lib/fog/brightbox/requests/compute/list_applications.rb +8 -2
  81. data/lib/fog/brightbox/requests/compute/list_cloud_ips.rb +8 -2
  82. data/lib/fog/brightbox/requests/compute/list_firewall_policies.rb +8 -2
  83. data/lib/fog/brightbox/requests/compute/list_images.rb +8 -2
  84. data/lib/fog/brightbox/requests/compute/list_load_balancers.rb +8 -2
  85. data/lib/fog/brightbox/requests/compute/list_server_groups.rb +8 -2
  86. data/lib/fog/brightbox/requests/compute/list_server_types.rb +8 -2
  87. data/lib/fog/brightbox/requests/compute/list_servers.rb +8 -2
  88. data/lib/fog/brightbox/requests/compute/list_users.rb +8 -2
  89. data/lib/fog/brightbox/requests/compute/list_zones.rb +8 -2
  90. data/lib/fog/brightbox/requests/compute/map_cloud_ip.rb +11 -2
  91. data/lib/fog/brightbox/requests/compute/move_servers_server_group.rb +10 -12
  92. data/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +11 -2
  93. data/lib/fog/brightbox/requests/compute/remove_listeners_load_balancer.rb +11 -2
  94. data/lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb +11 -2
  95. data/lib/fog/brightbox/requests/compute/remove_servers_server_group.rb +9 -10
  96. data/lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb +22 -3
  97. data/lib/fog/brightbox/requests/compute/reset_ftp_password_scoped_account.rb +18 -0
  98. data/lib/fog/brightbox/requests/compute/reset_secret_api_client.rb +13 -1
  99. data/lib/fog/brightbox/requests/compute/reset_secret_application.rb +9 -2
  100. data/lib/fog/brightbox/requests/compute/shutdown_server.rb +9 -2
  101. data/lib/fog/brightbox/requests/compute/snapshot_server.rb +9 -2
  102. data/lib/fog/brightbox/requests/compute/start_server.rb +9 -2
  103. data/lib/fog/brightbox/requests/compute/stop_server.rb +9 -2
  104. data/lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb +9 -2
  105. data/lib/fog/brightbox/requests/compute/update_account.rb +32 -34
  106. data/lib/fog/brightbox/requests/compute/update_api_client.rb +12 -2
  107. data/lib/fog/brightbox/requests/compute/update_application.rb +12 -2
  108. data/lib/fog/brightbox/requests/compute/update_cloud_ip.rb +13 -2
  109. data/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +16 -1
  110. data/lib/fog/brightbox/requests/compute/update_image.rb +17 -2
  111. data/lib/fog/brightbox/requests/compute/update_load_balancer.rb +15 -2
  112. data/lib/fog/brightbox/requests/compute/update_scoped_account.rb +12 -19
  113. data/lib/fog/brightbox/requests/compute/update_server.rb +12 -2
  114. data/lib/fog/brightbox/requests/compute/update_server_group.rb +12 -2
  115. data/lib/fog/brightbox/requests/compute/update_user.rb +15 -2
  116. data/lib/fog/cloudstack/models/compute/server.rb +3 -1
  117. data/lib/fog/core.rb +1 -0
  118. data/lib/fog/core/connection.rb +1 -0
  119. data/lib/fog/google/storage.rb +13 -2
  120. data/lib/fog/libvirt/models/compute/server.rb +1 -0
  121. data/lib/fog/libvirt/requests/compute/list_domains.rb +2 -2
  122. data/lib/fog/openstack.rb +57 -58
  123. data/lib/fog/openstack/compute.rb +15 -14
  124. data/lib/fog/openstack/identity.rb +10 -2
  125. data/lib/fog/openstack/image.rb +1 -1
  126. data/lib/fog/openstack/models/compute/flavor.rb +5 -1
  127. data/lib/fog/openstack/models/compute/security_group.rb +1 -1
  128. data/lib/fog/openstack/models/compute/server.rb +5 -0
  129. data/lib/fog/openstack/models/identity/users.rb +1 -2
  130. data/lib/fog/openstack/requests/compute/create_flavor.rb +4 -1
  131. data/lib/fog/openstack/requests/compute/create_security_group.rb +1 -1
  132. data/lib/fog/openstack/requests/compute/get_limits.rb +93 -0
  133. data/lib/fog/openstack/requests/compute/list_tenants.rb +1 -0
  134. data/lib/fog/openstack/requests/compute/release_address.rb +13 -1
  135. data/lib/fog/openstack/requests/compute/reset_server_state.rb +24 -0
  136. data/lib/fog/openstack/requests/identity/create_role.rb +1 -1
  137. data/lib/fog/openstack/requests/identity/set_tenant.rb +21 -0
  138. data/lib/fog/openstack/volume.rb +2 -1
  139. data/lib/fog/rackspace/models/compute_v2/server.rb +27 -0
  140. data/lib/fog/rackspace/models/compute_v2/servers.rb +8 -0
  141. data/lib/fog/rackspace/models/dns/record.rb +14 -1
  142. data/lib/fog/rackspace/models/storage/file.rb +68 -2
  143. data/lib/fog/rackspace/requests/compute_v2/create_server.rb +3 -0
  144. data/lib/fog/version.rb +5 -0
  145. data/lib/fog/vsphere/compute.rb +74 -8
  146. data/lib/fog/vsphere/models/compute/cluster.rb +31 -0
  147. data/lib/fog/vsphere/models/compute/clusters.rb +26 -0
  148. data/lib/fog/vsphere/models/compute/datacenter.rb +35 -0
  149. data/lib/fog/vsphere/models/compute/datacenters.rb +23 -0
  150. data/lib/fog/vsphere/models/compute/datastore.rb +24 -0
  151. data/lib/fog/vsphere/models/compute/datastores.rb +25 -0
  152. data/lib/fog/vsphere/models/compute/folder.rb +28 -0
  153. data/lib/fog/vsphere/models/compute/folders.rb +27 -0
  154. data/lib/fog/vsphere/models/compute/interface.rb +39 -0
  155. data/lib/fog/vsphere/models/compute/interfaces.rb +33 -0
  156. data/lib/fog/vsphere/models/compute/network.rb +21 -0
  157. data/lib/fog/vsphere/models/compute/networks.rb +25 -0
  158. data/lib/fog/vsphere/models/compute/resource_pool.rb +23 -0
  159. data/lib/fog/vsphere/models/compute/resource_pools.rb +26 -0
  160. data/lib/fog/vsphere/models/compute/server.rb +78 -12
  161. data/lib/fog/vsphere/models/compute/servers.rb +16 -20
  162. data/lib/fog/vsphere/models/compute/template.rb +13 -0
  163. data/lib/fog/vsphere/models/compute/templates.rb +23 -0
  164. data/lib/fog/vsphere/models/compute/volume.rb +45 -0
  165. data/lib/fog/vsphere/models/compute/volumes.rb +33 -0
  166. data/lib/fog/vsphere/requests/compute/create_vm.rb +114 -0
  167. data/lib/fog/vsphere/requests/compute/get_cluster.rb +25 -0
  168. data/lib/fog/vsphere/requests/compute/get_datacenter.rb +29 -0
  169. data/lib/fog/vsphere/requests/compute/get_datastore.rb +25 -0
  170. data/lib/fog/vsphere/requests/compute/get_folder.rb +73 -0
  171. data/lib/fog/vsphere/requests/compute/get_network.rb +25 -0
  172. data/lib/fog/vsphere/requests/compute/get_resource_pool.rb +26 -0
  173. data/lib/fog/vsphere/requests/compute/get_virtual_machine.rb +62 -0
  174. data/lib/fog/vsphere/requests/compute/list_clusters.rb +37 -0
  175. data/lib/fog/vsphere/requests/compute/list_datacenters.rb +34 -0
  176. data/lib/fog/vsphere/requests/compute/list_datastores.rb +40 -0
  177. data/lib/fog/vsphere/requests/compute/list_folders.rb +45 -0
  178. data/lib/fog/vsphere/requests/compute/list_networks.rb +38 -0
  179. data/lib/fog/vsphere/requests/compute/list_resource_pools.rb +39 -0
  180. data/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +132 -166
  181. data/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb +52 -0
  182. data/lib/fog/vsphere/requests/compute/list_vm_volumes.rb +51 -0
  183. data/lib/fog/vsphere/requests/compute/vm_clone.rb +6 -8
  184. data/lib/fog/vsphere/requests/compute/vm_destroy.rb +1 -8
  185. data/lib/fog/vsphere/requests/compute/vm_reconfig_hardware.rb +1 -2
  186. data/lib/tasks/changelog_task.rb +98 -0
  187. data/lib/tasks/documentation_task.rb +155 -0
  188. data/lib/tasks/test_task.rb +46 -0
  189. data/tests/aws/models/iam/users_tests.rb +16 -2
  190. data/tests/aws/requests/auto_scaling/notification_configuration_tests.rb +1 -0
  191. data/tests/aws/requests/auto_scaling/tag_tests.rb +1 -0
  192. data/tests/aws/requests/compute/instance_tests.rb +2 -0
  193. data/tests/aws/requests/compute/volume_tests.rb +8 -0
  194. data/tests/aws/requests/storage/object_tests.rb +18 -1
  195. data/tests/aws/requests/storage/versioning_tests.rb +70 -0
  196. data/tests/brightbox/compute_tests.rb +96 -4
  197. data/tests/brightbox/models/compute/account_tests.rb +15 -0
  198. data/tests/brightbox/oauth2_tests.rb +103 -0
  199. data/tests/brightbox/requests/compute/account_tests.rb +9 -2
  200. data/tests/brightbox/requests/compute/interface_tests.rb +18 -4
  201. data/tests/dns/models/record_tests.rb +17 -3
  202. data/tests/openstack/requests/compute/address_tests.rb +22 -19
  203. data/tests/openstack/requests/compute/flavor_tests.rb +4 -2
  204. data/tests/openstack/requests/compute/limit_tests.rb +60 -0
  205. data/tests/openstack/requests/compute/quota_tests.rb +16 -3
  206. data/tests/openstack/requests/compute/security_group_tests.rb +1 -1
  207. data/tests/rackspace/models/compute_v2/servers_tests.rb +6 -0
  208. data/tests/rackspace/models/storage/file_tests.rb +172 -0
  209. data/tests/rackspace/requests/dns/helper.rb +12 -26
  210. data/tests/vsphere/compute_tests.rb +3 -3
  211. data/tests/vsphere/models/compute/server_tests.rb +1 -2
  212. data/tests/vsphere/requests/compute/list_virtual_machines_tests.rb +5 -13
  213. data/tests/vsphere/requests/compute/vm_clone_tests.rb +2 -2
  214. metadata +59 -11
  215. data/lib/fog/vsphere/requests/compute/datacenters.rb +0 -34
  216. data/lib/fog/vsphere/requests/compute/find_vm_by_ref.rb +0 -41
  217. data/lib/fog/vsphere/requests/compute/vm_create.rb +0 -97
  218. data/tests/vsphere/requests/compute/find_vm_by_ref_tests.rb +0 -26
  219. data/tests/vsphere/requests/compute/vm_create_tests.rb +0 -20
data/.gitignore CHANGED
@@ -6,17 +6,17 @@
6
6
  .bundle
7
7
  .DS_Store
8
8
  .idea
9
+ .yardoc
9
10
  /tests/.fog
10
11
  bin/*
11
12
  !bin/fog
12
- !bin/rdoc
13
13
  .fog
14
14
  coverage
15
15
  doc/*
16
16
  docs/_site/*
17
17
  docs/about/supported_services.markdown
18
18
  Gemfile.lock
19
- rdoc
19
+ yardoc
20
20
  pkg
21
21
  spec/credentials.yml
22
22
  vendor/*
data/README.md CHANGED
@@ -1,12 +1,13 @@
1
1
  ![fog](http://geemus.s3.amazonaws.com/fog.png)
2
2
 
3
- fog is the Ruby cloud computing library, top to bottom:
3
+ fog is the Ruby cloud services library, top to bottom:
4
4
 
5
5
  * Collections provide a simplified interface, making clouds easier to work with and switch between.
6
6
  * Requests allow power users to get the most out of the features of each individual cloud.
7
7
  * Mocks make testing and integrating a breeze.
8
8
 
9
9
  [![Build Status](https://secure.travis-ci.org/fog/fog.png?branch=master)](http://travis-ci.org/fog/fog)
10
+ [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/fog/fog)
10
11
 
11
12
  ## Getting Started
12
13
 
@@ -112,23 +113,21 @@ geemus says: "That should give you everything you need to get started, but let m
112
113
 
113
114
  ## Contributing
114
115
 
115
- * Find something you would like to work on. For suggestions look for the `easy`, `medium` and `hard` tags in the [issues](https://github.com/fog/fog/issues)
116
+ * Find something you would like to work on.
117
+ * Look for anything you can help with in the [issue tracker](https://github.com/fog/fog/issues).
118
+ * Look at the [code quality metrics](https://codeclimate.com/github/fog/fog) for anything you can help clean up.
119
+ * Or anything else!
116
120
  * Fork the project and do your work in a topic branch.
117
- * Add a config at `~/.fog` for the component you want to test.
121
+ * Make sure your changes will work on both Ruby 1.8.7 and Ruby 1.9
122
+ * Add a config at `tests/.fog` for the component you want to test.
118
123
  * Add shindo tests to prove your code works and run all the tests using `bundle exec rake`.
119
- * Rebase your branch against fog/fog to make sure everything is up to date.
124
+ * Rebase your branch against `fog/fog` to make sure everything is up to date.
120
125
  * Commit your changes and send a pull request.
121
126
 
122
127
  ## Additional Resources
123
128
 
124
129
  [fog.io](http://fog.io)
125
130
 
126
- ## Sponsorship
127
-
128
- ![Engine Yard](http://www.engineyard.com/images/logo.png)
129
-
130
- All new work on fog is sponsored by [Engine Yard](http://engineyard.com)
131
-
132
131
  ## Copyright
133
132
 
134
133
  (The MIT License)
data/Rakefile CHANGED
@@ -1,8 +1,8 @@
1
1
  require 'bundler/setup'
2
2
  require 'date'
3
3
  require 'rubygems'
4
- require 'rdoc/task'
5
4
  require 'rubygems/package_task'
5
+ require 'yard'
6
6
  require File.dirname(__FILE__) + '/lib/fog'
7
7
 
8
8
  #############################################################################
@@ -16,8 +16,7 @@ def name
16
16
  end
17
17
 
18
18
  def version
19
- line = File.read("lib/#{name}.rb")[/^\s*VERSION\s*=\s*.*/]
20
- line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
19
+ Fog::VERSION
21
20
  end
22
21
 
23
22
  def date
@@ -49,6 +48,9 @@ end
49
48
  GEM_NAME = "#{name}"
50
49
  task :default => :test
51
50
 
51
+ require "tasks/test_task"
52
+ Fog::Rake::TestTask.new
53
+
52
54
  namespace :test do
53
55
  task :dynect do
54
56
  [false].each do |mock|
@@ -58,39 +60,6 @@ namespace :test do
58
60
  end
59
61
  end
60
62
 
61
- task :test do
62
- Rake::Task[:mock_tests].invoke
63
- end
64
-
65
- def tests(mocked)
66
- Formatador.display_line
67
- start = Time.now.to_i
68
- threads = []
69
- Thread.main[:results] = []
70
- Fog.providers.each do |key, value|
71
- threads << Thread.new do
72
- Thread.main[:results] << {
73
- :provider => value,
74
- :success => sh("export FOG_MOCK=#{mocked} && bundle exec shindont +#{key}")
75
- }
76
- end
77
- end
78
- threads.each do |thread|
79
- thread.join
80
- end
81
- Formatador.display_table(Thread.main[:results].sort {|x,y| x[:provider] <=> y[:provider]})
82
- Formatador.display_line("[bold]FOG_MOCK=#{mocked}[/] tests completed in [bold]#{Time.now.to_i - start}[/] seconds")
83
- Formatador.display_line
84
- end
85
-
86
- task :mock_tests do
87
- tests(true)
88
- end
89
-
90
- task :real_tests do
91
- tests(false)
92
- end
93
-
94
63
  task :nuke do
95
64
  Fog.providers.each do |provider|
96
65
  next if ['Vmfusion'].include?(provider)
@@ -116,14 +85,6 @@ task :nuke do
116
85
  end
117
86
  end
118
87
 
119
- require 'rdoc/task'
120
- RDoc::Task.new do |rdoc|
121
- rdoc.rdoc_dir = 'rdoc'
122
- rdoc.title = "#{name} #{version}"
123
- rdoc.rdoc_files.include('README*')
124
- rdoc.rdoc_files.include('lib/**/*.rb')
125
- end
126
-
127
88
  desc "Open an irb session preloaded with this library"
128
89
  task :console do
129
90
  sh "irb -rubygems -r ./lib/#{name}.rb"
@@ -171,7 +132,7 @@ task :gemspec => :validate do
171
132
  end
172
133
 
173
134
  task :validate do
174
- libfiles = Dir['lib/*'] - ["lib/#{name}.rb", "lib/#{name}"]
135
+ libfiles = Dir['lib/*'] - ["lib/#{name}.rb", "lib/#{name}", "lib/tasks"]
175
136
  unless libfiles.empty?
176
137
  puts "Directory `lib` should only contain a `#{name}.rb` file and `#{name}` dir."
177
138
  exit!
@@ -182,261 +143,16 @@ task :validate do
182
143
  end
183
144
  end
184
145
 
185
- task :changelog do
186
- timestamp = Time.now.utc.strftime('%m/%d/%Y')
187
- sha = `git log | head -1`.split(' ').last
188
- changelog = ["#{version} #{timestamp} #{sha}"]
189
- changelog << ('=' * changelog[0].length)
190
- changelog << ''
191
-
192
- require 'multi_json'
193
- github_repo_data = Fog::JSON.decode(Excon.get('https://api.github.com/repos/fog/fog').body)
194
- data = github_repo_data.reject {|key, value| !['forks', 'open_issues', 'watchers'].include?(key)}
195
- github_collaborator_data = Fog::JSON.decode(Excon.get('https://api.github.com/repos/fog/fog/collaborators').body)
196
- data['collaborators'] = github_collaborator_data.length
197
- rubygems_data = Fog::JSON.decode(Excon.get('https://rubygems.org/api/v1/gems/fog.json').body)
198
- data['downloads'] = rubygems_data['downloads']
199
- stats = []
200
- for key in data.keys.sort
201
- stats << "'#{key}' => #{data[key]}"
202
- end
203
- changelog << "Stats! { #{stats.join(', ')} }"
204
- changelog << ''
205
-
206
- last_sha = `cat changelog.txt | head -1`.split(' ').last
207
- shortlog = `git shortlog #{last_sha}..HEAD`
208
- changes = {}
209
- committers = {}
210
- for line in shortlog.split("\n")
211
- if line =~ /^\S/
212
- committer = line.split(' (', 2).first
213
- committers[committer] = 0
214
- elsif line =~ /^\s*((Merge.*)|(Release.*))?$/
215
- # skip empty lines, Merge and Release commits
216
- else
217
- unless line[-1..-1] == '.'
218
- line << '.'
219
- end
220
- line.lstrip!
221
- line.gsub!(/^\[([^\]]*)\] /, '')
222
- tag = $1 || 'misc'
223
- changes[tag] ||= []
224
- changes[tag] << (line << ' thanks ' << committer)
225
- committers[committer] += 1
226
- end
227
- end
228
-
229
- for committer, commits in committers.to_a.sort {|x,y| y[1] <=> x[1]}
230
- if [
231
- 'Aaron Suggs',
232
- 'Brian Hartsock',
233
- 'Christopher Oliver',
234
- 'Decklin Foster',
235
- 'Dylan Egan',
236
- 'geemus',
237
- 'Henry Addison',
238
- 'Kevin Menard',
239
- 'Lincoln Stoll',
240
- 'Luqman Amjad',
241
- 'Michael Zeng',
242
- 'Nick Osborn',
243
- 'nightshade427',
244
- 'Patrick Debois',
245
- 'Stepan G. Fedorov',
246
- 'Wesley Beary'
247
- ].include?(committer)
248
- next
249
- end
250
- changelog << "MVP! #{committer}"
251
- changelog << ''
252
- break
253
- end
254
-
255
- for tag in changes.keys.sort
256
- changelog << ('[' << tag << ']')
257
- for commit in changes[tag]
258
- changelog << (' ' << commit)
259
- end
260
- changelog << ''
261
- end
262
-
263
- old_changelog = File.read('changelog.txt')
264
- File.open('changelog.txt', 'w') do |file|
265
- file.write(changelog.join("\n"))
266
- file.write("\n\n")
267
- file.write(old_changelog)
268
- end
146
+ # Include Yard tasks for rake yard
147
+ YARDOC_LOCATION = "doc"
148
+ YARD::Rake::YardocTask.new do |t|
149
+ t.files = ['lib/**/*.rb', "README"]
150
+ t.options = ["--output-dir", YARDOC_LOCATION, "--title", "#{name} #{version}"]
269
151
  end
270
152
 
271
- task :docs do
272
- Rake::Task[:supported_services_docs].invoke
273
- Rake::Task[:upload_fog_io].invoke
274
- Rake::Task[:upload_rdoc].invoke
275
-
276
- # connect to storage provider
277
- Fog.credential = :geemus
278
- storage = Fog::Storage.new(:provider => 'AWS')
279
- directory = storage.directories.new(:key => 'fog.io')
280
- # write base index with redirect to new version
281
- directory.files.create(
282
- :body => redirecter('latest'),
283
- :content_type => 'text/html',
284
- :key => 'index.html',
285
- :public => true
286
- )
153
+ require "tasks/changelog_task"
154
+ Fog::Rake::ChangelogTask.new
287
155
 
288
- Formatador.display_line
289
- end
156
+ require "tasks/documentation_task"
157
+ Fog::Rake::DocumentationTask.new
290
158
 
291
- task :supported_services_docs do
292
- support, shared = {}, []
293
- for key, values in Fog.services
294
- unless values.length == 1
295
- shared |= [key]
296
- values.each do |value|
297
- support[value] ||= {}
298
- support[value][key] = '+'
299
- end
300
- else
301
- value = values.first
302
- support[value] ||= {}
303
- support[value][:other] ||= []
304
- support[value][:other] << key
305
- end
306
- end
307
- shared.sort! {|x,y| x.to_s <=> y.to_s}
308
- columns = [:provider] + shared + [:other]
309
- data = []
310
- for key in support.keys.sort {|x,y| x.to_s <=> y.to_s}
311
- data << { :provider => key }.merge!(support[key])
312
- end
313
-
314
- table = ''
315
- table << "<table border='1'>\n"
316
-
317
- table << " <tr>"
318
- for column in columns
319
- table << "<th>#{column}</th>"
320
- end
321
- table << "</tr>\n"
322
-
323
- for datum in data
324
- table << " <tr>"
325
- for column in columns
326
- if value = datum[column]
327
- case value
328
- when Array
329
- table << "<td>#{value.join(', ')}</td>"
330
- when '+'
331
- table << "<td style='text-align: center;'>#{value}</td>"
332
- else
333
- table << "<th>#{value}</th>"
334
- end
335
- else
336
- table << "<td></td>"
337
- end
338
- end
339
- table << "</tr>\n"
340
- end
341
-
342
- table << "</table>\n"
343
-
344
- File.open('docs/about/supported_services.markdown', 'w') do |file|
345
- file.puts <<-METADATA
346
- ---
347
- layout: default
348
- title: Supported Services
349
- ---
350
-
351
- METADATA
352
- file.puts(table)
353
- end
354
- end
355
-
356
- task :upload_fog_io do
357
- # connect to storage provider
358
- Fog.credential = :geemus
359
- storage = Fog::Storage.new(:provider => 'AWS')
360
- directory = storage.directories.new(:key => 'fog.io')
361
-
362
- # build the docs locally
363
- sh "jekyll docs docs/_site"
364
-
365
- # write web page files to versioned 'folder'
366
- for file_path in Dir.glob('docs/_site/**/*')
367
- next if File.directory?(file_path)
368
- file_name = file_path.gsub('docs/_site/', '')
369
- key = '' << version << '/' << file_name
370
- Formatador.redisplay(' ' * 128)
371
- Formatador.redisplay("Uploading [bold]#{key}[/]")
372
- if File.extname(file_name) == '.html'
373
- # rewrite links with version
374
- body = File.read(file_path)
375
- body.gsub!(/vX.Y.Z/, 'v' << version)
376
- body.gsub!(/='\//, %{='/} << version << '/')
377
- body.gsub!(/="\//, %{="/} << version << '/')
378
- content_type = 'text/html'
379
- directory.files.create(
380
- :body => redirecter(key),
381
- :content_type => 'text/html',
382
- :key => 'latest/' << file_name,
383
- :public => true
384
- )
385
- else
386
- body = File.open(file_path)
387
- content_type = nil # leave it up to mime-types
388
- end
389
- directory.files.create(
390
- :body => body,
391
- :content_type => content_type,
392
- :key => key,
393
- :public => true
394
- )
395
- end
396
- Formatador.redisplay(' ' * 128)
397
- Formatador.redisplay("Uploaded docs/_site\n")
398
- end
399
-
400
- task :upload_rdoc do
401
- # connect to storage provider
402
- Fog.credential = :geemus
403
- storage = Fog::Storage.new(:provider => 'AWS')
404
- directory = storage.directories.new(:key => 'fog.io')
405
-
406
- # write rdoc files to versioned 'folder'
407
- Rake::Task[:rdoc].invoke
408
- for file_path in Dir.glob('rdoc/**/*')
409
- next if File.directory?(file_path)
410
- file_name = file_path.gsub('rdoc/', '')
411
- key = '' << version << '/rdoc/' << file_name
412
- Formatador.redisplay(' ' * 128)
413
- Formatador.redisplay("Uploading [bold]#{key}[/]")
414
- directory.files.create(
415
- :body => File.open(file_path),
416
- :key => key,
417
- :public => true
418
- )
419
- end
420
- Formatador.redisplay(' ' * 128)
421
- directory.files.create(
422
- :body => redirecter("#{version}/rdoc/index.html"),
423
- :content_type => 'text/html',
424
- :key => 'latest/rdoc/index.html',
425
- :public => true
426
- )
427
- Formatador.redisplay("Uploaded rdoc\n")
428
- end
429
-
430
- def redirecter(path)
431
- redirecter = <<-HTML
432
- <!doctype html>
433
- <head>
434
- <title>fog</title>
435
- <meta http-equiv="REFRESH" content="0;url=http://fog.io/#{path}">
436
- </head>
437
- <body>
438
- <a href="http://fog.io/#{path}">redirecting to lastest (#{path})</a>
439
- </body>
440
- </html>
441
- HTML
442
- end
@@ -1,3 +1,156 @@
1
+ 1.8.0 12/01/2012 057c0c525a39e77cb2037c9fec3d851b209c151b
2
+ =========================================================
3
+
4
+ Stats! { 'collaborators' => 41, 'downloads' => 1334733, 'forks' => 630, 'open_issues' => 98, 'watchers' => 2258 }
5
+
6
+ [AWS]
7
+ Adds ModifyVolumeAttribute. thanks Eric Stonfer
8
+
9
+ [Brightbox]
10
+ Removes incorrect yard tag. thanks Paul Thornthwaite
11
+ Updates request docs to use Yard. thanks Paul Thornthwaite
12
+ Adds baseline documentation. thanks Paul Thornthwaite
13
+ Documents #request method. thanks Paul Thornthwaite
14
+ Comments out rogue text. thanks Paul Thornthwaite
15
+ Fixes generated files EOF with newlines. thanks Paul Thornthwaite
16
+ Adds Servers#bootstrap. thanks Paul Thornthwaite
17
+ Adds way to check auth method. thanks Paul Thornthwaite
18
+ Adds reset FTP for scoped accounts. thanks Paul Thornthwaite
19
+ Fixes Compute#account to pass service. thanks Paul Thornthwaite
20
+ Fixes Account#reset_ftp_password. thanks Paul Thornthwaite
21
+ Fixes test to run out of sequence. thanks Paul Thornthwaite
22
+ Expands documentation for Compute class. thanks Paul Thornthwaite
23
+ Tests recognised options. thanks Paul Thornthwaite
24
+ Refactors credential code in Compute. thanks Paul Thornthwaite
25
+ Extracts authentication connection. thanks Paul Thornthwaite
26
+ Refactors how tokens are requested. thanks Paul Thornthwaite
27
+ Moves tokens to CredentialSet. thanks Paul Thornthwaite
28
+ Extracts parts of request out of compute. thanks Paul Thornthwaite
29
+ Adds support for refresh tokens. thanks Paul Thornthwaite
30
+ Adds option to disable token management. thanks Paul Thornthwaite
31
+ Adds means to update scoped account. thanks Paul Thornthwaite
32
+ Moves more of public API into Shared. thanks Paul Thornthwaite
33
+ Guards unimplemented mock tests. thanks Paul Thornthwaite
34
+
35
+ [Docs]
36
+ Switches to using Yard for documentation. thanks Paul Thornthwaite
37
+
38
+ [aws]
39
+ fixed auto scaling model group 'destroy' method where it needs to use merge! instead of merge to set the opts local variable in place, otherwise the options passed to the method are droppedon the floor. thanks Jay Perry
40
+
41
+ [aws|compute]
42
+ add offeringType to output from describe_reserved_instances_offerings. thanks geemus
43
+ fix mocks/tests around describe_reserved_instances_offerings. thanks geemus
44
+ fix one more offeringType mock format test failure. thanks geemus
45
+
46
+ [aws|dynamodb]
47
+ port off of sts for credentials, now uses signature v4. thanks geemus
48
+
49
+ [aws|storage]
50
+ Add Fog::Storage::AWS#delete_multiple_objects. thanks Garret Alfert
51
+ Add mock for Fog::Storage::AWS#delete_multiple_objects. thanks Garret Alfert
52
+ Little improvements to delete_multiple_objects tests. thanks Garret Alfert
53
+ Add Fog::Storage::AWS#delete_multiple_objects. thanks Garret Alfert
54
+ Add mock for Fog::Storage::AWS#delete_multiple_objects. thanks Garret Alfert
55
+ Little improvements to delete_multiple_objects tests. thanks Garret Alfert
56
+
57
+ [core]
58
+ Adds fog User-Agent header. thanks Paul Thornthwaite
59
+ Splits Fog::VERSION into own file. thanks Paul Thornthwaite
60
+ Adds fog User-Agent header. thanks Paul Thornthwaite
61
+ Updates Rakefile to use Fog::VERSION. thanks Paul Thornthwaite
62
+
63
+ [dns]
64
+ Add more record tests. thanks Brian Hartsock
65
+
66
+ [docs]
67
+ Updates link on fog.io to point to doc. thanks Paul Thornthwaite
68
+ Updates contributing notes. thanks Paul Thornthwaite
69
+ Replaces link to API to `rubydoc.info`. thanks Paul Thornthwaite
70
+ Adds 1.8.7 note to fog.io collaborators guide. thanks Paul Thornthwaite
71
+
72
+ [misc]
73
+ Add support for AWS Australia (ap-southeast-2). thanks Amy Woodward
74
+ Add Hosted Zone ID for ap-southeast-2. thanks Amy Woodward
75
+ Do not add empty security group. thanks Dan Bode
76
+ Add attr group. thanks Dan Bode
77
+ Sync with latest OpenStack flavors extensions. thanks Dan Prince
78
+ OpenStack floating_ip (aka address) test fixes. thanks Dan Prince
79
+ OpenStack: Remove volumes from limits tests. thanks Dan Prince
80
+ OpenStack: updates to quota tests. thanks Dan Prince
81
+ OpenStack: security group test fixes. thanks Dan Prince
82
+ add support for Storage::Rackspace::File#access_control_allow_origin and #origin. thanks Dusty Jones
83
+ add support for Storage::Rackspace::File#access_control_allow_origin and #origin. thanks Dusty Jones
84
+ Save the file instance before testing for presence of attribute. thanks Dusty Jones
85
+ Fix describe_instances stateReason handling. thanks Edward Muller
86
+ added support for Storage::Rackspace::File#metadata. thanks Evan Smith
87
+ added support for Storage::Rackspace::File#metadata. thanks Evan Smith
88
+ merged with origin. thanks Evan Smith
89
+ Rackspace Cloud Files. can load metadata from existing file. can set metadata for new file. can unset metadata for existing file. thanks Evan Smith
90
+ merged with upstream master. thanks Evan Smith
91
+ Implemented bootstrap method for Rackspace Compute v2. Added ability to set "metadata" and "personality" fields when creating a server on Rackspace Compute v2. Improved response parsing when dealing with Rackspace DNS service. thanks Jesse Scott
92
+ Removed the commented out password setting line for Rackspace Compute v2 bootstrap method. thanks Jesse Scott
93
+ Clarified the logic for finding the newly created DNS record for Rackspace Cloud DNS. thanks Jesse Scott
94
+ fix warning message to follow correct bucket naming guidelines. thanks Michael Elfassy
95
+ Bucket names cannot begin with the "goog" prefix. Also change for DNS compliant subdomain. thanks Michael Elfassy
96
+ VMWare vsphere provider refactor. thanks Ohad Levy
97
+ do not force trailing / on path. thanks Ohad Levy
98
+ Removes dead link to DNS tests. thanks Paul Thornthwaite
99
+ Adds link to Code Climate metrics. thanks Paul Thornthwaite
100
+ Extracts Changelog Rake task to class. thanks Paul Thornthwaite
101
+ Moves fog.io generation a prerequsite. thanks Paul Thornthwaite
102
+ Extracts docs rake tasks to a class. thanks Paul Thornthwaite
103
+ Extracts testing Rake tasks to class. thanks Paul Thornthwaite
104
+ Moves new Task classes to better location. thanks Paul Thornthwaite
105
+ Revert "[core] Adds fog User-Agent header". thanks Paul Thornthwaite
106
+ Inconsistent usage of cpus / vpcus in libvirt / requests. Reported number of cpus was always 1 for libvirt domains. thanks Romain Vrignaud
107
+ use CGI.escape when encoding the POST body. thanks Sam Cooper
108
+ Added versioned delete_multiple_objects support. thanks Timur Alperovich
109
+ Add support for volume_pool_name. thanks Vincent Demeester
110
+ fixes issue#1313 ~ Creating user via `Aws.iam.users` ignores `:path`. thanks VirtualStaticVoid
111
+ revised create logic to default path to '/'. thanks VirtualStaticVoid
112
+ added test for create logic to default path to '/'. thanks VirtualStaticVoid
113
+ added support for mock. thanks VirtualStaticVoid
114
+ revised test order. thanks VirtualStaticVoid
115
+ README: s/'cloud computing'/'cloud services'. thanks Wesley Beary
116
+ Adding explicit support for metadata for Rackspace compute_v2. thanks heyryanw
117
+ removed Fog::AWS[:rds] this was creating issues with was security credentials. thanks mauro catenacci
118
+ Adding public_ip_address and private_ip_address to Fog::Compute::RackspaceV2::Server. thanks sashap
119
+ Adding bootstrap and setup for RackspaceV2 servers. thanks sashap
120
+
121
+ [openstack]
122
+ Add Accept header with application/json media type to requests. thanks Andrew Donald Kennedy
123
+ Refactor Openstack Authentication. thanks Nelvin Driz
124
+ Fix Typo in Merge of Authentication Refactoring. thanks Nelvin Driz
125
+ Make use of the unscoped token for reauthentication. thanks Philip Mark M. Deazeta
126
+
127
+ [openstack|compute]
128
+ Add "Reset Server State" request. thanks Nelvin Driz
129
+ Add `get_limits` request. thanks Nelvin Driz
130
+
131
+ [openstack|identity]
132
+ use tenant_id parameter in users model. thanks Philip Mark M. Deazeta
133
+ Add `attr_accessor :unscoped_token` to Mock. thanks Philip Mark M. Deazeta
134
+
135
+ [opnestack|identity]
136
+ Added set_tenant request for identity service. thanks Philip Mark M. Deazeta
137
+
138
+ [rackspace|computev2]
139
+ aded test for bootstrap. thanks Brian Hartsock
140
+
141
+ [rackspace|dns]
142
+ fixed tests, merged some formatting to reduce duplication. thanks Brian Hartsock
143
+
144
+ [rackspace|storage]
145
+ rackspace files tests should be pending in mocked mode. thanks geemus
146
+
147
+ [readme]
148
+ update outdated sponsorship section. thanks geemus
149
+
150
+ [vsphere]
151
+ ensure reload works correctly for server. thanks Ohad Levy
152
+
153
+
1
154
  1.7.0 11/04/2012 aa853488c9d84d849f52cf348787030fbb963163
2
155
  =========================================================
3
156