fog-maestrodev 1.18.0.20131125111730 → 1.18.0.20131126122111

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/.travis.yml +6 -0
  2. data/fog.gemspec +2 -2
  3. data/lib/fog/aws/models/compute/address.rb +6 -5
  4. data/lib/fog/aws/parsers/compute/describe_addresses.rb +1 -1
  5. data/lib/fog/brightbox/requests/compute/update_server.rb +1 -1
  6. data/lib/fog/core/scp.rb +1 -1
  7. data/lib/fog/digitalocean/models/compute/server.rb +4 -0
  8. data/lib/fog/digitalocean/requests/compute/create_server.rb +2 -0
  9. data/lib/fog/dnsimple/dns.rb +1 -1
  10. data/lib/fog/google/compute.rb +15 -0
  11. data/lib/fog/google/models/compute/servers.rb +2 -1
  12. data/lib/fog/google/requests/compute/insert_server.rb +2 -2
  13. data/lib/fog/rackspace/models/compute_v2/key_pairs.rb +1 -1
  14. data/lib/fog/rackspace/models/queues/claim.rb +36 -0
  15. data/lib/fog/rackspace/models/queues/claims.rb +25 -0
  16. data/lib/fog/rackspace/models/queues/message.rb +39 -0
  17. data/lib/fog/rackspace/models/queues/messages.rb +37 -0
  18. data/lib/fog/rackspace/models/queues/queue.rb +65 -2
  19. data/lib/fog/rackspace/models/queues/queues.rb +15 -0
  20. data/lib/fog/rackspace/models/storage/file.rb +1 -1
  21. data/lib/fog/rackspace/requests/compute_v2/delete_keypair.rb +1 -1
  22. data/lib/fog/rackspace/requests/compute_v2/get_keypair.rb +1 -1
  23. data/lib/fog/rackspace/requests/queues/create_claim.rb +15 -0
  24. data/lib/fog/rackspace/requests/queues/create_message.rb +15 -0
  25. data/lib/fog/rackspace/requests/queues/create_queue.rb +11 -0
  26. data/lib/fog/rackspace/requests/queues/delete_claim.rb +12 -0
  27. data/lib/fog/rackspace/requests/queues/delete_message.rb +14 -0
  28. data/lib/fog/rackspace/requests/queues/delete_queue.rb +10 -0
  29. data/lib/fog/rackspace/requests/queues/get_claim.rb +11 -0
  30. data/lib/fog/rackspace/requests/queues/get_message.rb +12 -0
  31. data/lib/fog/rackspace/requests/queues/get_queue.rb +10 -0
  32. data/lib/fog/rackspace/requests/queues/get_queue_stats.rb +10 -0
  33. data/lib/fog/rackspace/requests/queues/list_messages.rb +26 -0
  34. data/lib/fog/rackspace/requests/queues/list_queues.rb +17 -2
  35. data/lib/fog/rackspace/requests/queues/update_claim.rb +7 -0
  36. data/tests/aws/models/storage/file_tests.rb +4 -0
  37. data/tests/brightbox/compute/schema.rb +0 -13
  38. data/tests/digitalocean/models/compute/server_tests.rb +4 -3
  39. data/tests/helpers/collection_helper.rb +10 -2
  40. metadata +45 -45
data/.travis.yml CHANGED
@@ -11,6 +11,7 @@ rvm:
11
11
  - 2.0.0
12
12
  - jruby-18mode
13
13
  - jruby-19mode
14
+ - jruby-head
14
15
 
15
16
  script: bundle exec rake travis
16
17
 
@@ -28,6 +29,11 @@ matrix:
28
29
  gemfile: Gemfile
29
30
  - rvm: jruby-19mode
30
31
  gemfile: Gemfile.1.8.7
32
+ - rvm: jruby-head
33
+ gemfile: Gemfile.1.8.7
34
+
35
+ allow_failures:
36
+ - rvm: jruby-head
31
37
 
32
38
  notifications:
33
39
  email: false
data/fog.gemspec CHANGED
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
6
6
  ## If your rubyforge_project name is different, then edit it and comment out
7
7
  ## the sub! line in the Rakefile
8
8
  s.name = 'fog-maestrodev'
9
- s.version = '1.18.0.20131125111730'
10
- s.date = '2013-11-25'
9
+ s.version = '1.18.0.20131126122111'
10
+ s.date = '2013-11-26'
11
11
  s.rubyforge_project = 'fog'
12
12
 
13
13
  ## Make sure your summary is short. The description may be as long
@@ -6,12 +6,13 @@ module Fog
6
6
 
7
7
  class Address < Fog::Model
8
8
 
9
- identity :public_ip, :aliases => 'publicIp'
9
+ identity :public_ip, :aliases => 'publicIp'
10
10
 
11
- attribute :allocation_id, :aliases => 'allocationId'
12
- attribute :association_id, :aliases => 'associationId'
13
- attribute :server_id, :aliases => 'instanceId'
14
- attribute :network_interface_id, :aliases => 'networkInterfaceId'
11
+ attribute :allocation_id, :aliases => 'allocationId'
12
+ attribute :association_id, :aliases => 'associationId'
13
+ attribute :server_id, :aliases => 'instanceId'
14
+ attribute :network_interface_id, :aliases => 'networkInterfaceId'
15
+ attribute :network_interface_owner_id, :aliases => 'networkInterfaceOwnerId'
15
16
  attribute :domain
16
17
 
17
18
  def initialize(attributes = {})
@@ -12,7 +12,7 @@ module Fog
12
12
 
13
13
  def end_element(name)
14
14
  case name
15
- when 'instanceId', 'publicIp', 'domain', 'allocationId', 'associationId'
15
+ when 'instanceId', 'publicIp', 'domain', 'allocationId', 'associationId', 'networkInterfaceId', 'networkInterfaceOwnerId'
16
16
  @address[name] = value
17
17
  when 'item'
18
18
  @response['addressesSet'] << @address
@@ -9,7 +9,7 @@ module Fog
9
9
  # @option options [String] :name Editable label
10
10
  # @option options [String] :user_data User defined metadata
11
11
  # @option options [Boolean] :compatibility_mode Server needs to be shutdown and restarted for changes to this to take effect
12
- # @opiton options [Array] :server_groups Array of Server Groups that this server should be part of
12
+ # @option options [Array] :server_groups Array of Server Groups that this server should be part of
13
13
  #
14
14
  # @return [Hash] if successful Hash version of JSON object
15
15
  # @return [NilClass] if no options were passed
data/lib/fog/core/scp.rb CHANGED
@@ -78,7 +78,7 @@ module Fog
78
78
  end
79
79
  end
80
80
 
81
- def download(remote_path, local_path, download_options = {})
81
+ def download(remote_path, local_path, download_options = {}, &block)
82
82
  begin
83
83
  Net::SCP.start(@address, @username, @options) do |scp|
84
84
  scp.download!(remote_path, local_path, download_options) do |ch, name, sent, total|
@@ -17,6 +17,7 @@ module Fog
17
17
  # Not documented in their API, but
18
18
  # available nevertheless
19
19
  attribute :public_ip_address, :aliases => 'ip_address'
20
+ attribute :private_ip_address
20
21
  attribute :backups_active
21
22
 
22
23
  attr_writer :ssh_keys
@@ -124,6 +125,9 @@ module Fog
124
125
  elsif @ssh_keys
125
126
  options[:ssh_key_ids] = @ssh_keys.map(&:id)
126
127
  end
128
+
129
+ options[:private_networking] = !!attributes[:private_networking]
130
+
127
131
  data = service.create_server name,
128
132
  flavor_id,
129
133
  image_id,
@@ -24,6 +24,8 @@ module Fog
24
24
  query_hash[:ssh_key_ids] = options[:ssh_key_ids]
25
25
  end
26
26
 
27
+ query_hash[:private_networking] = !!options[:private_networking]
28
+
27
29
  request(
28
30
  :expects => [200],
29
31
  :method => 'GET',
@@ -85,7 +85,7 @@ module Fog
85
85
  "Accept" => "application/json",
86
86
  "Content-Type" => "application/json" })
87
87
 
88
- response = @connection.request(params.merge!({:host => @host}))
88
+ response = @connection.request(params)
89
89
 
90
90
  unless response.body.empty?
91
91
  response.body = Fog::JSON.decode(response.body)
@@ -215,6 +215,21 @@ module Fog
215
215
  "source" => ""
216
216
  },
217
217
  "status" => "READY"
218
+ },
219
+ "debian-7-wheezy-v20131014" => {
220
+ "kind" => "compute#image",
221
+ "selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
222
+ "id" => "4213305957435180899",
223
+ "creationTimestamp" => "2013-09-04T13:24:30.479-07:00",
224
+ "name" => "debian-7-wheezy-v20131014",
225
+ "description" => "Debian GNU/Linux 7.1 (wheezy) built on 2013-10-14",
226
+ "sourceType" => "RAW",
227
+ "preferredKernel" => "https://www.googleapis.com/compute/#{api_version}/projects/google/global/kernels/gce-v20130813",
228
+ "rawDisk" => {
229
+ "containerType" => "TAR",
230
+ "source" => ""
231
+ },
232
+ "status" => "READY"
218
233
  }
219
234
  }
220
235
  }
@@ -47,13 +47,14 @@ module Fog
47
47
  def bootstrap(new_attributes = {})
48
48
  defaults = {
49
49
  :name => "fog-#{Time.now.to_i}",
50
- :image_name => "debian-7-wheezy-v20130816",
50
+ :image_name => "debian-7-wheezy-v20131014",
51
51
  :machine_type => "n1-standard-1",
52
52
  :zone_name => "us-central1-b",
53
53
  :private_key_path => File.expand_path("~/.ssh/id_rsa"),
54
54
  :public_key_path => File.expand_path("~/.ssh/id_rsa.pub"),
55
55
  :username => ENV['USER'],
56
56
  }
57
+
57
58
  if new_attributes[:disks]
58
59
  new_attributes[:disks].each do |disk|
59
60
  defaults.delete :image_name if disk['boot']
@@ -16,7 +16,7 @@ module Fog
16
16
  "type"=>"PERSISTENT",
17
17
  "mode"=>"READ_WRITE",
18
18
  "source"=>"https://www.googleapis.com/compute/#{api_version}/projects/#{@project}/zones/#{zone_name}/disks/#{disk.name}",
19
- "deviceName"=>disk.name,
19
+ "deviceName"=>"persistent-disk-#{i}",
20
20
  "boot"=>true
21
21
  }
22
22
  i+=1
@@ -46,7 +46,7 @@ module Fog
46
46
  "name" => server_name,
47
47
  "tags" => { "fingerprint" => "42WmSpB8rSM=" },
48
48
  "machineType" => "https://www.googleapis.com/compute/#{api_version}/projects/#{@project}/zones/#{zone_name}/machineTypes/#{options['machineType']}",
49
- "image" => "https://www.googleapis.com/compute/#{api_version}/projects/centos-cloud/global/images/#{options['image']}",
49
+ "image" => "https://www.googleapis.com/compute/#{api_version}/projects/#{image_project}/global/images/#{options['image']}",
50
50
  "kernel" => "https://www.googleapis.com/compute/#{api_version}/projects/google/global/kernels/gce-v20130813",
51
51
  "canIpForward" => false,
52
52
  "networkInterfaces" => [
@@ -24,7 +24,7 @@ module Fog
24
24
  end
25
25
 
26
26
  # Fetch keypair details
27
- # @param [String] key_name: name of the key to request
27
+ # @param [String] key_name name of the key to request
28
28
  # @return [Fog::Compute::RackspaceV2::Keypair] the requested keypair or 'nil' when not found
29
29
  # @raise [Fog::Compute::RackspaceV2::BadRequest]
30
30
  # @raise [Fog::Compute::RackspaceV2::InternalServerError]
@@ -5,15 +5,42 @@ module Fog
5
5
  class Queues
6
6
  class Claim < Fog::Model
7
7
 
8
+ # @!attribute [r] identity
9
+ # @return [String] The claim's id
8
10
  identity :identity
9
11
 
12
+ # @!attribute [rw] grace
13
+ # @return [Integer] The grace attribute specifies the message grace period in seconds. The value of grace value must be between 60 and 43200 seconds (12 hours).
14
+ # You must include a value for this attribute in your request. To deal with workers that have stopped responding (for up to 1209600 seconds or 14 days, including
15
+ # claim lifetime), the server extends the lifetime of claimed messages to be at least as long as the lifetime of the claim itself, plus the specified grace period.
16
+ # If a claimed message would normally live longer than the grace period, its expiration is not adjusted.
10
17
  attribute :grace
18
+
19
+ # @!attribute [rw] ttl
20
+ # @return [Integer] The ttl attribute specifies how long the server waits before releasing the claim. The ttl value must be between 60 and 43200 seconds (12 hours).
11
21
  attribute :ttl
22
+
23
+ # @!attribute [rw] limit
24
+ # @return [Integer] Specifies the number of messages to return, up to 20 messages. If limit is not specified, limit defaults to 10.
12
25
  attribute :limit
26
+
27
+ # @!attribute [r] limit
28
+ # @return [Array<Fog::Rackspace::Queues::Messages>, Array<Strings>] Specifies the number of messages to return, up to 20 messages.
29
+ # If limit is not specified, limit defaults to 10.
13
30
  attribute :messages
14
31
 
15
32
  alias :id :identity
16
33
 
34
+ # Creates or updates a claim
35
+ #
36
+ # @return [Boolean] returns true if claim is being created
37
+ #
38
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
39
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
40
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
41
+ # @raise [Fog::Rackspace::Queues::ServiceError]
42
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/POST_claimMessages__version__queues__queue_name__claims_claims-operations-dle001.html
43
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/PATCH_updateClaim__version__queues__queue_name__claims__claimId__claims-operations-dle001.html
17
44
  def save
18
45
  if identity.nil?
19
46
  create
@@ -22,6 +49,15 @@ module Fog
22
49
  end
23
50
  end
24
51
 
52
+ # Destroys Claim
53
+ #
54
+ # @return [Boolean] returns true if claim is deleted
55
+ #
56
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
57
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
58
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
59
+ # @raise [Fog::Rackspace::Queues::ServiceError]
60
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/DELETE_deleteClaim__version__queues__queue_name__claims__claimId__claims-operations-dle001.html
25
61
  def destroy
26
62
  requires :identity, :queue
27
63
  service.delete_claim(queue.name, identity)
@@ -8,12 +8,29 @@ module Fog
8
8
 
9
9
  model Fog::Rackspace::Queues::Claim
10
10
 
11
+ # @!attribute [rw] queue
12
+ # @return [String] The queue associated with the claim collection
11
13
  attr_accessor :queue
12
14
 
15
+ # Returns list of claims
16
+ # @note The Rackspace Cloud does not currently provide a way to retrieve claims as such this list is maintained by fog. Claims are added to the claim collection
17
+ # as they are created.
18
+ # @return [Fog::Rackspace::Queues::Claims] Retrieves a collection of claims.
19
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
20
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
21
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
22
+ # @raise [Fog::Rackspace::Queues::ServiceError]
13
23
  def all
14
24
  self
15
25
  end
16
26
 
27
+ # This operation claims a set of messages (up to the value of the limit parameter) from oldest to newest and skips any messages that are already claimed.
28
+ # @return [Fog::Rackspace::Queues::Claim] Returns a claim
29
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
30
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
31
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
32
+ # @raise [Fog::Rackspace::Queues::ServiceError]
33
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/POST_claimMessages__version__queues__queue_name__claims_claims-operations-dle001.html
17
34
  def create(attributes = {})
18
35
  object = new(attributes)
19
36
  if object.save
@@ -23,6 +40,14 @@ module Fog
23
40
  end
24
41
  end
25
42
 
43
+ # This operation queries the specified claim for the specified queue. Claims with malformed IDs or claims that are not found by ID are ignored.
44
+ #
45
+ # @param [Integer] claim_id Specifies the claim ID.
46
+ # @return [Fog::Rackspace::Queues::Claim] Returns a claim
47
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
48
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
49
+ # @raise [Fog::Rackspace::Queues::ServiceError]
50
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_queryClaim__version__queues__queue_name__claims__claimId__claims-operations-dle001.html
26
51
  def get(claim_id)
27
52
  requires :queue
28
53
  data = service.get_claim(queue.identity, claim_id).body
@@ -5,12 +5,31 @@ module Fog
5
5
  class Queues
6
6
  class Message < Fog::Model
7
7
 
8
+ # @!attribute [r] age
9
+ # @return [Integer] The number of seconds relative to the server's clock.
8
10
  attribute :age
11
+
12
+ # @!attribute [rw] ttl
13
+ # @return [Integer] specifies how long the server waits before marking the message as expired and removing it from the queue.
14
+ # @note The value of ttl must be between 60 and 1209600 seconds (14 days). Note that the server might not actually delete the message until its
15
+ # age has reached up to (ttl + 60) seconds, to allow for flexibility in storage implementations.
9
16
  attribute :ttl
17
+
18
+ # @!attribute [rw] body
19
+ # @return [String, Hash, Array] specifies an arbitrary document that constitutes the body of the message being sent. The size of this body is limited to 256 KB, excluding whitespace. The document must be valid JSON.
10
20
  attribute :body
21
+
22
+ # @!attribute [r] href
23
+ # @return [String] location of the message
11
24
  attribute :href
25
+
26
+ # @!attribute [r] claim_id
27
+ # @return [String] the id of the claim
12
28
  attribute :claim_id
13
29
 
30
+
31
+ # @!attribute [r] identity
32
+ # @return [String] The messages identity
14
33
  def identity
15
34
  return nil unless href
16
35
 
@@ -19,6 +38,17 @@ module Fog
19
38
  end
20
39
  alias :id :identity
21
40
 
41
+ # Creates messages
42
+ # Requires queue, client_id, body, and ttl attributes to be populated
43
+ # @note messages cannot be updated
44
+ #
45
+ # @return [Boolean] returns true if message has been succesfully saved
46
+ #
47
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
48
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
49
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
50
+ # @raise [Fog::Rackspace::Queues::ServiceError]
51
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/POST_postMessage__version__queues__queue_name__messages_message-operations-dle001.html
22
52
  def save
23
53
  requires :queue, :client_id, :body, :ttl
24
54
  raise "Message has already been created and may not be updated." unless identity.nil?
@@ -27,6 +57,15 @@ module Fog
27
57
  true
28
58
  end
29
59
 
60
+ # Destroys Message
61
+ #
62
+ # @return [Boolean] returns true if message is deleted
63
+ #
64
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
65
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
66
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
67
+ # @raise [Fog::Rackspace::Queues::ServiceError]
68
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/DELETE_deleteMessage__version__queues__queue_name__messages__messageId__message-operations-dle001.html
30
69
  def destroy
31
70
  requires :identity, :queue
32
71
  options = {}
@@ -8,13 +8,43 @@ module Fog
8
8
 
9
9
  model Fog::Rackspace::Queues::Message
10
10
 
11
+ # @!attribute [r] client_id
12
+ # @return [String] UUID for the client instance.
11
13
  attr_accessor :client_id
14
+
15
+ # @!attribute [r] queue
16
+ # @return [String] The name of the queue associated with the message.
12
17
  attr_accessor :queue
18
+
19
+ # @!attribute [rw] echo
20
+ # @return [Boolean] Determines whether the API returns a client's own messages. The echo parameter is a Boolean value (true or false) that determines whether the API
21
+ # returns a client's own messages, as determined by the uuid portion of the User-Agent header. If you do not specify a value, echo uses the default value of false.
22
+ # If you are experimenting with the API, you might want to set echo=true in order to see the messages that you posted.
13
23
  attr_accessor :echo
24
+
25
+ # @!attribute [rw] limit
26
+ # @return [String] When more messages are available than can be returned in a single request, the client can pick up the next batch of messages by simply using the URI
27
+ # template parameters returned from the previous call in the "next" field. Specifies up to 10 messages (the default value) to return. If you do not specify a value
28
+ # for the limit parameter, the default value of 10 is used.
14
29
  attr_accessor :limit
30
+
31
+ # @!attribute [rw] marker
32
+ # @return [String] Specifies an opaque string that the client can use to request the next batch of messages. The marker parameter communicates to the server which
33
+ # messages the client has already received. If you do not specify a value, the API returns all messages at the head of the queue (up to the limit).
15
34
  attr_accessor :marker
35
+
36
+ # @!attribute [rw] include_claimed
37
+ # @return [String] Determines whether the API returns claimed messages and unclaimed messages. The include_claimed parameter is a Boolean value (true or false)
38
+ # that determines whether the API returns claimed messages and unclaimed messages. If you do not specify a value, include_claimed uses the default value of false
39
+ # (only unclaimed messages are returned).
16
40
  attr_accessor :include_claimed
17
41
 
42
+ # Returns list of messages
43
+ #
44
+ # @return [Fog::Rackspace::Queues::Messages] Retrieves a collection of messages.
45
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
46
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
47
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
18
48
  def all
19
49
  requires :client_id, :queue
20
50
  response = service.list_messages(client_id, queue.name, options)
@@ -26,6 +56,13 @@ module Fog
26
56
  load(data)
27
57
  end
28
58
 
59
+ # Returns the specified message from the queue.
60
+ #
61
+ # @param [Integer] message_id id of the message to be retrieved
62
+ # @return [Fog::Rackspace::Queues::Claim] Returns a claim
63
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
64
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
65
+ # @raise [Fog::Rackspace::Queues::ServiceError]
29
66
  def get(message_id)
30
67
  requires :client_id, :queue
31
68
  data = service.get_message(client_id, queue.name, message_id).body
@@ -5,8 +5,17 @@ module Fog
5
5
  class Queues
6
6
  class Queue < Fog::Model
7
7
 
8
+ # @!attribute [rw] name
9
+ # @return [String] name of queue
8
10
  identity :name
9
11
 
12
+ # Returns list of messages in the queue
13
+ #
14
+ # @return [Fog::Rackspace::Queues::Messages] Retrieves a collection of messages.
15
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
16
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
17
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
18
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_getMessages__version__queues__queue_name__messages_message-operations-dle001.html
10
19
  def messages
11
20
  @messages ||= begin
12
21
  Fog::Rackspace::Queues::Messages.new({
@@ -18,10 +27,25 @@ module Fog
18
27
  end
19
28
  end
20
29
 
30
+ # Returns queue statistics, including how many messages are in the queue, categorized by status.
31
+ #
32
+ # @return [Hash] Retrieves a collection of messages.
33
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
34
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
35
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
36
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_getQueueStats__version__queues__queue_name__stats_queue-operations-dle001.html
21
37
  def stats
22
38
  service.get_queue_stats(name).body['messages']
23
39
  end
24
40
 
41
+ # Returns list of claims
42
+ # @note The Rackspace Cloud does not currently provide a way to retrieve claims as such this list is maintained by fog. Claims are added to the claim collection
43
+ # as they are created.
44
+ # @return [Fog::Rackspace::Queues::Claims] Retrieves a collection of claims.
45
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
46
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
47
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
48
+ # @raise [Fog::Rackspace::Queues::ServiceError]
25
49
  def claims
26
50
  @claims ||= begin
27
51
  Fog::Rackspace::Queues::Claims.new({
@@ -31,12 +55,32 @@ module Fog
31
55
  end
32
56
  end
33
57
 
34
- #Helper method to enqueue a single message
58
+ # Helper method to enqueue a single message
59
+ #
60
+ # @param [String, Hash, Array] body The body attribute specifies an arbitrary document that constitutes the body of the message being sent. The size of this body is limited to 256 KB, excluding whitespace. The document must be valid JSON.
61
+ # @param [Integer] ttl The ttl attribute specifies how long the server waits before releasing the claim. The ttl value must be between 60 and 43200 seconds (12 hours).
62
+ # @param [Hash] options
63
+ # @return [Boolean] returns true if message has been succesfully enqueued
64
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
65
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
66
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
67
+ # @raise [Fog::Rackspace::Queues::ServiceError]
68
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/POST_postMessage__version__queues__queue_name__messages_message-operations-dle001.html
35
69
  def enqueue(body, ttl, options = {})
36
70
  messages.create(options.merge({:body => body, :ttl => ttl}))
37
71
  end
38
72
 
39
- #Helper method to claim (dequeue) a single message, including destroying it
73
+ # Helper method to claim (dequeue) a single message, yield the message, and then destroy it
74
+ #
75
+ # @param [Integer] ttl The ttl attribute specifies how long the server waits before releasing the claim. The ttl value must be between 60 and 43200 seconds (12 hours).
76
+ # @param [Integer] grace The grace attribute specifies the message grace period in seconds. The value of grace value must be between 60 and 43200 seconds (12 hours).
77
+ # @param [Hash] options
78
+ # @yieldparam message claimed [Fog::Rackspace::Queues::Message]
79
+ # @return [Boolean] Returns true if claim was successfully made
80
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
81
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
82
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
83
+ # @raise [Fog::Rackspace::Queues::ServiceError]
40
84
  def dequeue(ttl, grace, options = {}, &block)
41
85
  claim = claims.create(
42
86
  options.merge(
@@ -56,12 +100,31 @@ module Fog
56
100
  end
57
101
  end
58
102
 
103
+ # Creates queue
104
+ # Requires name attribute to be populated
105
+ #
106
+ # @return [Boolean] returns true if queue has been succesfully saved
107
+ #
108
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
109
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
110
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
111
+ # @raise [Fog::Rackspace::Queues::ServiceError]
112
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/POST_postMessage__version__queues__queue_name__messages_message-operations-dle001.html
59
113
  def save
60
114
  requires :name
61
115
  data = service.create_queue(name)
62
116
  true
63
117
  end
64
118
 
119
+ # Destroys queue
120
+ #
121
+ # @return [Boolean] returns true if queue is deleted
122
+ #
123
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
124
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
125
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
126
+ # @raise [Fog::Rackspace::Queues::ServiceError]
127
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/DELETE_deleteQueue__version__queues__queue_name__queue-operations-dle001.html
65
128
  def destroy
66
129
  requires :name
67
130
  service.delete_queue(name)
@@ -8,6 +8,13 @@ module Fog
8
8
 
9
9
  model Fog::Rackspace::Queues::Queue
10
10
 
11
+ # Returns list of queues
12
+ #
13
+ # @return [Fog::Rackspace::Queues::Queues] Retrieves a collection of queues.
14
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
15
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
16
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
17
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_listQueues__version__queues_.html
11
18
  def all
12
19
  response = service.list_queues
13
20
  if service.list_queues.status == 204
@@ -18,6 +25,14 @@ module Fog
18
25
  load(data)
19
26
  end
20
27
 
28
+ # This operation queries the specified queue.
29
+ #
30
+ # @param [String] queue_name Specifies the queue name
31
+ # @return [Fog::Rackspace::Queues::Queue] Returns a queue
32
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
33
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
34
+ # @raise [Fog::Rackspace::Queues::ServiceError]
35
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_checkQueueExists__version__queues__queue_name__queue-operations-dle001.html
21
36
  def get(queue_name)
22
37
  #204 no content is returned on success. That's why no data is passed
23
38
  # from the GET to the constructor.
@@ -139,7 +139,7 @@ module Fog
139
139
  end
140
140
 
141
141
  # Set last modified
142
- # @param [String, Fog::Time] timestamp
142
+ # @param [String, Fog::Time] obj
143
143
  def last_modified=(obj)
144
144
  if obj.nil? || obj == "" || obj.is_a?(Time)
145
145
  attributes[:last_modified] = obj
@@ -4,7 +4,7 @@ module Fog
4
4
  class Real
5
5
 
6
6
  # Delete the key specified with key_name
7
- # @param [String] key_name: name of the key to delete
7
+ # @param [String] key_name name of the key to delete
8
8
  # @return [Excon::Response] response
9
9
  # @raise [Fog::Compute::RackspaceV2::NotFound]
10
10
  # @raise [Fog::Compute::RackspaceV2::BadRequest]
@@ -4,7 +4,7 @@ module Fog
4
4
  class Real
5
5
 
6
6
  # Retreive single keypair details
7
- # @param [String] key_name: name of the key for which to request the details
7
+ # @param [String] key_name name of the key for which to request the details
8
8
  # @return [Excon::Response] response :
9
9
  # * body [Hash]: -
10
10
  # * 'keypair' [Hash]: -
@@ -2,6 +2,21 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation claims a set of messages (up to the value of the limit parameter) from oldest to newest and skips any messages that are already claimed.
7
+ # If no unclaimed messages are available, the API returns a 204 No Content message.
8
+ #
9
+ # @param [String] queue_name Specifies the name of the queue.
10
+ # @param [Integer] ttl The ttl attribute specifies how long the server waits before releasing the claim. The ttl value must be between 60 and 43200 seconds (12 hours).
11
+ # @param [Integer] grace The grace attribute specifies the message grace period in seconds. The value of grace value must be between 60 and 43200 seconds (12 hours).
12
+ # @param [Hash] options
13
+ # @option options [Integer] :limit - Specifies the number of messages to return, up to 20 messages. If limit is not specified, limit defaults to 10.
14
+ # @return [Excon::Response] response
15
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
16
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
17
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
18
+ # @raise [Fog::Rackspace::Queues::ServiceError]
19
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/POST_claimMessages__version__queues__queue_name__claims_claims-operations-dle001.html
5
20
  def create_claim(queue_name, ttl, grace, options = {})
6
21
  body = {
7
22
  :ttl => ttl,
@@ -2,6 +2,21 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation posts the specified message or messages.
7
+ # @note You can submit up to 10 messages in a single request.
8
+ #
9
+ # @param [String] client_id UUID for the client instance.
10
+ # @param [String] queue_name Specifies the name of the queue.
11
+ # @param [String, Hash, Array] body The body attribute specifies an arbitrary document that constitutes the body of the message being sent.
12
+ # The size of this body is limited to 256 KB, excluding whitespace. The document must be valid JSON.
13
+ # @param [Integer] ttl The ttl attribute specifies how long the server waits before releasing the claim. The ttl value must be between 60 and 43200 seconds (12 hours).
14
+ # @return [Excon::Response] response
15
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
16
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
17
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
18
+ # @raise [Fog::Rackspace::Queues::ServiceError]
19
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/POST_postMessage__version__queues__queue_name__messages_message-operations-dle001.html
5
20
  def create_message(client_id, queue_name, body, ttl)
6
21
  data = [{
7
22
  :ttl => ttl,
@@ -2,6 +2,17 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation creates a new queue.
7
+ # The body of the request is empty.
8
+ #
9
+ # @param [String] queue_name Specifies the name of the queue.
10
+ # @return [Excon::Response] response
11
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
12
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
13
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
14
+ # @raise [Fog::Rackspace::Queues::ServiceError]
15
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/PUT_createQueue__version__queues__queue_name__queue-operations-dle001.html
5
16
  def create_queue(queue_name)
6
17
  request(
7
18
  :body => Fog::JSON.encode({}),
@@ -2,6 +2,18 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation immediately releases a claim, making any remaining, undeleted) messages that are associated with the claim available to other workers.
7
+ # Claims with malformed IDs or claims that are not found by ID are ignored.
8
+ #
9
+ # @param [String] queue_name Specifies the name of the queue.
10
+ # @param [String] claim_id Specifies the claim ID.
11
+ # @return [Excon::Response] response
12
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
13
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
14
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
15
+ # @raise [Fog::Rackspace::Queues::ServiceError]
16
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/DELETE_deleteClaim__version__queues__queue_name__claims__claimId__claims-operations-dle001.html
5
17
  def delete_claim(queue_name, claim_id)
6
18
  request(
7
19
  :expects => 204,
@@ -2,6 +2,20 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation immediately deletes the specified message.
7
+ # @note If you do not specify claim_id, but the message is claimed, the operation fails. You can only delete claimed messages by providing an appropriate claim_id.
8
+ #
9
+ # @param [String] queue_name Specifies the name of the queue.
10
+ # @param [String] message_id Specifies the message ID.
11
+ # @param [Hash] options
12
+ # @option options [Integer] :claim_id - Identifies the claim.
13
+ # @return [Excon::Response] response
14
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
15
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
16
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
17
+ # @raise [Fog::Rackspace::Queues::ServiceError]
18
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/DELETE_deleteMessage__version__queues__queue_name__messages__messageId__message-operations-dle001.html
5
19
  def delete_message(queue_name, message_id, options = {})
6
20
  query = {}
7
21
  query[:claim_id] = options[:claim_id] if options.has_key? :claim_id
@@ -2,6 +2,16 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation immediately deletes a queue and all of its existing messages.
7
+ #
8
+ # @param [String] queue_name Specifies the name of the queue.
9
+ # @return [Excon::Response] response
10
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
11
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
12
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
13
+ # @raise [Fog::Rackspace::Queues::ServiceError]
14
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/DELETE_deleteQueue__version__queues__queue_name__queue-operations-dle001.html
5
15
  def delete_queue(queue_name)
6
16
  request(
7
17
  :expects => 204,
@@ -2,6 +2,17 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation queries the specified claim for the specified queue. Claims with malformed IDs or claims that are not found by ID are ignored.
7
+ #
8
+ # @param [String] queue_name Specifies the name of the queue.
9
+ # @param [Integer] claim_id Specifies the claim ID.
10
+ # @return [Excon::Response] response
11
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
12
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
13
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
14
+ # @raise [Fog::Rackspace::Queues::ServiceError]
15
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_queryClaim__version__queues__queue_name__claims__claimId__claims-operations-dle001.html
5
16
  def get_claim(queue_name, claim_id)
6
17
  request(
7
18
  :expects => 200,
@@ -2,6 +2,18 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation gets the specified message from the specified queue.
7
+ #
8
+ # @param [String] client_id UUID for the client instance.
9
+ # @param [String] queue_name Specifies the name of the queue.
10
+ # @param [Integer] message_id Specifies the message ID.
11
+ # @return [Excon::Response] response
12
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
13
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
14
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
15
+ # @raise [Fog::Rackspace::Queues::ServiceError]
16
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_getSpecificMessage__version__queues__queue_name__messages__messageId__message-operations-dle001.html
5
17
  def get_message(client_id, queue_name, message_id)
6
18
  request(
7
19
  :expects => 200,
@@ -2,6 +2,16 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation verifies whether the specified queue exists.
7
+ #
8
+ # @param [String] queue_name Specifies the name of the queue.
9
+ # @return [Excon::Response] response
10
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
11
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
12
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
13
+ # @raise [Fog::Rackspace::Queues::ServiceError]
14
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_checkQueueExists__version__queues__queue_name__queue-operations-dle001.html
5
15
  def get_queue(queue_name)
6
16
  request(
7
17
  :expects => [200, 204],
@@ -2,6 +2,16 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation returns queue statistics, including how many messages are in the queue, categorized by status.
7
+ #
8
+ # @param [String] queue_name Specifies the name of the queue.
9
+ # @return [Excon::Response] response
10
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
11
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
12
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
13
+ # @raise [Fog::Rackspace::Queues::ServiceError]
14
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_getQueueStats__version__queues__queue_name__stats_queue-operations-dle001.html
5
15
  def get_queue_stats(queue_name)
6
16
  request(
7
17
  :expects => 200,
@@ -2,6 +2,32 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation gets the message or messages in the specified queue.
7
+ #
8
+ # A request to list messages when the queue is not found or when messages are not found returns 204, instead of 200, because there was no information to send back.
9
+ # Messages with malformed IDs or messages that are not found by ID are ignored.
10
+ #
11
+ # @param [String] client_id UUID for the client instance.
12
+ # @param [String] queue_name Specifies the name of the queue.
13
+ # @param [Hash] options
14
+ # @option options [String] :marker - Specifies an opaque string that the client can use to request the next batch of messages. The marker parameter communicates to the
15
+ # server which messages the client has already received. If you do not specify a value, the API returns all messages at the head of the queue (up to the limit).
16
+ # @option options [Integer] :limit - When more messages are available than can be returned in a single request, the client can pick up the next batch of messages
17
+ # by simply using the URI template parameters returned from the previous call in the "next" field. Specifies up to 10 messages (the default value) to return.
18
+ # If you do not specify a value for the limit parameter, the default value of 10 is used.
19
+ # @option options [String] :echo - Determines whether the API returns a client's own messages. The echo parameter is a Boolean value (true or false) that determines
20
+ # whether the API returns a client's own messages, as determined by the uuid portion of the User-Agent header. If you do not specify a value, echo uses the default
21
+ # value of false. If you are experimenting with the API, you might want to set echo=true in order to see the messages that you posted.
22
+ # @option options [String] :include_claimed - Determines whether the API returns claimed messages and unclaimed messages. The include_claimed parameter is a Boolean
23
+ # value (true or false) that determines whether the API returns claimed messages and unclaimed messages. If you do not specify a value, include_claimed uses the
24
+ # default value of false (only unclaimed messages are returned).
25
+ # @return [Excon::Response] response
26
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
27
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
28
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
29
+ # @raise [Fog::Rackspace::Queues::ServiceError]
30
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_getMessages__version__queues__queue_name__messages_message-operations-dle001.html
5
31
  def list_messages(client_id, queue_name, options = {})
6
32
  request(
7
33
  :expects => [200, 204],
@@ -2,11 +2,26 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
- def list_queues
5
+
6
+ # This operation lists queues for the project. The queues are sorted alphabetically by name.
7
+ # @note A request to list queues when you have no queues in your account returns 204, instead of 200, because there was no information to send back.
8
+ #
9
+ # @param [Hash] options
10
+ # @option options [String] :marker - Specifies the name of the last queue received in a previous request, or none to get the first page of results.
11
+ # @option options [Integer] :limit - Specifies the name of the last queue received in a previous request, or none to get the first page of results.
12
+ # @option options [Boolean] :detailed - Determines whether queue metadata is included in the response. The default value for this parameter is false, which excludes t
13
+ # @return [Excon::Response] response
14
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
15
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
16
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
17
+ # @raise [Fog::Rackspace::Queues::ServiceError]
18
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_listQueues__version__queues_.html
19
+ def list_queues(options={})
6
20
  request(
7
21
  :expects => [200, 204],
8
22
  :method => 'GET',
9
- :path => 'queues'
23
+ :path => 'queues',
24
+ :query => options
10
25
  )
11
26
  end
12
27
  end
@@ -2,6 +2,13 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation posts the specified message or messages.
7
+ # @note You can submit up to 10 messages in a single request.
8
+ #
9
+ # @param [String] queue_name Specifies the name of the queue.
10
+ # @param [Integer] ttl The ttl attribute specifies how long the server waits before releasing the claim. The ttl value must be between 60 and 43200 seconds (12 hours).
11
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/PATCH_updateClaim__version__queues__queue_name__claims__claimId__claims-operations-dle001.html
5
12
  def update_claim(queue_name, claim_id, ttl)
6
13
  body = {
7
14
  :ttl => ttl
@@ -44,6 +44,10 @@ Shindo.tests("Storage[:aws] | file", ["aws"]) do
44
44
  end
45
45
 
46
46
  tests('#versions are all for the correct key').returns(true) do
47
+ # JRuby 1.7.5+ issue causes a SystemStackError: stack level too deep
48
+ # https://github.com/jruby/jruby/issues/1265
49
+ pending if RUBY_PLATFORM == "java" and JRUBY_VERSION =~ /1\.7\.[5-8]/
50
+
47
51
  @instance.versions.all? { |v| v.key == @instance.key }
48
52
  end
49
53
  end
@@ -525,19 +525,6 @@ class Brightbox
525
525
  "firewall_policy" => Brightbox::Compute::Formats::Nested::FIREWALL_POLICY
526
526
  }
527
527
 
528
- #FIREWALL_RULE = {
529
- #"id" => String,
530
- #"resource_type" => String,
531
- #"url" => String,
532
- #"source" => String,
533
- #"source_port" => String,
534
- #"destination" => String,
535
- #"destination_port" => String,
536
- #"protocol" => String,
537
- #"icmp_type_name" => String,
538
- #"description" => Fog::Nullable::String
539
- #}
540
-
541
528
  IMAGE = {
542
529
  "name" => String,
543
530
  "created_at" => String,
@@ -6,8 +6,8 @@ Shindo.tests("Fog::Compute[:digitalocean] | server model", ['digitalocean', 'com
6
6
 
7
7
  tests('have the action') do
8
8
  test('reload') { server.respond_to? 'reload' }
9
- %w{
10
- shutdown
9
+ %w{
10
+ shutdown
11
11
  reboot
12
12
  power_cycle
13
13
  stop
@@ -19,12 +19,13 @@ Shindo.tests("Fog::Compute[:digitalocean] | server model", ['digitalocean', 'com
19
19
 
20
20
  tests('have attributes') do
21
21
  model_attribute_hash = server.attributes
22
- attributes = [
22
+ attributes = [
23
23
  :id,
24
24
  :name,
25
25
  :state,
26
26
  :backups_active,
27
27
  :public_ip_address,
28
+ :private_ip_address,
28
29
  :flavor_id,
29
30
  :region_id,
30
31
  :image_id,
@@ -36,11 +36,19 @@ def collection_tests(collection, params = {}, mocks_implemented = true)
36
36
  tests('Enumerable') do
37
37
  pending if Fog.mocking? && !mocks_implemented
38
38
 
39
- [
39
+ methods = [
40
40
  'all?', 'any?', 'find', 'detect', 'collect', 'map',
41
41
  'find_index', 'flat_map', 'collect_concat', 'group_by',
42
42
  'none?', 'one?'
43
- ].each do |enum_method|
43
+ ]
44
+
45
+ # JRuby 1.7.5+ issue causes a SystemStackError: stack level too deep
46
+ # https://github.com/jruby/jruby/issues/1265
47
+ if RUBY_PLATFORM == "java" and JRUBY_VERSION =~ /1\.7\.[5-8]/
48
+ methods.delete('all?')
49
+ end
50
+
51
+ methods.each do |enum_method|
44
52
  if collection.respond_to?(enum_method)
45
53
  tests("##{enum_method}").succeeds do
46
54
  block_called = false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-maestrodev
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0.20131125111730
4
+ version: 1.18.0.20131126122111
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-25 00:00:00.000000000 Z
12
+ date: 2013-11-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: builder
16
- requirement: &21750480 !ruby/object:Gem::Requirement
16
+ requirement: &17409860 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *21750480
24
+ version_requirements: *17409860
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: excon
27
- requirement: &21748360 !ruby/object:Gem::Requirement
27
+ requirement: &17409260 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.28.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *21748360
35
+ version_requirements: *17409260
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: formatador
38
- requirement: &21746840 !ruby/object:Gem::Requirement
38
+ requirement: &17408760 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.2.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *21746840
46
+ version_requirements: *17408760
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: multi_json
49
- requirement: &21745700 !ruby/object:Gem::Requirement
49
+ requirement: &17408300 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '1.0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *21745700
57
+ version_requirements: *17408300
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: mime-types
60
- requirement: &21756380 !ruby/object:Gem::Requirement
60
+ requirement: &17407900 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *21756380
68
+ version_requirements: *17407900
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: net-scp
71
- requirement: &23216740 !ruby/object:Gem::Requirement
71
+ requirement: &17407360 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '1.1'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *23216740
79
+ version_requirements: *17407360
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: net-ssh
82
- requirement: &23212220 !ruby/object:Gem::Requirement
82
+ requirement: &17406780 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 2.1.3
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *23212220
90
+ version_requirements: *17406780
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: nokogiri
93
- requirement: &23210800 !ruby/object:Gem::Requirement
93
+ requirement: &17406300 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '1.5'
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *23210800
101
+ version_requirements: *17406300
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: ruby-hmac
104
- requirement: &23210180 !ruby/object:Gem::Requirement
104
+ requirement: &17422280 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *23210180
112
+ version_requirements: *17422280
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: jekyll
115
- requirement: &23236480 !ruby/object:Gem::Requirement
115
+ requirement: &17421780 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *23236480
123
+ version_requirements: *17421780
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: rake
126
- requirement: &23235020 !ruby/object:Gem::Requirement
126
+ requirement: &17421360 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *23235020
134
+ version_requirements: *17421360
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: rbvmomi
137
- requirement: &23233060 !ruby/object:Gem::Requirement
137
+ requirement: &17420940 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: '0'
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *23233060
145
+ version_requirements: *17420940
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: yard
148
- requirement: &23232140 !ruby/object:Gem::Requirement
148
+ requirement: &17420500 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ! '>='
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: '0'
154
154
  type: :development
155
155
  prerelease: false
156
- version_requirements: *23232140
156
+ version_requirements: *17420500
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: thor
159
- requirement: &23230880 !ruby/object:Gem::Requirement
159
+ requirement: &17420060 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ! '>='
@@ -164,10 +164,10 @@ dependencies:
164
164
  version: '0'
165
165
  type: :development
166
166
  prerelease: false
167
- version_requirements: *23230880
167
+ version_requirements: *17420060
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: rspec
170
- requirement: &23228920 !ruby/object:Gem::Requirement
170
+ requirement: &17419540 !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
173
173
  - - ~>
@@ -175,10 +175,10 @@ dependencies:
175
175
  version: 1.3.1
176
176
  type: :development
177
177
  prerelease: false
178
- version_requirements: *23228920
178
+ version_requirements: *17419540
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: rbovirt
181
- requirement: &23249880 !ruby/object:Gem::Requirement
181
+ requirement: &17419000 !ruby/object:Gem::Requirement
182
182
  none: false
183
183
  requirements:
184
184
  - - ! '>='
@@ -186,10 +186,10 @@ dependencies:
186
186
  version: 0.0.11
187
187
  type: :development
188
188
  prerelease: false
189
- version_requirements: *23249880
189
+ version_requirements: *17419000
190
190
  - !ruby/object:Gem::Dependency
191
191
  name: shindo
192
- requirement: &23247580 !ruby/object:Gem::Requirement
192
+ requirement: &17418480 !ruby/object:Gem::Requirement
193
193
  none: false
194
194
  requirements:
195
195
  - - ~>
@@ -197,10 +197,10 @@ dependencies:
197
197
  version: 0.3.4
198
198
  type: :development
199
199
  prerelease: false
200
- version_requirements: *23247580
200
+ version_requirements: *17418480
201
201
  - !ruby/object:Gem::Dependency
202
202
  name: fission
203
- requirement: &23258940 !ruby/object:Gem::Requirement
203
+ requirement: &17418100 !ruby/object:Gem::Requirement
204
204
  none: false
205
205
  requirements:
206
206
  - - ! '>='
@@ -208,10 +208,10 @@ dependencies:
208
208
  version: '0'
209
209
  type: :development
210
210
  prerelease: false
211
- version_requirements: *23258940
211
+ version_requirements: *17418100
212
212
  - !ruby/object:Gem::Dependency
213
213
  name: pry
214
- requirement: &23257480 !ruby/object:Gem::Requirement
214
+ requirement: &17417620 !ruby/object:Gem::Requirement
215
215
  none: false
216
216
  requirements:
217
217
  - - ! '>='
@@ -219,10 +219,10 @@ dependencies:
219
219
  version: '0'
220
220
  type: :development
221
221
  prerelease: false
222
- version_requirements: *23257480
222
+ version_requirements: *17417620
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: google-api-client
225
- requirement: &23255180 !ruby/object:Gem::Requirement
225
+ requirement: &17417100 !ruby/object:Gem::Requirement
226
226
  none: false
227
227
  requirements:
228
228
  - - ~>
@@ -230,10 +230,10 @@ dependencies:
230
230
  version: 0.6.2
231
231
  type: :development
232
232
  prerelease: false
233
- version_requirements: *23255180
233
+ version_requirements: *17417100
234
234
  - !ruby/object:Gem::Dependency
235
235
  name: unf
236
- requirement: &23291080 !ruby/object:Gem::Requirement
236
+ requirement: &17416680 !ruby/object:Gem::Requirement
237
237
  none: false
238
238
  requirements:
239
239
  - - ! '>='
@@ -241,7 +241,7 @@ dependencies:
241
241
  version: '0'
242
242
  type: :development
243
243
  prerelease: false
244
- version_requirements: *23291080
244
+ version_requirements: *17416680
245
245
  description: The Ruby cloud services library. Supports all major cloud providers including
246
246
  AWS, Rackspace, Linode, Blue Box, StormOnDemand, and many others. Full support for
247
247
  most AWS services including EC2, S3, CloudWatch, SimpleDB, ELB, and RDS.
@@ -5354,7 +5354,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
5354
5354
  version: '0'
5355
5355
  segments:
5356
5356
  - 0
5357
- hash: 2767433852425085725
5357
+ hash: -4541569326546230128
5358
5358
  required_rubygems_version: !ruby/object:Gem::Requirement
5359
5359
  none: false
5360
5360
  requirements: